Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Does anyone know why this transformation doesn't work with the current xsl namespace? >Thread Next - Re: Does anyone know why this transformation doesn't work with the current xsl namespace? Re: Does anyone know why this transformation doesn't work with the current xsl namespace?To: NULL Date: 7/26/2008 9:45:00 AM "CK" <c_kettenbach@h...> wrote in message news:hHnik.5779$np7.5361@f...... > 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 http://www.w3.org/TR/WD-xsl is an older namespace for XSLPattern, an obsolete transformation technology that Microsoft invented before the current XSLT was finalised. It's very different to XSLT. That being said I don't see anything terribly wrong with the actual transform although XSLPattern treated namespaced elements differently and I suspect your XML uses these. Take a look at http://www.dpawson.co.uk/xsl/sect2/N5536.html especially numbers 13 and 23 and if that doesn't help show the XML you're trying to transform. -- Joe Fawcett (MVP - XML) http://joe.fawcett.name | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
