In my XSLT file. I use the document() function
<xsl:variable name="Publicity" select="document('./publicity.xml')" />
and that works but if I try to link a PHP script that generate the XML dynamically,
<xsl:variable name="Publicity" select="document('./publicity.php')" />
I get a
Warning: XSLTProcessor::transformToXml() [xsltprocessor.transformtoxml]: file:///C:/wamp/www/XSLT/test.php:3: parser error : Start tag expected, '<' not found in ... on line ...
Which consist of the < from <?php
It looks like the XSLTProcessor isn't requesting the file like via a HTTP request so it's not executed by Apache / PHP.
I know I could simply include that XML structure to my main XML but I'm trying to avoid this... until someone tell me there is no other way.
Thank you!
XMLfile usingdocument()its working but if I usedocument()to access aPHPscript (PHP can generate XML fyi) I get an error. Bill said thedocument()reads the file off the disk so thePHPisn't executed so I get an error. I guess there is no way to get this done really.