View Single Post
  #4 (permalink)  
Old October 20th, 2006, 11:20 AM
joefawcett's Avatar
joefawcett joefawcett is offline
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Well I would use the identity transform and add one template to match the text nodes:
Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:param name="from" select="'!'"/>
  <xsl:param name="to" select="'?'"/>

  <xsl:template match="node()|@*">

    <xsl:copy>

      <xsl:apply-templates select="node()|@*"/>
    </xsl:copy>
  </xsl:template>
  <!--
    Templates to match nodes that need changing go here
  -->
  <xsl:template match="text()">
    <xsl:value-of select="translate(., $from, $to)"/>
  </xsl:template>
</xsl:stylesheet>

--

Joe (Microsoft MVP - XML)
Reply With Quote