Subject: Re: [xsl] The identity transform and attributes|
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Mon, 21 Jan 2008 17:30:23 +0100
What's however still beyond me (and maybe I missed it on this afternoon's very interesting thread) is why @* uses the combined syntax of * (element) and @ (attribute),
No, * doesn't mean element it means "principal node kind" which is element on all axes except attribute: (where it's attribute and namespace:: (ehere it is namespace) this pricipal node kind stuff is introduced (I assume) just to give a ratinale for @* to mean whet it means, but the particular formulation has the effect that self:: axis could only be used with difficulty on attribute nodes in XSLT 1 and still in xslt 2 it isn't as natural as one might like.
(i.e., node() is supposed to be "any" node imo, but this is arguably not true as it does not include attribute nodes),
yes it does include attribute nodes,
attribute::node() and self::node() both select attribute nodes. node() on its own is short for child::node() which does not select attribute nodes because there are never any attributes in the child axis, it is teh child axis that does not include attributes, not the node() node test.