Ignore:
Timestamp:
Jul 21, 2007, 8:07:11 AM (17 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
master
Children:
a6966fa
Parents:
3ca2208
Message:

Merged r8226 from new-xsl branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/lib/lib.xsl

    r3ca2208 r00b1e11  
    1 <?xml version="1.0"?>
    2 
     1<?xml version="1.0" encoding="ASCII"?>
    32<!-- ********************************************************************
    43     $Id$
     
    1211
    1312     ******************************************************************** -->
    14 
    15 
    16 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" xmlns:dyn="http://exslt.org/dynamic" xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" exclude-result-prefixes="src" version="1.0">
     13<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" xmlns:ssb="http://sideshowbarker.net/ns" xmlns:dyn="http://exslt.org/dynamic" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" xmlns="http://docbook.org/ns/docbook" exclude-result-prefixes="src" version="1.0">
    1714
    1815<xsl:template name="dot.count">
     
    313310  </xsl:choose>
    314311</xsl:template>
    315 
    316312  <xsl:template name="str.tokenize.keep.delimiters">
    317313    <xsl:param name="string" select="''"/>
     
    320316      <xsl:when test="not($string)"/>
    321317      <xsl:when test="not($delimiters)">
    322         <xsl:call-template name="str.tokenize.keep.delimiters-characters">
    323           <xsl:with-param name="string" select="$string"/>
    324         </xsl:call-template>
     318        <xsl:call-template name="str.tokenize.keep.delimiters-characters">
     319          <xsl:with-param name="string" select="$string"/>
     320        </xsl:call-template>
    325321      </xsl:when>
    326322      <xsl:otherwise>
    327         <xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
    328           <xsl:with-param name="string" select="$string"/>
    329           <xsl:with-param name="delimiters" select="$delimiters"/>
    330         </xsl:call-template>
     323        <xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
     324          <xsl:with-param name="string" select="$string"/>
     325          <xsl:with-param name="delimiters" select="$delimiters"/>
     326        </xsl:call-template>
    331327      </xsl:otherwise>
    332328    </xsl:choose>
    333329  </xsl:template>
    334  
    335330  <xsl:template name="str.tokenize.keep.delimiters-characters">
    336331    <xsl:param name="string"/>
    337332    <xsl:if test="$string">
    338       <token><xsl:value-of select="substring($string, 1, 1)"/></token>
     333      <ssb:token><xsl:value-of select="substring($string, 1, 1)"/></ssb:token>
    339334      <xsl:call-template name="str.tokenize.keep.delimiters-characters">
    340         <xsl:with-param name="string" select="substring($string, 2)"/>
     335        <xsl:with-param name="string" select="substring($string, 2)"/>
    341336      </xsl:call-template>
    342337    </xsl:if>
    343338  </xsl:template>
    344  
    345339  <xsl:template name="str.tokenize.keep.delimiters-delimiters">
    346340    <xsl:param name="string"/>
     
    349343    <xsl:choose>
    350344      <xsl:when test="not($delimiter)">
    351         <token><xsl:value-of select="$string"/></token>
     345        <ssb:token><xsl:value-of select="$string"/></ssb:token>
    352346      </xsl:when>
    353347      <xsl:when test="contains($string, $delimiter)">
    354         <xsl:if test="not(starts-with($string, $delimiter))">
    355           <xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
    356             <xsl:with-param name="string" select="substring-before($string, $delimiter)"/>
    357             <xsl:with-param name="delimiters" select="substring($delimiters, 2)"/>
    358           </xsl:call-template>
    359         </xsl:if>
    360         <!-- output each delimiter -->
    361         <xsl:value-of select="$delimiter"/>
    362         <xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
    363           <xsl:with-param name="string" select="substring-after($string, $delimiter)"/>
    364           <xsl:with-param name="delimiters" select="$delimiters"/>
    365         </xsl:call-template>
     348        <xsl:if test="not(starts-with($string, $delimiter))">
     349          <xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
     350            <xsl:with-param name="string" select="substring-before($string, $delimiter)"/>
     351            <xsl:with-param name="delimiters" select="substring($delimiters, 2)"/>
     352          </xsl:call-template>
     353        </xsl:if>
     354        <!-- output each delimiter -->
     355        <xsl:value-of select="$delimiter"/>
     356        <xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
     357          <xsl:with-param name="string" select="substring-after($string, $delimiter)"/>
     358          <xsl:with-param name="delimiters" select="$delimiters"/>
     359        </xsl:call-template>
    366360      </xsl:when>
    367361      <xsl:otherwise>
    368         <xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
    369           <xsl:with-param name="string" select="$string"/>
    370           <xsl:with-param name="delimiters" select="substring($delimiters, 2)"/>
    371         </xsl:call-template>
     362        <xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
     363          <xsl:with-param name="string" select="$string"/>
     364          <xsl:with-param name="delimiters" select="substring($delimiters, 2)"/>
     365        </xsl:call-template>
    372366      </xsl:otherwise>
    373367    </xsl:choose>
Note: See TracChangeset for help on using the changeset viewer.