ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xsl-list
xsl-list
Re: [xsl] Collecting attributes from the ancestor-or-self axis
by Jeni Tennison other posts by this author
Nov 19 2001 12:29PM messages near this date
Re: [xsl] Collecting attributes from the ancestor-or-self axis | Re: [xsl] Collecting attributes from the ancestor-or-self axis
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
Thread:
WATKIN-JONES,ADAM (HP-UnitedKingdom,ex1)
Oleg Tkachenko
Jeni Tennison
David Carlisle
David Carlisle

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved