OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   SAX2: about LexicalHandler interface comment() method.

[ Lists Home | Date Index | Thread Index ]
  • From: KAZUMI Saito <ksaito@flab.fujitsu.co.jp>
  • To: xml-dev@xml.org
  • Date: Thu, 30 Mar 2000 12:36:26 +0900


The comment() method reports the Comments as a char[] not a String.  It is similar
to the characters() or ignoreWhitespace(). 

Some of the SAX2 parsers report content of single element by multiple characters().

 ex) <elem>ABC
     DEF</elem>

    ==> characters( "ABC\n", ?, 4);
        characters( "DEF", ?, 3);

I think it is good for parsing performance. When use same technique for reporting
comments, following problem is expected.

 After comment() was called twice, the application will not be able to discriminate
 ex2 from ex1.

 ex1) <!--ABC
      DEF-->

    ==> comment( "ABC\n", ?, 4);
        comment( "DEF", ?, 3);

 ex2) <!--ABC
      -->
      <!--DEF-->

    ==> comment( "ABC\n", ?, 4);
        comment( "DEF", ?, 3);

I want to discriminate those, but since the SAX aims to be _simple_, sush
things is not siginificant?

-----
 KAZUMI Saito  FUJITSU Laboratories Ltd.


***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS