[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-dev
Subject:    RE: [xml-dev] "self" axis for an attribute context node
From:       "Michael Kay" <mike () saxonica ! com>
Date:       2007-03-12 11:55:41
Message-ID: 00cf01c7649d$5c32e1b0$6401a8c0 () turtle
[Download RAW message or body]

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


_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic