xsl-list
[Top] [All Lists]

Re: [xsl] Comparing xslt attributes and putting them in sequential order

2014-08-12 10:44:28

I have two files and I am trying to merge them.

Can you show us what you tried so far in XSLT, so that we can help you with the 
explicit issue you are having?

I want to compare the attribute value of "version" with in the 
same file, if the values are different I want to copy them in 
sequential order but if they are same then those attribute 
should have the same value.

Not quite clear, in your output there are version numbers that do not appear in 
your input. Pairwise merging is easiest in XSLT 3.0 with the new xsl:merge 
instruction, but you didn't say what version of XSLT you are using. 

One way to tackle your issue, but not necessarily the most economical, is to 
process both files and sort them on version number, then pipeline the result 
and use grouping with group-adjacent. But it depends on your actual 
requirements whether this approach is good enough.

Cheers,

Abel Braaksma
Exselt Streaming XSLT 3.0 processor
http://exselt.net
 
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>