|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: count() problem
> -----Original Message----- > From: Sam Saha [mailto:sam_saha1975@xxxxxxxx] Hi, <snip /> > How do I use the count() function to count the > number of nodes that do NOT have a blank value. I have > the following xml. In this case the count should be 6. <snip /> > > I am doing something like this: > <xsl:variable name="num" > select="count(root/nodes/*[starts-with(local-name(),'tele')!='' > or starts-with(local-name(),'node')!=''])" /> > Hmm, this makes little sense, as you are counting nodes for which the following expression: starts-with(local-name(),'tele') is not equal to '' This will indeed be true also for the blank nodes, so you probably need something like: count(root/nodes/*[(starts-with(local-name(),'tele') or starts-with(local-name(),'node')) and not(.='')]) Hope this helps! Cheers, Andreas
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








