View Single Post
  #2 (permalink)  
Old October 17th, 2007, 08:07 AM
samjudson's Avatar
samjudson samjudson is offline
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

If its simply a one to one mapping then you can start by specifying the identity template:

<xsl:template match="node()|@*">
   <xsl:copy>
   <xsl:apply-templates select="@*"/>
   <xsl:apply-templates/>
   </xsl:copy>
 </xsl:template>

And then defining 'replace' templates:

<xsl:template match="A">
<A1>
  <xsl:apply-template select="@*"/>
  <xsl:apply-template/>
</A1>
</xsl:template>

Repeat this for each element that is changed.

I don't know of any products that could do this automatically for you however.

/- Sam Judson : Wrox Technical Editor -/
Reply With Quote