OK there might be an obvious answer to this, but I'm a Java and C programmer really, so this is slightly unfamiliar. Anyway here goes...
I am developing a CMS where the data is held in a database and the page structure is held in an XSL sheet. I transform the XSL with PHP to get some HTML which is printed out with WYSIWYG editors added for editing in the CMS. Publishing pages works in the same way, but without adding the editors, and the HTML is written to a file rather than printed in the CMS page.
//cms stuff
$HTML = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments, $parameters);
//...
echo $HTML;
//cms stuff
No problem with that, but, what if the XSL contains something like this?
<![CDATA[<?php include 'left_nav.php'; ?>]]>
When published to a file, this works fine, because the PHP is processed when the page is loaded, but when printing to the CMS page it simply writes...
<?php include 'left_nav.php'; ?>
...literally, without processing it.
Is there any way I can reprocess the $HTML variable so the include is actually included in the CMS page?
I am developing a CMS where the data is held in a database and the page structure is held in an XSL sheet. I transform the XSL with PHP to get some HTML which is printed out with WYSIWYG editors added for editing in the CMS. Publishing pages works in the same way, but without adding the editors, and the HTML is written to a file rather than printed in the CMS page.
//cms stuff
$HTML = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments, $parameters);
//...
echo $HTML;
//cms stuff
No problem with that, but, what if the XSL contains something like this?
<![CDATA[<?php include 'left_nav.php'; ?>]]>
When published to a file, this works fine, because the PHP is processed when the page is loaded, but when printing to the CMS page it simply writes...
<?php include 'left_nav.php'; ?>
...literally, without processing it.
Is there any way I can reprocess the $HTML variable so the include is actually included in the CMS page?