Changeset 00b1e11 in clfs-embedded for BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common
- Timestamp:
- Jul 21, 2007, 8:07:11 AM (17 years ago)
- Branches:
- master
- Children:
- a6966fa
- Parents:
- 3ca2208
- Location:
- BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/common.xsl
r3ca2208 r00b1e11 15 15 copyright and other information. 16 16 17 This file contains general templates common to both the HTML and FO18 versions of the DocBook stylesheets.19 17 ******************************************************************** --> 20 18 21 <doc:reference xmlns=""> 22 <referenceinfo> 23 <releaseinfo role="meta"> 24 $Id$ 25 </releaseinfo> 26 <author><surname>Walsh</surname> 27 <firstname>Norman</firstname></author> 28 <copyright><year>1999-2007</year> 29 <holder>Norman Walsh</holder> 30 </copyright> 31 </referenceinfo> 32 <title>Common Template Reference</title> 33 34 <partintro id="partintro"> 35 <title>Introduction</title> 36 37 <para>This is technical reference documentation for the âcommonâ 38 templates in the DocBook XSL Stylesheets. The common templates are 39 âcommonâ because they are shared across output formats (that is, 40 theyâre not output-format-dependent).</para> 41 42 <para>This documentation is not intended to be <quote>user</quote> 43 documentation. It is provided for developers writing 44 customization layers for the stylesheets, and for anyone who's 45 interested in <quote>how it works</quote>.</para> 46 47 </partintro> 48 19 <doc:reference xmlns="" xml:id="base"> 20 <info> 21 <title>Common » Base Template Reference</title> 22 <releaseinfo role="meta"> 23 $Id$ 24 </releaseinfo> 25 </info> 26 <!-- * yes, partintro is a valid child of a reference... --> 27 <partintro xml:id="partintro"> 28 <title>Introduction</title> 29 <para>This is technical reference documentation for the âbaseâ 30 set of common templates in the DocBook XSL Stylesheets.</para> 31 <para>This is not intended to be user documentation. It is 32 provided for developers writing customization layers for the 33 stylesheets.</para> 34 </partintro> 49 35 </doc:reference> 50 36 … … 184 170 <refdescription id="section.level-desc"> 185 171 <para>This template calculates the hierarchical level of a section. 186 The element < sgmltag>sect1</sgmltag> is at level 1, <sgmltag>sect2</sgmltag> is172 The element <tag>sect1</tag> is at level 1, <tag>sect2</tag> is 187 173 at level 2, etc.</para> 188 174 … … 1325 1311 <!-- ====================================================================== --> 1326 1312 <!-- OrderedList Numeration --> 1327 1328 <xsl:template name="orderedlist-starting-number"> 1329 <xsl:param name="list" select="."/> 1330 1331 <!-- Need a neutral dbxxx --> 1332 <xsl:variable name="pi-html-start"> 1333 <xsl:call-template name="pi-attribute"> 1334 <xsl:with-param name="pis" 1335 select="$list/processing-instruction('dbhtml')"/> 1336 <xsl:with-param name="attribute" select="'start'"/> 1337 </xsl:call-template> 1338 </xsl:variable> 1339 1340 <xsl:variable name="pi-fo-start"> 1341 <xsl:call-template name="pi-attribute"> 1342 <xsl:with-param name="pis" 1343 select="$list/processing-instruction('dbfo')"/> 1344 <xsl:with-param name="attribute" select="'start'"/> 1345 </xsl:call-template> 1346 </xsl:variable> 1347 1313 <xsl:template name="output-orderedlist-starting-number"> 1314 <xsl:param name="list"/> 1315 <xsl:param name="pi-start"/> 1348 1316 <xsl:choose> 1349 1317 <xsl:when test="not($list/@continuation = 'continues')"> … … 1352 1320 <xsl:value-of select="@startingnumber"/> 1353 1321 </xsl:when> 1354 <xsl:when test="$pi-html-start != ''"> 1355 <xsl:value-of select="$pi-html-start"/> 1356 </xsl:when> 1357 <xsl:when test="$pi-fo-start != ''"> 1358 <xsl:value-of select="$pi-fo-start"/> 1322 <xsl:when test="$pi-start != ''"> 1323 <xsl:value-of select="$pi-start"/> 1359 1324 </xsl:when> 1360 1325 <xsl:otherwise>1</xsl:otherwise> … … 1363 1328 <xsl:otherwise> 1364 1329 <xsl:variable name="prevlist" 1365 1330 select="$list/preceding::orderedlist[1]"/> 1366 1331 <xsl:choose> 1367 1332 <xsl:when test="count($prevlist) = 0">2</xsl:when> … … 1383 1348 <!-- context node must be a listitem in an orderedlist --> 1384 1349 <xsl:param name="node" select="."/> 1385 1386 1350 <xsl:choose> 1387 1351 <xsl:when test="$node/@override"> … … 1904 1868 the final item in an inline list (though it could also be useful 1905 1869 for generating choice separators for non-inline lists).</para> 1906 1907 1870 <para>It currently works by evaluating a processing instruction 1908 1871 (PI) of the form <?dbchoice choice="foo"?> : 1909 1910 1872 <itemizedlist> 1911 1873 <listitem> 1912 <simpara>if the value of the < sgmltag>choice</sgmltag>1874 <simpara>if the value of the <tag>choice</tag> 1913 1875 pseudo-attribute is "and" or "or", returns a localized "and" 1914 1876 or "or"</simpara> … … 1916 1878 <listitem> 1917 1879 <simpara>otherwise returns the literal value of the 1918 < sgmltag>choice</sgmltag> pseudo-attribute</simpara>1880 <tag>choice</tag> pseudo-attribute</simpara> 1919 1881 </listitem> 1920 1882 </itemizedlist> 1921 1922 1883 The latter is provided only as a temporary workaround because the 1923 1884 locale files do not currently have translations for the word … … 1925 1886 logical "or" separator in French (for example), you currently need 1926 1887 to do this: 1927 1928 1888 <literallayout><?dbchoice choice="ou"?></literallayout> 1929 1889 </para> 1930 1931 1890 <warning> 1932 <para>The < sgmltag>dbchoice</sgmltag> processing instruction is1891 <para>The <tag>dbchoice</tag> processing instruction is 1933 1892 an unfortunate hack; support for it may disappear in the future 1934 1893 (particularly if and when a more appropriate means for marking … … 1938 1897 </doc:template> 1939 1898 <xsl:template name="select.choice.separator"> 1940 1941 1899 <xsl:variable name="choice"> 1942 <xsl:call-template name="pi-attribute"> 1943 <xsl:with-param name="pis" select="processing-instruction('dbchoice')"/> 1944 <xsl:with-param name="attribute">choice</xsl:with-param> 1945 </xsl:call-template> 1946 </xsl:variable> 1947 1900 <xsl:call-template name="pi.dbchoice_choice"/> 1901 </xsl:variable> 1948 1902 <xsl:choose> 1949 1903 <!-- if value of $choice is "and" or "or", translate to equivalent in --> … … 2025 1979 </xsl:choose> 2026 1980 </xsl:template> 2027 2028 1981 </xsl:stylesheet> -
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/de.xml
r3ca2208 r00b1e11 20 20 21 21 <!-- ******************************************************************** --> 22 <!-- In these files, % with a letter is used for a placeholder: --> 23 <!-- %t is the current element's title --> 24 <!-- %s is the current element's subtitle (if applicable)--> 25 <!-- %n is the current element's number label--> 26 <!-- %p is the current element's page number (if applicable)--> 27 <!-- ******************************************************************** --> 28 22 29 23 30 <l:gentext key="Abstract" text="Zusammenfassung"/> -
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/en.xml
r3ca2208 r00b1e11 20 20 21 21 <!-- ******************************************************************** --> 22 <!-- In these files, % with a letter is used for a placeholder: --> 23 <!-- %t is the current element's title --> 24 <!-- %s is the current element's subtitle (if applicable)--> 25 <!-- %n is the current element's number label--> 26 <!-- %p is the current element's page number (if applicable)--> 27 <!-- ******************************************************************** --> 28 22 29 23 30 <l:gentext key="Abstract" text="Abstract"/> -
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/es.xml
r3ca2208 r00b1e11 20 20 21 21 <!-- ******************************************************************** --> 22 <!-- In these files, % with a letter is used for a placeholder: --> 23 <!-- %t is the current element's title --> 24 <!-- %s is the current element's subtitle (if applicable)--> 25 <!-- %n is the current element's number label--> 26 <!-- %p is the current element's page number (if applicable)--> 27 <!-- ******************************************************************** --> 28 22 29 23 30 <l:gentext key="Abstract" text="Resumen"/> -
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/fr.xml
r3ca2208 r00b1e11 20 20 21 21 <!-- ******************************************************************** --> 22 <!-- In these files, % with a letter is used for a placeholder: --> 23 <!-- %t is the current element's title --> 24 <!-- %s is the current element's subtitle (if applicable)--> 25 <!-- %n is the current element's number label--> 26 <!-- %p is the current element's page number (if applicable)--> 27 <!-- ******************************************************************** --> 28 22 29 23 30 <l:gentext key="Abstract" text="Résumé"/> -
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/it.xml
r3ca2208 r00b1e11 20 20 21 21 <!-- ******************************************************************** --> 22 <!-- In these files, % with a letter is used for a placeholder: --> 23 <!-- %t is the current element's title --> 24 <!-- %s is the current element's subtitle (if applicable)--> 25 <!-- %n is the current element's number label--> 26 <!-- %p is the current element's page number (if applicable)--> 27 <!-- ******************************************************************** --> 28 22 29 23 30 <l:gentext key="Abstract" text="Estratto"/> -
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/labels.xsl
r3ca2208 r00b1e11 194 194 </xsl:when> 195 195 <xsl:when test="string($reference.autolabel) != 0"> 196 <xsl:if test="$component.label.includes.part.label != 0 and 197 ancestor::part"> 198 <xsl:variable name="part.label"> 199 <xsl:apply-templates select="ancestor::part" 200 mode="label.markup"/> 201 </xsl:variable> 202 <xsl:if test="$part.label != ''"> 203 <xsl:value-of select="$part.label"/> 204 <xsl:apply-templates select="ancestor::part" 205 mode="intralabel.punctuation"/> 206 </xsl:if> 207 </xsl:if> 196 208 <xsl:variable name="format"> 197 209 <xsl:call-template name="autolabel.format"> … … 199 211 </xsl:call-template> 200 212 </xsl:variable> 201 <xsl:number from="book" count="reference" format="{$format}" level="any"/> 213 <xsl:choose> 214 <xsl:when test="$label.from.part != 0 and ancestor::part"> 215 <xsl:number from="part" count="reference" format="{$format}" level="any"/> 216 </xsl:when> 217 <xsl:otherwise> 218 <xsl:number from="book" count="reference" format="{$format}" level="any"/> 219 </xsl:otherwise> 220 </xsl:choose> 202 221 </xsl:when> 203 222 </xsl:choose> -
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/pi.xsl
r3ca2208 r00b1e11 1 1 <?xml version='1.0'?> 2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" 4 xmlns:date="http://exslt.org/dates-and-times" 5 xmlns:exsl="http://exslt.org/common" 6 exclude-result-prefixes="doc date exsl" 7 extension-element-prefixes="date exsl" 8 version='1.0'> 2 <xsl:stylesheet 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" 5 xmlns:date="http://exslt.org/dates-and-times" 6 xmlns:exsl="http://exslt.org/common" 7 xmlns:xlink="http://www.w3.org/1999/xlink" 8 exclude-result-prefixes="doc date exsl" 9 extension-element-prefixes="date exsl" 10 version='1.0'> 9 11 10 12 <!-- ******************************************************************** … … 16 18 copyright and other information. 17 19 18 This file contains general templates for processing processing19 instructions common to both the HTML and FO versions of the20 DocBook stylesheets.21 20 ******************************************************************** --> 22 21 23 <!-- Process PIs also on title pages --> 24 <xsl:template match="processing-instruction()" mode="titlepage.mode"> 25 <xsl:apply-templates select="."/> 26 </xsl:template> 27 28 <xsl:template match="processing-instruction('dbtimestamp')"> 22 <doc:reference xmlns=""><info><title>Common Processing Instruction Reference</title> 23 <releaseinfo role="meta"> 24 $Id$ 25 </releaseinfo> 26 </info> 27 <partintro id="partintro"> 28 <title>Introduction</title> 29 <para>This is generated reference documentation for all 30 user-specifiable processing instructions (PIs) in the 31 âcommonâ part of the DocBook XSL stylesheets. 32 <note> 33 <para>You add these PIs at particular points in a document to 34 cause specific âexceptionsâ to formatting/output behavior. To 35 make global changes in formatting/output behavior across an 36 entire document, itâs better to do it by setting an 37 appropriate stylesheet parameter (if there is one).</para> 38 </note> 39 </para> 40 </partintro> 41 </doc:reference> 42 43 <!-- ==================================================================== --> 44 <doc:pi name="dbchoice_choice" xmlns=""> 45 <refpurpose>Generates a localized choice separator</refpurpose> 46 <refdescription id="select.choice.separator-desc"> 47 <para>Use the <tag class="xmlpi">dbchoice choice</tag> PI to 48 generate an appropriate localized âchoiceâ separator (for 49 example, <literal>and</literal> or <literal>or</literal>) 50 before the final item in an inline <tag>simplelist</tag></para> 51 <warning> 52 <para>This PI is a less-than-ideal hack; support for it may 53 disappear in the future (particularly if and when a more 54 appropriate means for marking up "choice" lists becomes 55 available in DocBook).</para> 56 </warning> 57 </refdescription> 58 <refsynopsisdiv> 59 <synopsis><tag class="xmlpi">dbchoice choice="and"|"or"|<replaceable>string</replaceable>"</tag></synopsis> 60 </refsynopsisdiv> 61 <refparameter> 62 <variablelist> 63 <varlistentry><term>choice="and"</term> 64 <listitem> 65 <para>generates a localized <literal>and</literal> separator</para> 66 </listitem> 67 </varlistentry> 68 <varlistentry><term>choice="or"</term> 69 <listitem> 70 <para>generates a localized <literal>or</literal> separator</para> 71 </listitem> 72 </varlistentry> 73 <varlistentry><term>choice="<replaceable>string</replaceable>"</term> 74 <listitem> 75 <para>generates a literal <replaceable>string</replaceable> separator</para> 76 </listitem> 77 </varlistentry> 78 </variablelist> 79 </refparameter> 80 </doc:pi> 81 <xsl:template name="pi.dbchoice_choice"> 82 <xsl:param name="node" select="."/> 83 <xsl:call-template name="pi-attribute"> 84 <xsl:with-param name="pis" select="$node/processing-instruction('dbchoice')"/> 85 <xsl:with-param name="attribute">choice</xsl:with-param> 86 </xsl:call-template> 87 </xsl:template> 88 89 <doc:pi name="dbtimestamp" xmlns=""> 90 <refpurpose>Inserts a date timestamp</refpurpose> 91 <refdescription> 92 <para>Use the <tag>dbtimestamp</tag> PI at any point in a 93 source document to cause a date timestamp (a formatted 94 string representing the current date and time) to be 95 inserted in output of the document.</para> 96 </refdescription> 97 <refsynopsisdiv> 98 <synopsis><tag class="xmlpi">dbtimestamp format="<replaceable>formatstring</replaceable>" [padding="0"|"1"]</tag></synopsis> 99 </refsynopsisdiv> 100 <refparameter> 101 <variablelist> 102 <varlistentry><term>format="<replaceable>formatstring</replaceable>"</term> 103 <listitem> 104 <para>Specifies format in which the date and time are 105 output</para> 106 <note> 107 <para>For details of the content of the format string, 108 see <link role="tcg" xlink:href="Datetime.html" 109 >Date and time</link>.</para> 110 </note> 111 </listitem> 112 </varlistentry> 113 <varlistentry><term>padding="0"|"1"</term> 114 <listitem> 115 <para>Specifies padding behavior; if non-zero, padding is is added</para> 116 </listitem> 117 </varlistentry> 118 </variablelist> 119 </refparameter> 120 </doc:pi> 121 <xsl:template name="pi.dbtimestamp"> 29 122 <xsl:variable name="format"> 30 123 <xsl:variable name="pi-format"> … … 45 138 </xsl:otherwise> 46 139 </xsl:choose> 47 </xsl:variable> 48 140 </xsl:variable> 49 141 <xsl:variable name="padding"> 50 142 <xsl:variable name="pi-padding"> … … 61 153 </xsl:choose> 62 154 </xsl:variable> 63 64 155 <xsl:variable name="date"> 65 156 <xsl:choose> … … 73 164 </xsl:choose> 74 165 </xsl:variable> 75 76 166 <xsl:choose> 77 167 <xsl:when test="function-available('date:date-time') or 78 168 function-available('date:dateTime')"> 79 169 <xsl:call-template name="datetime.format"> 80 170 <xsl:with-param name="date" select="$date"/> … … 89 179 </xsl:otherwise> 90 180 </xsl:choose> 91 181 </xsl:template> 182 183 <doc:pi name="dbtex_delims" xmlns=""> 184 <refpurpose>Generates delimiters around embedded TeX equations 185 in output</refpurpose> 186 <refdescription> 187 <para>Use the <tag class="xmlpi">dbtex delims</tag> PI as a 188 child of a <tag>textobject</tag> containing embedded TeX 189 markup, to cause that markup to be surrounded by 190 <literal>$</literal> delimiter characters in output.</para> 191 </refdescription> 192 <refsynopsisdiv> 193 <synopsis><tag class="xmlpi">dbtex delims="no"|"yes"</tag></synopsis> 194 </refsynopsisdiv> 195 <refparameter> 196 <variablelist> 197 <varlistentry><term>dbtex delims="no"|"yes"</term> 198 <listitem> 199 <para>Specifies whether delimiters are output</para> 200 </listitem> 201 </varlistentry> 202 </variablelist> 203 </refparameter> 204 <refsee role="params"> 205 <para><parameter>tex.math.delims</parameter></para> 206 </refsee> 207 <refsee role="tcg"> 208 <para><link role="tcg" 209 xlink:href="TexMath.html" 210 >DBTeXMath</link></para> 211 </refsee> 212 </doc:pi> 213 <xsl:template name="pi.dbtex_delims"> 214 <xsl:param name="node" select="."/> 215 <xsl:call-template name="pi-attribute"> 216 <xsl:with-param name="pis" select="$node/processing-instruction('dbtex')"/> 217 <xsl:with-param name="attribute" select="'delims'"/> 218 </xsl:call-template> 219 </xsl:template> 220 221 <!-- ==================================================================== --> 222 223 <xsl:template match="processing-instruction()" mode="titlepage.mode"> 224 <!-- * Als process PIs on title pages --> 225 <xsl:apply-templates select="."/> 226 </xsl:template> 227 228 <xsl:template match="processing-instruction('dbtimestamp')"> 229 <xsl:call-template name="pi.dbtimestamp"/> 92 230 </xsl:template> 93 231 … … 96 234 <xsl:param name="format"/> 97 235 <xsl:param name="padding" select="1"/> 98 99 236 <xsl:if test="$format != ''"> 100 237 <!-- replace any whitespace in the format string with a non-breaking space --> 101 238 <xsl:variable name="format-nbsp" 102 103 104 239 select="translate($format, 240 ' 	
', 241 '    ')"/> 105 242 <xsl:variable name="tokenized-format-string"> 106 243 <xsl:call-template name="str.tokenize.keep.delimiters"> 107 108 244 <xsl:with-param name="string" select="$format-nbsp"/> 245 <xsl:with-param name="delimiters" select="' ,./-()[]:'"/> 109 246 </xsl:call-template> 110 247 </xsl:variable> 111 112 <xsl:choose>113 <!-- include extra test for Xalan quirk -->114 <xsl:when test="function-available('exsl:node-set') or115 contains(system-property('xsl:vendor'),'Apache Software Foundation')">116 <!-- We must preserve context node in order to get valid language -->117 <xsl:variable name="context" select="."/>118 <xsl:for-each select="exsl:node-set($tokenized-format-string)/node()">119 <xsl:variable name="token">120 < xsl:value-of select="."/>121 </xsl:variable>122 <!-- Restore context node -->123 <xsl:for-each select="$context">124 <xsl:choose>125 <xsl:when test="$token = 'a'">126 <xsl:call-template name="gentext.template">127 <xsl:with-param name="context" select="'datetime-abbrev'"/>128 < xsl:with-param name="name" select="date:day-abbreviation($date)"/>129 </xsl: call-template>130 </xsl:when>131 <xsl:when test="$token = 'A'">132 <xsl:call-template name="gentext.template">133 <xsl:with-param name="context" select="'datetime-full'"/>134 < xsl:with-param name="name" select="date:day-name($date)"/>135 </xsl: call-template>136 </xsl:when>137 <xsl:when test="$token = 'b'">138 <xsl:call-template name="gentext.template">139 <xsl:with-param name="context" select="'datetime-abbrev'"/>140 < xsl:with-param name="name" select="date:month-abbreviation($date)"/>141 </xsl: call-template>142 </xsl:when>143 <xsl:when test="$token = 'c'">144 <xsl:value-of select="date:date($date)"/>145 <xsl:text> </xsl:text>146 < xsl:value-of select="date:time($date)"/>147 </xsl:when>148 <xsl:when test="$token = 'B'">149 <xsl:call-template name="gentext.template">150 <xsl:with-param name="context" select="'datetime-full'"/>151 < xsl:with-param name="name" select="date:month-name($date)"/>152 </xsl: call-template>153 </xsl:when>154 <xsl:when test="$token = 'd'">155 <xsl:if test="$padding = 1 and156 string-length(date:day-in-month($date)) = 1">0</xsl:if>157 < xsl:value-of select="date:day-in-month($date)"/>158 </xsl:when>159 <xsl:when test="$token = 'H'">160 <xsl:if test="$padding = 1 and string-length(date:hour-in-day($date)) = 1">0</xsl:if>161 < xsl:value-of select="date:hour-in-day($date)"/>162 </xsl:when>163 <xsl:when test="$token = 'j'">164 < xsl:value-of select="date:day-in-year($date)"/>165 </xsl:when>166 <xsl:when test="$token = 'm'">167 <xsl:if test="$padding = 1 and string-length(date:month-in-year($date)) = 1">0</xsl:if>168 < xsl:value-of select="date:month-in-year($date)"/>169 </xsl:when>170 <xsl:when test="$token = 'M'">171 <xsl:if test="string-length(date:minute-in-hour($date)) = 1">0</xsl:if>172 < xsl:value-of select="date:minute-in-hour($date)"/>173 </xsl:when>174 <xsl:when test="$token = 'S'">175 <xsl:if test="string-length(date:second-in-minute($date)) = 1">0</xsl:if>176 < xsl:value-of select="date:second-in-minute($date)"/>177 </xsl:when>178 <xsl:when test="$token = 'U'">179 < xsl:value-of select="date:week-in-year($date)"/>180 </xsl:when>181 <xsl:when test="$token = 'w'">182 < xsl:value-of select="date:day-in-week($date)"/>183 </xsl:when>184 <xsl:when test="$token = 'x'">185 < xsl:value-of select="date:date($date)"/>186 </xsl:when>187 <xsl:when test="$token = 'X'">188 < xsl:value-of select="date:time($date)"/>189 </xsl:when>190 <xsl:when test="$token = 'Y'">191 < xsl:value-of select="date:year($date)"/>192 </xsl:when>193 <xsl:otherwise>194 < xsl:value-of select="$token"/>195 </xsl: otherwise>196 </xsl: choose>248 <xsl:choose> 249 <!-- include extra test for Xalan quirk --> 250 <xsl:when test="function-available('exsl:node-set') or 251 contains(system-property('xsl:vendor'),'Apache Software Foundation')"> 252 <!-- We must preserve context node in order to get valid language --> 253 <xsl:variable name="context" select="."/> 254 <xsl:for-each select="exsl:node-set($tokenized-format-string)/node()"> 255 <xsl:variable name="token"> 256 <xsl:value-of select="."/> 257 </xsl:variable> 258 <!-- Restore context node --> 259 <xsl:for-each select="$context"> 260 <xsl:choose> 261 <xsl:when test="$token = 'a'"> 262 <xsl:call-template name="gentext.template"> 263 <xsl:with-param name="context" select="'datetime-abbrev'"/> 264 <xsl:with-param name="name" select="date:day-abbreviation($date)"/> 265 </xsl:call-template> 266 </xsl:when> 267 <xsl:when test="$token = 'A'"> 268 <xsl:call-template name="gentext.template"> 269 <xsl:with-param name="context" select="'datetime-full'"/> 270 <xsl:with-param name="name" select="date:day-name($date)"/> 271 </xsl:call-template> 272 </xsl:when> 273 <xsl:when test="$token = 'b'"> 274 <xsl:call-template name="gentext.template"> 275 <xsl:with-param name="context" select="'datetime-abbrev'"/> 276 <xsl:with-param name="name" select="date:month-abbreviation($date)"/> 277 </xsl:call-template> 278 </xsl:when> 279 <xsl:when test="$token = 'c'"> 280 <xsl:value-of select="date:date($date)"/> 281 <xsl:text> </xsl:text> 282 <xsl:value-of select="date:time($date)"/> 283 </xsl:when> 284 <xsl:when test="$token = 'B'"> 285 <xsl:call-template name="gentext.template"> 286 <xsl:with-param name="context" select="'datetime-full'"/> 287 <xsl:with-param name="name" select="date:month-name($date)"/> 288 </xsl:call-template> 289 </xsl:when> 290 <xsl:when test="$token = 'd'"> 291 <xsl:if test="$padding = 1 and 292 string-length(date:day-in-month($date)) = 1">0</xsl:if> 293 <xsl:value-of select="date:day-in-month($date)"/> 294 </xsl:when> 295 <xsl:when test="$token = 'H'"> 296 <xsl:if test="$padding = 1 and string-length(date:hour-in-day($date)) = 1">0</xsl:if> 297 <xsl:value-of select="date:hour-in-day($date)"/> 298 </xsl:when> 299 <xsl:when test="$token = 'j'"> 300 <xsl:value-of select="date:day-in-year($date)"/> 301 </xsl:when> 302 <xsl:when test="$token = 'm'"> 303 <xsl:if test="$padding = 1 and string-length(date:month-in-year($date)) = 1">0</xsl:if> 304 <xsl:value-of select="date:month-in-year($date)"/> 305 </xsl:when> 306 <xsl:when test="$token = 'M'"> 307 <xsl:if test="string-length(date:minute-in-hour($date)) = 1">0</xsl:if> 308 <xsl:value-of select="date:minute-in-hour($date)"/> 309 </xsl:when> 310 <xsl:when test="$token = 'S'"> 311 <xsl:if test="string-length(date:second-in-minute($date)) = 1">0</xsl:if> 312 <xsl:value-of select="date:second-in-minute($date)"/> 313 </xsl:when> 314 <xsl:when test="$token = 'U'"> 315 <xsl:value-of select="date:week-in-year($date)"/> 316 </xsl:when> 317 <xsl:when test="$token = 'w'"> 318 <xsl:value-of select="date:day-in-week($date)"/> 319 </xsl:when> 320 <xsl:when test="$token = 'x'"> 321 <xsl:value-of select="date:date($date)"/> 322 </xsl:when> 323 <xsl:when test="$token = 'X'"> 324 <xsl:value-of select="date:time($date)"/> 325 </xsl:when> 326 <xsl:when test="$token = 'Y'"> 327 <xsl:value-of select="date:year($date)"/> 328 </xsl:when> 329 <xsl:otherwise> 330 <xsl:value-of select="$token"/> 331 </xsl:otherwise> 332 </xsl:choose> 333 </xsl:for-each> 197 334 </xsl:for-each> 198 </xsl:for-each> 199 </xsl:when> 200 <xsl:otherwise> 201 <xsl:message> 202 Timestamp processing requires an XSLT processor with support 203 for the EXSLT node-set() function. 204 </xsl:message> 205 </xsl:otherwise> 206 </xsl:choose> 335 </xsl:when> 336 <xsl:otherwise> 337 <xsl:message> 338 Timestamp processing requires an XSLT processor with support 339 for the EXSLT node-set() function. 340 </xsl:message> 341 </xsl:otherwise> 342 </xsl:choose> 207 343 </xsl:if> 208 209 344 </xsl:template> 210 345 -
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/refentry.xsl
r3ca2208 r00b1e11 17 17 18 18 <!-- ==================================================================== --> 19 <doc:reference xmlns=""> 20 <referenceinfo> 19 <doc:reference xmlns="" xml:id="refentry"> 20 <info> 21 <title>Common » Refentry Metadata Template Reference</title> 21 22 <releaseinfo role="meta"> 22 23 $Id$ 23 24 </releaseinfo> 24 <corpauthor>The DocBook Project</corpauthor> 25 <copyright> 26 <year>2005-2007</year> 27 <holder>The DocBook Project</holder> 28 </copyright> 29 </referenceinfo> 30 <title>Refentry Metadata-Gathering Template Reference</title> 31 32 <partintro id="partintro"> 25 </info> 26 <!-- * yes, partintro is a valid child of a reference... --> 27 <partintro xml:id="partintro"> 33 28 <title>Introduction</title> 34 35 <para>This is technical reference documentation for the "refentry 36 metadata gathering" templates in the DocBook XSL Stylesheets.</para> 37 29 <para>This is technical reference documentation for the ârefentry 30 metadataâ templates in the DocBook XSL Stylesheets.</para> 38 31 <para>This is not intended to be user documentation. It is provided 39 for developers writing customization layers for the 40 stylesheets.</para> 41 32 for developers writing customization layers for the stylesheets.</para> 42 33 <note> 43 34 <para>Currently, only the manpages stylesheets make use of these 44 35 templates. They are, however, potentially useful elsewhere.</para> 45 36 </note> 46 47 37 </partintro> 48 49 38 </doc:reference> 50 39 … … 57 46 example, users view Unix man pages as, well, individual pages, not as 58 47 part of a "book" of some kind. Therefore, it is sometimes necessary to 59 embed "context" information in output for each < sgmltag>refentry</sgmltag>.</para>48 embed "context" information in output for each <tag>refentry</tag>.</para> 60 49 61 50 <para>However, one problem is that different users mark up that 62 51 context information in different ways. Often (usually), the 63 52 context information is not actually part of the content of the 64 < sgmltag>refentry</sgmltag> itself, but instead part of the content of a65 parent or ancestor element to the the < sgmltag>refentry</sgmltag>. And53 <tag>refentry</tag> itself, but instead part of the content of a 54 parent or ancestor element to the the <tag>refentry</tag>. And 66 55 even then, DocBook provides a variety of elements that users might 67 56 potentially use to mark up the same kind of information. One user 68 might use the < sgmltag>productnumber</sgmltag> element to mark up version57 might use the <tag>productnumber</tag> element to mark up version 69 58 information about a particular product, while another might use 70 the < sgmltag>releaseinfo</sgmltag> element.</para>59 the <tag>releaseinfo</tag> element.</para> 71 60 72 61 <para>Taking all that in mind, the 73 62 <function>get.refentry.metadata</function> template tries to gather 74 metadata from a < sgmltag>refentry</sgmltag> element and its ancestor63 metadata from a <tag>refentry</tag> element and its ancestor 75 64 elements in an intelligent and user-configurable way. The basic 76 65 mechanism used in the XPath expressions throughout this stylesheet 77 66 is to select the relevant metadata from the *info element that is 78 closest to the actual < sgmltag>refentry</sgmltag> â either on the79 < sgmltag>refentry</sgmltag> itself, or on its nearest ancestor.</para>67 closest to the actual <tag>refentry</tag> â either on the 68 <tag>refentry</tag> itself, or on its nearest ancestor.</para> 80 69 81 70 <note> … … 92 81 <term>refname</term> 93 82 <listitem> 94 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>83 <para>The first <tag>refname</tag> in the refentry</para> 95 84 </listitem> 96 85 </varlistentry> … … 98 87 <term>info</term> 99 88 <listitem> 100 <para>A set of info nodes (from a < sgmltag>refentry</sgmltag>89 <para>A set of info nodes (from a <tag>refentry</tag> 101 90 element and its ancestors)</para> 102 91 </listitem> … … 195 184 <para>The <literal>man(7)</literal> man page describes this as "the 196 185 title of the man page (e.g., <literal>MAN</literal>). This differs 197 from < sgmltag>refname</sgmltag> in that, if the <sgmltag>refentry</sgmltag> has a198 < sgmltag>refentrytitle</sgmltag>, we use that as the <sgmltag>title</sgmltag>;199 otherwise, we just use first < sgmltag>refname</sgmltag> in the first200 < sgmltag>refnamediv</sgmltag> in the source.</para>186 from <tag>refname</tag> in that, if the <tag>refentry</tag> has a 187 <tag>refentrytitle</tag>, we use that as the <tag>title</tag>; 188 otherwise, we just use first <tag>refname</tag> in the first 189 <tag>refnamediv</tag> in the source.</para> 201 190 </refdescription> 202 191 <refparameter id="get.refentry.title-params"> … … 205 194 <term>refname</term> 206 195 <listitem> 207 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>196 <para>The first <tag>refname</tag> in the refentry</para> 208 197 </listitem> 209 198 </varlistentry> … … 211 200 </refparameter> 212 201 <refreturn id="get.refentry.title-returns"> 213 <para>Returns a < sgmltag>title</sgmltag> node.</para></refreturn>202 <para>Returns a <tag>title</tag> node.</para></refreturn> 214 203 </doc:template> 215 204 <xsl:template name="get.refentry.title"> … … 233 222 <para>The <literal>man(7)</literal> man page describes this as "the 234 223 section number the man page should be placed in (e.g., 235 <literal>7</literal>)". If we do not find a < sgmltag>manvolnum</sgmltag>236 specified in the source, and we find that the < sgmltag>refentry</sgmltag> is224 <literal>7</literal>)". If we do not find a <tag>manvolnum</tag> 225 specified in the source, and we find that the <tag>refentry</tag> is 237 226 for a function, we use the section number <literal>3</literal> 238 227 ["Library calls (functions within program libraries)"]; otherwise, we … … 245 234 <term>refname</term> 246 235 <listitem> 247 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>236 <para>The first <tag>refname</tag> in the refentry</para> 248 237 </listitem> 249 238 </varlistentry> … … 324 313 <term>refname</term> 325 314 <listitem> 326 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>315 <para>The first <tag>refname</tag> in the refentry</para> 327 316 </listitem> 328 317 </varlistentry> … … 330 319 <term>info</term> 331 320 <listitem> 332 <para>A set of info nodes (from a < sgmltag>refentry</sgmltag>321 <para>A set of info nodes (from a <tag>refentry</tag> 333 322 element and its ancestors)</para> 334 323 </listitem> … … 343 332 </refparameter> 344 333 <refreturn id="get.refentry.date-returns"> 345 <para>Returns a < sgmltag>date</sgmltag> node.</para>334 <para>Returns a <tag>date</tag> node.</para> 346 335 </refreturn> 347 336 </doc:template> … … 496 485 <term>refname</term> 497 486 <listitem> 498 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>487 <para>The first <tag>refname</tag> in the refentry</para> 499 488 </listitem> 500 489 </varlistentry> … … 502 491 <term>info</term> 503 492 <listitem> 504 <para>A set of info nodes (from a < sgmltag>refentry</sgmltag>493 <para>A set of info nodes (from a <tag>refentry</tag> 505 494 element and its ancestors)</para> 506 495 </listitem> … … 516 505 </refparameter> 517 506 <refreturn id="get.refentry.source-returns"> 518 <para>Returns a < sgmltag>source</sgmltag> node.</para>507 <para>Returns a <tag>source</tag> node.</para> 519 508 </refreturn> 520 509 </doc:template> … … 612 601 <term>refname</term> 613 602 <listitem> 614 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>603 <para>The first <tag>refname</tag> in the refentry</para> 615 604 </listitem> 616 605 </varlistentry> … … 618 607 <term>info</term> 619 608 <listitem> 620 <para>A set of info nodes (from a < sgmltag>refentry</sgmltag>609 <para>A set of info nodes (from a <tag>refentry</tag> 621 610 element and its ancestors)</para> 622 611 </listitem> … … 796 785 <term>refname</term> 797 786 <listitem> 798 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>787 <para>The first <tag>refname</tag> in the refentry</para> 799 788 </listitem> 800 789 </varlistentry> … … 802 791 <term>info</term> 803 792 <listitem> 804 <para>A set of info nodes (from a < sgmltag>refentry</sgmltag>793 <para>A set of info nodes (from a <tag>refentry</tag> 805 794 element and its ancestors)</para> 806 795 </listitem> … … 982 971 <term>refname</term> 983 972 <listitem> 984 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>973 <para>The first <tag>refname</tag> in the refentry</para> 985 974 </listitem> 986 975 </varlistentry> … … 988 977 <term>info</term> 989 978 <listitem> 990 <para>A set of info nodes (from a < sgmltag>refentry</sgmltag>979 <para>A set of info nodes (from a <tag>refentry</tag> 991 980 element and its ancestors)</para> 992 981 </listitem> … … 1002 991 </refparameter> 1003 992 <refreturn id="get.refentry.manual-returns"> 1004 <para>Returns a < sgmltag>manual</sgmltag> node.</para>993 <para>Returns a <tag>manual</tag> node.</para> 1005 994 </refreturn> 1006 995 </doc:template> … … 1141 1130 <refdescription id="get.refentry.metadata.prefs-desc"> 1142 1131 <para>The DocBook XSL stylesheets include several user-configurable 1143 global stylesheet parameters for controlling < sgmltag>refentry</sgmltag>1132 global stylesheet parameters for controlling <tag>refentry</tag> 1144 1133 metadata gathering. Those parameters are not read directly by the 1145 other < sgmltag>refentry</sgmltag> metadata-gathering1134 other <tag>refentry</tag> metadata-gathering 1146 1135 templates. Instead, they are read only by the 1147 1136 <function>get.refentry.metadata.prefs</function> template, 1148 1137 which assembles them into a structure that is then passed to 1149 the other < sgmltag>refentry</sgmltag> metadata-gathering1138 the other <tag>refentry</tag> metadata-gathering 1150 1139 templates.</para> 1151 1140 1152 1141 <para>So the, <function>get.refentry.metadata.prefs</function> 1153 1142 template is the only interface to collecting stylesheet parameters for 1154 controlling < sgmltag>refentry</sgmltag> metadata gathering.</para>1143 controlling <tag>refentry</tag> metadata gathering.</para> 1155 1144 </refdescription> 1156 1145 <refparameter id="get.refentry.metadata.prefs-params"> … … 1159 1148 </refparameter> 1160 1149 <refreturn id="get.refentry.metadata.prefs-returns"> 1161 <para>Returns a < sgmltag>manual</sgmltag> node.</para>1150 <para>Returns a <tag>manual</tag> node.</para> 1162 1151 </refreturn> 1163 1152 </doc:template> … … 1224 1213 <term>refname</term> 1225 1214 <listitem> 1226 <para>The first < sgmltag>refname</sgmltag> in the refentry</para>1215 <para>The first <tag>refname</tag> in the refentry</para> 1227 1216 </listitem> 1228 1217 </varlistentry> -
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/table.xsl
r3ca2208 r00b1e11 125 125 <refpurpose>Determine the column number in which a given entry occurs</refpurpose> 126 126 <refdescription id="entry.colnum-desc"> 127 <para>If an < sgmltag>entry</sgmltag> has a128 < sgmltag class="attribute">colname</sgmltag> or129 < sgmltag class="attribute">namest</sgmltag> attribute, this template127 <para>If an <tag>entry</tag> has a 128 <tag class="attribute">colname</tag> or 129 <tag class="attribute">namest</tag> attribute, this template 130 130 will determine the number of the column in which the entry should occur. 131 For other < sgmltag>entry</sgmltag>s, nothing is returned.</para>131 For other <tag>entry</tag>s, nothing is returned.</para> 132 132 </refdescription> 133 133 <refparameter id="entry.colnum-params"> … … 135 135 <varlistentry><term>entry</term> 136 136 <listitem> 137 <para>The < sgmltag>entry</sgmltag>-element which is to be tested.</para>137 <para>The <tag>entry</tag>-element which is to be tested.</para> 138 138 </listitem> 139 139 </varlistentry> -
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/utility.xsl
r3ca2208 r00b1e11 4 4 xmlns:dyn="http://exslt.org/dynamic" 5 5 xmlns:saxon="http://icl.com/saxon" 6 xmlns:xlink="http://www.w3.org/1999/xlink" 6 7 exclude-result-prefixes="doc dyn saxon" 7 8 version='1.0'> … … 16 17 17 18 ******************************************************************** --> 18 19 <doc:reference xmlns=""> 20 <referenceinfo> 21 <releaseinfo role="meta"> 22 $Id$ 23 </releaseinfo> 24 <corpauthor>The DocBook Project Development Team</corpauthor> 25 <copyright><year>2007</year> 26 <holder>The DocBook Project</holder> 27 </copyright> 28 </referenceinfo> 29 <title>Utility Template Reference</title> 30 31 <partintro id="partintro"> 32 <title>Introduction</title> 33 34 <para>This is technical reference documentation for the 35 miscellaneous utility templates in the DocBook XSL 36 Stylesheets.</para> 37 38 <note> 39 <para>These templates are defined in a separate file from the set 40 of âcommonâ templates because some of the comment templates 41 reference DocBook XSL stylesheet parameters, requiring the 42 entire set of parameters to be imported/included in any 43 stylesheet that imports/includes the common templates.</para> 44 <para>The utility templates donât import or include any DocBook 45 XSL stylesheet parameters, so the utility templates can be used 46 without importing the whole set of parameters.</para> 47 </note> 48 49 <para>The following documentation is not intended to be 50 <quote>user</quote> documentation. It is provided for developers 51 writing customization layers for the stylesheets, and for anyone 52 who's interested in <quote>how it works</quote>.</para> 53 </partintro> 19 <doc:reference xmlns="" xml:id="utility"> 20 <info> 21 <title>Common » Utility Template Reference</title> 22 <releaseinfo role="meta"> 23 $Id$ 24 </releaseinfo> 25 </info> 26 <!-- * yes, partintro is a valid child of a reference... --> 27 <partintro xml:id="partintro"> 28 <title>Introduction</title> 29 <para>This is technical reference documentation for the 30 miscellaneous utility templates in the DocBook XSL 31 Stylesheets.</para> 32 <note> 33 <para>These templates are defined in a separate file from the set 34 of âcommonâ templates because some of the comment templates 35 reference DocBook XSL stylesheet parameters, requiring the 36 entire set of parameters to be imported/included in any 37 stylesheet that imports/includes the common templates.</para> 38 <para>The utility templates donât import or include any DocBook 39 XSL stylesheet parameters, so the utility templates can be used 40 without importing the whole set of parameters.</para> 41 </note> 42 <para>This is not intended to be user documentation. It is 43 provided for developers writing customization layers for the 44 stylesheets.</para> 45 </partintro> 54 46 </doc:reference> 55 47 … … 68 60 <refparameter id="log.message-params"> 69 61 <variablelist> 70 <varlistentry> 71 <term>level</term> 62 <varlistentry><term>level</term> 72 63 <listitem> 73 64 <para>Text to log/emit in the message-level field to … … 77 68 </listitem> 78 69 </varlistentry> 79 <varlistentry> 80 <term>source</term> 70 <varlistentry><term>source</term> 81 71 <listitem> 82 72 <para>Text to log/emit in the source field to identify the … … 97 87 </listitem> 98 88 </varlistentry> 99 <varlistentry> 100 <term>context-desc</term> 89 <varlistentry><term>context-desc</term> 101 90 <listitem> 102 91 <para>Text to log/emit in the context-description field to … … 104 93 </listitem> 105 94 </varlistentry> 106 <varlistentry> 107 <term>context-desc-field-length</term> 95 <varlistentry><term>context-desc-field-length</term> 108 96 <listitem> 109 97 <para>Specifies length of the context-description field … … 127 115 </listitem> 128 116 </varlistentry> 129 <varlistentry> 130 <term>message</term> 117 <varlistentry><term>message</term> 131 118 <listitem> 132 119 <para>Text to log/emit in the actual message field</para> 133 120 </listitem> 134 121 </varlistentry> 135 <varlistentry> 136 <term>message-field-length</term> 122 <varlistentry><term>message-field-length</term> 137 123 <listitem> 138 124 <para>Specifies length of the message … … 256 242 <note> 257 243 <para>This function began as a copy of Nate Austin's 258 <function>prepend-pad</function> function in the < ulink259 url="http://www.dpawson.co.uk/xsl/sect2/padding.html" >Padding260 Content</ ulink> section of Dave Pawson's <ulink261 url="http://www.dpawson.co.uk/xsl/index.html" >XSLT262 FAQ</ ulink>.</para>244 <function>prepend-pad</function> function in the <link 245 xlink:href="http://www.dpawson.co.uk/xsl/sect2/padding.html" >Padding 246 Content</link> section of Dave Pawson's <link 247 xlink:href="http://www.dpawson.co.uk/xsl/index.html" >XSLT 248 FAQ</link>.</para> 263 249 </note> 264 250 </refdescription> -
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/zh_cn.xml
r3ca2208 r00b1e11 20 20 21 21 <!-- ******************************************************************** --> 22 <!-- In these files, % with a letter is used for a placeholder: --> 23 <!-- %t is the current element's title --> 24 <!-- %s is the current element's subtitle (if applicable)--> 25 <!-- %n is the current element's number label--> 26 <!-- %p is the current element's page number (if applicable)--> 27 <!-- ******************************************************************** --> 28 22 29 23 30 <l:gentext key="Abstract" text="æèŠ"/> -
BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/common/zh_tw.xml
r3ca2208 r00b1e11 20 20 21 21 <!-- ******************************************************************** --> 22 <!-- In these files, % with a letter is used for a placeholder: --> 23 <!-- %t is the current element's title --> 24 <!-- %s is the current element's subtitle (if applicable)--> 25 <!-- %n is the current element's number label--> 26 <!-- %p is the current element's page number (if applicable)--> 27 <!-- ******************************************************************** --> 28 22 29 23 30 <l:gentext key="Abstract" text="æèŠ"/>
Note:
See TracChangeset
for help on using the changeset viewer.