OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] XPath count/contains

[ Lists Home | Date Index | Thread Index ]

> 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/







 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS