At 15:35 08.01.2003, Pawel wrote:
Hello,

libxml (tested with 2.4.30) creates these additional nodes when parsing
documents with xincludes: XML_XINCLUDE_START and XML_XINCLUDE_END.
PHP has no support for these nodes and chokes when it encounters them,
therefore walking the xml tree after issuing $doc->xinclude() fails.

The only work-around I could come up with is:
$doc = domxml_open_mem($doc->dump_mem())
which gets rid of the XML_XINCLUDE_START and XML_XINCLUDE_END nodes

The problem comes up when you have entities in the xincluded document,
which don't get substituted.
This short patch substitutes any entity references you might have in the
xincluded document.
Why not check for XML_XINCLUDE_START and XML_XINCLUDE_END or
the libxml version in configure and make the necessary changes to the .c
file?

marcus


--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to