On Fri, Oct 28, 2005 at 10:19:38AM -0700, Jain, Nilesh wrote:
> >-----Original Message-----
> >From: Daniel Veillard [mailto:[EMAIL PROTECTED]
> >  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
> 
> After reading above link, seems to me that CDATA tag is used to drive
> parsing what to do in such cases.
  
  We disagree on the reading of the spec or I don't understand your sentence.

> When I looked at the test cases,
> parsing routing is adding CDATA tag internally if some entity is defined
> inside javascript. Why parser is adding tag? 

  The parser is adding the tag to avoid problem with escaping at the XML
level and the script content.

> >  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.
> 
> I traced the code for SAX test cases, the output change is see is
> because of new callback parser is giving in case of
> XML_WAR_UNDECLARED_ENTITY. Could you help me understand what action
> application can take on this callback. 

  They need to register the entities content, provide it back when 
asked for it in a separate callback type. 
  See the warning at the end of http://xmlsoft.org/entities.html

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to