[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 19:32:00 +0200
Re:  Help XSL Transformation of Data
Rajesh Jain wrote:

<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

Is there any reason that you have version="1.1"?


<!-- ================================================================== -->
<!-- ==== G L O B A L   P A R A M E T E R S =========================== -->
<!-- ================================================================== -->

<xsl:param name="skin.images" />
<xsl:param name="webapp" />


<!-- ================================================================== --> <!-- ==== TEMPLATE: chart-data-xml ==================================== --> <!-- ================================================================== --> <xsl:template name="chart-data-xml">


<xsl:variable name="color"> <xsl:choose> <xsl:when test="/page/HttpRequest/Parameters/@Color!=''"><xsl:value-of select="/page/HttpRequest/Parameters/@Color"/></xsl:when> <xsl:otherwise>5555ff</xsl:otherwise> </xsl:choose> </xsl:variable>

  <xsl:variable name="skip" select="count(Chart-Data/Root/Item[position()=1]/Statistics/Item) div 4"/>
  <xsl:variable name="chartids">
    <xsl:for-each select="Chart-Data/Root/Item">
      <xsl:value-of select="@ID"/><xsl:text>,</xsl:text>
    </xsl:for-each>
  </xsl:variable>



  <!-- ================================================================== -->
  <!-- Chart Data ======================================================= -->
  <!-- ================================================================== -->
    <xsl:output indent="yes"/>

xsl:output has to be a top level element (child of xsl:stylesheet).


<xsl:apply-templates select="Chart-Data"/>

<xsl:key name="k1" match="Metrics/*" use="local-name()"/>

xsl:key has to be a top level element as well.



<xsl:template match="Chart-Data">

You can't nest templates so you need to move this xsl:template out of the outer xsl:template.





--


	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.