W3C home > Mailing lists > Public > xsl-editors@w3.org > April to June 2000

Re: XPath and XSLT specs disagree about node()?

From: Jeff Caruso <jcaruso@pageflexinc.com>
Date: Thu, 08 Jun 2000 10:46:25 -0400
Message-ID: <393FB1C1.C5C58F73@bitstream.com>
To: keshlam@us.ibm.com
CC: xsl-editors@w3.org, www-xpath-comments@w3.org
keshlam@us.ibm.com wrote:

> In the XPath spec, Section 2, there's an example:
>      * child::node() selects all the children of the context node,
>        whatever their node type
> My thought processes: "OK, child:: is selecting all the children, and
> node() is a wildcard meaning any-node-type. Compare this with the previous
> example, child::*, which selects only elements."
> That seems to be confirmed by later statements:
>      A node test node() is true for any node of any type whatsoever.
> and
>      A location step of . is short for self::node()
> BUT XSLT DISAGREES! In section 5.2, it says:
>      * node() matches any node other than an attribute node  and the root
> node

I don't see a disagreement. Section 5.2 is talking about examples of patterns
for template matching. Used as a match pattern, "node()" cannot match an
attribute, because it is an abbreviation for "child::node()", and an attribute
is never a child.

 -- JeffC

Dr. Jeffrey L. Caruso <jcaruso@bitstream.com>
Bitstream, Inc.  215 First St.  Cambridge, MA 02142
Received on Thursday, 8 June 2000 10:47:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:44:18 UTC