pupito
May 16th, 2007, 04:23 PM
Please move to the XML forum.
It's possible avoid that transformNode begins the output string with <?xml version='1.0'?>
For example:
XML content:
<?xml version="1.0"?>
<Lista>
<Pelicula>
<Id>100</Id>
<Titulo>12 Monos</Titulo>
</Pelicula>
<Pelicula>
<Id>101</Id>
<Titulo>La nave de la muerte</Titulo>
</Pelicula>
</Lista>
XSL Content:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="Lista/Pelicula">
<xsl:value-of select="format-number(number(Id),'000000')"/>
<xsl:value-of select="Titulo"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
The result of the transformation is:
<?xml version='1.0'?>00010012 Monos000101La nave de la muerte...
I expects:
00010012 Monos000101La nave de la muerte...
Is this possible?
Thanks
It's possible avoid that transformNode begins the output string with <?xml version='1.0'?>
For example:
XML content:
<?xml version="1.0"?>
<Lista>
<Pelicula>
<Id>100</Id>
<Titulo>12 Monos</Titulo>
</Pelicula>
<Pelicula>
<Id>101</Id>
<Titulo>La nave de la muerte</Titulo>
</Pelicula>
</Lista>
XSL Content:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="Lista/Pelicula">
<xsl:value-of select="format-number(number(Id),'000000')"/>
<xsl:value-of select="Titulo"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
The result of the transformation is:
<?xml version='1.0'?>00010012 Monos000101La nave de la muerte...
I expects:
00010012 Monos000101La nave de la muerte...
Is this possible?
Thanks