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

RE: Returning an element's position number

Subject: RE: Returning an element's position number
From: "Cindy Hunt" <Cindy.Hunt@xxxxxxx>
Date: Thu, 16 Feb 2006 11:07:34 -0500
so number
Thanks so much - that did the trick!

Cindy Hunt


-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Thursday, February 16, 2006 10:21 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Returning an element's position number


see the recent thread (with the rather unhelpful tile "Re:  Stumped on
XPath")

  The trick with doing cross references in XSLT is always generate the
  reference text _at the referenced node_ not on the referencing node.
  then you can easily get the same number in the reference and in the
  referenced heading. (Often by just calling a named template or special
  mode that just does the numbering.


so just have
<xsl:key name="l" match="legend" use="@id"/> then on your reference element do
<xsl:for-each select="key('l',@link)">
                         <xsl:number/>
</xsl:for-each<

so that you generate the number on the <legend element even though it is
output at the point of the reference.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The service is powered
by MessageLabs. For more information on a proactive anti-virus service working
around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.