my question about ssi in xsl again
thanks for your answer. sorry if i wasn't that clear. my problem is. i run open the php file
in my web browser. the php file takes the xml
and xsl below and processes them, and shows me
what i need in the web browser. my only problem
is, in the msc.xsl the , or if I put <?php include("file.txt"); ?>, doesn't get included by the server. i just get the
page i want, with a comment or nothing if i use the
php include. i'm wondering if there is a way to
use the php script below to process my xml and xsl
files, and then after that, process my ssi or php
includes. I put samples of my files below.
Thanks again,
--- msc.php -----------------------------------
<?php
$processor = xslt_create();
$result = xslt_process($processor, 'htdocs/msc.xml', 'htdocs/msc.xsl');
if(!$result) echo xslt_error($processor);
xslt_free($processor);
echo $result;
?>
-----------------------------------------------
--- msc.xml -----------------------------------
<msc>
<subject key="01" value="something here">
<class key="01A" value="something here">
<topic key="01A35" value="something here"/>
</class>
</subject>
</msc>
-----------------------------------------------
--- msc.xsl -----------------------------------
<xsl:stylesheet version = '1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method="xml" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
<xsl:template match="msc">
<html>
<head>
<title></title>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template name="subject" match="subject">
<h2 class="hpadding">
<xsl:value-of select="@key"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="@value"/>
</h2>
<xsl:call-template name="class"/>
<xsl:apply-templates/>
</xsl:template>
<xsl:template name="class">
<p class="ppadding">
<xsl:for-each select="class">
<xsl:value-of select="@key"/>
<xsl:text>: </xsl:text><span style="color:maroon;">
<xsl:value-of select="@value"/></span>
</xsl:for-each>
</p>
</xsl:template>
</xsl:stylesheet>
------------------------------------------------
__________________
Weldon
|