Changeset 00b1e11 in clfs-embedded for BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/lib
- Timestamp:
- Jul 21, 2007, 8:07:11 AM (17 years ago)
- Branches:
- master
- Children:
- a6966fa
- Parents:
- 3ca2208
- 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"?> 3 2 <!-- ******************************************************************** 4 3 $Id$ … … 12 11 13 12 ******************************************************************** --> 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"> 17 14 18 15 <xsl:template name="dot.count"> … … 313 310 </xsl:choose> 314 311 </xsl:template> 315 316 312 <xsl:template name="str.tokenize.keep.delimiters"> 317 313 <xsl:param name="string" select="''"/> … … 320 316 <xsl:when test="not($string)"/> 321 317 <xsl:when test="not($delimiters)"> 322 323 324 318 <xsl:call-template name="str.tokenize.keep.delimiters-characters"> 319 <xsl:with-param name="string" select="$string"/> 320 </xsl:call-template> 325 321 </xsl:when> 326 322 <xsl:otherwise> 327 328 329 330 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> 331 327 </xsl:otherwise> 332 328 </xsl:choose> 333 329 </xsl:template> 334 335 330 <xsl:template name="str.tokenize.keep.delimiters-characters"> 336 331 <xsl:param name="string"/> 337 332 <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> 339 334 <xsl:call-template name="str.tokenize.keep.delimiters-characters"> 340 335 <xsl:with-param name="string" select="substring($string, 2)"/> 341 336 </xsl:call-template> 342 337 </xsl:if> 343 338 </xsl:template> 344 345 339 <xsl:template name="str.tokenize.keep.delimiters-delimiters"> 346 340 <xsl:param name="string"/> … … 349 343 <xsl:choose> 350 344 <xsl:when test="not($delimiter)"> 351 <token><xsl:value-of select="$string"/></token>345 <ssb:token><xsl:value-of select="$string"/></ssb:token> 352 346 </xsl:when> 353 347 <xsl:when test="contains($string, $delimiter)"> 354 355 356 357 358 359 360 361 362 363 364 365 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> 366 360 </xsl:when> 367 361 <xsl:otherwise> 368 369 370 371 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> 372 366 </xsl:otherwise> 373 367 </xsl:choose>
Note:
See TracChangeset
for help on using the changeset viewer.