Ignore:
Timestamp:
Dec 11, 2007, 3:32:16 PM (12 years ago)
Author:
julian.reschke@…
Message:

rfc2629.xslt fix: for cross-document references, distinguish between Section and Appendix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rfc2629xslt/rfc2629.xslt

    r6 r32  
    18161816        </xsl:choose>
    18171817      </xsl:variable>
     1818     
     1819      <xsl:variable name="secterm">
     1820        <xsl:choose>
     1821          <!-- starts with letter? -->
     1822          <xsl:when test="translate(substring($sec,1,1),$ucase,'')=''">Appendix</xsl:when>
     1823          <xsl:otherwise>Section</xsl:otherwise>
     1824        </xsl:choose>
     1825      </xsl:variable>
    18181826
    18191827      <xsl:variable name="fmt">
     
    18711879                    <xsl:attribute name="id"><xsl:value-of select="$anchor"/></xsl:attribute>
    18721880                  </xsl:if>
    1873                   <xsl:text>Section </xsl:text>
     1881                  <xsl:value-of select="$secterm"/>
     1882                  <xsl:text> </xsl:text>
    18741883                  <xsl:value-of select="$sec"/>
    18751884                </a>
    18761885              </xsl:when>
    1877               <xsl:otherwise>Section <xsl:value-of select="$sec"/></xsl:otherwise>
     1886              <xsl:otherwise><xsl:value-of select="$secterm"/><xsl:text> </xsl:text><xsl:value-of select="$sec"/></xsl:otherwise>
    18781887            </xsl:choose>
    18791888            <xsl:if test="$fmt='of'">
     
    19311940            <xsl:choose>
    19321941              <xsl:when test="$href!=''">
    1933                 <a href="{$href}">Section <xsl:value-of select="$sec"/></a>
     1942                <a href="{$href}"><xsl:value-of select="$secterm"/><xsl:text> </xsl:text><xsl:value-of select="$sec"/></a>
    19341943              </xsl:when>
    1935               <xsl:otherwise>Section <xsl:value-of select="$sec"/></xsl:otherwise>
     1944              <xsl:otherwise><xsl:value-of select="$secterm"/><xsl:text> </xsl:text><xsl:value-of select="$sec"/></xsl:otherwise>
    19361945            </xsl:choose>
    19371946            <xsl:text>)</xsl:text>
     
    19451954                    <xsl:attribute name="title"><xsl:value-of select="$title"/></xsl:attribute>
    19461955                  </xsl:if>
    1947                   <xsl:text>Section </xsl:text>
     1956                  <xsl:value-of select="$secterm"/>
     1957                  <xsl:text> </xsl:text>
    19481958                  <xsl:value-of select="$sec"/>
    19491959                </a>
    19501960              </xsl:when>
    1951               <xsl:otherwise>Section <xsl:value-of select="$sec"/></xsl:otherwise>
     1961              <xsl:otherwise><xsl:value-of select="$secterm"/><xsl:text> </xsl:text><xsl:value-of select="$sec"/></xsl:otherwise>
    19521962            </xsl:choose>
    19531963          </xsl:when>
     
    46134623    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text>
    46144624    <!-- when RCS keyword substitution in place, add version info -->
    4615     <xsl:if test="contains('$Revision: 1.352 $',':')">
    4616       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.352 $', 'Revision: '),'$','')),', ')" />
     4625    <xsl:if test="contains('$Revision: 1.353 $',':')">
     4626      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.353 $', 'Revision: '),'$','')),', ')" />
    46174627    </xsl:if>
    4618     <xsl:if test="contains('$Date: 2007/12/09 19:23:50 $',':')">
    4619       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2007/12/09 19:23:50 $', 'Date: '),'$','')),', ')" />
     4628    <xsl:if test="contains('$Date: 2007/12/11 23:20:44 $',':')">
     4629      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2007/12/11 23:20:44 $', 'Date: '),'$','')),', ')" />
    46204630    </xsl:if>
    46214631    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))" />
Note: See TracChangeset for help on using the changeset viewer.