Hi Everyone,
I am using the PHP XSLT support for Sablotron/Expat.
Problem in short:
Something I run directly through the Sablotron prompt handles entities fine, but running the same files through php just ignores the entities.
In detail. The files are:
test.xml
<!DOCTYPE page [<!ENTITY % HTMLlat1 SYSTEM "entities.ent">%HTMLlat1;]>
<Article>
My name is: &my_name;
</Article>
test.xsl
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="Article">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
entities.ent
<!ENTITY my_name "Jens Schriver">
test.php
<?php
$parser = xslt_create();
xslt_run($parser, 'test.xsl', 'test.xml');
print xslt_fetch_result($parser);
xslt_free($parser);
?>
Procedure:
When I run
% sabcmd test.xsl test.xml > ./output.html
the output.html gives the result I want. No problem.
output.html
<?xml version="1.0" encoding="UTF-8"?>
My name is: Jens Schriver
However, when I run php script, it just ignores the entity. It doesnt give any errors, but output is this:
php browser output:
<?xml version="1.0" encoding="UTF-8"?>
My name is:
Nothing. Just a blanc spot where the entity should have been. This is killing me. ANY ideas will be greatly appreciated.
I am running:
PHP 4.0.8-dev
FreeBSD 4.2
-Jens