xsl-list
[Top] [All Lists]

Re: pulling a document with a null namespace into a namespace

2003-08-08 09:52:19
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