Statistics
| Revision:

root / tmp / org.txm.core / res / org / txm / xml / xsl / tei / common2 / tei-param.xsl @ 187

History | View | Annotate | Download (13.8 kB)

1
<?xml version="1.0" encoding="utf-8"?>
2
<xsl:stylesheet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sch="http://purl.oclc.org/dsdl/schematron" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="m tei xsi sch" version="2.0">
3
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" scope="stylesheet" type="stylesheet">
4
    <desc>
5
      <p>TEI stylesheet customization module, common for all output
6
      formats.</p>
7
      <p>This software is dual-licensed:
8

    
9
1. Distributed under a Creative Commons Attribution-ShareAlike 3.0
10
Unported License http://creativecommons.org/licenses/by-sa/3.0/ 
11

    
12
2. http://www.opensource.org/licenses/BSD-2-Clause
13
		
14
All rights reserved.
15

    
16
Redistribution and use in source and binary forms, with or without
17
modification, are permitted provided that the following conditions are
18
met:
19

    
20
* Redistributions of source code must retain the above copyright
21
notice, this list of conditions and the following disclaimer.
22

    
23
* Redistributions in binary form must reproduce the above copyright
24
notice, this list of conditions and the following disclaimer in the
25
documentation and/or other materials provided with the distribution.
26

    
27
This software is provided by the copyright holders and contributors
28
"as is" and any express or implied warranties, including, but not
29
limited to, the implied warranties of merchantability and fitness for
30
a particular purpose are disclaimed. In no event shall the copyright
31
holder or contributors be liable for any direct, indirect, incidental,
32
special, exemplary, or consequential damages (including, but not
33
limited to, procurement of substitute goods or services; loss of use,
34
data, or profits; or business interruption) however caused and on any
35
theory of liability, whether in contract, strict liability, or tort
36
(including negligence or otherwise) arising in any way out of the use
37
of this software, even if advised of the possibility of such damage.
38
</p>
39
      <p>Author: See AUTHORS</p>
40
      <p>Id: $Id: tei-param.xsl 10010 2012-01-03 19:35:49Z rahtz $</p>
41
      <p>Copyright: 2011, TEI Consortium</p>
42
    </desc>
43
  </doc>
44

    
45
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="output" type="string">
46
      <desc>Type of output being generated</desc>
47
   </doc>
48
  <xsl:param name="outputTarget">html</xsl:param>
49

    
50
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="CSS" type="string">
51
    <desc>CSS class for TOC entries</desc>
52
  </doc>
53
  <xsl:param name="class_toc">toc</xsl:param>
54
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="figures" type="string">
55
    <desc>Directory specification to put before names of graphics files,
56
      unless they start with "./"</desc>
57
  </doc>
58
  <xsl:param name="graphicsPrefix"/>
59
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="figures" type="string">
60
    <desc> Default file suffix for graphics files,
61
    if not directly specified</desc>
62
  </doc>
63
  <xsl:param name="graphicsSuffix">.png</xsl:param>
64
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="figures" type="decimal">
65
    <desc> Scaling of imported graphics</desc>
66
  </doc>
67
  <xsl:param name="standardScale">1</xsl:param>
68

    
69
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="headings" type="boolean">
70
    <desc> Construct a heading 
71
    for &lt;div&gt; elements with no &lt;head&gt;</desc>
72
  </doc>
73
  <xsl:param name="autoHead"/>
74

    
75

    
76
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="headings">
77
    <desc>[common] How to make a heading for section if there is no
78
      &lt;head&gt;</desc>
79
  </doc>
80
  <xsl:template name="autoMakeHead">
81
    <xsl:param name="display"/>
82
    <xsl:choose>
83
      <xsl:when test="tei:head and $display='full'">
84
        <xsl:apply-templates select="tei:head" mode="makeheading"/>
85
      </xsl:when>
86
      <xsl:when test="tei:head">
87
        <xsl:apply-templates select="tei:head" mode="plain"/>
88
      </xsl:when>
89
      <xsl:when test="tei:front/tei:head">
90
        <xsl:apply-templates select="tei:front/tei:head" mode="plain"/>
91
      </xsl:when>
92
      <xsl:when test="@n">
93
	<xsl:value-of select="@n"/>
94
      </xsl:when>
95
      <xsl:when test="@type">
96
	<xsl:text>[</xsl:text>
97
        <xsl:value-of select="@type"/>
98
	<xsl:text>]</xsl:text>
99
      </xsl:when>
100
      <xsl:otherwise>
101
        <xsl:text>➤</xsl:text>
102
      </xsl:otherwise>
103
    </xsl:choose>
