[xsl] extracting preceding nodes with certain exceptions

Subject: [xsl] extracting preceding nodes with certain exceptions
From: "Matthew L. Avizinis" <mla@xxxxxxxxx>
Date: Mon, 15 Sep 2003 16:04:20 -0400
Hello all,
 I need some help with the following:
I have (but could be variable):
   <token position="1"/>
   <token position="2"/>
            <token position="3"/>
            <token posistion="4"/>
             <token position="5"/>
             <token position="6"/>

I would like to sum the values of all preceding nodes of <token> #6 that are <token>s, but which are not descendants of the preceding sibling of its ancestor <row>, that is I want to exclude <token>s #3 and #4.
I have sum(ancestor::row//token[@position &lt; $token-position]) where in this case $token-position = 6, but that excludes the tokens in positions 1 and 2. I think I am missing something simple here, but suggestions are welcome.
thanks in advance,
Matthew L. Avizinis
Gleim Publications, Inc.

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

Current Thread