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

Re: How to get the number of the father

Subject: Re: How to get the number of the father
From: David_Marston@xxxxxxxxx
Date: Thu, 9 Nov 2000 11:17:52 -0500
xml path get father node
Frederic Schwebel wrote:
>So I need to know in my "template match='section'" if the parent of this
>section is the current section. I think I can achieve it with xsl:number,
>but I don't know how.

It looks to me like you are confusing xsl:number with the generate-id()
function, which is intended to provide a node identification that will be
constant for the duration of the transformation.

Rule of thumb: think of xsl:number as an output tool. If you want to use
it when setting the value of a variable, you should develop instinctive
skepticism about the whole approach. Even if it works in a variable,
there's probably something better. You speculated that count(some-path)
might do the trick, which shows signs of the well-founded skepticism
about xsl:number.

Also consider a select qualifier on the apply-templates, so that you're
only processing "section" children of the current node.
.................David Marston


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.