[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
RE: [xml-dev] "self" axis for an attribute context node
- From: "Michael Kay" <mike@saxonica.com>
- To: "'Oleg A. Paraschenko'" <olpa@xmlhack.ru>,"'xml-dev'" <xml-dev@lists.xml.org>
- Date: Mon, 12 Mar 2007 11:55:41 -0000
> I thought that the following XPath steps are equivanent:
>
> something[name()='lalala']
> something[self::lalala]
>
> However, it isn't so.
<snip/>
> Why does it so?
A NameTest used in a step of a path expression selects nodes of the
principal node kind for the axis used in that step. The principal node kind
for the self axis is "element". A well-known gotcha (well-known to those who
know it, anyway). In 2.0 you can write self::attribute(lalala).
Michael Kay
http://www.saxonica.com/
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]