[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Help XSL Transformation of Data

Subject: Re: Help XSL Transformation of Data
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Mon, 28 Sep 2009 17:31:56 +0200
Re:  Help XSL Transformation of Data
Rajesh Jain wrote:

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.

We need to see the complete code of the stylesheet you use, if the XML parsing error occurs in that stylesheet.


If the code below is your complete stylesheet then you have certainly removed essential elements like the xsl:stylesheet element and of course also the xsl:template.

<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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.