Subject: Re: Element name Change for a node
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Thu, 14 Sep 2006 13:49:36 +0530
|
Your solution is certainly very nice.
Regarding my solution, this syntax should have come to my mind..
<xsl:element name="US_{local-name()}">
On 9/14/06, Michael Kay <mike@xxxxxxxxxxxx> wrote:
I would do this as:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />
<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<xsl:template match="address/*">
<xsl:element name="US_{local-name()}">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Michael Kay
http://www.saxonica.com/
--
Regards,
Mukul Gandhi
http://gandhimukul.tripod.com
|