W3C home > Mailing lists > Public > www-xpath-comments@w3.org > January to March 2004

Question about self axis

From: Kirmse, Daniel <daniel.kirmse@sap.com>
Date: Fri, 19 Mar 2004 09:40:45 +0100
Message-ID: <22772E6015DA354B84C6F8DB8BF60504D0EDE3@dewdfx13.wdf.sap.corp>
To: www-xpath-comments@w3.org

Hi,

suppose following document (X-Hive example):

<?xml version="1.0" encoding="ISO-8859-1"?>
<ma:AuctionWatchList xmlns:ma="http://www.example.com/AuctionWatch" 	xmlns:xlink="http://www.w3.org/1999/xlink" 	xmlns:anyzone="http://www.example.com/auctioneers#anyzone" 	xmlns:eachbay="http://www.example.com/auctioneers#eachbay" 	xmlns:yabadoo="http://www.example.com/auctioneers#yabadoo">
  <ma:Auction anyzone:ID="0321K372910">
...

and consider this XQuery:

//ma:Auction/@anyzone:ID/self::*

In my understanding this should yield:

anyzone:ID="0321K372910"

because the NameTest "*" matches the attribute name, as well as self::*:*, self::*:ID, self::anyzone:* and self::anyzone:ID.

Is that right? Can one say that each node that has a node-name no matter what type of node it is, would yield a similar result?

Thanks & Cheers,
Daniel     
 
Received on Friday, 19 March 2004 03:41:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:05:55 GMT