Changeset 5320:4899bcc1c2c3 for doc

Show
Ignore:
Timestamp:
2007-11-29 07:03:47 (12 months ago)
Author:
Rocco Rutte <pdmef@…>
Branch:
HEAD
Message:

Add ascii-replacements for 0x2dc (tilde) and 0x2026 (...) too.
The manual cannot be clean us-acii but now we should have at least latin1

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • doc/db-cleanup.xsl

    r5319 r5320  
    4343  <!-- 1) replace all non-breaking spaces by ascii-spaces (0xA0) --> 
    4444  <!-- 2) replace all quotes by ascii quotes (0x201C and 0x201D) --> 
     45  <!-- 3) replace "fancy" tilde with real tilde (sic!) (0x2DC)   --> 
     46  <!-- 4) replace "horizontal ellipses" with 3 dots (0x2026)     --> 
    4547  <xsl:template name="fixup"> 
    4648    <xsl:param name="str"/> 
    47     <xsl:value-of select="translate(translate(translate($str,'&#xA0;',' '),'&#x201C;','&#x22;'),'&#x201D;','&#x22;')"/> 
     49    <xsl:choose> 
     50      <xsl:when test="contains($str,'&#x2026;')"> 
     51        <xsl:call-template name="fixup"> 
     52          <xsl:with-param name="str"><xsl:value-of select="substring-before($str,'&#x2026;')"/></xsl:with-param> 
     53        </xsl:call-template> 
     54        <xsl:text>...</xsl:text> 
     55        <xsl:call-template name="fixup"> 
     56          <xsl:with-param name="str"><xsl:value-of select="substring-after($str,'&#x2026;')"/></xsl:with-param> 
     57        </xsl:call-template> 
     58      </xsl:when> 
     59      <xsl:otherwise> 
     60        <xsl:value-of select="translate(translate(translate(translate($str,'&#xA0;',' '),'&#x201C;','&#x22;'),'&#x201D;','&#x22;'),'&#x2DC;','~')"/> 
     61      </xsl:otherwise> 
     62    </xsl:choose> 
    4863  </xsl:template> 
    4964