This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: enumerating things (global counter)


> 
> It takes into account all "preceding" requirements, but "preceding" in
> XPath terms doesn't include ancestors, and you want to include
> ancestors in your numbering. So use:
> 
>   <xsl:value-of
>     select="count(preceding::requirement | 
> ancestor::requirement) + 1" />
> 
Or use <xsl:number level="any"/> which does much the same thing.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com 

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]