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

RE: RE: RE: RE: Unexpected results when creating an SV

Subject: RE: RE: RE: RE: Unexpected results when creating an SVG pie chart
From: cknell@xxxxxxxxxx
Date: Mon, 07 Jun 2004 14:42:12 -0400
sv resultes
Yes, I see what you mean. In fact I think I realized that and made mention in an earlier message on this thread you may have missed. This difference can be illustrated if we change the SITES template so it looks like this.

  <xsl:template match="SITES">
    <xsl:for-each select="SITE">
      <position><xsl:value-of select="position()" /></position>
      <xsl:apply-templates select="."/>
    </xsl:for-each>
  </xsl:template>

The difference is a subtle one and I may still confuse it from time to time.
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     Josh Canfield <Josh.Canfield@xxxxxxxxxxxx>
Sent:     Mon, 7 Jun 2004 11:31:55 -0700
To:       <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject:  RE: RE: RE:  Unexpected results when creating an SVG pie chart

This is a different problem, unrelated to how for-each works. You are setting the context list to a single node when you call apply-templates, the original poster was not, position() was being called from within the for-each element.

Josh

-----Original Message-----
From: cknell@xxxxxxxxxx [mailto:cknell@xxxxxxxxxx]
Sent: Monday, June 07, 2004 11:17 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: RE: RE:  Unexpected results when creating an SVG pie
chart


Make this small change to the stylesheet below, run it against the original XML document, and tell me what value is selected for the style attribute.

Change this:
 <xsl:template match="SITES">
    <xsl:apply-templates select="SITE"/>
  </xsl:template>


To this:
  <xsl:template match="SITES">
    <xsl:for-each select="SITE">
      <xsl:apply-templates select="."/>
    </xsl:for-each>
  </xsl:template>

Make this small change to the XSLT below and run it against the original XML. Tell me what value you get for the style attribute.

-- 
Charles Knell
cknell@xxxxxxxxxx - email




--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
--+--




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.