This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Collecting attributes from the ancestor-or-self axis
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: Oleg Tkachenko <olegt at multiconn dot com>
- Cc: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 19 Nov 2001 12:29:19 +0000
- Subject: Re: [xsl] Collecting attributes from the ancestor-or-self axis
- Organization: Jeni Tennison Consulting Ltd
- References: <72FAAE98015DD511B42600D0B747AC7FC1224F@kipling.br.itc.hp.com><3BF8F538.80205@multiconn.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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