All,
Been able to install PHP 4.1 and Sablotron 0.71 binaries on windows XP platform.
Noticed that xsl_set_encoding documented on http://uk.php.net/manual/en/ref.xslt.php page is not available.
Think this is not behind my problem.
Have run into a 'trivial' problem which despite considerable RTFM (Read The F.. Manual for the uninitiated) I have been unable to resolve.
Have following minimal php script
<?php
$html = '';
$xh = xslt_create();
$html = xslt_process($xh,'./pag.xml','./pag.xsl');
xslt_free($xh);
echo $html;
?>
Call this XML script:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE BOOK [
<!ELEMENT BOOK (AUTHOR)>
<!ELEMENT AUTHOR (#PCDATA)>
]>
<BOOK>
<AUTHOR>Me</AUTHOR>
</BOOK
Using this stylesheet:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:value-of />
</xsl:template>
</xsl:stylesheet>
Now Internet Explorer is quite happy with the validity of the XML and XSL scripts.
So why is PHP throwing up the error message:
Warning: Sablotron error on line 4: missing required XSLT attribute in c:\inetpub\wwwroot\xml\script\pag.php on line 6
Why, oh why,
Any suggestions please ...
Thanks,
Jef