Changeset ee92a8c in clfs-sysroot for BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/lib
- Timestamp:
- Sep 9, 2007, 2:02:47 AM (17 years ago)
- Branches:
- master
- Children:
- 93fcbff
- Parents:
- c21857e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/lib/lib.xsl
rc21857e ree92a8c 11 11 12 12 ******************************************************************** --> 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">13 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 14 14 15 15 <xsl:template name="dot.count"> … … 331 331 <xsl:param name="string"/> 332 332 <xsl:if test="$string"> 333 <ssb:token ><xsl:value-of select="substring($string, 1, 1)"/></ssb:token>333 <ssb:token xmlns:ssb="http://sideshowbarker.net/ns"><xsl:value-of select="substring($string, 1, 1)"/></ssb:token> 334 334 <xsl:call-template name="str.tokenize.keep.delimiters-characters"> 335 335 <xsl:with-param name="string" select="substring($string, 2)"/> … … 343 343 <xsl:choose> 344 344 <xsl:when test="not($delimiter)"> 345 <ssb:token ><xsl:value-of select="$string"/></ssb:token>345 <ssb:token xmlns:ssb="http://sideshowbarker.net/ns"><xsl:value-of select="$string"/></ssb:token> 346 346 </xsl:when> 347 347 <xsl:when test="contains($string, $delimiter)"> … … 389 389 </xsl:choose> 390 390 </xsl:template> 391 392 391 393 <xsl:template name="apply-character-map">394 <xsl:param name="content"/>395 <xsl:param name="map.contents"/>396 <xsl:variable name="replaced_text">397 <xsl:call-template name="string.subst">398 <xsl:with-param name="string" select="$content"/>399 <xsl:with-param name="target" select="$map.contents[1]/@character"/>400 <xsl:with-param name="replacement" select="$map.contents[1]/@string"/>401 </xsl:call-template>402 </xsl:variable>403 <xsl:choose>404 <xsl:when test="$map.contents[2]">405 <xsl:call-template name="apply-character-map">406 <xsl:with-param name="content" select="$replaced_text"/>407 <xsl:with-param name="map.contents" select="$map.contents[position() > 1]"/>408 </xsl:call-template>409 </xsl:when>410 <xsl:otherwise>411 <xsl:value-of select="$replaced_text"/>412 </xsl:otherwise>413 </xsl:choose>414 </xsl:template>415 416 417 <xsl:template name="read-character-map">418 <xsl:param name="use.subset"/>419 <xsl:param name="subset.profile"/>420 <xsl:param name="uri"/>421 <xsl:choose>422 <xsl:when test="$use.subset != 0">423 <!-- use a subset of the character map instead of the full map -->424 <xsl:choose>425 <!-- xsltproc and Xalan both support dyn:evaluate() -->426 <xsl:when test="function-available('dyn:evaluate')">427 <xsl:copy-of select="document($uri)//*[local-name()='output-character'] [dyn:evaluate($subset.profile)]"/>428 </xsl:when>429 <!-- Saxon has its own evaluate() & doesn't support dyn:evaluate() -->430 <xsl:when test="function-available('saxon:evaluate')">431 <xsl:copy-of select="document($uri)//*[local-name()='output-character'] [saxon:evaluate($subset.profile)]"/>432 </xsl:when>433 <xsl:otherwise>434 <xsl:message terminate="yes">435 Error: To process character-map subsets, you must use an XSLT engine436 that supports the evaluate() XSLT extension function. Your XSLT engine437 does not support it.438 </xsl:message>439 </xsl:otherwise>440 </xsl:choose>441 </xsl:when>442 <xsl:otherwise>443 <!-- value of $use.subset is non-zero, so use the full map -->444 <xsl:copy-of select="document($uri)//*[local-name()='output-character']"/>445 </xsl:otherwise>446 </xsl:choose>447 </xsl:template>448 392 <xsl:template name="count.uri.path.depth"> 449 393 <xsl:param name="filename" select="''"/>
Note:
See TracChangeset
for help on using the changeset viewer.