XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] "self" axis for an attribute context node

Hello Michael, David, Bjoern,

thanks for pointing that the principal node type for the self axis is
"element", not "anything". Reading XPath specification, I found:

> the self axis contains just the context node itself

and didn't scroll down to check the section "Node Tests" carefully.
My fault.


On Mon, 12 Mar 2007 11:55:41 -0000
"Michael Kay" <mike@saxonica.com> wrote:

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


-- 
Oleg Parashchenko  olpa@ http://xmlhack.ru/  XML news in Russian
http://uucode.com/blog/  Generative Programming, XML, TeX, Scheme
http://olpa.livejournal.com/


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS