Beispiel #1
0
        void ParseAttList(AttList list, char term)
        {
            char ch = this.current.SkipWhitespace();

            while (ch != term)
            {
                if (ch == '%')
                {
                    Entity e = ParseParameterEntity(SgmlDtd.peterm);
                    PushEntity(this.current.ResolvedUri, e);
                    ParseAttList(list, Entity.EOF);
                    PopEntity();
                    ch = this.current.SkipWhitespace();
                }
                else if (ch == '-')
                {
                    ch = ParseDeclComments();
                }
                else
                {
                    AttDef a = ParseAttDef(ch);
                    list.Add(a);
                }
                ch = this.current.SkipWhitespace();
            }
        }
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
 void ParseAttList(AttList list, char term)
 {
     char ch = this.current.SkipWhitespace();
     while (ch != term)
     {
         if (ch == '%')
         {
             Entity e = ParseParameterEntity(SgmlDtd.peterm);
             PushEntity(this.current.ResolvedUri, e);
             ParseAttList(list, Entity.EOF);
             PopEntity();
             ch = this.current.SkipWhitespace();
         }
         else if (ch == '-')
         {
             ch = ParseDeclComments();
         }
         else
         {
             AttDef a = ParseAttDef(ch);
             list.Add(a);
         }
         ch = this.current.SkipWhitespace();
     }
 }
Beispiel #4
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);
     }
 }