RE: [xsl] difference between select="*" and select="node()"

Subject: RE: [xsl] difference between select="*" and select="node()"
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Tue, 9 Apr 2002 09:04:56 +0100
As a NodeTest, node() matches any node.

But as a Step, node() is short for child::node() which only selects nodes on
the child axis; there are no attributes on the child axis. To find both
child nodes and attributes, your need select="child::node() |
attribute::node()".

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Karthik
> Gurumurthy
> Sent: 08 April 2002 12:11
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] difference between select="*" and select="node()"
>
>
> hi all,
>
> it's behaving the same way for me :-(
> am using Oreilly's XSLT to learn XSLT.
> It says that node() selects the attribute as well in addition
> to the text
> nodes.
> But still my attribute values do not get printed.
> The book also mentions that attribute needs to be selected
> explicitly to
> apply the default
> rule for attributes.
> If node() does that then why does'nt it print?
>
> thanks
> karthik.
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread