[xslt] xmlns and error message



Hi, the additional space in your version number in the xsl file is the reason of your message:

should be version="1.0" instead of version="1.0 "

regards,

Jean Senellart

Hubert Carvallo writes:
 > Hello,
 > 
 > I'm using libxslt 1.0.23 with PHP 4.3 to transform an XML file (export 
 > from FileMaker) to HTML
 > 
 > Here is the XML (output.xml)
 > 
 > <?xml version="1.0" encoding="UTF-8" ?>
 > <FMPDSORESULT xmlns="http://www.filemaker.com/fmpdsoresult";>
 > <ERRORCODE>0</ERRORCODE>
 > <DATABASE>fmp_test2.fp5</DATABASE>
 > <LAYOUT>standard</LAYOUT>
 > <ROW MODID="0" RECORDID="1">
 > <Nom>Carvallo</Nom>
 > <Prenom>Hubert</Prenom>
 > </ROW>
 > <ROW MODID="0" RECORDID="2">
 > <Nom>Veillard</Nom>
 > <Prenom>Daniel</Prenom>
 > </ROW>
 > <ROW MODID="0" RECORDID="3">
 > <Nom>Meunier</Nom>
 > <Prenom>Olivier</Prenom>
 > </ROW>
 > </FMPDSORESULT>
 > 
 > Here is the XSL (convert.xsl)
 > 
 > <?xml version="1.0" encoding="iso-8859-1"?>
 > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
 > version="1.0 "
 > xmlns:fm="http://www.filemaker.com/fmpdsoresult";>
 > <xsl:output method="html" omit-xml-declaration="yes" 
 > encoding="iso-8859-1" indent="yes" version="4.0" media-type="text/html; 
 > charset=iso-8859-1"/>
 > 
 > <xsl:template match="fm:FMPDSORESULT">
 > <html>
 > <head>
 > </head>
 > <body bgcolor="#FFFFFF" text="#000000">
 > <div align="center">
 > 	<xsl:apply-templates select="fm:ROW"/>
 > </div>
 > </body>
 > </html>
 > </xsl:template>
 > 	<xsl:template match="fm:ROW">
 > 		<xsl:value-of select="fm:Prenom" />
 > 		<xsl:text> </xsl:text>
 > 		<xsl:value-of select="fm:Nom" />
 > 		<br/>
 > 	</xsl:template>
 > </xsl:stylesheet>
 > 
 > Here is the PHP script (taken from http://www.neokraft.net)
 > 
 > <?php
 > $xsltproc = '/usr/bin/xsltproc';
 > 
 > $cmd = $xsltproc.' convert.xsl output.xml 2>&1';
 > exec($cmd,$array_res);
 > echo implode("\n",$array_res);
 > ?>
 > 
 > And here is the output with the error message (given by  2>&1)
 > 
 > compilation error: file convert.xsl line 2 element stylesheet 
 > xsl:version: only 1.0 features are supported
 > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
 > "http://www.w3.org/TR/html4 loose.dtd">
 > <html>
 > <head><meta http-equiv="Content-Type" content="text/html; 
 > charset=iso-8859-1"></head>
 > <body bgcolor="#FFFFFF" text="#000000"><div align="center">Hubert 
 > Carvallo<br>Daniel Veillard<br>Olivier Meunier<br>
 > </div></body>
 > </html>
 > 
 > Is there something I must change in the XSL file or is it an issue 
 > solved by upgrading to libxslt 1.0.24?
 > 
 > Thanks in advance
 > 
 > Hubert Carvallo
 > 
 > _______________________________________________
 > xslt mailing list, project page http://xmlsoft.org/XSLT/
 > xslt@gnome.org
 > http://mail.gnome.org/mailman/listinfo/xslt
 > 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]