Beispiel #1
0
 public void Reset(string name, XmlNodeType nt, string value)
 {
     this.Value            = value;
     this.Name             = name;
     this.NodeType         = nt;
     this.Space            = XmlSpace.None;
     this.XmlLang          = null;
     this.IsEmpty          = true;
     this.attributes.Count = 0;
     this.DtdType          = null;
 }
Beispiel #2
0
        void ParseAttList()
        {
            char ch = this.current.SkipWhitespace();

            string[] names   = ParseNameGroup(ch, true);
            AttList  attlist = new AttList();

            ParseAttList(attlist, '>');
            foreach (string name in names)
            {
                ElementDecl e = (ElementDecl)this.elements[name];
                if (e == null)
                {
                    this.current.Error("ATTLIST references undefined ELEMENT {0}", name);
                }
                e.AddAttDefs(attlist);
            }
        }
Beispiel #3
0
        public bool CanContain(string name, SgmlDtd dtd)
        {
            foreach (object obj in Members)
            {
                if (obj is String)
                {
                    if (obj == (object)name)
                    {
                        return(true);
                    }
                }
            }

            foreach (object obj in Members)
            {
                if (obj is String)
                {
                    string      s = (string)obj;
                    ElementDecl e = dtd.FindElement(s);
                    if (e != null)
                    {
                        if (e.StartTagOptional)
                        {
                            if (e.CanContain(name, dtd))
                            {
                                return(true);
                            }
                        }
                    }
                }
                else
                {
                    Group m = (Group)obj;
                    if (m.CanContain(name, dtd))
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
Beispiel #4
0
 public void Reset(string name, XmlNodeType nt, string value)
 {
     this.Value = value;
     this.Name = name;
     this.NodeType = nt;
     this.Space = XmlSpace.None;
     this.XmlLang = null;
     this.IsEmpty = true;
     this.attributes.Count = 0;
     this.DtdType = null;
 }