[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|