Ignore:
Timestamp:
09/09/2007 08:55:14 AM (17 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
d4ce7bec
Parents:
e747759
Message:

Merged r8368 from new-xsl branch.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8369 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

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

    re747759 rc1fe047a  
    1111
    1212     ******************************************************************** -->
    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">
    1414
    1515<xsl:template name="dot.count">
     
    331331    <xsl:param name="string"/>
    332332    <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>
    334334      <xsl:call-template name="str.tokenize.keep.delimiters-characters">
    335335        <xsl:with-param name="string" select="substring($string, 2)"/>
     
    343343    <xsl:choose>
    344344      <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>
    346346      </xsl:when>
    347347      <xsl:when test="contains($string, $delimiter)">
     
    389389      </xsl:choose>
    390390    </xsl:template>
    391 
    392391 
    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() &gt; 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 engine
    436 that supports the evaluate() XSLT extension function. Your XSLT engine
    437 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>
    448392<xsl:template name="count.uri.path.depth">
    449393  <xsl:param name="filename" select="''"/>
Note: See TracChangeset for help on using the changeset viewer.