View Single Post
  #2 (permalink)  
Old June 26th, 2006, 05:40 AM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,481, Level: 59
Points: 18,481, Level: 59 Points: 18,481, Level: 59 Points: 18,481, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,960
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Use the modified identity template:

<xsl:template match="client:*" xmlns:client="http://client1">
  <xsl:element name="{name()}" namespace="http://client2">
    <xsl:copy-of select="@*"/>
    <xsl:apply-templates/>
  </xsl:element>
</xsl:template>

XSLT 1.0 encourages processors to use the prefix given by "name()", that is the original prefix. XSLT 2.0 makes it mandatory to use this prefix unless there is a conflict.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote