예제 #1
0
 public override void Read(Tokeniser t, CharacterReader r)
 {
     if (r.MatchConsume("--"))
     {
         t.CreateCommentPending();
         t.Transition(CommentStart);
     }
     else if (r.MatchConsumeIgnoreCase("DOCTYPE"))
     {
         t.Transition(Doctype);
     }
     else if (r.MatchConsume("[CDATA["))
     {
         // TODO: should actually check current namepspace, and only non-html allows cdata. until namespace
         // is implemented properly, keep handling as cdata (HtmlCDataSection)
         //} else if (!t.currentNodeInHtmlNS() && r.matchConsume("[CDATA[")) {
         t.Transition(CdataSection);
     }
     else
     {
         t.Error(this);
         t.AdvanceTransition(BogusComment); // advance so this char gets in bogus comment data's rewind
     }
 }