[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XPath count/contains
> Michael is right Attributes are nodes although the XPATH nodes() > function does not match them. XPath does not have a nodes() function. It's spelt "node()", and it's not a function. The NodeTest node() does match attribute nodes. However, if node() is used as a Step, without specifying an axis, then the axis defaults to the child axis. So the Step node() will find all nodes (of any kind) on the child axis. The reason it doesn't find attributes is not that node() doesn't match attributes, it is that there are no attributes on the child axis. You can see this if you specify an axis, for example attribute::node(), self::node(), ancestor-or-self::node() will all match attributes if there are any attributes on the selected axis. Michael Kay http://www.saxonica.com/
|
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
|