docbook_xsl_wrapper 0.1.2 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/CHANGELOG +41 -0
- data/README.md +9 -17
- data/bin/docbook_xsl_wrapper +9 -14
- data/docbook_xsl_wrapper.gemspec +8 -7
- data/lib/docbook_xsl_wrapper.rb +24 -1
- data/lib/docbook_xsl_wrapper/epub.rb +124 -122
- data/lib/docbook_xsl_wrapper/options.rb +1 -1
- data/lib/docbook_xsl_wrapper/validate.rb +22 -0
- data/lib/docbook_xsl_wrapper/version.rb +1 -1
- data/schema/docbookxi.rng +18654 -0
- data/spec/docbook_xsl_wrapper/validate_spec.rb +64 -0
- data/xsl/AUTHORS +4 -0
- data/xsl/COPYING +48 -0
- data/xsl/REVISION +1 -0
- data/xsl/VERSION.xsl +115 -0
- data/xsl/common/addns.xsl +124 -0
- data/xsl/common/af.xml +1272 -0
- data/xsl/common/am.xml +1272 -0
- data/xsl/common/ar.xml +1272 -0
- data/xsl/common/as.xml +703 -0
- data/xsl/common/ast.xml +703 -0
- data/xsl/common/autoidx-kimber.xsl +45 -0
- data/xsl/common/autoidx-kosek.xsl +155 -0
- data/xsl/common/az.xml +715 -0
- data/xsl/common/bg.xml +767 -0
- data/xsl/common/bn.xml +1272 -0
- data/xsl/common/bn_in.xml +703 -0
- data/xsl/common/bs.xml +705 -0
- data/xsl/common/ca.xml +703 -0
- data/xsl/common/charmap.xsl +222 -0
- data/xsl/common/common.xsl +2129 -0
- data/xsl/common/cs.xml +743 -0
- data/xsl/common/cy.xml +1288 -0
- data/xsl/common/da.xml +707 -0
- data/xsl/common/de.xml +709 -0
- data/xsl/common/el.xml +772 -0
- data/xsl/common/en.xml +1272 -0
- data/xsl/common/entities.ent +67 -0
- data/xsl/common/eo.xml +1272 -0
- data/xsl/common/es.xml +719 -0
- data/xsl/common/et.xml +1272 -0
- data/xsl/common/eu.xml +1272 -0
- data/xsl/common/fa.xml +703 -0
- data/xsl/common/fi.xml +713 -0
- data/xsl/common/fr.xml +733 -0
- data/xsl/common/ga.xml +1272 -0
- data/xsl/common/gentext.xsl +855 -0
- data/xsl/common/gl.xml +1272 -0
- data/xsl/common/gu.xml +703 -0
- data/xsl/common/he.xml +1272 -0
- data/xsl/common/hi.xml +703 -0
- data/xsl/common/hr.xml +705 -0
- data/xsl/common/hu.xml +721 -0
- data/xsl/common/id.xml +1272 -0
- data/xsl/common/insertfile.xsl +113 -0
- data/xsl/common/is.xml +715 -0
- data/xsl/common/it.xml +1272 -0
- data/xsl/common/ja.xml +703 -0
- data/xsl/common/ka.xml +743 -0
- data/xsl/common/kn.xml +1272 -0
- data/xsl/common/ko.xml +1272 -0
- data/xsl/common/ky.xml +775 -0
- data/xsl/common/l10n.dtd +64 -0
- data/xsl/common/l10n.xml +78 -0
- data/xsl/common/l10n.xsl +598 -0
- data/xsl/common/la.xml +1272 -0
- data/xsl/common/labels.xsl +933 -0
- data/xsl/common/lt.xml +721 -0
- data/xsl/common/lv.xml +1272 -0
- data/xsl/common/ml.xml +703 -0
- data/xsl/common/mn.xml +773 -0
- data/xsl/common/mr.xml +703 -0
- data/xsl/common/nb.xml +1272 -0
- data/xsl/common/nds.xml +709 -0
- data/xsl/common/nl.xml +703 -0
- data/xsl/common/nn.xml +1272 -0
- data/xsl/common/olink.xsl +1284 -0
- data/xsl/common/or.xml +1272 -0
- data/xsl/common/pa.xml +703 -0
- data/xsl/common/pi.xml +168 -0
- data/xsl/common/pi.xsl +347 -0
- data/xsl/common/pl.xml +721 -0
- data/xsl/common/pt.xml +1272 -0
- data/xsl/common/pt_br.xml +1272 -0
- data/xsl/common/refentry.xsl +1353 -0
- data/xsl/common/ro.xml +1272 -0
- data/xsl/common/ru.xml +769 -0
- data/xsl/common/sk.xml +1272 -0
- data/xsl/common/sl.xml +1272 -0
- data/xsl/common/sq.xml +1272 -0
- data/xsl/common/sr.xml +763 -0
- data/xsl/common/sr_Latn.xml +722 -0
- data/xsl/common/subtitles.xsl +181 -0
- data/xsl/common/sv.xml +707 -0
- data/xsl/common/ta.xml +703 -0
- data/xsl/common/table.xsl +515 -0
- data/xsl/common/targetdatabase.dtd +49 -0
- data/xsl/common/targets.xsl +338 -0
- data/xsl/common/te.xml +703 -0
- data/xsl/common/th.xml +1272 -0
- data/xsl/common/titles.xsl +850 -0
- data/xsl/common/tl.xml +1272 -0
- data/xsl/common/tr.xml +709 -0
- data/xsl/common/uk.xml +769 -0
- data/xsl/common/ur.xml +705 -0
- data/xsl/common/utility.xsl +291 -0
- data/xsl/common/vi.xml +1272 -0
- data/xsl/common/xh.xml +1272 -0
- data/xsl/common/zh.xml +703 -0
- data/xsl/common/zh_cn.xml +703 -0
- data/xsl/common/zh_tw.xml +703 -0
- data/xsl/epub/docbook.xsl +1769 -0
- data/xsl/epub3/chunk.xsl +30 -0
- data/xsl/epub3/docbook-epub.css.xml +142 -0
- data/xsl/epub3/docbook.xsl +20 -0
- data/xsl/epub3/epub3-chunk-mods.xsl +52 -0
- data/xsl/epub3/epub3-element-mods.xsl +2533 -0
- data/xsl/epub3/titlepage.templates.xml +712 -0
- data/xsl/epub3/titlepage.templates.xsl +3842 -0
- data/xsl/lib/lib.xsl +533 -0
- data/xsl/xhtml/admon.xsl +142 -0
- data/xsl/xhtml/annotations.xsl +160 -0
- data/xsl/xhtml/autoidx.xsl +831 -0
- data/xsl/xhtml/autotoc.xsl +706 -0
- data/xsl/xhtml/biblio-iso690.xsl +1302 -0
- data/xsl/xhtml/biblio.xsl +1371 -0
- data/xsl/xhtml/block.xsl +584 -0
- data/xsl/xhtml/callout.xsl +210 -0
- data/xsl/xhtml/chunk-code.xsl +675 -0
- data/xsl/xhtml/chunk-common.xsl +1627 -0
- data/xsl/xhtml/chunker.xsl +317 -0
- data/xsl/xhtml/component.xsl +440 -0
- data/xsl/xhtml/division.xsl +214 -0
- data/xsl/xhtml/ebnf.xsl +331 -0
- data/xsl/xhtml/footnote.xsl +346 -0
- data/xsl/xhtml/formal.xsl +496 -0
- data/xsl/xhtml/glossary.xsl +602 -0
- data/xsl/xhtml/graphics.xsl +1537 -0
- data/xsl/xhtml/html-rtf.xsl +321 -0
- data/xsl/xhtml/html.xsl +690 -0
- data/xsl/xhtml/htmltbl.xsl +102 -0
- data/xsl/xhtml/index.xsl +264 -0
- data/xsl/xhtml/info.xsl +48 -0
- data/xsl/xhtml/inline.xsl +1508 -0
- data/xsl/xhtml/its.xsl +109 -0
- data/xsl/xhtml/keywords.xsl +38 -0
- data/xsl/xhtml/lists.xsl +1227 -0
- data/xsl/xhtml/math.xsl +286 -0
- data/xsl/xhtml/param.xsl +449 -0
- data/xsl/xhtml/pi.xsl +1237 -0
- data/xsl/xhtml/qandaset.xsl +440 -0
- data/xsl/xhtml/refentry.xsl +307 -0
- data/xsl/xhtml/sections.xsl +564 -0
- data/xsl/xhtml/synop.xsl +1623 -0
- data/xsl/xhtml/table.xsl +1179 -0
- data/xsl/xhtml/task.xsl +76 -0
- data/xsl/xhtml/titlepage.templates.xsl +4005 -0
- data/xsl/xhtml/titlepage.xsl +1108 -0
- data/xsl/xhtml/toc.xsl +334 -0
- data/xsl/xhtml/verbatim.xsl +389 -0
- data/xsl/xhtml/xref.xsl +1268 -0
- data/xsl/xhtml5/docbook.xsl +22 -0
- data/xsl/xhtml5/html5-chunk-mods.xsl +112 -0
- data/xsl/xhtml5/html5-element-mods.xsl +791 -0
- data/xsl/xhtml5/xhtml-docbook.xsl +531 -0
- metadata +207 -27
- data/.rvmrc +0 -48
- data/xslt/obfuscate.xsl +0 -12
data/xsl/common/pi.xml
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
|
|
3
|
+
<reference><info><title>Common Processing Instruction Reference</title>
|
|
4
|
+
<releaseinfo role="meta">
|
|
5
|
+
$Id: pi.xsl 8782 2010-07-27 21:15:17Z mzjn $
|
|
6
|
+
</releaseinfo>
|
|
7
|
+
</info>
|
|
8
|
+
<partintro xml:id="partintro">
|
|
9
|
+
<title>Introduction</title>
|
|
10
|
+
|
|
11
|
+
<para>This is generated reference documentation for all
|
|
12
|
+
user-specifiable processing instructions (PIs) in the
|
|
13
|
+
“common” part of the DocBook XSL stylesheets.
|
|
14
|
+
<note>
|
|
15
|
+
|
|
16
|
+
<para>You add these PIs at particular points in a document to
|
|
17
|
+
cause specific “exceptions” to formatting/output behavior. To
|
|
18
|
+
make global changes in formatting/output behavior across an
|
|
19
|
+
entire document, it’s better to do it by setting an
|
|
20
|
+
appropriate stylesheet parameter (if there is one).</para>
|
|
21
|
+
|
|
22
|
+
</note>
|
|
23
|
+
</para>
|
|
24
|
+
|
|
25
|
+
</partintro>
|
|
26
|
+
|
|
27
|
+
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbchoice_choice">
|
|
28
|
+
<refnamediv>
|
|
29
|
+
<refname>dbchoice_choice</refname>
|
|
30
|
+
<refpurpose>Generates a localized choice separator</refpurpose>
|
|
31
|
+
</refnamediv>
|
|
32
|
+
<refsynopsisdiv>
|
|
33
|
+
|
|
34
|
+
<synopsis><tag class="xmlpi">dbchoice choice="and"|"or"|<replaceable>string</replaceable>"</tag></synopsis>
|
|
35
|
+
|
|
36
|
+
</refsynopsisdiv>
|
|
37
|
+
<refsect1><title>Description</title>
|
|
38
|
+
|
|
39
|
+
<para>Use the <tag class="xmlpi">dbchoice choice</tag> PI to
|
|
40
|
+
generate an appropriate localized “choice” separator (for
|
|
41
|
+
example, <literal>and</literal> or <literal>or</literal>)
|
|
42
|
+
before the final item in an inline <tag>simplelist</tag></para>
|
|
43
|
+
|
|
44
|
+
<warning>
|
|
45
|
+
|
|
46
|
+
<para>This PI is a less-than-ideal hack; support for it may
|
|
47
|
+
disappear in the future (particularly if and when a more
|
|
48
|
+
appropriate means for marking up "choice" lists becomes
|
|
49
|
+
available in DocBook).</para>
|
|
50
|
+
|
|
51
|
+
</warning>
|
|
52
|
+
</refsect1><refsect1><title>Parameters</title>
|
|
53
|
+
|
|
54
|
+
<variablelist>
|
|
55
|
+
<varlistentry><term>choice="and"</term>
|
|
56
|
+
<listitem>
|
|
57
|
+
|
|
58
|
+
<para>generates a localized <literal>and</literal> separator</para>
|
|
59
|
+
|
|
60
|
+
</listitem>
|
|
61
|
+
</varlistentry>
|
|
62
|
+
<varlistentry><term>choice="or"</term>
|
|
63
|
+
<listitem>
|
|
64
|
+
|
|
65
|
+
<para>generates a localized <literal>or</literal> separator</para>
|
|
66
|
+
|
|
67
|
+
</listitem>
|
|
68
|
+
</varlistentry>
|
|
69
|
+
<varlistentry><term>choice="<replaceable>string</replaceable>"</term>
|
|
70
|
+
<listitem>
|
|
71
|
+
|
|
72
|
+
<para>generates a literal <replaceable>string</replaceable> separator</para>
|
|
73
|
+
|
|
74
|
+
</listitem>
|
|
75
|
+
</varlistentry>
|
|
76
|
+
</variablelist>
|
|
77
|
+
|
|
78
|
+
</refsect1></refentry>
|
|
79
|
+
|
|
80
|
+
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbtimestamp">
|
|
81
|
+
<refnamediv>
|
|
82
|
+
<refname>dbtimestamp</refname>
|
|
83
|
+
<refpurpose>Inserts a date timestamp</refpurpose>
|
|
84
|
+
</refnamediv>
|
|
85
|
+
<refsynopsisdiv>
|
|
86
|
+
|
|
87
|
+
<synopsis><tag class="xmlpi">dbtimestamp format="<replaceable>formatstring</replaceable>" [padding="0"|"1"]</tag></synopsis>
|
|
88
|
+
|
|
89
|
+
</refsynopsisdiv>
|
|
90
|
+
<refsect1><title>Description</title>
|
|
91
|
+
|
|
92
|
+
<para>Use the <tag class="xmlpi">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
|
+
|
|
97
|
+
</refsect1><refsect1><title>Parameters</title>
|
|
98
|
+
|
|
99
|
+
<variablelist>
|
|
100
|
+
<varlistentry><term>format="<replaceable>formatstring</replaceable>"</term>
|
|
101
|
+
<listitem>
|
|
102
|
+
|
|
103
|
+
<para>Specifies format in which the date and time are
|
|
104
|
+
output</para>
|
|
105
|
+
|
|
106
|
+
<note>
|
|
107
|
+
|
|
108
|
+
<para>For details of the content of the format string,
|
|
109
|
+
see <link role="tcg" xlink:href="Datetime.html">Date and time</link>.</para>
|
|
110
|
+
|
|
111
|
+
</note>
|
|
112
|
+
</listitem>
|
|
113
|
+
</varlistentry>
|
|
114
|
+
<varlistentry><term>padding="0"|"1"</term>
|
|
115
|
+
<listitem>
|
|
116
|
+
|
|
117
|
+
<para>Specifies padding behavior; if non-zero, padding is is added</para>
|
|
118
|
+
|
|
119
|
+
</listitem>
|
|
120
|
+
</varlistentry>
|
|
121
|
+
</variablelist>
|
|
122
|
+
|
|
123
|
+
</refsect1></refentry>
|
|
124
|
+
|
|
125
|
+
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="dbtex_delims">
|
|
126
|
+
<refnamediv>
|
|
127
|
+
<refname>dbtex_delims</refname>
|
|
128
|
+
<refpurpose>Generates delimiters around embedded TeX equations
|
|
129
|
+
in output</refpurpose>
|
|
130
|
+
</refnamediv>
|
|
131
|
+
<refsynopsisdiv>
|
|
132
|
+
|
|
133
|
+
<synopsis><tag class="xmlpi">dbtex delims="no"|"yes"</tag></synopsis>
|
|
134
|
+
|
|
135
|
+
</refsynopsisdiv>
|
|
136
|
+
<refsect1><title>Description</title>
|
|
137
|
+
|
|
138
|
+
<para>Use the <tag class="xmlpi">dbtex delims</tag> PI as a
|
|
139
|
+
child of a <tag>textobject</tag> containing embedded TeX
|
|
140
|
+
markup, to cause that markup to be surrounded by
|
|
141
|
+
<literal>$</literal> delimiter characters in output.</para>
|
|
142
|
+
|
|
143
|
+
<warning>
|
|
144
|
+
|
|
145
|
+
<para>This feature is useful for print/PDF output only if you
|
|
146
|
+
use the obsolete and now unsupported PassiveTeX XSL-FO
|
|
147
|
+
engine.</para>
|
|
148
|
+
|
|
149
|
+
</warning>
|
|
150
|
+
</refsect1><refsect1><title>Parameters</title>
|
|
151
|
+
|
|
152
|
+
<variablelist>
|
|
153
|
+
<varlistentry><term>dbtex delims="no"|"yes"</term>
|
|
154
|
+
<listitem>
|
|
155
|
+
|
|
156
|
+
<para>Specifies whether delimiters are output</para>
|
|
157
|
+
|
|
158
|
+
</listitem>
|
|
159
|
+
</varlistentry>
|
|
160
|
+
</variablelist>
|
|
161
|
+
|
|
162
|
+
</refsect1><refsect1 role="params"><title>Related Global Parameters</title>
|
|
163
|
+
|
|
164
|
+
<para><parameter>tex.math.delims</parameter></para>
|
|
165
|
+
|
|
166
|
+
</refsect1></refentry>
|
|
167
|
+
</reference>
|
|
168
|
+
|
data/xsl/common/pi.xsl
ADDED
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
<?xml version='1.0'?>
|
|
2
|
+
<xsl:stylesheet
|
|
3
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
4
|
+
xmlns:d="http://docbook.org/ns/docbook"
|
|
5
|
+
xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
|
|
6
|
+
xmlns:date="http://exslt.org/dates-and-times"
|
|
7
|
+
xmlns:exsl="http://exslt.org/common"
|
|
8
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
9
|
+
exclude-result-prefixes="doc date exsl d"
|
|
10
|
+
extension-element-prefixes="date exsl"
|
|
11
|
+
version='1.0'>
|
|
12
|
+
|
|
13
|
+
<!-- ********************************************************************
|
|
14
|
+
$Id: pi.xsl 8782 2010-07-27 21:15:17Z mzjn $
|
|
15
|
+
********************************************************************
|
|
16
|
+
|
|
17
|
+
This file is part of the XSL DocBook Stylesheet distribution.
|
|
18
|
+
See ../README or http://docbook.sf.net/release/xsl/current/ for
|
|
19
|
+
copyright and other information.
|
|
20
|
+
|
|
21
|
+
******************************************************************** -->
|
|
22
|
+
|
|
23
|
+
<doc:reference xmlns=""><info><title>Common Processing Instruction Reference</title>
|
|
24
|
+
<releaseinfo role="meta">
|
|
25
|
+
$Id: pi.xsl 8782 2010-07-27 21:15:17Z mzjn $
|
|
26
|
+
</releaseinfo>
|
|
27
|
+
</info>
|
|
28
|
+
<partintro id="partintro">
|
|
29
|
+
<title>Introduction</title>
|
|
30
|
+
<para>This is generated reference documentation for all
|
|
31
|
+
user-specifiable processing instructions (PIs) in the
|
|
32
|
+
“common” part of the DocBook XSL stylesheets.
|
|
33
|
+
<note>
|
|
34
|
+
<para>You add these PIs at particular points in a document to
|
|
35
|
+
cause specific “exceptions” to formatting/output behavior. To
|
|
36
|
+
make global changes in formatting/output behavior across an
|
|
37
|
+
entire document, it’s better to do it by setting an
|
|
38
|
+
appropriate stylesheet parameter (if there is one).</para>
|
|
39
|
+
</note>
|
|
40
|
+
</para>
|
|
41
|
+
</partintro>
|
|
42
|
+
</doc:reference>
|
|
43
|
+
|
|
44
|
+
<!-- ==================================================================== -->
|
|
45
|
+
<doc:pi name="dbchoice_choice" xmlns="">
|
|
46
|
+
<refpurpose>Generates a localized choice separator</refpurpose>
|
|
47
|
+
<refdescription id="select.choice.separator-desc">
|
|
48
|
+
<para>Use the <tag class="xmlpi">dbchoice choice</tag> PI to
|
|
49
|
+
generate an appropriate localized “choice” separator (for
|
|
50
|
+
example, <literal>and</literal> or <literal>or</literal>)
|
|
51
|
+
before the final item in an inline <tag>simplelist</tag></para>
|
|
52
|
+
<warning>
|
|
53
|
+
<para>This PI is a less-than-ideal hack; support for it may
|
|
54
|
+
disappear in the future (particularly if and when a more
|
|
55
|
+
appropriate means for marking up "choice" lists becomes
|
|
56
|
+
available in DocBook).</para>
|
|
57
|
+
</warning>
|
|
58
|
+
</refdescription>
|
|
59
|
+
<refsynopsisdiv>
|
|
60
|
+
<synopsis><tag class="xmlpi">dbchoice choice="and"|"or"|<replaceable>string</replaceable>"</tag></synopsis>
|
|
61
|
+
</refsynopsisdiv>
|
|
62
|
+
<refparameter>
|
|
63
|
+
<variablelist>
|
|
64
|
+
<varlistentry><term>choice="and"</term>
|
|
65
|
+
<listitem>
|
|
66
|
+
<para>generates a localized <literal>and</literal> separator</para>
|
|
67
|
+
</listitem>
|
|
68
|
+
</varlistentry>
|
|
69
|
+
<varlistentry><term>choice="or"</term>
|
|
70
|
+
<listitem>
|
|
71
|
+
<para>generates a localized <literal>or</literal> separator</para>
|
|
72
|
+
</listitem>
|
|
73
|
+
</varlistentry>
|
|
74
|
+
<varlistentry><term>choice="<replaceable>string</replaceable>"</term>
|
|
75
|
+
<listitem>
|
|
76
|
+
<para>generates a literal <replaceable>string</replaceable> separator</para>
|
|
77
|
+
</listitem>
|
|
78
|
+
</varlistentry>
|
|
79
|
+
</variablelist>
|
|
80
|
+
</refparameter>
|
|
81
|
+
</doc:pi>
|
|
82
|
+
<xsl:template name="pi.dbchoice_choice">
|
|
83
|
+
<xsl:param name="node" select="."/>
|
|
84
|
+
<xsl:call-template name="pi-attribute">
|
|
85
|
+
<xsl:with-param name="pis" select="$node/processing-instruction('dbchoice')"/>
|
|
86
|
+
<xsl:with-param name="attribute">choice</xsl:with-param>
|
|
87
|
+
</xsl:call-template>
|
|
88
|
+
</xsl:template>
|
|
89
|
+
|
|
90
|
+
<doc:pi name="dbtimestamp" xmlns="">
|
|
91
|
+
<refpurpose>Inserts a date timestamp</refpurpose>
|
|
92
|
+
<refdescription>
|
|
93
|
+
<para>Use the <tag class="xmlpi">dbtimestamp</tag> PI at any point in a
|
|
94
|
+
source document to cause a date timestamp (a formatted
|
|
95
|
+
string representing the current date and time) to be
|
|
96
|
+
inserted in output of the document.</para>
|
|
97
|
+
</refdescription>
|
|
98
|
+
<refsynopsisdiv>
|
|
99
|
+
<synopsis><tag class="xmlpi">dbtimestamp format="<replaceable>formatstring</replaceable>" [padding="0"|"1"]</tag></synopsis>
|
|
100
|
+
</refsynopsisdiv>
|
|
101
|
+
<refparameter>
|
|
102
|
+
<variablelist>
|
|
103
|
+
<varlistentry><term>format="<replaceable>formatstring</replaceable>"</term>
|
|
104
|
+
<listitem>
|
|
105
|
+
<para>Specifies format in which the date and time are
|
|
106
|
+
output</para>
|
|
107
|
+
<note>
|
|
108
|
+
<para>For details of the content of the format string,
|
|
109
|
+
see <link role="tcg" xlink:href="Datetime.html"
|
|
110
|
+
>Date and time</link>.</para>
|
|
111
|
+
</note>
|
|
112
|
+
</listitem>
|
|
113
|
+
</varlistentry>
|
|
114
|
+
<varlistentry><term>padding="0"|"1"</term>
|
|
115
|
+
<listitem>
|
|
116
|
+
<para>Specifies padding behavior; if non-zero, padding is is added</para>
|
|
117
|
+
</listitem>
|
|
118
|
+
</varlistentry>
|
|
119
|
+
</variablelist>
|
|
120
|
+
</refparameter>
|
|
121
|
+
</doc:pi>
|
|
122
|
+
<xsl:template name="pi.dbtimestamp">
|
|
123
|
+
<xsl:variable name="format">
|
|
124
|
+
<xsl:variable name="pi-format">
|
|
125
|
+
<xsl:call-template name="pi-attribute">
|
|
126
|
+
<xsl:with-param name="pis" select="."/>
|
|
127
|
+
<xsl:with-param name="attribute">format</xsl:with-param>
|
|
128
|
+
</xsl:call-template>
|
|
129
|
+
</xsl:variable>
|
|
130
|
+
<xsl:choose>
|
|
131
|
+
<xsl:when test="$pi-format != ''">
|
|
132
|
+
<xsl:value-of select="$pi-format"/>
|
|
133
|
+
</xsl:when>
|
|
134
|
+
<xsl:otherwise>
|
|
135
|
+
<xsl:call-template name="gentext.template">
|
|
136
|
+
<xsl:with-param name="context" select="'datetime'"/>
|
|
137
|
+
<xsl:with-param name="name" select="'format'"/>
|
|
138
|
+
</xsl:call-template>
|
|
139
|
+
</xsl:otherwise>
|
|
140
|
+
</xsl:choose>
|
|
141
|
+
</xsl:variable>
|
|
142
|
+
<xsl:variable name="padding">
|
|
143
|
+
<xsl:variable name="pi-padding">
|
|
144
|
+
<xsl:call-template name="pi-attribute">
|
|
145
|
+
<xsl:with-param name="pis" select="."/>
|
|
146
|
+
<xsl:with-param name="attribute">padding</xsl:with-param>
|
|
147
|
+
</xsl:call-template>
|
|
148
|
+
</xsl:variable>
|
|
149
|
+
<xsl:choose>
|
|
150
|
+
<xsl:when test="$pi-padding != ''">
|
|
151
|
+
<xsl:value-of select="$pi-padding"/>
|
|
152
|
+
</xsl:when>
|
|
153
|
+
<xsl:otherwise>1</xsl:otherwise>
|
|
154
|
+
</xsl:choose>
|
|
155
|
+
</xsl:variable>
|
|
156
|
+
<xsl:variable name="date">
|
|
157
|
+
<xsl:choose>
|
|
158
|
+
<xsl:when test="function-available('date:date-time')">
|
|
159
|
+
<xsl:value-of select="date:date-time()"/>
|
|
160
|
+
</xsl:when>
|
|
161
|
+
<xsl:when test="function-available('date:dateTime')">
|
|
162
|
+
<!-- Xalan quirk -->
|
|
163
|
+
<xsl:value-of select="date:dateTime()"/>
|
|
164
|
+
</xsl:when>
|
|
165
|
+
</xsl:choose>
|
|
166
|
+
</xsl:variable>
|
|
167
|
+
<xsl:choose>
|
|
168
|
+
<xsl:when test="function-available('date:date-time') or
|
|
169
|
+
function-available('date:dateTime')">
|
|
170
|
+
<xsl:call-template name="datetime.format">
|
|
171
|
+
<xsl:with-param name="date" select="$date"/>
|
|
172
|
+
<xsl:with-param name="format" select="$format"/>
|
|
173
|
+
<xsl:with-param name="padding" select="$padding"/>
|
|
174
|
+
</xsl:call-template>
|
|
175
|
+
</xsl:when>
|
|
176
|
+
<xsl:otherwise>
|
|
177
|
+
<xsl:message>
|
|
178
|
+
Timestamp processing requires XSLT processor with EXSLT date support.
|
|
179
|
+
</xsl:message>
|
|
180
|
+
</xsl:otherwise>
|
|
181
|
+
</xsl:choose>
|
|
182
|
+
</xsl:template>
|
|
183
|
+
|
|
184
|
+
<doc:pi name="dbtex_delims" xmlns="">
|
|
185
|
+
<refpurpose>Generates delimiters around embedded TeX equations
|
|
186
|
+
in output</refpurpose>
|
|
187
|
+
<refdescription>
|
|
188
|
+
<para>Use the <tag class="xmlpi">dbtex delims</tag> PI as a
|
|
189
|
+
child of a <tag>textobject</tag> containing embedded TeX
|
|
190
|
+
markup, to cause that markup to be surrounded by
|
|
191
|
+
<literal>$</literal> delimiter characters in output.</para>
|
|
192
|
+
<warning>
|
|
193
|
+
<para>This feature is useful for print/PDF output only if you
|
|
194
|
+
use the obsolete and now unsupported PassiveTeX XSL-FO
|
|
195
|
+
engine.</para>
|
|
196
|
+
</warning>
|
|
197
|
+
</refdescription>
|
|
198
|
+
<refsynopsisdiv>
|
|
199
|
+
<synopsis><tag class="xmlpi">dbtex delims="no"|"yes"</tag></synopsis>
|
|
200
|
+
</refsynopsisdiv>
|
|
201
|
+
<refparameter>
|
|
202
|
+
<variablelist>
|
|
203
|
+
<varlistentry><term>dbtex delims="no"|"yes"</term>
|
|
204
|
+
<listitem>
|
|
205
|
+
<para>Specifies whether delimiters are output</para>
|
|
206
|
+
</listitem>
|
|
207
|
+
</varlistentry>
|
|
208
|
+
</variablelist>
|
|
209
|
+
</refparameter>
|
|
210
|
+
|
|
211
|
+
<refsee role="params">
|
|
212
|
+
<para><parameter>tex.math.delims</parameter></para>
|
|
213
|
+
</refsee>
|
|
214
|
+
|
|
215
|
+
</doc:pi>
|
|
216
|
+
<xsl:template name="pi.dbtex_delims">
|
|
217
|
+
<xsl:param name="node" select="."/>
|
|
218
|
+
<xsl:call-template name="pi-attribute">
|
|
219
|
+
<xsl:with-param name="pis" select="$node/processing-instruction('dbtex')"/>
|
|
220
|
+
<xsl:with-param name="attribute" select="'delims'"/>
|
|
221
|
+
</xsl:call-template>
|
|
222
|
+
</xsl:template>
|
|
223
|
+
|
|
224
|
+
<!-- ==================================================================== -->
|
|
225
|
+
|
|
226
|
+
<xsl:template match="processing-instruction()" mode="titlepage.mode">
|
|
227
|
+
<!-- * Als process PIs on title pages -->
|
|
228
|
+
<xsl:apply-templates select="."/>
|
|
229
|
+
</xsl:template>
|
|
230
|
+
|
|
231
|
+
<xsl:template match="processing-instruction('dbtimestamp')">
|
|
232
|
+
<xsl:call-template name="pi.dbtimestamp"/>
|
|
233
|
+
</xsl:template>
|
|
234
|
+
|
|
235
|
+
<xsl:template name="datetime.format">
|
|
236
|
+
<xsl:param name="date"/>
|
|
237
|
+
<xsl:param name="format"/>
|
|
238
|
+
<xsl:param name="padding" select="1"/>
|
|
239
|
+
<xsl:if test="$format != ''">
|
|
240
|
+
<!-- replace any whitespace in the format string with a non-breaking space -->
|
|
241
|
+
<xsl:variable name="format-nbsp"
|
|
242
|
+
select="translate($format,
|
|
243
|
+
' 	
',
|
|
244
|
+
'    ')"/>
|
|
245
|
+
<xsl:variable name="tokenized-format-string">
|
|
246
|
+
<xsl:call-template name="str.tokenize.keep.delimiters">
|
|
247
|
+
<xsl:with-param name="string" select="$format-nbsp"/>
|
|
248
|
+
<xsl:with-param name="delimiters" select="' ,./-()[]:'"/>
|
|
249
|
+
</xsl:call-template>
|
|
250
|
+
</xsl:variable>
|
|
251
|
+
<xsl:choose>
|
|
252
|
+
<xsl:when test="$exsl.node.set.available != 0">
|
|
253
|
+
<!-- We must preserve context node in order to get valid language -->
|
|
254
|
+
<xsl:variable name="context" select="."/>
|
|
255
|
+
<xsl:for-each select="exsl:node-set($tokenized-format-string)/node()">
|
|
256
|
+
<xsl:variable name="token">
|
|
257
|
+
<xsl:value-of select="."/>
|
|
258
|
+
</xsl:variable>
|
|
259
|
+
<!-- Restore context node -->
|
|
260
|
+
<xsl:for-each select="$context">
|
|
261
|
+
<xsl:choose>
|
|
262
|
+
<xsl:when test="$token = 'a'">
|
|
263
|
+
<xsl:call-template name="gentext.template">
|
|
264
|
+
<xsl:with-param name="context" select="'datetime-abbrev'"/>
|
|
265
|
+
<xsl:with-param name="name" select="date:day-abbreviation($date)"/>
|
|
266
|
+
</xsl:call-template>
|
|
267
|
+
</xsl:when>
|
|
268
|
+
<xsl:when test="$token = 'A'">
|
|
269
|
+
<xsl:call-template name="gentext.template">
|
|
270
|
+
<xsl:with-param name="context" select="'datetime-full'"/>
|
|
271
|
+
<xsl:with-param name="name" select="date:day-name($date)"/>
|
|
272
|
+
</xsl:call-template>
|
|
273
|
+
</xsl:when>
|
|
274
|
+
<xsl:when test="$token = 'b'">
|
|
275
|
+
<xsl:call-template name="gentext.template">
|
|
276
|
+
<xsl:with-param name="context" select="'datetime-abbrev'"/>
|
|
277
|
+
<xsl:with-param name="name" select="date:month-abbreviation($date)"/>
|
|
278
|
+
</xsl:call-template>
|
|
279
|
+
</xsl:when>
|
|
280
|
+
<xsl:when test="$token = 'c'">
|
|
281
|
+
<xsl:value-of select="date:date($date)"/>
|
|
282
|
+
<xsl:text> </xsl:text>
|
|
283
|
+
<xsl:value-of select="date:time($date)"/>
|
|
284
|
+
</xsl:when>
|
|
285
|
+
<xsl:when test="$token = 'B'">
|
|
286
|
+
<xsl:call-template name="gentext.template">
|
|
287
|
+
<xsl:with-param name="context" select="'datetime-full'"/>
|
|
288
|
+
<xsl:with-param name="name" select="date:month-name($date)"/>
|
|
289
|
+
</xsl:call-template>
|
|
290
|
+
</xsl:when>
|
|
291
|
+
<xsl:when test="$token = 'd'">
|
|
292
|
+
<xsl:if test="$padding = 1 and
|
|
293
|
+
string-length(date:day-in-month($date)) = 1">0</xsl:if>
|
|
294
|
+
<xsl:value-of select="date:day-in-month($date)"/>
|
|
295
|
+
</xsl:when>
|
|
296
|
+
<xsl:when test="$token = 'H'">
|
|
297
|
+
<xsl:if test="$padding = 1 and string-length(date:hour-in-day($date)) = 1">0</xsl:if>
|
|
298
|
+
<xsl:value-of select="date:hour-in-day($date)"/>
|
|
299
|
+
</xsl:when>
|
|
300
|
+
<xsl:when test="$token = 'j'">
|
|
301
|
+
<xsl:value-of select="date:day-in-year($date)"/>
|
|
302
|
+
</xsl:when>
|
|
303
|
+
<xsl:when test="$token = 'm'">
|
|
304
|
+
<xsl:if test="$padding = 1 and string-length(date:month-in-year($date)) = 1">0</xsl:if>
|
|
305
|
+
<xsl:value-of select="date:month-in-year($date)"/>
|
|
306
|
+
</xsl:when>
|
|
307
|
+
<xsl:when test="$token = 'M'">
|
|
308
|
+
<xsl:if test="string-length(date:minute-in-hour($date)) = 1">0</xsl:if>
|
|
309
|
+
<xsl:value-of select="date:minute-in-hour($date)"/>
|
|
310
|
+
</xsl:when>
|
|
311
|
+
<xsl:when test="$token = 'S'">
|
|
312
|
+
<xsl:if test="string-length(date:second-in-minute($date)) = 1">0</xsl:if>
|
|
313
|
+
<xsl:value-of select="date:second-in-minute($date)"/>
|
|
314
|
+
</xsl:when>
|
|
315
|
+
<xsl:when test="$token = 'U'">
|
|
316
|
+
<xsl:value-of select="date:week-in-year($date)"/>
|
|
317
|
+
</xsl:when>
|
|
318
|
+
<xsl:when test="$token = 'w'">
|
|
319
|
+
<xsl:value-of select="date:day-in-week($date)"/>
|
|
320
|
+
</xsl:when>
|
|
321
|
+
<xsl:when test="$token = 'x'">
|
|
322
|
+
<xsl:value-of select="date:date($date)"/>
|
|
323
|
+
</xsl:when>
|
|
324
|
+
<xsl:when test="$token = 'X'">
|
|
325
|
+
<xsl:value-of select="date:time($date)"/>
|
|
326
|
+
</xsl:when>
|
|
327
|
+
<xsl:when test="$token = 'Y'">
|
|
328
|
+
<xsl:value-of select="date:year($date)"/>
|
|
329
|
+
</xsl:when>
|
|
330
|
+
<xsl:otherwise>
|
|
331
|
+
<xsl:value-of select="$token"/>
|
|
332
|
+
</xsl:otherwise>
|
|
333
|
+
</xsl:choose>
|
|
334
|
+
</xsl:for-each>
|
|
335
|
+
</xsl:for-each>
|
|
336
|
+
</xsl:when>
|
|
337
|
+
<xsl:otherwise>
|
|
338
|
+
<xsl:message>
|
|
339
|
+
Timestamp processing requires an XSLT processor with support
|
|
340
|
+
for the EXSLT node-set() function.
|
|
341
|
+
</xsl:message>
|
|
342
|
+
</xsl:otherwise>
|
|
343
|
+
</xsl:choose>
|
|
344
|
+
</xsl:if>
|
|
345
|
+
</xsl:template>
|
|
346
|
+
|
|
347
|
+
</xsl:stylesheet>
|