Subject: Re: [xsl] Help XSL Transformation of Data From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Mon, 28 Sep 2009 17:31:56 +0200 |
I am using the code snippet you provided, along with the row to output the time. But this doesn't seem to work. The only thing I changed was to remove the template definition and added Chart-Data before Root.
I get an error XML Parsing Error: no element found
I am complete newbie, so please let me know if I have to use template definition and how to use it.
<xsl:key name="k1" match="Metrics/*" use="local-name()"/>
<chart_data> <!-- Category (X axis) date row --> <row> <null/>
<xsl:for-each select="Chart-Data/Root/Item[position()=1]/Statistics/Item">
<string><xsl:value-of select="@StartRawDateAndTime"/></string>
</xsl:for-each>
</row>
<xsl:for-each select="Chart-Data/Root/Item/Statistics/Item[1]/Metrics/*">
<row>
<string><xsl:value-of select="local-name()"/></string>
<xsl:for-each select="key('k1', local-name())">
<number><xsl:value-of select="number(@TotalValue)"/></number>
</xsl:for-each>
</row>
</xsl:for-each>
</chart_data>
Martin Honnen http://msmvps.com/blogs/martin_honnen/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Help XSL Transformation o, Rajesh Jain | Thread | Re: [xsl] Help XSL Transformation o, Rajesh Jain |
Re: [xsl] Help XSL Transformation o, Rajesh Jain | Date | Re: [xsl] Use of xsl:apply-template, Wendell Piez |
Month |