Re: [xsl] pulling a document with a null namespace into a namespace

Subject: Re: [xsl] pulling a document with a null namespace into a namespace
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Fri, 08 Aug 2003 18:52:19 +0200
Michael Clark wrote:

I've tried, I really have, but I can't come up with a solution to this.

Have a look at http://www.w3.org/TR/xslt#section-Creating-Elements-with-xsl:element

Try something like
  <xsl:template match="*">
    <xsl:element name="{local-name()}" namespace="http://wibble.com/ns";>
      <xsl:copy-of select="@*/>
      <xsl:apply-templates/>
    </xsl:element>
  </xsl:template>

Add identity templates for PI and comments and/or special attribute
processing at leisure.

J.Pietschmann


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



Current Thread