Re: [xml] Entity Rference replacement problem in Canonical module



On Thu, Jun 30, 2005 at 04:45:14AM -0700, gopabandhu patra wrote:
Hello Sir,
 
I've a doubt that
We are very sure that Canonical module takes a Document pointer as an input which can be get after parsing 
of XML document. Now the doubt is If user has not set below value before parsing
    xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
    xmlSubstituteEntitiesDefault(1); 
 
The Parser will not replace the Entity reference. The Canonical module is returning the error in this case. 
But As per the specification,  Character and parsed entity references are replaced with the literal 
characters (excepting special characters).
[...]
Can you say me what might be the solution?.

  You should not use xmlLoadExtDtdDefaultValue and
xmlSubstituteEntitiesDefault() as they affect the library globally. You should
use the new parser APIs xmlReadxxx and set 
  the option value to 
    XML_PARSE_DTDATTR | XML_PARSE_NOENT

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team 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]