Re: [xml] xhtml1 test case



On Tue, Oct 25, 2005 at 03:08:52PM -0700, Jain, Nilesh wrote:

Question related to xhtml1 test case. In 2.6.20 the parse output
contains <![CDATA[ tag under <script type="text/javascript"> tag, but in
2.6.22 it doesn't output <![CDATA[ tag, could you help me understand the
reason? 

  Because it's a suggestion to do that CDATA escaping in the XHTML1
W3C REC but in some case it is not needed and to avoid nasty interop
problem with IE that escaping is dropped when not needed:
   http://www.w3.org/TR/xhtml1/#h-4.8

Where as just before that it says "SAX.error: Entity 'title' not
defined" though ent2 test file has &title defined. Why is so?

  Because in libxml2 to use SAX you need to maintain the entity dictionnary
and provide sax->getEntity which an empty SAX handler like the one used by
xmllint SAX tester doesn't do.

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]