Subject: Re: [xsl] Collecting attributes from the ancestor-or-self axis From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 19 Nov 2001 12:29:00 GMT |
> I don't think that's right. By definition node-set is "an unordered > collection of nodes without duplicates". So all dublicates have to be > removed at the time of XPath expresison evaluating and the order may be > any one appropriate to XPath processor. the order that matters in this case (the order of any attribute nodes that have the same name) is not processor dependent. in attribute-or-self::*/@* you get a node set consisting entirely of attribute nodes, many of which may have the same name. But any attribute nodes with the same name must have come from different elements, and so document order is defined by Xpath and is not processor dependent. > <xsl:copy-of> copies nodes in document order, but if you are copying > attributes, why do you care about any order? Because they come from different elements but you are copying them to the same element, so they over-write each other, so you need to know that this happens in document order. Fortunately in this case that had the effect the original poster wanted. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Collecting attributes fro, Oleg Tkachenko | Thread | Re: [xsl] Collecting attributes fro, Jeni Tennison |
RE: [xsl] Collecting attributes fro, WATKIN-JONES,ADAM (H | Date | Re: [xsl] Collecting attributes fro, Jeni Tennison |
Month |