test.xml
<results>
<match>
<count>1</count>
<name>:PHatCat</name>
<link>http://freshmeat.net/projects/phatcat/</link>
<description>A PHP CueCat Decoder.</description>
<date>Oct 9th 2000</date>
<category>Web/Applications</category>
<license>GPL</license>
</match>
<match>
<count>2</count>
<name>About Me</name>
<link>http://freshmeat.net/projects/aboutme/</link>
<description>A system for recording/sharing preferences</description>
<date>Apr 18th 2000</date>
<category>Web/Tools</category>
<license>GPL</license>
</match>
</results>
test.xsl
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" encoding="utf-8" />
<xsl:template match="/results">
<html><head><title>XSLT Freshmeat Demo</title></head>
<body bgcolor="#FFFFFF">
<table>
<xsl:call-template name="matches"/>
</table>
</body></html>
</xsl:template>
<xsl:template name="matches">
<xsl:for-each select="match">
<tr>
<td><xsl:value-of select="count"/></td>
<td><a href="{link}"><xsl:value-of select="name"/></a></td>
<td><xsl:value-of select="description"/></td>
<td><xsl:value-of select="date"/></td>
<td><xsl:value-of select="license"/></td>
</tr>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
test.php
<?php
$parser = xslt_create();
xslt_run($parser, './test.xsl', './test.xml');
echo xslt_fetch_result($parser);
xslt_free($parser);
?>
Fatal error: msgtype: error in
/home/httpd/vhosts/mediawaveonline/test/xslt.php on line 4
I am *very* new to both xml and xsl but this interests me greatly, please
help if you could.
--
Chris Lee
Mediawaveonline.com
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]