|
Hi, For the attached files the parameter entity inside the CDATA block is not getting replaced. Ideally after replacement the CDATA content should be <!ATTLIST root attr1 NMTOKEN "attrvalue">, however the PE entity replacement is going wrong and the content is being returned as NULL. The problem occurs at line 2314 in parser.c, there is a function call to xmlParseStringPEReference, for the PE inside the Cdata block, which in turn calls the xmlGetParameterEntity, and then does a hashlookup, from the xmlGetEntityFromTable function. However the entity pointer returned contains the content as Empty instead of <!ATTLIST root attr1 NMTOKEN "attrvalue">. I think the content should not be empty, its probably happening because somehow the parser is not able to read the entity content in external2.ent….
Regards Ashwin
|
<!DOCTYPE root SYSTEM "external.ent"> <root>&peInCdata;</root>
<!ELEMENT root (#PCDATA)> <!ENTITY % peInCdata SYSTEM "external2.ent"> <!ENTITY peInCdata "<![CDATA[%peInCdata;]]>">
<!ATTLIST root attr1 NMTOKEN "attrvalue">