Ignore:
Timestamp:
12/10/2013 11:37:38 PM (11 years ago)
Author:
Krejzi <krejzi@…>
Branches:
7.5-systemd, 7.6-systemd, 7.7-systemd, 7.8-systemd, 7.9-systemd
Children:
112db9d
Parents:
f2a5108
Message:

Import new branch

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

File:
1 moved

Legend:

Unmodified
Added
Removed
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/html/glossary.xsl

    rf2a5108 rb1a51ac1  
    1 <?xml version="1.0" encoding="ASCII"?>
    2 <!--This file was created automatically by html2xhtml-->
    3 <!--from the HTML stylesheets.-->
    4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
     1<?xml version='1.0'?>
     2<!DOCTYPE xsl:stylesheet [
     3<!ENTITY % common.entities SYSTEM "../common/entities.ent">
     4%common.entities;
     5]>
     6<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     7                xmlns:xlink='http://www.w3.org/1999/xlink'
     8                exclude-result-prefixes="xlink"
     9                version='1.0'>
    510
    611<!-- ********************************************************************
    7      $Id$
     12     $Id: glossary.xsl 9709 2013-01-22 18:56:09Z bobstayton $
    813     ********************************************************************
    914
     
    1722
    1823<xsl:template match="glossary">
    19  
    20 <xsl:variable name="language">
    21   <xsl:call-template name="l10n.language"/>
    22 </xsl:variable>
    23 
    24 <xsl:variable name="lowercase">
    25   <xsl:call-template name="gentext">
    26     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
    27   </xsl:call-template>
    28 </xsl:variable>
    29 
    30 <xsl:variable name="uppercase">
    31   <xsl:call-template name="gentext">
    32     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
    33   </xsl:call-template>
    34 </xsl:variable>
    35 
     24  &setup-language-variable;
    3625  <xsl:call-template name="id.warning"/>
    3726
    38   <div>
    39     <xsl:apply-templates select="." mode="class.attribute"/>
    40     <xsl:if test="$generate.id.attributes != 0">
    41       <xsl:attribute name="id">
    42         <xsl:call-template name="object.id"/>
    43       </xsl:attribute>
    44     </xsl:if>
     27  <xsl:element name="{$div.element}">
     28    <xsl:apply-templates select="." mode="common.html.attributes"/>
     29    <xsl:call-template name="id.attribute">
     30      <xsl:with-param name="conditional" select="0"/>
     31    </xsl:call-template>
    4532
    4633    <xsl:call-template name="glossary.titlepage"/>
     
    6754            <xsl:when test="$glossary.sort != 0">
    6855              <xsl:apply-templates select="glossentry">
    69                 <xsl:sort lang="{$language}" select="translate(glossterm, $lowercase,                                              $uppercase)"/>
     56                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
    7057              </xsl:apply-templates>
    7158            </xsl:when>
     
    8471      <xsl:call-template name="process.footnotes"/>
    8572    </xsl:if>
    86   </div>
    87 </xsl:template>
    88 
    89 <xsl:template match="glossary/glossaryinfo"/>
    90 <xsl:template match="glossary/info"/>
    91 <xsl:template match="glossary/title"/>
    92 <xsl:template match="glossary/subtitle"/>
    93 <xsl:template match="glossary/titleabbrev"/>
     73  </xsl:element>
     74</xsl:template>
     75
     76<xsl:template match="glossary/glossaryinfo"></xsl:template>
     77<xsl:template match="glossary/info"></xsl:template>
     78<xsl:template match="glossary/title"></xsl:template>
     79<xsl:template match="glossary/subtitle"></xsl:template>
     80<xsl:template match="glossary/titleabbrev"></xsl:template>
    9481
    9582<!-- ==================================================================== -->
    9683
    9784<xsl:template match="glosslist">
    98  
    99 <xsl:variable name="language">
    100   <xsl:call-template name="l10n.language"/>
    101 </xsl:variable>
    102 
    103 <xsl:variable name="lowercase">
    104   <xsl:call-template name="gentext">
    105     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
    106   </xsl:call-template>
    107 </xsl:variable>
    108 
    109 <xsl:variable name="uppercase">
    110   <xsl:call-template name="gentext">
    111     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
    112   </xsl:call-template>
    113 </xsl:variable>
    114 
     85  &setup-language-variable;
    11586  <div>
    116     <xsl:apply-templates select="." mode="class.attribute"/>
     87    <xsl:apply-templates select="." mode="common.html.attributes"/>
     88    <xsl:call-template name="id.attribute"/>
    11789    <xsl:call-template name="anchor"/>
    11890    <xsl:if test="blockinfo/title|info/title|title">
     
    12395        <xsl:when test="$glossary.sort != 0">
    12496          <xsl:apply-templates select="glossentry">
    125             <xsl:sort lang="{$language}" select="translate(glossterm, $lowercase,                                          $uppercase)"/>
     97                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
    12698          </xsl:apply-templates>
    12799        </xsl:when>
     
    137109
    138110<xsl:template match="glossdiv">
    139  
    140 <xsl:variable name="language">
    141   <xsl:call-template name="l10n.language"/>
    142 </xsl:variable>
    143 
    144 <xsl:variable name="lowercase">
    145   <xsl:call-template name="gentext">
    146     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
    147   </xsl:call-template>
    148 </xsl:variable>
    149 
    150 <xsl:variable name="uppercase">
    151   <xsl:call-template name="gentext">
    152     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
    153   </xsl:call-template>
    154 </xsl:variable>
    155 
     111  &setup-language-variable;
    156112  <xsl:call-template name="id.warning"/>
    157113
    158114  <div>
    159     <xsl:apply-templates select="." mode="class.attribute"/>
     115    <xsl:apply-templates select="." mode="common.html.attributes"/>
     116    <xsl:call-template name="id.attribute">
     117      <xsl:with-param name="conditional" select="0"/>
     118    </xsl:call-template>
    160119    <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
    161120
     
    164123        <xsl:when test="$glossary.sort != 0">
    165124          <xsl:apply-templates select="glossentry">
    166             <xsl:sort lang="{$language}" select="translate(glossterm, $lowercase,                                          $uppercase)"/>
     125            <xsl:sort lang="{$language}"
     126                      select="translate(glossterm, $lowercase,
     127                                        $uppercase)"/>
    167128          </xsl:apply-templates>
    168129        </xsl:when>
     
    177138<xsl:template match="glossdiv/title">
    178139  <h3>
    179     <xsl:apply-templates select="." mode="class.attribute"/>
     140    <xsl:apply-templates select="." mode="common.html.attributes"/>
    180141    <xsl:apply-templates/>
    181142  </h3>
     
    196157    <xsl:when test="$glossentry.show.acronym = 'primary'">
    197158      <dt>
     159        <xsl:call-template name="id.attribute">
     160          <xsl:with-param name="conditional">
     161            <xsl:choose>
     162              <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
     163              <xsl:otherwise>1</xsl:otherwise>
     164            </xsl:choose>
     165          </xsl:with-param>
     166        </xsl:call-template>
    198167        <xsl:call-template name="anchor">
    199168          <xsl:with-param name="conditional">
     
    220189    <xsl:when test="$glossentry.show.acronym = 'yes'">
    221190      <dt>
     191        <xsl:call-template name="id.attribute">
     192          <xsl:with-param name="conditional">
     193            <xsl:choose>
     194              <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
     195              <xsl:otherwise>1</xsl:otherwise>
     196            </xsl:choose>
     197          </xsl:with-param>
     198        </xsl:call-template>
    222199        <xsl:call-template name="anchor">
    223200          <xsl:with-param name="conditional">
     
    240217    <xsl:otherwise>
    241218      <dt>
     219        <xsl:call-template name="id.attribute">
     220          <xsl:with-param name="conditional">
     221            <xsl:choose>
     222              <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
     223              <xsl:otherwise>1</xsl:otherwise>
     224            </xsl:choose>
     225          </xsl:with-param>
     226        </xsl:call-template>
    242227        <xsl:call-template name="anchor">
    243228          <xsl:with-param name="conditional">
     
    258243
    259244<xsl:template match="glossentry/glossterm">
    260   <xsl:apply-templates/>
     245  <span>
     246    <xsl:apply-templates select="." mode="common.html.attributes"/>
     247    <xsl:call-template name="id.attribute"/>
     248    <xsl:call-template name="anchor"/>
     249    <xsl:apply-templates/>
     250  </span>
    261251  <xsl:if test="following-sibling::glossterm">, </xsl:if>
    262252</xsl:template>
     
    279269  <xsl:variable name="targets" select="key('id', $otherterm)"/>
    280270  <xsl:variable name="target" select="$targets[1]"/>
     271  <xsl:variable name="xlink" select="@xlink:href"/>
    281272
    282273  <dd>
     
    293284          <xsl:when test="$target">
    294285            <a>
    295               <xsl:apply-templates select="." mode="class.attribute"/>
     286              <xsl:apply-templates select="." mode="common.html.attributes"/>
     287              <xsl:call-template name="id.attribute"/>
    296288              <xsl:attribute name="href">
    297289                <xsl:call-template name="href.target">
     
    301293              <xsl:apply-templates select="$target" mode="xref-to"/>
    302294            </a>
     295          </xsl:when>
     296          <xsl:when test="$xlink">
     297            <xsl:call-template name="simple.xlink">
     298              <xsl:with-param name="content">
     299                <xsl:apply-templates/>
     300              </xsl:with-param>
     301            </xsl:call-template>
    303302          </xsl:when>
    304303          <xsl:when test="$otherterm != '' and not($target)">
     
    319318        <xsl:with-param name="title" select="$title"/>
    320319      </xsl:call-template>
    321       <xsl:text>.</xsl:text>
    322320    </p>
    323321  </dd>
     
    326324<xsl:template match="glossentry/glossdef">
    327325  <dd>
     326    <xsl:apply-templates select="." mode="common.html.attributes"/>
     327    <xsl:call-template name="id.attribute"/>
     328    <xsl:call-template name="anchor"/>
    328329    <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/>
    329330    <xsl:if test="glossseealso">
     
    351352  <xsl:variable name="targets" select="key('id', $otherterm)"/>
    352353  <xsl:variable name="target" select="$targets[1]"/>
     354  <xsl:variable name="xlink" select="@xlink:href"/>
    353355
    354356  <xsl:choose>
    355357    <xsl:when test="$target">
    356358      <a>
    357         <xsl:apply-templates select="." mode="class.attribute"/>
     359        <xsl:apply-templates select="." mode="common.html.attributes"/>
     360        <xsl:call-template name="id.attribute"/>
    358361        <xsl:attribute name="href">
    359362          <xsl:call-template name="href.target">
     
    363366        <xsl:apply-templates select="$target" mode="xref-to"/>
    364367      </a>
     368    </xsl:when>
     369    <xsl:when test="$xlink">
     370      <xsl:call-template name="simple.xlink">
     371        <xsl:with-param name="content">
     372          <xsl:apply-templates/>
     373        </xsl:with-param>
     374      </xsl:call-template>
    365375    </xsl:when>
    366376    <xsl:when test="$otherterm != '' and not($target)">
     
    377387
    378388  <xsl:choose>
    379     <xsl:when test="position() = last()">
    380       <xsl:text>.</xsl:text>
    381     </xsl:when>
     389    <xsl:when test="position() = last()"/>
    382390    <xsl:otherwise>
    383       <xsl:text>, </xsl:text>
     391                <xsl:call-template name="gentext.template">
     392                  <xsl:with-param name="context" select="'glossary'"/>
     393                  <xsl:with-param name="name" select="'seealso-separator'"/>
     394                </xsl:call-template>
    384395    </xsl:otherwise>
    385396  </xsl:choose>
     
    391402
    392403<xsl:template match="glossary[@role='auto']" priority="2">
    393  
    394 <xsl:variable name="language">
    395   <xsl:call-template name="l10n.language"/>
    396 </xsl:variable>
    397 
    398 <xsl:variable name="lowercase">
    399   <xsl:call-template name="gentext">
    400     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
    401   </xsl:call-template>
    402 </xsl:variable>
    403 
    404 <xsl:variable name="uppercase">
    405   <xsl:call-template name="gentext">
    406     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
    407   </xsl:call-template>
    408 </xsl:variable>
    409 
    410   <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
     404  &setup-language-variable;
     405  <xsl:variable name="terms"
     406                select="//glossterm[not(parent::glossdef)]|//firstterm"/>
    411407  <xsl:variable name="collection" select="document($glossary.collection, .)"/>
    412408
     
    430426
    431427  <div>
    432     <xsl:apply-templates select="." mode="class.attribute"/>
    433     <xsl:if test="$generate.id.attributes != 0">
    434       <xsl:attribute name="id">
    435         <xsl:call-template name="object.id"/>
    436       </xsl:attribute>
    437     </xsl:if>
     428    <xsl:apply-templates select="." mode="common.html.attributes"/>
     429    <xsl:call-template name="id.attribute">
     430      <xsl:with-param name="conditional" select="0"/>
     431    </xsl:call-template>
    438432
    439433    <xsl:call-template name="glossary.titlepage"/>
     
    464458            <xsl:when test="$glossary.sort != 0">
    465459              <xsl:for-each select="$collection//glossentry">
    466                 <xsl:sort lang="{$language}" select="translate(glossterm, $lowercase,                                              $uppercase)"/>
     460                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
    467461                <xsl:variable name="cterm" select="glossterm"/>
    468462                <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
     
    498492  <xsl:param name="terms" select="."/>
    499493
    500  
    501 <xsl:variable name="language">
    502   <xsl:call-template name="l10n.language"/>
    503 </xsl:variable>
    504 
    505 <xsl:variable name="lowercase">
    506   <xsl:call-template name="gentext">
    507     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
    508   </xsl:call-template>
    509 </xsl:variable>
    510 
    511 <xsl:variable name="uppercase">
    512   <xsl:call-template name="gentext">
    513     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
    514   </xsl:call-template>
    515 </xsl:variable>
    516 
     494  &setup-language-variable;
    517495
    518496  <div>
    519     <xsl:apply-templates select="." mode="class.attribute"/>
     497    <xsl:apply-templates select="." mode="common.html.attributes"/>
     498    <xsl:call-template name="id.attribute">
     499      <xsl:with-param name="conditional" select="0"/>
     500    </xsl:call-template>
    520501    <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
    521502
     
    524505        <xsl:when test="$glossary.sort != 0">
    525506          <xsl:for-each select="glossentry">
    526             <xsl:sort lang="{$language}" select="translate(glossterm, $lowercase,                                          $uppercase)"/>
     507                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
    527508            <xsl:variable name="cterm" select="glossterm"/>
    528509            <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
Note: See TracChangeset for help on using the changeset viewer.