Hi, The following well-formed xml snippet returns a well-formedness error on libxml (version 28). <?xml version='1.0'?> <!DOCTYPE test [ <!ELEMENT test (#PCDATA) > <!ENTITY % xx '%zz;'> <!ENTITY % zz '<!ENTITY tricky \"error-prone\" >' > %xx; ]> <test>This sample shows a &tricky; method.</test>
The error is that it is unable to locate the declaration for %xx. Ideally %xx should be replaced by <!ENTITY tricky "error-prone">. However as soon as it gets to %xx, it invokes the getParameterEntity callback, are we supposed to write code in the callback to get the replacement text, in my case I have not written any code for the function, so it returns a NULL pointer. I mean my doubt is, suppose we don’t do that, then should it be returning a well-formedness error?
|