104
  </xsl:template>
105
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="headings" type="string">
106
    <desc> Punctuation to insert after a section
107
    number</desc>
108
  </doc>
109
  <xsl:template name="headingNumberSuffix">
110
    <xsl:text>.</xsl:text>
111
    <xsl:value-of select="$numberSpacer"/>
112
  </xsl:template>
113
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="headings" type="string">
114
    <desc> Character to put after number of
115
    section header</desc>
116
  </doc>
117
  <xsl:param name="numberSpacer">
118
    <xsl:text> </xsl:text>
119
  </xsl:param>
120
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="links" type="string">
121
    <desc> Name of department within institution</desc>
122
  </doc>
123
  <xsl:param name="department"/>
124
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="links" type="string">
125
    <desc> Name of link to home page of application</desc>
126
  </doc>
127
  <xsl:param name="homeLabel">Home</xsl:param>
128
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="links" type="anyURI">
129
    <desc>Project Home</desc>
130
  </doc>
131
  <xsl:param name="homeURL">http://www.tei-c.org/</xsl:param>
132
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="links" type="string">
133
    <desc>Project</desc>
134
  </doc>
135
  <xsl:param name="homeWords">TEI</xsl:param>
136
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="links" type="string">
137
    <desc> Institution</desc>
138
  </doc>
139
  <xsl:param name="institution">A TEI Project</xsl:param>
140
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="links" type="anyURI">
141
    <desc> Institution link</desc>
142
  </doc>
143
  <xsl:param name="parentURL">http://www.tei-c.org/</xsl:param>
144
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="links" type="string">
145
    <desc> Name of overall institution</desc>
146
  </doc>
147
  <xsl:param name="parentWords">Parent Institution</xsl:param>
148
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="links" type="anyURI">
149
    <desc> Link to search application</desc>
150
  </doc>
151
  <xsl:param name="searchURL">http://www.google.com</xsl:param>
152
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="misc" type="anyURI">
153
    <desc> The home page for these stylesheets</desc>
154
  </doc>
155
  <xsl:param name="teixslHome">http://www.tei-c.org/Stylesheets/</xsl:param>
156
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="misc" type="boolean">
157
    <desc> Process elements according to assumptions
158
    of TEI P4</desc>
159
  </doc>
160
  <xsl:param name="teiP4Compat">false</xsl:param>
161

    
162
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="misc" type="boolean">
163
    <desc> Title, author and date is taken from the
164
    &lt;teiHeader&gt; rather than looked for in the front matter</desc>
165
  </doc>
166
  <xsl:param name="useHeaderFrontMatter">false</xsl:param>
