dazza12345
Programmer
Hi all, any idea why the following xslt file will be causing the following error:
Warning: Sablotron error on line 1: XML parser error 2: syntax error in /home/fhlinux203/b/bewisebets.co.uk/user/htdocs/bewisepoker/2/example1.php on line 7
The XSLT processor failed [2]: XML parser error 2: syntax error
example1.php
example.xslt
Cheers
Warning: Sablotron error on line 1: XML parser error 2: syntax error in /home/fhlinux203/b/bewisebets.co.uk/user/htdocs/bewisepoker/2/example1.php on line 7
The XSLT processor failed [2]: XML parser error 2: syntax error
example1.php
Code:
<?php
// Create a XSLT Processor
// "$xsltproc" is the XSLT processor resource.
$xsltproc = xslt_create();
// Processing the two files
$result = xslt_process( $xsltproc, '[URL unfurl="true"]http://www.pacificpoker.com/PokerTourInfo',[/URL] 'example.xslt' );
// If we have a result then display the contents?
// If not then die and display the error information
if( $result ) {
echo "$result";
} else {
die( sprintf(
"The XSLT processor failed [%d]: %s",
xslt_errno( $xsltproc ),
xslt_error( $xsltproc ) )
);
}
// Free up the XSLT Processor
xslt_free( $xsltproc );
?>
Code:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform">[/URL]
<xsl:output method="html" version="1.0" indent="yes"/>
<xsl:param name="date" select="2006"/>
<xsl:template match="/Tournament">
<html>
<head>
<title>Tournoment Details</title>
</head>
<body>
<table>
<tr>
<td>Tournament ID:</td>
<td><xsl:value-of select="Tournament-ID" /></td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>