Hi all
I've got a problem with execute the php code embeded in xsl stylesheet. I use xampp with PHP 5 on Fedora Core with xsl. Below is the code, which I cut a litle bit:
xml:
HTML Code:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="main.xsl"?>
<document>
	<headSection></headSection>
	<bodySection>
		<!-- TOP START -->
		<top>
			<topMenu>
				<item>
					<linkTitle>wojciech weiss</linkTitle>
					<link>?page=weiss</link>
				</item>
<!-- HERE is the rest of content -->
		<!-- FOOTER START -->
		<footer>Copyright  2007 Fundacja Wojciecha Weissa. All rights reserved</footer>
		<!-- FOOTER END -->
	</bodySection>
</document>
xsl:
HTML Code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes" doctype-public="-//W3C/DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
<xsl:template match="document">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
	<head>
		<title>Fundacja Wojciecha Weissa</title>

			@import url("cSs/main.css");
		</style>
	</head>
	<body>
		<div id="container">
			<div id="top">
				<!-- HERE I'M TRYING to embed PHP CODE-->
				<div id="main-content"><xsl:processing-instruction name="php">echo 'php';</xsl:processing-instruction></div>
				
	</body>
</html>
</xsl:template>
</xsl:stylesheet>
and index.php code:
PHP Code:
<?php
$xml
=new DOMDocument;
$xml->load('xMl/main.xml');
$xsl=new DOMDocument;
$xsl->load('xSl/main.xsl');
$proc=new XSLTProcessor;
$proc->importStylesheet($xsl);
echo 
$proc->transformToXML($xml);
?>
the xml and xsl is validating well but the php is not executed. Im not shure what is the problem... Im geting the page in my browser and when Im piping the source I've get:
HTML Code:
<div id="main-content"><?php echo 'php'; ?></div>
Im real stack about it... So one more thing, I can't use sablotron couse my hosting doesn't support this extension.
Please, tell me what I'm doing wrong and how to resolve the problem...
Thanks for any goals!