This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Re: Re: "*|@*|text()" vs. "node()"
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Re: Re: "*|@*|text()" vs. "node()"
- From: Jörg Heinicke <joerg dot heinicke at gmx dot de>
- Date: Thu, 04 Oct 2001 17:20:24 +0200
- References: <20011004140647.49978.qmail@web14509.mail.yahoo.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Thanks Dimitre, is there a logical explanation of writing the spec in this
way? Why attributes are no childs of its element?
Joerg
Dimitre Novatchev wrote:
>>Then look under patterns and you find the XSLT definition of the node()
>>test:
>>
>> node() matches any node other than an attribute node and the root node
>>
>>which is slightly confusing since the XPath spec defines it as:
>>
>> A node test node() is true for any node of any type whatsoever.
>>
>
> The confusion is because they omitted a necessary clarification:
>
> "A node test node() is true for any node of any type whatsoever for the ***given
> axis***"
>
> so:
>
> ancestor::node() will return the root node as one of the nodes in the resulting
> node-set.
>
> attribute::node() will return all attribute nodes of the current (element) node.
>
> namespace::node() will return all the namespace nodes of the current (element) node.
>
> node() will return all element, PI, comment, text children of the current node.
>
> Therefore, we have tests for all types of nodes.
>
> Cheers,
> Dimitre Novatchev.
--
System Development
VIRBUS AG
Fon +49(0)341-979-7435
Fax +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list