Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Counting self axes >Thread Next - Re: Counting self axes Re: Counting self axesTo: NULL Date: 8/1/2005 11:28:00 PM In article <1122920939.155134.283100@g...>, <rob.guitar.rob@g...> wrote: >This may be a stupid question, but if you count a self axe will it >always return 1? The self axis of a node always contains exactly one node (the node itself). So count(.../self::node()) will always return 1, if "..." selects a single node. self::* on the other hand only matches elements, because the principal node type for the self axis is element. So if "..." selects a single element, count(.../self::*) will return 1. If it selects a single node of some other type, it will return 0. -- Richard | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
