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

Node selection list

Subject: Node selection list
From: tsterlin@xxxxxxxxxxxxxxxxx
Date: Fri, 20 Feb 2004 15:58:40 -0700
xsl node accumulate
Josh, maybe this will better clarify my problem

Here is the XSLT code I have now:
  <xsl:template match="ITEM">
    <xsl:choose>
      <xsl:when test="string(ancestor::PARA0/TITLE)='Raging River '">
        <p class="bulletPara"><xsl:apply-templates/></p>
      </xsl:when>
      <xsl:when test="not(string(ancestor::PARA0/TITLE)='Raging River ')">
        <xsl:value-of select="count(ITEM)"/>
        <p class="numberedPara"><xsl:apply-templates/></p>
      </xsl:when>
    </xsl:choose>
  </xsl:template>

I know my test statement works because I get numbers for the items I want and
bullet points for the other items.  However, the numbered items all have zeroes
for their numbers.  I've also tried the number funtion, but I cannot set the
number attribute "count" or "from" with the condition
"not(string(ancestor::PARA0/TITLE)='Raging River ')" and must use a tag that
encompasses too much or too little.  I have other ITEMS earlier in the document
and the ones I want are broken into separate tags.  So I wind up with either a
continuous count starting at 14(there are 13 ITEMS prior to these) or a broken
count(one set of 1-3, another of 1-7 and so on).  Do you know of a
function/command I can use within this test to sequentially accumulate all of
the ITEMS that pass this test?  I cannot seem to get position, count, or number
to work for me.
Thanks,
Tracy.





 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.