RE: [xsl] XSL2 attribute and schema-attribute tests

Subject: RE: [xsl] XSL2 attribute and schema-attribute tests
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 14 Nov 2005 07:13:27 -0000
> If I do a <xsl:whatever select="attribute(foo)"/>, does the 
> select the 
> not default to the child axis

No, this is special-cased: if the node test has the form attribute(xxx) or
schema-attribute(xxx) then the axis defaults to the the attribute axis.
> Another  one:
> Will "self::node()/@foo" ever select anything,  or any nodes not by 
> killed .. killed by axes .. even two of them, disjoint 
> princpal node types?

self::node() selects the context node regardless what kind it is, the
principal node kind doesn't come into it. So the above expression is fine.
But self::*/@foo will never select anything.

Michael Kay

Current Thread