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

Re: Node selection list

Subject: Re: Node selection list
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 20 Feb 2004 23:49:02 GMT
xml node selection and condition
  <xsl:template match="ITEM">
so here the current node is ITEM
        <xsl:value-of select="count(ITEM)"/>
and here you are counting the number of child elements called ITEM which
is zero.
You probably want xsl:number
or 1 +count( preceding-sibling::ITEM)
or
1+count(receding:-sibling:ITEM)+count(../preceding-sibling::PARA0[TITLE!='Raging
River']/ITEM)


, but I cannot set the
number attribute "count" or "from" with the condition
"not(string(ancestor::PARA0/TITLE)='Raging River ')" 

you don't want to number a condition you want to number elements on
which that condition is true so use  ITEM[not(......)]
also if you know PARA0 is teh parent of ITEM, use parent:: rather than
ancestio:: it's a lot kinder to th esystem.


-- 
http://www.dcarlisle.demon.co.uk/matthew

 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.