Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Does anyone know why this transformation doesn't work with the current xsl namespace? Does anyone know why this transformation doesn't work with the current xsl namespace?To: NULL Date: 7/25/2008 10:01:00 AM
This works with the old namespace just fine.
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match='/'>
<div>
<xsl:apply-templates
select='ArrayOfString'></xsl:apply-templates>
</div>
</xsl:template>
<xsl:template match='ArrayOfString'>
<xsl:apply-templates select='string'></xsl:apply-templates>
</xsl:template>
<xsl:template match='string'>
<div>
<span><xsl:value-of select="."/></span>
</div>
</xsl:template>
</xsl:stylesheet>
but when I use the current namespace
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match='/'>
<div>
<xsl:apply-templates
select='ArrayOfString'></xsl:apply-templates>
</div>
</xsl:template>
<xsl:template match='ArrayOfString'>
<xsl:apply-templates select='string'></xsl:apply-templates>
</xsl:template>
<xsl:template match='string'>
<div>
<span><xsl:value-of select="."/></span>
</div>
</xsl:template>
</xsl:stylesheet>
the output fails and just gives me the processor instruction and one div
tag.
<?xml version="1.0" encoding="UTF-16"?><div></div>
Am I doing something wrong? Any ideas how to make it work with the current
namespace?
Thanks,
~CK
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
