Changeset 1978

Show
Ignore:
Timestamp:
11/25/08 08:58:29
Author:
johnsa
Message:

user client: correct duplicate template

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/resources/xsl/default/default/util.xsl

    r1976 r1978  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
     3 
     4<!-- UTILITY TEMPLATES --> 
     5 
     6  <xsl:template name="escapeApos"> 
     7    <xsl:param name="str"/> 
     8    <xsl:variable name="apos" select='"&apos;"'/> 
     9    <xsl:choose> 
     10      <xsl:when test="contains($str, $apos)"> 
     11         <xsl:value-of select="substring-before($str, $apos)" /> 
     12         <xsl:text>\'</xsl:text> 
     13         <xsl:call-template name="escapeApos"> 
     14            <xsl:with-param name="str" select="substring-after($str, $apos)" /> 
     15         </xsl:call-template> 
     16      </xsl:when> 
     17      <xsl:otherwise> 
     18         <xsl:value-of select="$str" /> 
     19      </xsl:otherwise> 
     20    </xsl:choose> 
     21  </xsl:template> 
    322 
    423  <!-- search and replace template taken from 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r1975 r1978  
    82538253  </xsl:template> 
    82548254 
    8255   <!--==== Utility Templates ====--> 
    8256  
    8257   <xsl:template name="escapeApos"> 
    8258     <xsl:param name="str"/> 
    8259     <xsl:variable name="apos" select='"&apos;"'/> 
    8260     <xsl:choose> 
    8261       <xsl:when test="contains($str, $apos)"> 
    8262          <xsl:value-of select="substring-before($str, $apos)" /> 
    8263          <xsl:text>\'</xsl:text> 
    8264          <xsl:call-template name="escapeApos"> 
    8265             <xsl:with-param name="str" select="substring-after($str, $apos)" /> 
    8266          </xsl:call-template> 
    8267       </xsl:when> 
    8268       <xsl:otherwise> 
    8269          <xsl:value-of select="$str" /> 
    8270       </xsl:otherwise> 
    8271     </xsl:choose> 
    8272   </xsl:template> 
    8273  
    8274   <!-- search and replace template taken from 
    8275        http://www.biglist.com/lists/xsl-list/archives/200211/msg00337.html --> 
    8276   <xsl:template name="replace"> 
    8277     <xsl:param name="string" select="''"/> 
    8278     <xsl:param name="pattern" select="''"/> 
    8279     <xsl:param name="replacement" select="''"/> 
    8280     <xsl:choose> 
    8281       <xsl:when test="$pattern != '' and $string != '' and contains($string, $pattern)"> 
    8282         <xsl:value-of select="substring-before($string, $pattern)"/> 
    8283         <xsl:copy-of select="$replacement"/> 
    8284         <xsl:call-template name="replace"> 
    8285           <xsl:with-param name="string" select="substring-after($string, $pattern)"/> 
    8286           <xsl:with-param name="pattern" select="$pattern"/> 
    8287           <xsl:with-param name="replacement" select="$replacement"/> 
    8288         </xsl:call-template> 
    8289       </xsl:when> 
    8290       <xsl:otherwise> 
    8291         <xsl:value-of select="$string"/> 
    8292       </xsl:otherwise> 
    8293     </xsl:choose> 
    8294   </xsl:template> 
    8295  
    82968255</xsl:stylesheet>