Re: merging attributes (with xsl:copy?)

Subject: Re: merging attributes (with xsl:copy?)
From: vidarg@xxxxxx (Vidar B. Gundersen)
Date: 20 Jul 1999 12:36:14 +0200
: Christian Lindig
> But how to copy all existing attributes to the new element?

  <!--
    Templates that copy an XML document,
    but leave pis, doctypes and comments out.
  -->

  <xsl:template match="*">
    <xsl:copy>
      <xsl:apply-templates select="@*"/>
      <xsl:apply-templates/>
    </xsl:copy>
  </xsl:template>

  <xsl:template match="@*">
    <xsl:copy/>
  </xsl:template>

-- 
Vidar Bronken Gundersen


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


Current Thread