merging attributes (with xsl:copy?)

Subject: merging attributes (with xsl:copy?)
From: Christian Lindig <lindig@xxxxxxxxxxx>
Date: Tue, 20 Jul 1999 10:18:43 +0200
I'm looking for a way to match all elements <x> (which may have
attributes) and add new attributes:
    <x>                 --> <x             b="b" c="c">
    <x a="a">           --> <x a="a"       b="b" c="c">
    <x a="a" d="d">     --> <x a="a" d="d" b="b" c="c">

When <x> has no attributes this is easy: 

    <xsl:template match="x">
        <x b="b" c="c">

But how to copy all existing attributes to the new element?  I'm sorry
in case this is a FAQ - I did not found it in the XSL archive. 

-- Christian
 Christian Lindig       Gaertner Datensysteme GbR, Braunschweig, Germany 

 XSL-List info and archive:

Current Thread