Altova Mailing List Archives

Re: [xsl] position within same nodes

From: Laurence O Garfield <lgarfiel@------------------->
Date: 7/19/2001 12:04:00 PM
> Larry,
> Try (count(preceding-sibling::meep)+1), or
> (count(preceding-sibling::*[name()=name(current())])+1) for the general case.
> <xsl:number/> is another way to go. It can get fairly complex (look it up
> in the spec), but in this case you shouldn't need any attributes to
> configure the counting: it'll default to what you want. Bind it to a
> variable if you need to retrieve it through XPath.
> Cheers,
> Wendell

Thanks, Wendell!  They both worked perfectly.  I decided to go with
<xsl:number /> because it seemed more elegant/readable-1-year-from-now.

--Larry Garfield

 XSL-List info and archive:


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.