[xml] Incorrect WFC error returned


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 '&#37;zz;'>

<!ENTITY % zz '&#60;!ENTITY tricky \"error-prone\" >' >



<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?


Thanks & Regards









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