Hello group,
I am having problems to transform xml document with xslt_process().
This is my code:
<?php
$xh = xslt_create();
$result = xslt_process($xh, 'file://test.xml', 'file://test.xsl');
if ($result)
echo $result;
xslt_free($xh);
?>
test.xml:
<?xml version="1.0" encoding="iso-8859-1"?>
<root>
<person>
<name>Peter Billen</name>
<age>16</age>
</person>
</root>
test.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="test2.xsl"/>
</xsl:stylesheet>
test2.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="bla">
DUMMY
</xsl:template>
</xsl:stylesheet>
It gives the following error:
Warning: Sablotron error on line 3: cannot open file 'test.xsl/test2.xsl' in
E:\htdocs\test.php on line 5
So I believe the <xsl:include> in test.xsl is not working properly. If I
remove that line (so I don't use test2.xsl), it works perfect, it prints out
Peter Billen 16 (it uses the built-in rules).
And my second question is: why is the home path of the XSLT parser
c:\program files\apache\bin and not the www-home directory I set in
httpd.conf (e:\htdocs in my case)
Thanks all,
--
Peter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php