xsl-list
[Top] [All Lists]

Re: [xsl] Style sheet to perform namespace mapping from input to output

2008-03-24 23:02:03
David meant, you need to have following namespace declarations:

<xsl:stylesheet xmlns:old="http://old-schema-uri";
xmlns:new="http://new-schema-uri";


On 3/24/08, Farrukh Najmi <farrukh(_at_)wellfleetsoftware(_dot_)com> wrote:
Thanks David. The resulting style sheet gives an error similar to:

ERROR:  'Namespace for prefix 'new' has not been declared.'

I am assuming that I need to somehow add the 'new' namespace declaration
via 'xmlns:new ' attribute in result tree.

This is probably a dumb question but how do I replace xmlns:old
namespace declaration with xmlns:new namespace declaration?

Thanks again for your kind help.

David Carlisle wrote:
declare old and new prefixes on xsl:stylesheet, then something like

<xsl:template match="old:*">
<xsl:element name="new:{local-name(.)">
  <xsl:copy-of select="@*"/>
   <xsl;apply-templates/>
 </xsl:element">
</xsl:template>



--
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com


-- 
Regards,
Mukul Gandhi

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--