Subject: Re: Collecting attributes from the ancestor-or-self axis
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 19 Nov 2001 12:29:19 +0000
|
Hi Oleg,
> <xsl:copy-of> copies nodes in document order, but if you are copying
> attributes, why do you care about any order?
In Adam's example, he was copying all the attributes from the
ancestors of the current node and the current node itself. He wanted
attributes nearer the current node to override the same-named
attributes from ancestors further away.
If you add two attributes with the same name to the same element, the
one that you add last is the one that gets included in the output. So
order *does* matter when you're copying attributes, if you're copying
several attributes of the same name.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- Re: Collecting attributes from the ancestor-or-self axis, (continued)
- David Carlisle - Fri, 16 Nov 2001 10:30:13 -0500 (EST)
- WATKIN-JONES,ADAM (HP-UnitedKingdom,ex1) - Mon, 19 Nov 2001 06:38:14 -0500 (EST)
- David Carlisle - Mon, 19 Nov 2001 06:58:46 -0500 (EST)
- Oleg Tkachenko - Mon, 19 Nov 2001 07:03:03 -0500 (EST)
- Jeni Tennison - Mon, 19 Nov 2001 07:28:47 -0500 (EST) <=
- David Carlisle - Mon, 19 Nov 2001 07:29:13 -0500 (EST)
- WATKIN-JONES,ADAM (HP-UnitedKingdom,ex1) - Mon, 19 Nov 2001 07:26:12 -0500 (EST)
|
|