[xsl] updated namespace difficulty

Subject: [xsl] updated namespace difficulty
From: S Woodside <sbwoodside@xxxxxxxxx>
Date: Sat, 15 Feb 2003 18:14:07 -0500
I'm using xsltproc.

The input contains lots of data, and the first xslt contains this:

<xsl:template match="text">
<xsl:element name="form_textarea" namespace="mynms"><b>foobar</b></xsl:element>
</xsl:template>


the output of the 1st transform contains lots of stuff, including
            <form_textarea xmlns="mynms"><b>foobar</b></form_textarea>

the second xslt is this (complete):
<?xml version="1.0"?>
<xsl:stylesheet
  xmlns="foo"
  xmlns:my="mynms"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  version="1.0"
  >
  <xsl:template match="my:form_textarea" priority="1">
    <b>SIMONHELLO</b>
  </xsl:template>
<!--
  [[xsl:template match="*" priority="-1"]]
    [[xsl:copy-of select="."/]]
  [[/xsl:template]]
-->
</xsl:stylesheet>

As is, it gives me this in the output, among other things:
<b xmlns="foo" xmlns:my="mynms">SIMONHELLO</b>
which is AFAICT correct. However I also want to copy through the rest of the output from the 1st transform! How do I do that? If I uncomment the 2nd template in the 2nd xslt, instead I get:
<form_textarea xmlns="mynms"><b>foobar</b></form_textarea>



Help is much appreciated. I have hopes to simplify my handling of multiple transformations using namespaces.


simon


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



Current Thread