This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Collecting attributes from the ancestor-or-self axis


> I believe this works as follows:
> 1. the select in copy-of returns a node-set in document order.  At this
> point the node set has duplicate attribute names.
> 
> 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.
> 

You're mislead of his meaning of "duplicates" here -- by "duplicates" he means
attribute nodes having the same name -- these are not duplicates in XPath, where
node equality is the same as node identity.


> > 2. when copy-of applies these attributes to the output element, the
> > duplication is removed by succeeding attribute nodes overwriting the values
> > of any attributes that are already present.
> 
> <xsl:copy-of> copies nodes in document order, but if you are copying 
> attributes, why do you care about any order?

Order is important here, as from a set of attribute nodes with the same name, only
the last one is output (by the serializer I guess?).


Cheers,
Dimitre Novatchev.




__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]