Subject: Re: [xsl] question about identity transform From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 31 Oct 2006 15:23:39 -0500 |
I've used the identity transform many times to do useful things and have often wondered about the match pattern. Why is the match pattern
"node() | @*"
rather than simply "node()"? Aren't attributes returned by node()?
Not when the axis is omitted ... the omission of the axis in an XPath expression is the abbreviation for the child:: axis, and there are no attributes along the child axis.
The XPath expression "node()" has a node test, but the axis is omitted, so the fully expanded version of this address is "child::node()". No attributes found there.
The "@" is an abbreviation for "attribute::" so "@*" expands to "attribute::*" which is why that works.
-- UBL/XSLT/XSL-FO training: Allerxd/Verx Denmark 2006-11-13,17,20/24 UBL International 2006 2006-11-13/17 http://www.ublconference.com World-wide corporate, govt. & user group UBL, XSL, & XML training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] question about identity trans, Bill French | Thread | RE: [xsl] question about identity t, Michael Kay |
Re: [xsl] normalize-space()?, Abel Braaksma | Date | Re: [xsl] question about identity t, Dimitre Novatchev |
Month |