David Carlisle wrote:
ancestor-or-self::*/@*
selects all the attributes from here up, and
<xsl:copy-of
a) sorts them in to document order (this is important, as we'll see)
b) copies them all into the currently open element
c) always, if two attribute nodes of the same name are added, the second
one replaces the first, so, because of (a) the innermost attribute
will be added last and will end up in the result.
Ah, it's all clear now. The above is far more valuable to me than the
solution. Thanks!
Cheers,
Manos