[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Union and descendants: count(.//name1|name2) ? Doesn't p
> > count(.//entry|e) > > Returns only the number of "entry" elements without adding > the number of e matches to the result. This parses as count( (.//entry) | (e) ) and should return the sum of the number of descendant "entry" elements and the number of child "e" elements. If you want to include descendant "e" elements, write count(.//entry | .//e) or (probably more efficient, because a union involves elimination of duplicates, which is not actually needed here) count(.//entry) + count(.//e) > > count(./e|entry) > > Works fine, counting both It will, because this expression is equivalent to count((./e) | (./entry)) Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|