> 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