167

    
168
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="misc" type="boolean">
169
    <desc>Whether to attempt to work out a current date (set to true
170
    for test results which won't differ</desc>
171
  </doc>
172
  <xsl:param name="useFixedDate">false</xsl:param>
173
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering">
174
    <desc>[common] How to number sections in back matter</desc>
175
  </doc>
176
  <xsl:template name="numberBackDiv">
177
    <xsl:if test="not($numberBackHeadings='')">
178
      <xsl:number count="tei:div|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6" format="A.1.1.1.1.1" level="multiple"/>
179
    </xsl:if>
180
  </xsl:template>
181
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering" type="boolean">
182
    <desc> Automatically number figures in back
183
    matter</desc>
184
  </doc>
185
  <xsl:param name="numberBackFigures">false</xsl:param>
186
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering" type="string">
187
    <desc> How to construct heading numbering in
188
    back matter</desc>
189
  </doc>
190
  <xsl:param name="numberBackHeadings">A.1</xsl:param>
191
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering" type="boolean">
192
    <desc> Automatically number tables in back
193
    matter</desc>
194
  </doc>
195
  <xsl:param name="numberBackTables">true</xsl:param>
196
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering">
197
    <desc>[common] How to number sections in main matter</desc>
198
  </doc>
199
  <xsl:template name="numberBodyDiv">
200
    <xsl:if test="$numberHeadings='true'">
201
      <xsl:number count="tei:div|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6" level="multiple"/>
202
    </xsl:if>
203
  </xsl:template>
204
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering" type="string">
205
    <desc> How to construct heading numbering in
206
    main matter</desc>
207
  </doc>
208
  <xsl:param name="numberBodyHeadings">1.1.1.1</xsl:param>
209
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering" type="boolean">
210
    <desc> Automatically number figures</desc>
211
  </doc>
212
  <xsl:param name="numberFigures">true</xsl:param>
213
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering">
214
    <desc>[common] How to number sections in front matter</desc>
215
  </doc>
216
  <xsl:template name="numberFrontDiv">
217
    <xsl:param name="minimal"/>
218
    <xsl:number count="tei:div|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6" level="multiple"/>
219
    <xsl:if test="$minimal='false'">
220
      <xsl:value-of select="$numberSpacer"/>
221
    </xsl:if>
222
  </xsl:template>
223
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering" type="boolean">
224
    <desc> Automatically number figures in
225
    front matter</desc>
226
  </doc>
227
  <xsl:param name="numberFrontFigures">false</xsl:param>
228
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering" type="string">
229
    <desc> How to construct heading numbering in
230
    front matter</desc>
231
  </doc>
232
  <xsl:param name="numberFrontHeadings"/>
233
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering" type="boolean">
234
    <desc> Automatically number tables in front
235
    matter</desc>
236
  </doc>
237
  <xsl:param name="numberFrontTables">true</xsl:param>
238
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering" type="boolean">
239
    <desc> Automatically number sections</desc>
240
  </doc>
241
  <xsl:param name="numberHeadings">true</xsl:param>
242
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering" type="integer">
243
    <desc> Depth to which sections should be
244
    numbered</desc>
245
  </doc>
246
  <xsl:param name="numberHeadingsDepth">9</xsl:param>
247
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering" type="boolean">
248
    <desc> Automatically number tables</desc>
249
  </doc>
250
  <xsl:param name="numberTables">true</xsl:param>
251
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering" type="boolean">
252
    <desc> Use value of "n" attribute to number
253
    sections</desc>
254
  </doc>
255
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="numbering" type="boolean">
256
    <desc>
257
    Automatically number paragraphs.
258
  </desc>
259
  </doc>
260
  <xsl:param name="numberParagraphs">false</xsl:param>
261
  <xsl:param name="prenumberedHeadings">false</xsl:param>
262
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="output" type="string">
263
    <desc> The complete URL when the document is
264
    being delivered from a web server (normally set by Apache or Cocoon)</desc>
265
  </doc>
266
  <xsl:param name="REQUEST"/>
267
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="output" type="boolean">
268
    <desc> Write to standard output channel</desc>
269
  </doc>
270
  <xsl:param name="STDOUT">true</xsl:param>
271
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="style" type="string">
272
    <desc> Display of &lt;pb&gt; element.
273
    Choices are "visible", "active" and "none".</desc>
274
  </doc>
275
  <xsl:param name="pagebreakStyle">visible</xsl:param>
276
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="style" type="string">
277
    <desc> How to display Relax NG schema fragments
278
    (rnc or rng)</desc>
279
  </doc>
280
  <xsl:param name="displayMode">rnc</xsl:param>
281
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="style" type="boolean">
282
    <desc> Provide minimal context for a link</desc>
283
  </doc>
284
  <xsl:param name="minimalCrossRef">false</xsl:param>
285
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="style" type="string">
286
    <desc> Character to insert at end of quote.</desc>
287
  </doc>
288
  <xsl:param name="postQuote">’</xsl:param>
289
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="style" type="string">
290
    <desc> Character to insert at start of quote</desc>
291
  </doc>
292
  <xsl:param name="preQuote">‘</xsl:param>
293
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="tables" type="string">
294
    <desc> Default alignment of table cells</desc>
295
  </doc>
296
  <xsl:param name="cellAlign">left</xsl:param>
297
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="tables" type="string">
298
    <desc> Default alignment of tables</desc>
299
  </doc>
300
  <xsl:param name="tableAlign">left</xsl:param>
301
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout" type="boolean">
302
    <desc>
303
Whether to make simplified display of ODD
304
</desc>
305
  </doc>
306
  <xsl:param name="oddWeaveLite">false</xsl:param>
307
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout" type="string">
308
    <desc>
309
Paragraph indentation
310
</desc>
311
  </doc>
312
  <xsl:param name="parIndent">1em</xsl:param>
313

    
314
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout" type="string">
315
    <desc>
316
      Style for formatted bibliography
317
    </desc>
318
  </doc>
319
  <xsl:param name="biblioStyle"></xsl:param>
320

    
321
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="layout" type="string">
322
    <desc>
323
Default spacing between paragraphs
324
</desc>
325
  </doc>
326
  <xsl:param name="parSkip">0pt</xsl:param>
327
  <doc xmlns="http://www.oxygenxml.com/ns/doc/xsl" class="hook">
328
    <desc>[common] Hook where actions can be inserted when making
329
     a heading</desc>
330
  </doc>
331
  <xsl:template name="sectionHeadHook"/>
332
</xsl:stylesheet>