This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: difference between select="*" and select="node()"
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 9 Apr 2002 09:04:56 +0100
- Subject: RE: [xsl] difference between select="*" and select="node()"
- Reply-to: xsl-list at lists dot mulberrytech dot com
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@ntlworld.com
work: Michael.Kay@softwareag.com
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Karthik
> Gurumurthy
> Sent: 08 April 2002 12:11
> To: xsl-list@lists.mulberrytech.com
> 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