metanorma-iho 1.2.3 → 1.2.5
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 +4 -4
- data/lib/isodoc/iho/html/htmlstyle.css +24 -30
- data/lib/isodoc/iho/iho.specification.xsl +978 -328
- data/lib/isodoc/iho/iho.standard.xsl +978 -328
- data/lib/metanorma/iho/front.rb +8 -10
- data/lib/metanorma/iho/isodoc.rng +44 -19
- data/lib/metanorma/iho/version.rb +1 -1
- metadata +2 -2
@@ -6,42 +6,45 @@
|
|
6
6
|
|
7
7
|
<xsl:variable name="debug">false</xsl:variable>
|
8
8
|
|
9
|
-
<xsl:variable name="title-en"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en']/node()"/></xsl:variable>
|
10
|
-
<xsl:variable name="title-main_"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'main']/node()"/></xsl:variable>
|
11
|
-
<xsl:variable name="title-main"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-main']/node()"/></xsl:variable>
|
12
|
-
<xsl:variable name="title-appendix"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-appendix']/node()"/></xsl:variable>
|
13
|
-
<xsl:variable name="title-annex"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-annex']/node()"/></xsl:variable>
|
14
|
-
<xsl:variable name="title-part"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-part']/node()"/></xsl:variable>
|
15
|
-
<xsl:variable name="title-supplement"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-supplement']/node()"/></xsl:variable>
|
16
|
-
<xsl:variable name="title_header">
|
17
|
-
<xsl:copy-of select="$title-main_"/>
|
18
|
-
<xsl:if test="normalize-space($title-main_) = ''"><xsl:copy-of select="$title-en"/></xsl:if>
|
19
|
-
</xsl:variable>
|
20
|
-
|
21
|
-
<xsl:variable name="docidentifier_parent" select="normalize-space(/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'IHO-parent-document'])"/>
|
22
|
-
<xsl:variable name="docidentifier">
|
23
|
-
<xsl:value-of select="$docidentifier_parent"/>
|
24
|
-
<xsl:if test="$docidentifier_parent = ''"><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'IHO']"/></xsl:if>
|
25
|
-
</xsl:variable>
|
26
|
-
<xsl:variable name="copyrightText" select="concat('© International Hydrographic Association ', /mn:metanorma/mn:bibdata/mn:copyright/mn:from ,' – All rights reserved')"/>
|
27
|
-
<xsl:variable name="edition">
|
28
|
-
<xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/>
|
29
|
-
</xsl:variable>
|
30
|
-
<xsl:variable name="month_year">
|
31
|
-
<xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']"/>
|
32
|
-
</xsl:variable>
|
33
|
-
|
34
9
|
<!-- Example:
|
35
10
|
<item level="1" id="Foreword" display="true">Foreword</item>
|
36
11
|
<item id="term-script" display="false">3.2</item>
|
37
12
|
-->
|
38
13
|
<xsl:variable name="contents_">
|
39
|
-
<
|
40
|
-
|
41
|
-
<xsl:
|
14
|
+
<xsl:variable name="bundle" select="count(//mn:metanorma) > 1"/>
|
15
|
+
<xsl:for-each select="//mn:metanorma">
|
16
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
17
|
+
<xsl:variable name="docidentifier"><xsl:value-of select="mn:bibdata/mn:docidentifier[@type = 'IHO']"/></xsl:variable>
|
18
|
+
<xsl:variable name="docnumber_">
|
19
|
+
<xsl:choose>
|
20
|
+
<xsl:when test="ancestor::*[local-name() = 'doc-container'] and (preceding::mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'IHO'] = $docidentifier or following::mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'IHO'] = $docidentifier)">
|
21
|
+
<xsl:variable name="doc_container_id" select="ancestor::*[local-name() = 'doc-container']/@id"/>
|
22
|
+
<xsl:value-of select="ancestor::*[local-name() = 'metanorma-collection']//*[local-name() = 'entry'][@target = $doc_container_id]/*[local-name() = 'identifier']"/>
|
23
|
+
</xsl:when>
|
24
|
+
<xsl:otherwise>
|
25
|
+
<xsl:value-of select="$docidentifier"/>
|
26
|
+
<xsl:if test="normalize-space($docidentifier) = ''">
|
27
|
+
<xsl:value-of select="mn:bibdata/mn:docidentifier[1]"/>
|
28
|
+
</xsl:if>
|
29
|
+
</xsl:otherwise>
|
30
|
+
</xsl:choose>
|
31
|
+
</xsl:variable>
|
32
|
+
<xsl:variable name="docnumber" select="normalize-space($docnumber_)"/>
|
33
|
+
<xsl:variable name="current_document">
|
34
|
+
<xsl:copy-of select="."/>
|
35
|
+
</xsl:variable>
|
36
|
+
|
37
|
+
<xsl:for-each select="xalan:nodeset($current_document)"> <!-- <xsl:for-each select="."> -->
|
38
|
+
<mnx:doc num="{$num}" firstpage_id="firstpage_id_{$num}" title-part="{$docnumber}" bundle="{$bundle}"> <!-- 'bundle' means several different documents (not language versions) in one xml -->
|
39
|
+
<mnx:contents>
|
40
|
+
<xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
|
41
|
+
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
42
42
|
|
43
|
-
|
44
|
-
|
43
|
+
<xsl:call-template name="processTablesFigures_Contents"/>
|
44
|
+
</mnx:contents>
|
45
|
+
</mnx:doc>
|
46
|
+
</xsl:for-each>
|
47
|
+
</xsl:for-each>
|
45
48
|
</xsl:variable>
|
46
49
|
<xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
|
47
50
|
|
@@ -94,6 +97,13 @@
|
|
94
97
|
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
95
98
|
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
96
99
|
</fo:simple-page-master>
|
100
|
+
<fo:simple-page-master master-name="blankpage-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
101
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
102
|
+
<fo:region-before region-name="header-blank" extent="{$marginTop}mm"/>
|
103
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
104
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
105
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
106
|
+
</fo:simple-page-master>
|
97
107
|
<!-- Preface pages -->
|
98
108
|
<fo:page-sequence-master master-name="preface">
|
99
109
|
<fo:repeatable-page-master-alternatives>
|
@@ -105,7 +115,7 @@
|
|
105
115
|
</fo:page-sequence-master>
|
106
116
|
<fo:page-sequence-master master-name="preface-landscape">
|
107
117
|
<fo:repeatable-page-master-alternatives>
|
108
|
-
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
118
|
+
<fo:conditional-page-master-reference master-reference="blankpage-landscape" blank-or-not-blank="blank"/>
|
109
119
|
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
|
110
120
|
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
|
111
121
|
</fo:repeatable-page-master-alternatives>
|
@@ -127,7 +137,7 @@
|
|
127
137
|
</fo:page-sequence-master>
|
128
138
|
<fo:page-sequence-master master-name="document-landscape">
|
129
139
|
<fo:repeatable-page-master-alternatives>
|
130
|
-
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
140
|
+
<fo:conditional-page-master-reference master-reference="blankpage-landscape" blank-or-not-blank="blank"/>
|
131
141
|
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
|
132
142
|
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
|
133
143
|
</fo:repeatable-page-master-alternatives>
|
@@ -165,154 +175,221 @@
|
|
165
175
|
</redirect:write>
|
166
176
|
</xsl:if>
|
167
177
|
|
168
|
-
<xsl:for-each select="xalan:nodeset($updated_xml)/*">
|
169
|
-
|
170
|
-
<xsl:
|
171
|
-
|
172
|
-
<xsl:choose>
|
173
|
-
<xsl:when test="/mn:metanorma/mn:boilerplate/*[not(self::mn:feedback-statement)]">
|
174
|
-
<fo:page-sequence master-reference="preface" format="i" force-page-count="no-force">
|
175
|
-
<xsl:call-template name="insertHeaderFooter">
|
176
|
-
<xsl:with-param name="font-weight">normal</xsl:with-param>
|
177
|
-
</xsl:call-template>
|
178
|
-
<fo:flow flow-name="xsl-region-body">
|
179
|
-
<fo:block-container margin-left="-1.5mm" margin-right="-1mm">
|
180
|
-
<fo:block-container margin-left="0mm" margin-right="0mm" border="0.5pt solid black">
|
181
|
-
<fo:block-container margin-top="6.5mm" margin-left="7.5mm" margin-right="8.5mm" margin-bottom="7.5mm">
|
182
|
-
<fo:block-container margin="0">
|
183
|
-
<fo:block text-align="justify">
|
184
|
-
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/*[not(self::mn:feedback-statement)]"/>
|
185
|
-
</fo:block>
|
186
|
-
</fo:block-container>
|
187
|
-
</fo:block-container>
|
188
|
-
</fo:block-container>
|
189
|
-
</fo:block-container>
|
190
|
-
</fo:flow>
|
191
|
-
</fo:page-sequence>
|
192
|
-
</xsl:when>
|
193
|
-
<xsl:otherwise>
|
194
|
-
<!-- https://github.com/metanorma/metanorma-iho/issues/293:
|
195
|
-
If the publication has no copyright boxed note (normally on page ii of the publication), page ii should be "Page intentionally left blank". -->
|
196
|
-
<fo:page-sequence master-reference="blankpage" format="i" force-page-count="no-force">
|
197
|
-
<xsl:call-template name="insertHeaderFooterBlank"/>
|
198
|
-
<fo:flow flow-name="xsl-region-body">
|
199
|
-
<fo:block/>
|
200
|
-
</fo:flow>
|
201
|
-
</fo:page-sequence>
|
202
|
-
</xsl:otherwise>
|
203
|
-
</xsl:choose>
|
178
|
+
<!-- <xsl:for-each select="xalan:nodeset($updated_xml)/*"> -->
|
179
|
+
<xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma">
|
180
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
204
181
|
|
205
|
-
<xsl:variable name="
|
206
|
-
<xsl:
|
182
|
+
<xsl:variable name="current_document">
|
183
|
+
<xsl:copy-of select="."/>
|
207
184
|
</xsl:variable>
|
208
185
|
|
209
|
-
<xsl:for-each select="xalan:nodeset($
|
186
|
+
<xsl:for-each select="xalan:nodeset($current_document)">
|
210
187
|
|
211
|
-
<xsl:
|
188
|
+
<xsl:variable name="title-en"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en']/node()"/></xsl:variable>
|
189
|
+
<xsl:variable name="title-main_"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'main']/node()"/></xsl:variable>
|
212
190
|
|
213
|
-
|
214
|
-
<
|
191
|
+
<xsl:variable name="title_header">
|
192
|
+
<xsl:copy-of select="$title-main_"/>
|
193
|
+
<xsl:if test="normalize-space($title-main_) = ''"><xsl:copy-of select="$title-en"/></xsl:if>
|
194
|
+
</xsl:variable>
|
215
195
|
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
196
|
+
<xsl:variable name="docidentifier_parent" select="normalize-space(/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'IHO-parent-document'])"/>
|
197
|
+
<xsl:variable name="docidentifier">
|
198
|
+
<xsl:value-of select="$docidentifier_parent"/>
|
199
|
+
<xsl:if test="$docidentifier_parent = ''"><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'IHO']"/></xsl:if>
|
200
|
+
</xsl:variable>
|
220
201
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
</xsl:call-template>
|
225
|
-
<fo:flow flow-name="xsl-region-body">
|
202
|
+
<xsl:variable name="copyrightText" select="concat('© International Hydrographic Association ', /mn:metanorma/mn:bibdata/mn:copyright/mn:from ,' – All rights reserved')"/>
|
203
|
+
<xsl:variable name="edition"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/></xsl:variable>
|
204
|
+
<xsl:variable name="month_year"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']"/></xsl:variable>
|
226
205
|
|
227
|
-
|
206
|
+
<xsl:call-template name="cover-page">
|
207
|
+
<xsl:with-param name="num" select="$num"/>
|
208
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
209
|
+
<xsl:with-param name="edition" select="$edition"/>
|
210
|
+
<xsl:with-param name="month_year" select="$month_year"/>
|
211
|
+
</xsl:call-template>
|
212
|
+
|
213
|
+
<xsl:choose>
|
214
|
+
<xsl:when test="/mn:metanorma/mn:boilerplate/*[not(self::mn:feedback-statement)]">
|
215
|
+
<fo:page-sequence master-reference="preface" format="i" force-page-count="no-force">
|
216
|
+
<xsl:call-template name="insertHeaderFooter">
|
217
|
+
<xsl:with-param name="title_header" select="$title_header"/>
|
218
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
219
|
+
<xsl:with-param name="edition" select="$edition"/>
|
220
|
+
<xsl:with-param name="month_year" select="$month_year"/>
|
221
|
+
<xsl:with-param name="font-weight">normal</xsl:with-param>
|
222
|
+
</xsl:call-template>
|
223
|
+
<fo:flow flow-name="xsl-region-body">
|
228
224
|
<fo:block-container margin-left="-1.5mm" margin-right="-1mm">
|
229
|
-
<fo:block-container margin-left="0mm" margin-right="0mm" border="0.5pt solid black"
|
225
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" border="0.5pt solid black">
|
230
226
|
<fo:block-container margin-top="6.5mm" margin-left="7.5mm" margin-right="8.5mm" margin-bottom="7.5mm">
|
231
227
|
<fo:block-container margin="0">
|
232
228
|
<fo:block text-align="justify">
|
233
|
-
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/*[
|
229
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/*[not(self::mn:feedback-statement)]"/>
|
234
230
|
</fo:block>
|
235
231
|
</fo:block-container>
|
236
232
|
</fo:block-container>
|
237
233
|
</fo:block-container>
|
238
234
|
</fo:block-container>
|
239
|
-
|
240
|
-
|
235
|
+
</fo:flow>
|
236
|
+
</fo:page-sequence>
|
237
|
+
</xsl:when>
|
238
|
+
<xsl:otherwise>
|
239
|
+
<!-- https://github.com/metanorma/metanorma-iho/issues/293:
|
240
|
+
If the publication has no copyright boxed note (normally on page ii of the publication), page ii should be "Page intentionally left blank". -->
|
241
|
+
<fo:page-sequence master-reference="blankpage" format="i" force-page-count="no-force">
|
242
|
+
<xsl:call-template name="insertHeaderFooterBlank">
|
243
|
+
<xsl:with-param name="title_header" select="$title_header"/>
|
244
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
245
|
+
<xsl:with-param name="edition" select="$edition"/>
|
246
|
+
<xsl:with-param name="month_year" select="$month_year"/>
|
247
|
+
</xsl:call-template>
|
248
|
+
<fo:flow flow-name="xsl-region-body">
|
249
|
+
<fo:block/>
|
250
|
+
</fo:flow>
|
251
|
+
</fo:page-sequence>
|
252
|
+
</xsl:otherwise>
|
253
|
+
</xsl:choose>
|
241
254
|
|
242
|
-
|
243
|
-
|
244
|
-
|
255
|
+
<xsl:variable name="updated_xml_with_pages">
|
256
|
+
<xsl:call-template name="processPrefaceAndMainSectionsIHO_items"/>
|
257
|
+
</xsl:variable>
|
245
258
|
|
246
|
-
|
247
|
-
</fo:page-sequence>
|
248
|
-
<!-- End Preface Pages -->
|
249
|
-
<!-- =========================== -->
|
250
|
-
<!-- =========================== -->
|
251
|
-
</xsl:for-each>
|
259
|
+
<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface/sections -->
|
252
260
|
|
253
|
-
|
261
|
+
<xsl:for-each select=".//mn:page_sequence[parent::mn:preface][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
|
254
262
|
|
255
|
-
|
256
|
-
|
263
|
+
<!-- Preface Pages -->
|
264
|
+
<fo:page-sequence master-reference="preface" format="i" force-page-count="end-on-even">
|
257
265
|
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
266
|
+
<xsl:attribute name="master-reference">
|
267
|
+
<xsl:text>preface</xsl:text>
|
268
|
+
<xsl:call-template name="getPageSequenceOrientation"/>
|
269
|
+
</xsl:attribute>
|
262
270
|
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
271
|
+
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
272
|
+
<xsl:call-template name="insertHeaderFooter">
|
273
|
+
<xsl:with-param name="title_header" select="$title_header"/>
|
274
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
275
|
+
<xsl:with-param name="edition" select="$edition"/>
|
276
|
+
<xsl:with-param name="month_year" select="$month_year"/>
|
277
|
+
<xsl:with-param name="font-weight">normal</xsl:with-param>
|
278
|
+
<xsl:with-param name="orientation"><xsl:call-template name="getPageSequenceOrientation"/></xsl:with-param>
|
279
|
+
</xsl:call-template>
|
280
|
+
<fo:flow flow-name="xsl-region-body">
|
281
|
+
|
282
|
+
<!-- <xsl:if test="position() = 1">
|
283
|
+
<fo:block-container margin-left="-1.5mm" margin-right="-1mm">
|
284
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" border="0.5pt solid black" >
|
285
|
+
<fo:block-container margin-top="6.5mm" margin-left="7.5mm" margin-right="8.5mm" margin-bottom="7.5mm">
|
286
|
+
<fo:block-container margin="0">
|
287
|
+
<fo:block text-align="justify">
|
288
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/*[local-name() != 'feedback-statement']"/>
|
289
|
+
</fo:block>
|
290
|
+
</fo:block-container>
|
291
|
+
</fo:block-container>
|
292
|
+
</fo:block-container>
|
293
|
+
</fo:block-container>
|
294
|
+
<fo:block break-after="page"/>
|
295
|
+
</xsl:if> -->
|
268
296
|
|
269
|
-
|
270
|
-
|
297
|
+
<!-- Contents, Document History, ... except Foreword and Introduction -->
|
298
|
+
<!-- <xsl:call-template name="processPrefaceSectionsDefault"/> -->
|
299
|
+
<xsl:apply-templates select="*[not(self::mn:foreword) and not(self::mn:introduction)]">
|
300
|
+
<xsl:with-param name="num" select="$num"/>
|
301
|
+
</xsl:apply-templates>
|
271
302
|
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
303
|
+
</fo:flow>
|
304
|
+
</fo:page-sequence>
|
305
|
+
<!-- End Preface Pages -->
|
306
|
+
<!-- =========================== -->
|
307
|
+
<!-- =========================== -->
|
308
|
+
</xsl:for-each>
|
278
309
|
|
279
|
-
|
310
|
+
<xsl:for-each select=".//mn:page_sequence[mn:foreword or mn:introduction][parent::mn:preface][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
|
280
311
|
|
281
|
-
|
312
|
+
<!-- Preface Pages -->
|
313
|
+
<fo:page-sequence master-reference="preface" format="i" force-page-count="end-on-even">
|
282
314
|
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
315
|
+
<xsl:attribute name="master-reference">
|
316
|
+
<xsl:text>preface</xsl:text>
|
317
|
+
<xsl:call-template name="getPageSequenceOrientation"/>
|
318
|
+
</xsl:attribute>
|
287
319
|
|
288
|
-
|
289
|
-
<xsl:
|
290
|
-
|
320
|
+
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
321
|
+
<xsl:call-template name="insertHeaderFooter">
|
322
|
+
<xsl:with-param name="title_header" select="$title_header"/>
|
323
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
324
|
+
<xsl:with-param name="edition" select="$edition"/>
|
325
|
+
<xsl:with-param name="month_year" select="$month_year"/>
|
326
|
+
<xsl:with-param name="font-weight">normal</xsl:with-param>
|
327
|
+
<xsl:with-param name="orientation"><xsl:call-template name="getPageSequenceOrientation"/></xsl:with-param>
|
328
|
+
</xsl:call-template>
|
329
|
+
<fo:flow flow-name="xsl-region-body">
|
291
330
|
|
292
|
-
|
293
|
-
|
294
|
-
<fo:flow flow-name="xsl-region-body">
|
295
|
-
<fo:block-container>
|
331
|
+
<!-- Foreword, Introduction -->
|
332
|
+
<xsl:apply-templates select="*[self::mn:foreword or self::mn:introduction]"/>
|
296
333
|
|
297
|
-
|
334
|
+
</fo:flow>
|
335
|
+
</fo:page-sequence>
|
336
|
+
<!-- End Preface Pages -->
|
337
|
+
<!-- =========================== -->
|
338
|
+
<!-- =========================== -->
|
339
|
+
</xsl:for-each>
|
298
340
|
|
299
|
-
|
300
|
-
<!-- Normative references -->
|
301
|
-
<!-- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" /> -->
|
302
|
-
<!-- Terms and definitions -->
|
303
|
-
<!-- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms']" />
|
304
|
-
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='definitions']" />
|
305
|
-
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope')]" /> -->
|
341
|
+
<xsl:for-each select=".//mn:page_sequence[not(parent::mn:preface)][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
|
306
342
|
|
307
|
-
|
343
|
+
<xsl:variable name="page_sequence_content">
|
344
|
+
<xsl:apply-templates/>
|
345
|
+
</xsl:variable>
|
308
346
|
|
309
|
-
|
347
|
+
<xsl:if test="xalan:nodeset($page_sequence_content)/node()">
|
310
348
|
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
349
|
+
<fo:page-sequence master-reference="document" format="1" force-page-count="end-on-even">
|
350
|
+
|
351
|
+
<xsl:attribute name="master-reference">
|
352
|
+
<xsl:text>document</xsl:text>
|
353
|
+
<xsl:call-template name="getPageSequenceOrientation"/>
|
354
|
+
</xsl:attribute>
|
355
|
+
|
356
|
+
<xsl:if test="position() = 1">
|
357
|
+
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
358
|
+
</xsl:if>
|
359
|
+
|
360
|
+
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
361
|
+
<xsl:call-template name="insertHeaderFooter">
|
362
|
+
<xsl:with-param name="title_header" select="$title_header"/>
|
363
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
364
|
+
<xsl:with-param name="edition" select="$edition"/>
|
365
|
+
<xsl:with-param name="month_year" select="$month_year"/>
|
366
|
+
<xsl:with-param name="orientation"><xsl:call-template name="getPageSequenceOrientation"/></xsl:with-param>
|
367
|
+
</xsl:call-template>
|
368
|
+
<fo:flow flow-name="xsl-region-body">
|
369
|
+
<fo:block-container>
|
370
|
+
|
371
|
+
<!-- <fo:block font-size="16pt" font-weight="bold" margin-bottom="18pt" role="H1"><xsl:value-of select="$title-en"/></fo:block> -->
|
372
|
+
|
373
|
+
<!-- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" /> -->
|
374
|
+
<!-- Normative references -->
|
375
|
+
<!-- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" /> -->
|
376
|
+
<!-- Terms and definitions -->
|
377
|
+
<!-- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms']" />
|
378
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='definitions']" />
|
379
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope')]" /> -->
|
380
|
+
|
381
|
+
<!-- <xsl:call-template name="processMainSectionsDefault"/> -->
|
382
|
+
|
383
|
+
<!--<xsl:apply-templates /> -->
|
384
|
+
<xsl:copy-of select="$page_sequence_content"/>
|
385
|
+
|
386
|
+
<xsl:if test="$table_if = 'true'"><fo:block/></xsl:if>
|
387
|
+
</fo:block-container>
|
388
|
+
</fo:flow>
|
389
|
+
</fo:page-sequence>
|
390
|
+
</xsl:if>
|
391
|
+
<!-- </xsl:if> -->
|
392
|
+
</xsl:for-each>
|
316
393
|
</xsl:for-each>
|
317
394
|
</xsl:for-each>
|
318
395
|
|
@@ -362,11 +439,31 @@
|
|
362
439
|
</xsl:template>
|
363
440
|
|
364
441
|
<xsl:template name="cover-page">
|
442
|
+
<xsl:param name="num"/>
|
443
|
+
<xsl:param name="docidentifier"/>
|
444
|
+
<xsl:param name="edition"/>
|
445
|
+
<xsl:param name="month_year"/>
|
446
|
+
|
447
|
+
<xsl:variable name="title-en"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en']/node()"/></xsl:variable>
|
448
|
+
<xsl:variable name="title-main_"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'main']/node()"/></xsl:variable>
|
449
|
+
<xsl:variable name="title-main"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-main']/node()"/></xsl:variable>
|
450
|
+
<xsl:variable name="title-appendix"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-appendix']/node()"/></xsl:variable>
|
451
|
+
<xsl:variable name="title-annex"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-annex']/node()"/></xsl:variable>
|
452
|
+
<xsl:variable name="title-part"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-part']/node()"/></xsl:variable>
|
453
|
+
<xsl:variable name="title-supplement"><xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@type = 'title-supplement']/node()"/></xsl:variable>
|
454
|
+
|
365
455
|
<!-- =========================== -->
|
366
456
|
<!-- Cover Page -->
|
367
457
|
<fo:page-sequence master-reference="cover-page">
|
368
458
|
<fo:flow flow-name="xsl-region-body">
|
369
459
|
|
460
|
+
<fo:block-container absolute-position="fixed" top="1mm">
|
461
|
+
<xsl:if test="$num = 1">
|
462
|
+
<xsl:attribute name="id">firstpage_id_0</xsl:attribute>
|
463
|
+
</xsl:if>
|
464
|
+
<fo:block id="firstpage_id_{$num}"> </fo:block>
|
465
|
+
</fo:block-container>
|
466
|
+
|
370
467
|
<xsl:variable name="isCoverPageImage" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'coverpage-image']/mn:value/mn:image and 1 = 1)"/>
|
371
468
|
|
372
469
|
<xsl:variable name="document_scheme" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'document-scheme']/mn:value)"/>
|
@@ -377,7 +474,7 @@
|
|
377
474
|
</xsl:when>
|
378
475
|
<xsl:otherwise>
|
379
476
|
|
380
|
-
<fo:block-container position="absolute" left="14.25mm" top="12mm" id="__internal_layout__coverpage_{generate-id()}">
|
477
|
+
<fo:block-container position="absolute" left="14.25mm" top="12mm" id="__internal_layout__coverpage_{$num}_{generate-id()}">
|
381
478
|
<fo:table table-layout="fixed" width="181.1mm">
|
382
479
|
<fo:table-column column-width="26mm"/>
|
383
480
|
<fo:table-column column-width="19.4mm"/>
|
@@ -588,6 +685,7 @@
|
|
588
685
|
</xsl:template>
|
589
686
|
|
590
687
|
<xsl:template match="mn:preface//mn:clause[@type = 'toc']" name="toc" priority="4">
|
688
|
+
<xsl:param name="num"/>
|
591
689
|
<!-- Table of Contents -->
|
592
690
|
<fo:block>
|
593
691
|
|
@@ -603,7 +701,7 @@
|
|
603
701
|
|
604
702
|
<fo:block role="TOC" xsl:use-attribute-sets="toc-style">
|
605
703
|
|
606
|
-
<xsl:for-each select="$contents//mnx:item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
704
|
+
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
607
705
|
<fo:block role="TOCI">
|
608
706
|
<fo:list-block xsl:use-attribute-sets="toc-item-block-style">
|
609
707
|
|
@@ -611,7 +709,7 @@
|
|
611
709
|
|
612
710
|
<fo:list-item>
|
613
711
|
<fo:list-item-label end-indent="label-end()">
|
614
|
-
<fo:block id="__internal_layout__toc_sectionnum_{generate-id()}">
|
712
|
+
<fo:block id="__internal_layout__toc_sectionnum_{$num}_{generate-id()}">
|
615
713
|
<xsl:if test="@section != '' and not(@type = 'annex')"> <!-- output below -->
|
616
714
|
<xsl:value-of select="@section"/>
|
617
715
|
</xsl:if>
|
@@ -767,7 +865,7 @@
|
|
767
865
|
<fo:inline><xsl:copy-of select="@id"/><xsl:apply-templates/></fo:inline>
|
768
866
|
</xsl:template>
|
769
867
|
|
770
|
-
<xsl:template match="
|
868
|
+
<xsl:template match="mn:metanorma/mn:bibdata/mn:edition">
|
771
869
|
<xsl:call-template name="capitalize">
|
772
870
|
<xsl:with-param name="str">
|
773
871
|
<xsl:call-template name="getLocalizedString">
|
@@ -779,7 +877,7 @@
|
|
779
877
|
<xsl:apply-templates/>
|
780
878
|
</xsl:template>
|
781
879
|
|
782
|
-
<xsl:template match="
|
880
|
+
<xsl:template match="mn:metanorma/mn:bibdata/mn:date[@type = 'published']">
|
783
881
|
<xsl:call-template name="convertDate">
|
784
882
|
<xsl:with-param name="date" select="."/>
|
785
883
|
<xsl:with-param name="format" select="'short'"/>
|
@@ -804,15 +902,21 @@
|
|
804
902
|
<!-- title -->
|
805
903
|
<!-- ====== -->
|
806
904
|
|
807
|
-
<xsl:template match="mn:annex/mn:fmt-title">
|
808
|
-
<fo:block
|
905
|
+
<xsl:template match="mn:annex/mn:fmt-title" name="annex_title">
|
906
|
+
<fo:block xsl:use-attribute-sets="annex-title-style">
|
907
|
+
|
908
|
+
<xsl:call-template name="refine_annex-title-style"/>
|
909
|
+
|
809
910
|
<xsl:apply-templates/>
|
810
911
|
<xsl:apply-templates select="following-sibling::*[1][mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
811
912
|
</fo:block>
|
812
913
|
</xsl:template>
|
813
914
|
|
814
915
|
<xsl:template match="mn:bibliography/mn:references[not(@normative='true')]/mn:fmt-title">
|
815
|
-
<fo:block
|
916
|
+
<fo:block xsl:use-attribute-sets="references-non-normative-title-style">
|
917
|
+
|
918
|
+
<xsl:call-template name="refine_references-non-normative-title-style"/>
|
919
|
+
|
816
920
|
<xsl:apply-templates/>
|
817
921
|
</fo:block>
|
818
922
|
</xsl:template>
|
@@ -858,9 +962,18 @@
|
|
858
962
|
</xsl:variable>
|
859
963
|
|
860
964
|
<xsl:element name="{$element-name}">
|
861
|
-
|
862
|
-
|
863
|
-
|
965
|
+
|
966
|
+
<xsl:choose>
|
967
|
+
<xsl:when test="@type = 'floating-title' or @type = 'section-title'">
|
968
|
+
<xsl:copy-of select="@id"/>
|
969
|
+
</xsl:when>
|
970
|
+
<xsl:otherwise>
|
971
|
+
<xsl:for-each select="parent::mn:clause">
|
972
|
+
<xsl:call-template name="setId"/>
|
973
|
+
</xsl:for-each>
|
974
|
+
</xsl:otherwise>
|
975
|
+
</xsl:choose>
|
976
|
+
|
864
977
|
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
865
978
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
866
979
|
<xsl:attribute name="space-before">
|
@@ -959,10 +1072,16 @@
|
|
959
1072
|
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
960
1073
|
</xsl:if>
|
961
1074
|
|
1075
|
+
<xsl:if test="ancestor::mn:li and ancestor::mn:table">
|
1076
|
+
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
1077
|
+
</xsl:if>
|
1078
|
+
|
962
1079
|
<xsl:if test=".//mn:fn">
|
963
1080
|
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
964
1081
|
</xsl:if>
|
965
1082
|
|
1083
|
+
<xsl:copy-of select="@id"/>
|
1084
|
+
|
966
1085
|
<xsl:apply-templates>
|
967
1086
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
968
1087
|
</xsl:apply-templates>
|
@@ -1016,7 +1135,12 @@
|
|
1016
1135
|
<xsl:template match="mn:index"/>
|
1017
1136
|
|
1018
1137
|
<xsl:template name="insertHeaderFooter">
|
1138
|
+
<xsl:param name="title_header"/>
|
1139
|
+
<xsl:param name="docidentifier"/>
|
1140
|
+
<xsl:param name="edition"/>
|
1141
|
+
<xsl:param name="month_year"/>
|
1019
1142
|
<xsl:param name="font-weight" select="'bold'"/>
|
1143
|
+
<xsl:param name="orientation"/>
|
1020
1144
|
<fo:static-content flow-name="header-odd" role="artifact">
|
1021
1145
|
<fo:block-container height="100%" font-size="8pt">
|
1022
1146
|
<fo:block padding-top="12.5mm">
|
@@ -1053,10 +1177,19 @@
|
|
1053
1177
|
</fo:block>
|
1054
1178
|
</fo:block-container>
|
1055
1179
|
</fo:static-content>
|
1056
|
-
<xsl:call-template name="insertHeaderBlank"
|
1057
|
-
|
1180
|
+
<xsl:call-template name="insertHeaderBlank">
|
1181
|
+
<xsl:with-param name="title_header" select="$title_header"/>
|
1182
|
+
<xsl:with-param name="orientation" select="$orientation"/>
|
1183
|
+
</xsl:call-template>
|
1184
|
+
<xsl:call-template name="insertFooter">
|
1185
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
1186
|
+
<xsl:with-param name="edition" select="$edition"/>
|
1187
|
+
<xsl:with-param name="month_year" select="$month_year"/>
|
1188
|
+
</xsl:call-template>
|
1058
1189
|
</xsl:template>
|
1059
1190
|
<xsl:template name="insertHeaderBlank">
|
1191
|
+
<xsl:param name="title_header"/>
|
1192
|
+
<xsl:param name="orientation"/>
|
1060
1193
|
<fo:static-content flow-name="header-blank" role="artifact">
|
1061
1194
|
<fo:block-container height="100%" font-size="8pt">
|
1062
1195
|
<fo:block padding-top="12.5mm">
|
@@ -1075,11 +1208,18 @@
|
|
1075
1208
|
</fo:block>
|
1076
1209
|
</fo:block-container>
|
1077
1210
|
<fo:block-container position="absolute" left="40.5mm" top="130mm" height="4mm" width="79mm" border="0.75pt solid black" text-align="center" display-align="center" line-height="100%">
|
1211
|
+
<xsl:if test="$orientation = '-landscape'">
|
1212
|
+
<xsl:attribute name="left">84mm</xsl:attribute>
|
1213
|
+
<xsl:attribute name="top">87mm</xsl:attribute>
|
1214
|
+
</xsl:if>
|
1078
1215
|
<fo:block>Page intentionally left blank</fo:block>
|
1079
1216
|
</fo:block-container>
|
1080
1217
|
</fo:static-content>
|
1081
1218
|
</xsl:template>
|
1082
1219
|
<xsl:template name="insertFooter">
|
1220
|
+
<xsl:param name="docidentifier"/>
|
1221
|
+
<xsl:param name="edition"/>
|
1222
|
+
<xsl:param name="month_year"/>
|
1083
1223
|
<fo:static-content flow-name="footer" role="artifact">
|
1084
1224
|
<fo:block-container height="100%" display-align="after">
|
1085
1225
|
<fo:block padding-bottom="12.5mm" font-size="8pt" text-align-last="justify">
|
@@ -1097,8 +1237,18 @@
|
|
1097
1237
|
</fo:static-content>
|
1098
1238
|
</xsl:template>
|
1099
1239
|
<xsl:template name="insertHeaderFooterBlank">
|
1100
|
-
<xsl:
|
1101
|
-
<xsl:
|
1240
|
+
<xsl:param name="title_header"/>
|
1241
|
+
<xsl:param name="docidentifier"/>
|
1242
|
+
<xsl:param name="edition"/>
|
1243
|
+
<xsl:param name="month_year"/>
|
1244
|
+
<xsl:call-template name="insertHeaderBlank">
|
1245
|
+
<xsl:with-param name="title_header" select="$title_header"/>
|
1246
|
+
</xsl:call-template>
|
1247
|
+
<xsl:call-template name="insertFooter">
|
1248
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
1249
|
+
<xsl:with-param name="edition" select="$edition"/>
|
1250
|
+
<xsl:with-param name="month_year" select="$month_year"/>
|
1251
|
+
</xsl:call-template>
|
1102
1252
|
</xsl:template>
|
1103
1253
|
|
1104
1254
|
<xsl:variable name="Image-IHO-SVG">
|
@@ -1414,6 +1564,7 @@
|
|
1414
1564
|
<xsl:variable name="en_dash">–</xsl:variable>
|
1415
1565
|
<xsl:variable name="em_dash">—</xsl:variable>
|
1416
1566
|
<xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
|
1567
|
+
<xsl:variable name="nonbreak_space_em_dash"> —</xsl:variable>
|
1417
1568
|
<xsl:variable name="cr"> </xsl:variable>
|
1418
1569
|
<xsl:variable name="lf">
|
1419
1570
|
</xsl:variable>
|
@@ -1956,6 +2107,7 @@
|
|
1956
2107
|
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="update_xml_step1"/>
|
1957
2108
|
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]" mode="update_xml_step1"/>
|
1958
2109
|
<xsl:template match="mn:section-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
2110
|
+
<xsl:template match="mn:floating-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
1959
2111
|
<!-- <xsl:template match="mn:preferred[following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
|
1960
2112
|
<xsl:template match="mn:preferred" mode="update_xml_step1"/>
|
1961
2113
|
<!-- <xsl:template match="mn:admitted[following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
|
@@ -1970,10 +2122,10 @@
|
|
1970
2122
|
|
1971
2123
|
<xsl:template match="mn:term[@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
|
1972
2124
|
|
1973
|
-
<xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title]]" mode="update_xml_step1">
|
2125
|
+
<xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]]" mode="update_xml_step1">
|
1974
2126
|
<xsl:copy>
|
1975
2127
|
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
1976
|
-
<xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title]/@depth"/>
|
2128
|
+
<xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]/@depth"/>
|
1977
2129
|
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
1978
2130
|
</xsl:copy>
|
1979
2131
|
</xsl:template>
|
@@ -2763,10 +2915,16 @@
|
|
2763
2915
|
<xsl:attribute-set name="license-statement-style">
|
2764
2916
|
</xsl:attribute-set> <!-- license-statement-style -->
|
2765
2917
|
|
2918
|
+
<xsl:template name="refine_license-statement-style">
|
2919
|
+
</xsl:template>
|
2920
|
+
|
2766
2921
|
<xsl:attribute-set name="license-statement-title-style">
|
2767
2922
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2768
2923
|
</xsl:attribute-set> <!-- license-statement-title-style -->
|
2769
2924
|
|
2925
|
+
<xsl:template name="refine_license-statement-title-style">
|
2926
|
+
</xsl:template>
|
2927
|
+
|
2770
2928
|
<xsl:attribute-set name="license-statement-p-style">
|
2771
2929
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
2772
2930
|
|
@@ -2777,23 +2935,47 @@
|
|
2777
2935
|
<xsl:attribute-set name="legal-statement-style">
|
2778
2936
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
2779
2937
|
|
2938
|
+
<xsl:template name="refine_legal-statement-style">
|
2939
|
+
</xsl:template>
|
2940
|
+
|
2780
2941
|
<xsl:attribute-set name="legal-statement-title-style">
|
2781
2942
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2782
2943
|
</xsl:attribute-set> <!-- legal-statement-title-style -->
|
2783
2944
|
|
2945
|
+
<xsl:template name="refine_legal-statement-title-style">
|
2946
|
+
</xsl:template>
|
2947
|
+
|
2784
2948
|
<xsl:attribute-set name="legal-statement-p-style">
|
2785
2949
|
</xsl:attribute-set> <!-- legal-statement-p-style -->
|
2786
2950
|
|
2951
|
+
<xsl:template name="refine_legal-statement-p-style">
|
2952
|
+
<xsl:if test="@align">
|
2953
|
+
<xsl:attribute name="text-align">
|
2954
|
+
<xsl:value-of select="@align"/>
|
2955
|
+
</xsl:attribute>
|
2956
|
+
</xsl:if>
|
2957
|
+
</xsl:template>
|
2958
|
+
|
2787
2959
|
<xsl:attribute-set name="feedback-statement-style">
|
2788
2960
|
</xsl:attribute-set> <!-- feedback-statement-style -->
|
2789
2961
|
|
2962
|
+
<xsl:template name="refine_feedback-statement-style">
|
2963
|
+
</xsl:template>
|
2964
|
+
|
2790
2965
|
<xsl:attribute-set name="feedback-statement-title-style">
|
2791
2966
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2792
2967
|
</xsl:attribute-set> <!-- feedback-statement-title-style -->
|
2793
2968
|
|
2969
|
+
<xsl:template name="refine_feedback-statement-title-style">
|
2970
|
+
|
2971
|
+
</xsl:template>
|
2972
|
+
|
2794
2973
|
<xsl:attribute-set name="feedback-statement-p-style">
|
2795
2974
|
</xsl:attribute-set> <!-- feedback-statement-p-style -->
|
2796
2975
|
|
2976
|
+
<xsl:template name="refine_feedback-statement-p-style">
|
2977
|
+
</xsl:template>
|
2978
|
+
|
2797
2979
|
<!-- End boilerplate sections styles -->
|
2798
2980
|
|
2799
2981
|
<!-- ================================= -->
|
@@ -2819,6 +3001,7 @@
|
|
2819
3001
|
|
2820
3002
|
<xsl:template match="mn:license-statement">
|
2821
3003
|
<fo:block xsl:use-attribute-sets="license-statement-style">
|
3004
|
+
<xsl:call-template name="refine_license-statement-style"/>
|
2822
3005
|
<xsl:apply-templates/>
|
2823
3006
|
</fo:block>
|
2824
3007
|
</xsl:template> <!-- license-statement -->
|
@@ -2836,6 +3019,7 @@
|
|
2836
3019
|
<xsl:template match="mn:legal-statement">
|
2837
3020
|
<xsl:param name="isLegacy">false</xsl:param>
|
2838
3021
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
3022
|
+
<xsl:call-template name="refine_legal-statement-style"/>
|
2839
3023
|
<xsl:apply-templates/>
|
2840
3024
|
</fo:block>
|
2841
3025
|
</xsl:template> <!-- legal-statement -->
|
@@ -3005,6 +3189,27 @@
|
|
3005
3189
|
<xsl:attribute-set name="sourcecode-container-style">
|
3006
3190
|
</xsl:attribute-set>
|
3007
3191
|
|
3192
|
+
<xsl:template name="refine_sourcecode-container-style">
|
3193
|
+
<xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
|
3194
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3195
|
+
</xsl:if>
|
3196
|
+
|
3197
|
+
<xsl:if test="ancestor::mn:example">
|
3198
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
3199
|
+
</xsl:if>
|
3200
|
+
|
3201
|
+
<xsl:copy-of select="@id"/>
|
3202
|
+
|
3203
|
+
<xsl:if test="parent::mn:note">
|
3204
|
+
<xsl:attribute name="margin-left">
|
3205
|
+
<xsl:choose>
|
3206
|
+
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3207
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3208
|
+
</xsl:choose>
|
3209
|
+
</xsl:attribute>
|
3210
|
+
</xsl:if>
|
3211
|
+
</xsl:template>
|
3212
|
+
|
3008
3213
|
<xsl:attribute-set name="sourcecode-style">
|
3009
3214
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
3010
3215
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -3018,6 +3223,12 @@
|
|
3018
3223
|
<xsl:template name="refine_sourcecode-style">
|
3019
3224
|
</xsl:template> <!-- refine_sourcecode-style -->
|
3020
3225
|
|
3226
|
+
<xsl:attribute-set name="sourcecode-number-style">
|
3227
|
+
</xsl:attribute-set>
|
3228
|
+
|
3229
|
+
<xsl:template name="refine_sourcecode-number-style">
|
3230
|
+
</xsl:template>
|
3231
|
+
|
3021
3232
|
<xsl:attribute-set name="sourcecode-name-style">
|
3022
3233
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
3023
3234
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -3026,6 +3237,9 @@
|
|
3026
3237
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
3027
3238
|
</xsl:attribute-set> <!-- sourcecode-name-style -->
|
3028
3239
|
|
3240
|
+
<xsl:template name="refine_sourcecode-name-style">
|
3241
|
+
</xsl:template>
|
3242
|
+
|
3029
3243
|
<xsl:template name="add-zero-spaces-equal">
|
3030
3244
|
<xsl:param name="text" select="."/>
|
3031
3245
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
@@ -3113,24 +3327,8 @@
|
|
3113
3327
|
<xsl:otherwise>
|
3114
3328
|
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
|
3115
3329
|
|
3116
|
-
<xsl:
|
3117
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3118
|
-
</xsl:if>
|
3119
|
-
|
3120
|
-
<xsl:if test="ancestor::mn:example">
|
3121
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
3122
|
-
</xsl:if>
|
3123
|
-
|
3124
|
-
<xsl:copy-of select="@id"/>
|
3330
|
+
<xsl:call-template name="refine_sourcecode-container-style"/>
|
3125
3331
|
|
3126
|
-
<xsl:if test="parent::mn:note">
|
3127
|
-
<xsl:attribute name="margin-left">
|
3128
|
-
<xsl:choose>
|
3129
|
-
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3130
|
-
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3131
|
-
</xsl:choose>
|
3132
|
-
</xsl:attribute>
|
3133
|
-
</xsl:if>
|
3134
3332
|
<fo:block-container margin-left="0mm" role="SKIP">
|
3135
3333
|
|
3136
3334
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
@@ -3457,6 +3655,7 @@
|
|
3457
3655
|
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
3458
3656
|
<xsl:if test="normalize-space() != ''">
|
3459
3657
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3658
|
+
<xsl:call-template name="refine_sourcecode-name-style"/>
|
3460
3659
|
<xsl:apply-templates/>
|
3461
3660
|
</fo:block>
|
3462
3661
|
</xsl:if>
|
@@ -3505,12 +3704,31 @@
|
|
3505
3704
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3506
3705
|
<xsl:attribute name="font-family">Fira Code, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
3507
3706
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
3508
|
-
</xsl:attribute-set>
|
3707
|
+
</xsl:attribute-set> <!-- pre-style -->
|
3708
|
+
|
3709
|
+
<xsl:template name="refine_pre-style">
|
3710
|
+
</xsl:template>
|
3509
3711
|
|
3510
3712
|
<xsl:attribute-set name="tt-style">
|
3511
3713
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
3512
3714
|
</xsl:attribute-set>
|
3513
3715
|
|
3716
|
+
<xsl:template name="refine_tt-style">
|
3717
|
+
<xsl:variable name="_font-size">9.5 <!-- inherit -->
|
3718
|
+
</xsl:variable>
|
3719
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3720
|
+
<xsl:if test="$font-size != ''">
|
3721
|
+
<xsl:attribute name="font-size">
|
3722
|
+
<xsl:choose>
|
3723
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
3724
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
3725
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3726
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3727
|
+
</xsl:choose>
|
3728
|
+
</xsl:attribute>
|
3729
|
+
</xsl:if>
|
3730
|
+
</xsl:template>
|
3731
|
+
|
3514
3732
|
<xsl:variable name="color-added-text">
|
3515
3733
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
3516
3734
|
</xsl:variable>
|
@@ -3523,9 +3741,14 @@
|
|
3523
3741
|
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
3524
3742
|
</xsl:attribute-set>
|
3525
3743
|
|
3744
|
+
<xsl:template name="refine_add-style">
|
3745
|
+
</xsl:template>
|
3746
|
+
|
3526
3747
|
<xsl:variable name="add-style">
|
3527
|
-
|
3528
|
-
|
3748
|
+
<add-style xsl:use-attribute-sets="add-style">
|
3749
|
+
<xsl:call-template name="refine_add-style"/>
|
3750
|
+
</add-style>
|
3751
|
+
</xsl:variable>
|
3529
3752
|
<xsl:template name="append_add-style">
|
3530
3753
|
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
3531
3754
|
</xsl:template>
|
@@ -3538,24 +3761,77 @@
|
|
3538
3761
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
3539
3762
|
</xsl:attribute-set>
|
3540
3763
|
|
3764
|
+
<xsl:template name="refine_del-style">
|
3765
|
+
</xsl:template>
|
3766
|
+
|
3767
|
+
<xsl:attribute-set name="strong-style">
|
3768
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3769
|
+
</xsl:attribute-set>
|
3770
|
+
|
3771
|
+
<xsl:template name="refine_strong_style">
|
3772
|
+
<xsl:if test="ancestor::*['preferred']">
|
3773
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
3774
|
+
</xsl:if>
|
3775
|
+
</xsl:template> <!-- refine_strong_style -->
|
3776
|
+
|
3777
|
+
<xsl:attribute-set name="em-style">
|
3778
|
+
<xsl:attribute name="font-style">italic</xsl:attribute>
|
3779
|
+
</xsl:attribute-set>
|
3780
|
+
|
3781
|
+
<xsl:template name="refine_em_style">
|
3782
|
+
</xsl:template> <!-- refine_em_style -->
|
3783
|
+
|
3784
|
+
<xsl:attribute-set name="sup-style">
|
3785
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3786
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3787
|
+
</xsl:attribute-set>
|
3788
|
+
|
3789
|
+
<xsl:template name="refine_sup-style">
|
3790
|
+
</xsl:template>
|
3791
|
+
|
3792
|
+
<xsl:attribute-set name="sub-style">
|
3793
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3794
|
+
<xsl:attribute name="vertical-align">sub</xsl:attribute>
|
3795
|
+
</xsl:attribute-set>
|
3796
|
+
|
3797
|
+
<xsl:template name="refine_sub-style">
|
3798
|
+
</xsl:template>
|
3799
|
+
|
3800
|
+
<xsl:attribute-set name="underline-style">
|
3801
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3802
|
+
</xsl:attribute-set>
|
3803
|
+
|
3804
|
+
<xsl:template name="refine_underline-style">
|
3805
|
+
</xsl:template>
|
3806
|
+
|
3807
|
+
<xsl:attribute-set name="hi-style">
|
3808
|
+
<xsl:attribute name="background-color">yellow</xsl:attribute>
|
3809
|
+
</xsl:attribute-set>
|
3810
|
+
|
3811
|
+
<xsl:template name="refine_hi-style">
|
3812
|
+
</xsl:template>
|
3813
|
+
|
3814
|
+
<xsl:attribute-set name="strike-style">
|
3815
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
3816
|
+
</xsl:attribute-set>
|
3817
|
+
|
3818
|
+
<xsl:template name="refine_strike-style">
|
3819
|
+
</xsl:template>
|
3820
|
+
|
3541
3821
|
<xsl:template match="mn:br">
|
3542
3822
|
<xsl:value-of select="$linebreak"/>
|
3543
3823
|
</xsl:template>
|
3544
3824
|
|
3545
|
-
|
3546
|
-
<fo:inline
|
3547
|
-
<xsl:call-template name="
|
3825
|
+
<xsl:template match="mn:em">
|
3826
|
+
<fo:inline xsl:use-attribute-sets="em-style">
|
3827
|
+
<xsl:call-template name="refine_em_style"/>
|
3548
3828
|
<xsl:apply-templates/>
|
3549
3829
|
</fo:inline>
|
3550
3830
|
</xsl:template>
|
3551
3831
|
|
3552
|
-
<xsl:template name="refine_italic_style">
|
3553
|
-
</xsl:template>
|
3554
|
-
|
3555
3832
|
<xsl:template match="mn:strong | *[local-name()='b']">
|
3556
3833
|
<xsl:param name="split_keep-within-line"/>
|
3557
|
-
<fo:inline
|
3558
|
-
|
3834
|
+
<fo:inline xsl:use-attribute-sets="strong-style">
|
3559
3835
|
<xsl:call-template name="refine_strong_style"/>
|
3560
3836
|
|
3561
3837
|
<xsl:apply-templates>
|
@@ -3564,44 +3840,27 @@
|
|
3564
3840
|
</fo:inline>
|
3565
3841
|
</xsl:template>
|
3566
3842
|
|
3567
|
-
<xsl:template name="refine_strong_style">
|
3568
|
-
<xsl:if test="ancestor::*['preferred']">
|
3569
|
-
<xsl:attribute name="role">SKIP</xsl:attribute>
|
3570
|
-
</xsl:if>
|
3571
|
-
</xsl:template>
|
3572
|
-
|
3573
3843
|
<xsl:template match="*[local-name()='padding']">
|
3574
3844
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
3575
3845
|
</xsl:template>
|
3576
3846
|
|
3577
3847
|
<xsl:template match="mn:sup">
|
3578
|
-
<fo:inline
|
3848
|
+
<fo:inline xsl:use-attribute-sets="sup-style">
|
3849
|
+
<xsl:call-template name="refine_sup-style"/>
|
3579
3850
|
<xsl:apply-templates/>
|
3580
3851
|
</fo:inline>
|
3581
3852
|
</xsl:template>
|
3582
3853
|
|
3583
3854
|
<xsl:template match="mn:sub">
|
3584
|
-
<fo:inline
|
3855
|
+
<fo:inline xsl:use-attribute-sets="sub-style">
|
3856
|
+
<xsl:call-template name="refine_sub-style"/>
|
3585
3857
|
<xsl:apply-templates/>
|
3586
3858
|
</fo:inline>
|
3587
3859
|
</xsl:template>
|
3588
3860
|
|
3589
3861
|
<xsl:template match="mn:tt">
|
3590
3862
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
3591
|
-
|
3592
|
-
<xsl:variable name="_font-size">9.5 <!-- inherit -->
|
3593
|
-
</xsl:variable>
|
3594
|
-
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3595
|
-
<xsl:if test="$font-size != ''">
|
3596
|
-
<xsl:attribute name="font-size">
|
3597
|
-
<xsl:choose>
|
3598
|
-
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
3599
|
-
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
3600
|
-
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3601
|
-
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3602
|
-
</xsl:choose>
|
3603
|
-
</xsl:attribute>
|
3604
|
-
</xsl:if>
|
3863
|
+
<xsl:call-template name="refine_tt-style"/>
|
3605
3864
|
<xsl:apply-templates/>
|
3606
3865
|
</fo:inline>
|
3607
3866
|
</xsl:template> <!-- tt -->
|
@@ -3620,7 +3879,8 @@
|
|
3620
3879
|
</xsl:template>
|
3621
3880
|
|
3622
3881
|
<xsl:template match="mn:underline">
|
3623
|
-
<fo:inline
|
3882
|
+
<fo:inline xsl:use-attribute-sets="underline-style">
|
3883
|
+
<xsl:call-template name="refine_underline-style"/>
|
3624
3884
|
<xsl:apply-templates/>
|
3625
3885
|
</fo:inline>
|
3626
3886
|
</xsl:template>
|
@@ -3778,6 +4038,7 @@
|
|
3778
4038
|
|
3779
4039
|
<xsl:template match="mn:del">
|
3780
4040
|
<fo:inline xsl:use-attribute-sets="del-style">
|
4041
|
+
<xsl:call-template name="refine_del-style"/>
|
3781
4042
|
<xsl:apply-templates/>
|
3782
4043
|
</fo:inline>
|
3783
4044
|
</xsl:template>
|
@@ -3787,7 +4048,8 @@
|
|
3787
4048
|
|
3788
4049
|
<!-- highlight text -->
|
3789
4050
|
<xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
|
3790
|
-
<fo:inline
|
4051
|
+
<fo:inline xsl:use-attribute-sets="hi-style">
|
4052
|
+
<xsl:call-template name="refine_hi-style"/>
|
3791
4053
|
<xsl:apply-templates/>
|
3792
4054
|
</fo:inline>
|
3793
4055
|
</xsl:template>
|
@@ -3873,7 +4135,8 @@
|
|
3873
4135
|
</xsl:template>
|
3874
4136
|
|
3875
4137
|
<xsl:template match="mn:strike">
|
3876
|
-
<fo:inline
|
4138
|
+
<fo:inline xsl:use-attribute-sets="strike-style">
|
4139
|
+
<xsl:call-template name="refine_strike-style"/>
|
3877
4140
|
<xsl:apply-templates/>
|
3878
4141
|
</fo:inline>
|
3879
4142
|
</xsl:template>
|
@@ -3953,6 +4216,7 @@
|
|
3953
4216
|
|
3954
4217
|
<xsl:template match="mn:pre" name="pre">
|
3955
4218
|
<fo:block xsl:use-attribute-sets="pre-style">
|
4219
|
+
<xsl:call-template name="refine_pre-style"/>
|
3956
4220
|
<xsl:copy-of select="@id"/>
|
3957
4221
|
<xsl:choose>
|
3958
4222
|
|
@@ -3983,24 +4247,42 @@
|
|
3983
4247
|
<xsl:attribute-set name="permission-style">
|
3984
4248
|
</xsl:attribute-set>
|
3985
4249
|
|
4250
|
+
<xsl:template name="refine_permission-style">
|
4251
|
+
</xsl:template>
|
4252
|
+
|
3986
4253
|
<xsl:attribute-set name="permission-name-style">
|
3987
4254
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3988
4255
|
</xsl:attribute-set>
|
3989
4256
|
|
4257
|
+
<xsl:template name="refine_permission-name-style">
|
4258
|
+
</xsl:template>
|
4259
|
+
|
3990
4260
|
<xsl:attribute-set name="permission-label-style">
|
3991
4261
|
</xsl:attribute-set>
|
3992
4262
|
|
4263
|
+
<xsl:template name="refine_permission-label-style">
|
4264
|
+
</xsl:template>
|
4265
|
+
|
3993
4266
|
<xsl:attribute-set name="requirement-style">
|
3994
4267
|
</xsl:attribute-set>
|
3995
4268
|
|
4269
|
+
<xsl:template name="refine_requirement-style">
|
4270
|
+
</xsl:template>
|
4271
|
+
|
3996
4272
|
<xsl:attribute-set name="requirement-name-style">
|
3997
4273
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3998
4274
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3999
4275
|
</xsl:attribute-set>
|
4000
4276
|
|
4277
|
+
<xsl:template name="refine_requirement-name-style">
|
4278
|
+
</xsl:template>
|
4279
|
+
|
4001
4280
|
<xsl:attribute-set name="requirement-label-style">
|
4002
4281
|
</xsl:attribute-set>
|
4003
4282
|
|
4283
|
+
<xsl:template name="refine_requirement-label-style">
|
4284
|
+
</xsl:template>
|
4285
|
+
|
4004
4286
|
<xsl:attribute-set name="subject-style">
|
4005
4287
|
</xsl:attribute-set>
|
4006
4288
|
|
@@ -4029,19 +4311,29 @@
|
|
4029
4311
|
<xsl:attribute name="border">1pt solid black</xsl:attribute>
|
4030
4312
|
</xsl:attribute-set>
|
4031
4313
|
|
4314
|
+
<xsl:template name="refine_recommendation-style">
|
4315
|
+
</xsl:template>
|
4316
|
+
|
4032
4317
|
<xsl:attribute-set name="recommendation-name-style">
|
4033
4318
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4034
4319
|
</xsl:attribute-set>
|
4035
4320
|
|
4321
|
+
<xsl:template name="refine_recommendation-name-style">
|
4322
|
+
</xsl:template>
|
4323
|
+
|
4036
4324
|
<xsl:attribute-set name="recommendation-label-style">
|
4037
4325
|
</xsl:attribute-set>
|
4038
4326
|
|
4327
|
+
<xsl:template name="refine_recommendation-label-style">
|
4328
|
+
</xsl:template>
|
4329
|
+
|
4039
4330
|
<!-- ========== -->
|
4040
4331
|
<!-- permission -->
|
4041
4332
|
<!-- ========== -->
|
4042
4333
|
<xsl:template match="mn:permission">
|
4043
4334
|
<xsl:call-template name="setNamedDestination"/>
|
4044
4335
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
4336
|
+
<xsl:call-template name="refine_permission-style"/>
|
4045
4337
|
<xsl:apply-templates select="mn:fmt-name"/>
|
4046
4338
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4047
4339
|
</fo:block>
|
@@ -4050,6 +4342,7 @@
|
|
4050
4342
|
<xsl:template match="mn:permission/mn:fmt-name">
|
4051
4343
|
<xsl:if test="normalize-space() != ''">
|
4052
4344
|
<fo:inline xsl:use-attribute-sets="permission-name-style">
|
4345
|
+
<xsl:call-template name="refine_permission-name-style"/>
|
4053
4346
|
<xsl:apply-templates/><xsl:text>:</xsl:text>
|
4054
4347
|
</fo:inline>
|
4055
4348
|
|
@@ -4058,6 +4351,7 @@
|
|
4058
4351
|
|
4059
4352
|
<xsl:template match="mn:permission/mn:label">
|
4060
4353
|
<fo:block xsl:use-attribute-sets="permission-label-style">
|
4354
|
+
<xsl:call-template name="refine_permission-label-style"/>
|
4061
4355
|
<xsl:apply-templates/>
|
4062
4356
|
</fo:block>
|
4063
4357
|
</xsl:template>
|
@@ -4070,6 +4364,7 @@
|
|
4070
4364
|
<xsl:template match="mn:requirement">
|
4071
4365
|
<xsl:call-template name="setNamedDestination"/>
|
4072
4366
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
4367
|
+
<xsl:call-template name="refine_requirement-style"/>
|
4073
4368
|
<xsl:apply-templates select="mn:fmt-name"/>
|
4074
4369
|
<xsl:apply-templates select="mn:label"/>
|
4075
4370
|
<xsl:apply-templates select="@obligation"/>
|
@@ -4081,6 +4376,7 @@
|
|
4081
4376
|
<xsl:template match="mn:requirement/mn:fmt-name">
|
4082
4377
|
<xsl:if test="normalize-space() != ''">
|
4083
4378
|
<fo:inline xsl:use-attribute-sets="requirement-name-style">
|
4379
|
+
<xsl:call-template name="refine_requirement-name-style"/>
|
4084
4380
|
<xsl:apply-templates/><xsl:text>:</xsl:text>
|
4085
4381
|
</fo:inline>
|
4086
4382
|
|
@@ -4089,6 +4385,7 @@
|
|
4089
4385
|
|
4090
4386
|
<xsl:template match="mn:requirement/mn:label">
|
4091
4387
|
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
4388
|
+
<xsl:call-template name="refine_requirement-label-style"/>
|
4092
4389
|
<xsl:apply-templates/>
|
4093
4390
|
</fo:block>
|
4094
4391
|
</xsl:template>
|
@@ -4114,6 +4411,7 @@
|
|
4114
4411
|
<xsl:template match="mn:recommendation">
|
4115
4412
|
<xsl:call-template name="setNamedDestination"/>
|
4116
4413
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
4414
|
+
<xsl:call-template name="refine_recommendation-style"/>
|
4117
4415
|
<xsl:apply-templates select="mn:fmt-name"/>
|
4118
4416
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4119
4417
|
</fo:block>
|
@@ -4122,6 +4420,7 @@
|
|
4122
4420
|
<xsl:template match="mn:recommendation/mn:fmt-name">
|
4123
4421
|
<xsl:if test="normalize-space() != ''">
|
4124
4422
|
<fo:inline xsl:use-attribute-sets="recommendation-name-style">
|
4423
|
+
<xsl:call-template name="refine_recommendation-name-style"/>
|
4125
4424
|
<xsl:apply-templates/><xsl:text>:</xsl:text>
|
4126
4425
|
</fo:inline>
|
4127
4426
|
|
@@ -4130,6 +4429,7 @@
|
|
4130
4429
|
|
4131
4430
|
<xsl:template match="mn:recommendation/mn:label">
|
4132
4431
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
4432
|
+
<xsl:call-template name="refine_recommendation-label-style"/>
|
4133
4433
|
<xsl:apply-templates/>
|
4134
4434
|
</fo:block>
|
4135
4435
|
</xsl:template>
|
@@ -4311,36 +4611,72 @@
|
|
4311
4611
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
4312
4612
|
</xsl:attribute-set> <!-- term-style -->
|
4313
4613
|
|
4614
|
+
<xsl:template name="refine_term-style">
|
4615
|
+
</xsl:template>
|
4616
|
+
|
4314
4617
|
<xsl:attribute-set name="term-name-style">
|
4315
4618
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4316
4619
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4317
4620
|
</xsl:attribute-set> <!-- term-name-style -->
|
4318
4621
|
|
4319
|
-
|
4622
|
+
<xsl:template name="refine_term-name-style">
|
4623
|
+
</xsl:template>
|
4624
|
+
|
4625
|
+
<xsl:attribute-set name="preferred-style">
|
4626
|
+
</xsl:attribute-set> <!-- preferred-style -->
|
4627
|
+
|
4628
|
+
<xsl:template name="refine_preferred-style">
|
4629
|
+
</xsl:template>
|
4630
|
+
|
4631
|
+
<xsl:attribute-set name="preferred-block-style">
|
4320
4632
|
<xsl:attribute name="line-height">1.1</xsl:attribute>
|
4321
4633
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
4322
4634
|
|
4635
|
+
<xsl:template name="refine_preferred-block-style">
|
4636
|
+
</xsl:template>
|
4637
|
+
|
4323
4638
|
<xsl:attribute-set name="preferred-term-style">
|
4324
4639
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4325
4640
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4326
4641
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
4327
4642
|
|
4643
|
+
<xsl:template name="refine_preferred-term-style">
|
4644
|
+
<xsl:if test="mn:strong">
|
4645
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4646
|
+
</xsl:if>
|
4647
|
+
</xsl:template>
|
4648
|
+
|
4328
4649
|
<xsl:attribute-set name="domain-style">
|
4329
4650
|
</xsl:attribute-set> <!-- domain-style -->
|
4330
4651
|
|
4652
|
+
<xsl:template name="refine_domain-style">
|
4653
|
+
</xsl:template>
|
4654
|
+
|
4331
4655
|
<xsl:attribute-set name="admitted-style">
|
4332
4656
|
</xsl:attribute-set> <!-- admitted-style -->
|
4333
4657
|
|
4658
|
+
<xsl:template name="refine_admitted-style">
|
4659
|
+
</xsl:template>
|
4660
|
+
|
4334
4661
|
<xsl:attribute-set name="deprecates-style">
|
4335
4662
|
</xsl:attribute-set> <!-- deprecates-style -->
|
4336
4663
|
|
4664
|
+
<xsl:template name="refine_deprecates-style">
|
4665
|
+
</xsl:template>
|
4666
|
+
|
4337
4667
|
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
4338
4668
|
</xsl:attribute-set>
|
4339
4669
|
|
4670
|
+
<xsl:template name="refine_related-block-style">
|
4671
|
+
</xsl:template>
|
4672
|
+
|
4340
4673
|
<xsl:attribute-set name="definition-style">
|
4341
4674
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
4342
4675
|
</xsl:attribute-set> <!-- definition-style -->
|
4343
4676
|
|
4677
|
+
<xsl:template name="refine_definition-style">
|
4678
|
+
</xsl:template>
|
4679
|
+
|
4344
4680
|
<xsl:attribute-set name="termsource-style">
|
4345
4681
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
4346
4682
|
</xsl:attribute-set> <!-- termsource-style -->
|
@@ -4351,11 +4687,17 @@
|
|
4351
4687
|
<xsl:attribute-set name="termsource-text-style">
|
4352
4688
|
</xsl:attribute-set> <!-- termsource-text-style -->
|
4353
4689
|
|
4690
|
+
<xsl:template name="refine_termsource-text-style">
|
4691
|
+
</xsl:template>
|
4692
|
+
|
4354
4693
|
<xsl:attribute-set name="origin-style">
|
4355
4694
|
<xsl:attribute name="color">blue</xsl:attribute>
|
4356
4695
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4357
4696
|
</xsl:attribute-set> <!-- origin-style -->
|
4358
4697
|
|
4698
|
+
<xsl:template name="refine_origin-style">
|
4699
|
+
</xsl:template>
|
4700
|
+
|
4359
4701
|
<!-- ====== -->
|
4360
4702
|
<!-- term -->
|
4361
4703
|
<!-- ====== -->
|
@@ -4371,9 +4713,8 @@
|
|
4371
4713
|
<xsl:template match="mn:term">
|
4372
4714
|
<xsl:call-template name="setNamedDestination"/>
|
4373
4715
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
4716
|
+
<xsl:call-template name="refine_term-style"/>
|
4374
4717
|
|
4375
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
4376
|
-
</xsl:if>
|
4377
4718
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4378
4719
|
</fo:block>
|
4379
4720
|
</xsl:template>
|
@@ -4449,6 +4790,7 @@
|
|
4449
4790
|
<!-- text SOURCE: -->
|
4450
4791
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
4451
4792
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
4793
|
+
<xsl:call-template name="refine_termsource-text-style"/>
|
4452
4794
|
<xsl:value-of select="."/>
|
4453
4795
|
</fo:inline>
|
4454
4796
|
</xsl:template>
|
@@ -4461,6 +4803,7 @@
|
|
4461
4803
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4462
4804
|
</xsl:if>
|
4463
4805
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4806
|
+
<xsl:call-template name="refine_origin-style"/>
|
4464
4807
|
<xsl:apply-templates/>
|
4465
4808
|
</fo:inline>
|
4466
4809
|
</fo:basic-link>
|
@@ -4510,9 +4853,12 @@
|
|
4510
4853
|
</xsl:variable>
|
4511
4854
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
4512
4855
|
|
4856
|
+
<xsl:call-template name="refine_preferred-block-style"/>
|
4857
|
+
|
4513
4858
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
4514
4859
|
|
4515
4860
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
4861
|
+
<xsl:call-template name="refine_term-name-style"/>
|
4516
4862
|
|
4517
4863
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
4518
4864
|
<xsl:call-template name="setIDforNamedDestination"/>
|
@@ -4523,7 +4869,7 @@
|
|
4523
4869
|
</xsl:if>
|
4524
4870
|
|
4525
4871
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
4526
|
-
<xsl:call-template name="
|
4872
|
+
<xsl:call-template name="refine_preferred-term-style"/>
|
4527
4873
|
|
4528
4874
|
<xsl:apply-templates/>
|
4529
4875
|
</fo:block>
|
@@ -4544,22 +4890,18 @@
|
|
4544
4890
|
|
4545
4891
|
<xsl:template match="mn:fmt-admitted">
|
4546
4892
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
4893
|
+
<xsl:call-template name="refine_admitted-style"/>
|
4547
4894
|
<xsl:apply-templates/>
|
4548
4895
|
</fo:block>
|
4549
4896
|
</xsl:template>
|
4550
4897
|
|
4551
4898
|
<xsl:template match="mn:fmt-deprecates">
|
4552
4899
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
4900
|
+
<xsl:call-template name="refine_deprecates-style"/>
|
4553
4901
|
<xsl:apply-templates/>
|
4554
4902
|
</fo:block>
|
4555
4903
|
</xsl:template>
|
4556
4904
|
|
4557
|
-
<xsl:template name="setStyle_preferred">
|
4558
|
-
<xsl:if test="mn:strong">
|
4559
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4560
|
-
</xsl:if>
|
4561
|
-
</xsl:template>
|
4562
|
-
|
4563
4905
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
4564
4906
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
4565
4907
|
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
@@ -4569,6 +4911,7 @@
|
|
4569
4911
|
|
4570
4912
|
<xsl:template match="mn:fmt-related">
|
4571
4913
|
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
4914
|
+
<xsl:call-template name="refine_related-block-style"/>
|
4572
4915
|
<xsl:apply-templates/>
|
4573
4916
|
</fo:block>
|
4574
4917
|
</xsl:template>
|
@@ -4583,6 +4926,7 @@
|
|
4583
4926
|
<!-- ========== -->
|
4584
4927
|
<xsl:template match="mn:fmt-definition">
|
4585
4928
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
4929
|
+
<xsl:call-template name="refine_definition-style"/>
|
4586
4930
|
<xsl:apply-templates/>
|
4587
4931
|
</fo:block>
|
4588
4932
|
</xsl:template>
|
@@ -4635,6 +4979,9 @@
|
|
4635
4979
|
<xsl:attribute-set name="example-body-style">
|
4636
4980
|
</xsl:attribute-set> <!-- example-body-style -->
|
4637
4981
|
|
4982
|
+
<xsl:template name="refine_example-body-style">
|
4983
|
+
</xsl:template>
|
4984
|
+
|
4638
4985
|
<xsl:attribute-set name="example-name-style">
|
4639
4986
|
<!-- <xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4640
4987
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -4685,6 +5032,8 @@
|
|
4685
5032
|
<xsl:when test="contains($element, 'block')">
|
4686
5033
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
4687
5034
|
|
5035
|
+
<xsl:call-template name="refine_example-p-style"/>
|
5036
|
+
|
4688
5037
|
<xsl:apply-templates/>
|
4689
5038
|
</fo:block>
|
4690
5039
|
</xsl:when>
|
@@ -4736,6 +5085,7 @@
|
|
4736
5085
|
</fo:block>
|
4737
5086
|
|
4738
5087
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
5088
|
+
<xsl:call-template name="refine_example-body-style"/>
|
4739
5089
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
4740
5090
|
<xsl:variable name="example_body">
|
4741
5091
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
@@ -4798,6 +5148,7 @@
|
|
4798
5148
|
<xsl:if test="*[not(self::mn:fmt-name)][position() > 1]">
|
4799
5149
|
<!-- display further elements in blocks -->
|
4800
5150
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
5151
|
+
<xsl:call-template name="refine_example-body-style"/>
|
4801
5152
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
4802
5153
|
<xsl:apply-templates select="*[not(self::mn:fmt-name)][position() > 1]">
|
4803
5154
|
<xsl:with-param name="fo_element" select="'block'"/>
|
@@ -4902,6 +5253,9 @@
|
|
4902
5253
|
|
4903
5254
|
<xsl:template name="refine_table-container-style">
|
4904
5255
|
<xsl:param name="margin-side"/>
|
5256
|
+
<xsl:if test="contains(translate(@style, ' ', ''), 'border:none')">
|
5257
|
+
<xsl:attribute name="font-size">inherit</xsl:attribute>
|
5258
|
+
</xsl:if>
|
4905
5259
|
<!-- end table block-container attributes -->
|
4906
5260
|
</xsl:template> <!-- refine_table-container-style -->
|
4907
5261
|
|
@@ -4917,6 +5271,12 @@
|
|
4917
5271
|
<xsl:call-template name="setBordersTableArray"/>
|
4918
5272
|
</xsl:template> <!-- refine_table-style -->
|
4919
5273
|
|
5274
|
+
<xsl:attribute-set name="table-number-style">
|
5275
|
+
</xsl:attribute-set>
|
5276
|
+
|
5277
|
+
<xsl:template name="refine_table-number-style">
|
5278
|
+
</xsl:template>
|
5279
|
+
|
4920
5280
|
<xsl:attribute-set name="table-name-style">
|
4921
5281
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
4922
5282
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
@@ -5002,6 +5362,9 @@
|
|
5002
5362
|
<xsl:if test="$lang = 'ar'">
|
5003
5363
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
5004
5364
|
</xsl:if>
|
5365
|
+
<xsl:if test="contains(translate(ancestor::mn:table/@style, ' ', ''), 'border:none')">
|
5366
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
5367
|
+
</xsl:if>
|
5005
5368
|
|
5006
5369
|
<xsl:call-template name="setBordersTableArray"/>
|
5007
5370
|
|
@@ -5040,6 +5403,9 @@
|
|
5040
5403
|
<!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
|
5041
5404
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
5042
5405
|
|
5406
|
+
<xsl:template name="refine_table-fn-number-style">
|
5407
|
+
</xsl:template>
|
5408
|
+
|
5043
5409
|
<xsl:attribute-set name="table-fmt-fn-label-style">
|
5044
5410
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
5045
5411
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -5048,30 +5414,12 @@
|
|
5048
5414
|
<xsl:template name="refine_table-fmt-fn-label-style">
|
5049
5415
|
</xsl:template>
|
5050
5416
|
|
5051
|
-
<xsl:attribute-set name="fn-container-body-style">
|
5052
|
-
<xsl:attribute name="text-indent">0</xsl:attribute>
|
5053
|
-
<xsl:attribute name="start-indent">0</xsl:attribute>
|
5054
|
-
</xsl:attribute-set>
|
5055
|
-
|
5056
5417
|
<xsl:attribute-set name="table-fn-body-style">
|
5057
5418
|
</xsl:attribute-set>
|
5058
5419
|
|
5059
|
-
<xsl:
|
5060
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
5061
|
-
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
5062
|
-
|
5063
|
-
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
5064
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
5065
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
5066
|
-
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
5067
|
-
|
5068
|
-
<xsl:template name="refine_figure-fmt-fn-label-style">
|
5420
|
+
<xsl:template name="refine_table-fn-body-style">
|
5069
5421
|
</xsl:template>
|
5070
5422
|
|
5071
|
-
<xsl:attribute-set name="figure-fn-body-style">
|
5072
|
-
<xsl:attribute name="text-align">justify</xsl:attribute>
|
5073
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
5074
|
-
</xsl:attribute-set>
|
5075
5423
|
<!-- ========================== -->
|
5076
5424
|
<!-- END Table styles -->
|
5077
5425
|
<!-- ========================== -->
|
@@ -5388,7 +5736,7 @@
|
|
5388
5736
|
|
5389
5737
|
</fo:block>
|
5390
5738
|
|
5391
|
-
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
5739
|
+
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
5392
5740
|
<xsl:if test="$continued = 'true'">
|
5393
5741
|
|
5394
5742
|
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
@@ -6349,6 +6697,7 @@
|
|
6349
6697
|
</xsl:apply-templates>
|
6350
6698
|
|
6351
6699
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
6700
|
+
<xsl:call-template name="refine_table-fn-body-style"/>
|
6352
6701
|
<!-- <xsl:copy-of select="./node()"/> -->
|
6353
6702
|
<xsl:apply-templates/>
|
6354
6703
|
</fo:inline>
|
@@ -6367,6 +6716,7 @@
|
|
6367
6716
|
<xsl:param name="process">false</xsl:param>
|
6368
6717
|
<xsl:if test="$process = 'true'">
|
6369
6718
|
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
6719
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
6370
6720
|
|
6371
6721
|
<!-- tab is padding-right -->
|
6372
6722
|
<xsl:apply-templates select=".//mn:tab">
|
@@ -7238,9 +7588,18 @@
|
|
7238
7588
|
<xsl:attribute-set name="dl-block-style">
|
7239
7589
|
</xsl:attribute-set>
|
7240
7590
|
|
7591
|
+
<xsl:template name="refine_dl-block-style">
|
7592
|
+
<xsl:if test="@key = 'true' and ancestor::mn:figure">
|
7593
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
7594
|
+
</xsl:if>
|
7595
|
+
</xsl:template>
|
7596
|
+
|
7241
7597
|
<xsl:attribute-set name="dt-row-style">
|
7242
7598
|
</xsl:attribute-set>
|
7243
7599
|
|
7600
|
+
<xsl:template name="refine_dt-row-style">
|
7601
|
+
</xsl:template>
|
7602
|
+
|
7244
7603
|
<xsl:attribute-set name="dt-cell-style">
|
7245
7604
|
</xsl:attribute-set>
|
7246
7605
|
|
@@ -7261,6 +7620,9 @@
|
|
7261
7620
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
7262
7621
|
</xsl:attribute-set> <!-- dl-name-style -->
|
7263
7622
|
|
7623
|
+
<xsl:template name="refine_dl-name-style">
|
7624
|
+
</xsl:template>
|
7625
|
+
|
7264
7626
|
<xsl:attribute-set name="dd-cell-style">
|
7265
7627
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
7266
7628
|
</xsl:attribute-set>
|
@@ -7299,9 +7661,7 @@
|
|
7299
7661
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
7300
7662
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
7301
7663
|
|
7302
|
-
<xsl:
|
7303
|
-
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
7304
|
-
</xsl:if>
|
7664
|
+
<xsl:call-template name="refine_dl-block-style"/>
|
7305
7665
|
|
7306
7666
|
<xsl:call-template name="setBlockSpanAll"/>
|
7307
7667
|
<xsl:if test="not(ancestor::mn:quote)">
|
@@ -7600,6 +7960,8 @@
|
|
7600
7960
|
<xsl:if test="$process = 'true'">
|
7601
7961
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
7602
7962
|
|
7963
|
+
<xsl:call-template name="refine_dl-name-style"/>
|
7964
|
+
|
7603
7965
|
<xsl:apply-templates/>
|
7604
7966
|
</fo:block>
|
7605
7967
|
</xsl:if>
|
@@ -7788,6 +8150,8 @@
|
|
7788
8150
|
<xsl:param name="split_keep-within-line"/>
|
7789
8151
|
|
7790
8152
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
8153
|
+
<xsl:call-template name="refine_dt-row-style"/>
|
8154
|
+
|
7791
8155
|
<xsl:call-template name="insert_dt_cell">
|
7792
8156
|
<xsl:with-param name="key_iso" select="$key_iso"/>
|
7793
8157
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -7997,15 +8361,22 @@
|
|
7997
8361
|
<xsl:attribute-set name="appendix-style">
|
7998
8362
|
</xsl:attribute-set>
|
7999
8363
|
|
8364
|
+
<xsl:template name="refine_appendix-style">
|
8365
|
+
</xsl:template>
|
8366
|
+
|
8000
8367
|
<xsl:attribute-set name="appendix-example-style">
|
8001
8368
|
</xsl:attribute-set>
|
8002
8369
|
|
8370
|
+
<xsl:template name="refine_appendix-example-style">
|
8371
|
+
</xsl:template>
|
8372
|
+
|
8003
8373
|
<!-- ======================== -->
|
8004
8374
|
<!-- Appendix processing -->
|
8005
8375
|
<!-- ======================== -->
|
8006
8376
|
<xsl:template match="mn:appendix">
|
8007
8377
|
<xsl:call-template name="setNamedDestination"/>
|
8008
8378
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
8379
|
+
<xsl:call-template name="refine_appendix-style"/>
|
8009
8380
|
<xsl:apply-templates select="mn:fmt-title"/>
|
8010
8381
|
</fo:block>
|
8011
8382
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
@@ -8024,6 +8395,7 @@
|
|
8024
8395
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
8025
8396
|
<xsl:call-template name="setNamedDestination"/>
|
8026
8397
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
8398
|
+
<xsl:call-template name="refine_appendix-example-style"/>
|
8027
8399
|
<xsl:apply-templates select="mn:fmt-name"/>
|
8028
8400
|
</fo:block>
|
8029
8401
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
@@ -8032,7 +8404,16 @@
|
|
8032
8404
|
<xsl:attribute-set name="xref-style">
|
8033
8405
|
<xsl:attribute name="color">blue</xsl:attribute>
|
8034
8406
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
8035
|
-
</xsl:attribute-set>
|
8407
|
+
</xsl:attribute-set> <!-- xref-style -->
|
8408
|
+
|
8409
|
+
<xsl:template name="refine_xref-style">
|
8410
|
+
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[self::mn:table or self::mn:dl])">
|
8411
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
8412
|
+
</xsl:if>
|
8413
|
+
<xsl:if test="parent::mn:add">
|
8414
|
+
<xsl:call-template name="append_add-style"/>
|
8415
|
+
</xsl:if>
|
8416
|
+
</xsl:template> <!-- refine_xref-style -->
|
8036
8417
|
|
8037
8418
|
<xsl:template match="mn:fmt-xref">
|
8038
8419
|
<xsl:call-template name="insert_basic_link">
|
@@ -8041,12 +8422,8 @@
|
|
8041
8422
|
<xsl:call-template name="getAltText"/>
|
8042
8423
|
</xsl:variable>
|
8043
8424
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
8044
|
-
<xsl:
|
8045
|
-
|
8046
|
-
</xsl:if>
|
8047
|
-
<xsl:if test="parent::mn:add">
|
8048
|
-
<xsl:call-template name="append_add-style"/>
|
8049
|
-
</xsl:if>
|
8425
|
+
<xsl:call-template name="refine_xref-style"/>
|
8426
|
+
|
8050
8427
|
<xsl:apply-templates/>
|
8051
8428
|
</fo:basic-link>
|
8052
8429
|
</xsl:with-param>
|
@@ -8159,10 +8536,10 @@
|
|
8159
8536
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
8160
8537
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
8161
8538
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
8162
|
-
</xsl:attribute-set>
|
8539
|
+
</xsl:attribute-set> <!-- note-style -->
|
8163
8540
|
|
8164
8541
|
<xsl:template name="refine_note-style">
|
8165
|
-
</xsl:template>
|
8542
|
+
</xsl:template> <!-- refine_note-style -->
|
8166
8543
|
|
8167
8544
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
8168
8545
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
@@ -8170,7 +8547,7 @@
|
|
8170
8547
|
<xsl:attribute-set name="note-name-style">
|
8171
8548
|
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
8172
8549
|
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
8173
|
-
</xsl:attribute-set>
|
8550
|
+
</xsl:attribute-set> <!-- note-name-style -->
|
8174
8551
|
|
8175
8552
|
<xsl:template name="refine_note-name-style">
|
8176
8553
|
</xsl:template> <!-- refine_note-name-style -->
|
@@ -8186,20 +8563,23 @@
|
|
8186
8563
|
<xsl:attribute-set name="note-p-style">
|
8187
8564
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
8188
8565
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
8189
|
-
</xsl:attribute-set>
|
8566
|
+
</xsl:attribute-set> <!-- note-p-style -->
|
8567
|
+
|
8568
|
+
<xsl:template name="refine_note-p-style">
|
8569
|
+
</xsl:template>
|
8190
8570
|
|
8191
8571
|
<xsl:attribute-set name="termnote-style">
|
8192
8572
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
8193
8573
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
8194
8574
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
8195
8575
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
8196
|
-
</xsl:attribute-set>
|
8576
|
+
</xsl:attribute-set> <!-- termnote-style -->
|
8197
8577
|
|
8198
8578
|
<xsl:template name="refine_termnote-style">
|
8199
8579
|
</xsl:template> <!-- refine_termnote-style -->
|
8200
8580
|
|
8201
8581
|
<xsl:attribute-set name="termnote-name-style">
|
8202
|
-
</xsl:attribute-set>
|
8582
|
+
</xsl:attribute-set> <!-- termnote-name-style -->
|
8203
8583
|
|
8204
8584
|
<xsl:template name="refine_termnote-name-style">
|
8205
8585
|
</xsl:template>
|
@@ -8207,6 +8587,9 @@
|
|
8207
8587
|
<xsl:attribute-set name="termnote-p-style">
|
8208
8588
|
</xsl:attribute-set>
|
8209
8589
|
|
8590
|
+
<xsl:template name="refine_termnote-p-style">
|
8591
|
+
</xsl:template>
|
8592
|
+
|
8210
8593
|
<!-- ====== -->
|
8211
8594
|
<!-- note -->
|
8212
8595
|
<!-- termnote -->
|
@@ -8267,11 +8650,13 @@
|
|
8267
8650
|
<xsl:choose>
|
8268
8651
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
8269
8652
|
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
8653
|
+
<xsl:call-template name="refine_note-p-style"/>
|
8270
8654
|
<xsl:apply-templates/>
|
8271
8655
|
</fo:inline>
|
8272
8656
|
</xsl:when>
|
8273
8657
|
<xsl:otherwise>
|
8274
8658
|
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
8659
|
+
<xsl:call-template name="refine_note-p-style"/>
|
8275
8660
|
<xsl:apply-templates/>
|
8276
8661
|
</fo:block>
|
8277
8662
|
</xsl:otherwise>
|
@@ -8363,11 +8748,13 @@
|
|
8363
8748
|
<xsl:choose>
|
8364
8749
|
<xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
|
8365
8750
|
<fo:inline xsl:use-attribute-sets="termnote-p-style">
|
8751
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
8366
8752
|
<xsl:apply-templates/>
|
8367
8753
|
</fo:inline>
|
8368
8754
|
</xsl:when>
|
8369
8755
|
<xsl:otherwise>
|
8370
8756
|
<fo:block xsl:use-attribute-sets="termnote-p-style">
|
8757
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
8371
8758
|
<xsl:apply-templates/>
|
8372
8759
|
</fo:block>
|
8373
8760
|
</xsl:otherwise>
|
@@ -8383,7 +8770,7 @@
|
|
8383
8770
|
<xsl:attribute name="font-family">Calibri</xsl:attribute>
|
8384
8771
|
<xsl:attribute name="margin-left">4.5mm</xsl:attribute>
|
8385
8772
|
<xsl:attribute name="margin-right">9mm</xsl:attribute>
|
8386
|
-
</xsl:attribute-set>
|
8773
|
+
</xsl:attribute-set> <!-- quote-style -->
|
8387
8774
|
|
8388
8775
|
<xsl:template name="refine_quote-style">
|
8389
8776
|
</xsl:template>
|
@@ -8392,6 +8779,9 @@
|
|
8392
8779
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
8393
8780
|
</xsl:attribute-set>
|
8394
8781
|
|
8782
|
+
<xsl:template name="refine_quote-source-style">
|
8783
|
+
</xsl:template>
|
8784
|
+
|
8395
8785
|
<!-- ====== -->
|
8396
8786
|
<!-- quote -->
|
8397
8787
|
<!-- source -->
|
@@ -8420,6 +8810,7 @@
|
|
8420
8810
|
</fo:block-container>
|
8421
8811
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
8422
8812
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
8813
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
8423
8814
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
8424
8815
|
<xsl:apply-templates select="mn:author"/>
|
8425
8816
|
<xsl:apply-templates select="mn:fmt-source"/>
|
@@ -8482,6 +8873,15 @@
|
|
8482
8873
|
<xsl:attribute-set name="figure-style">
|
8483
8874
|
</xsl:attribute-set>
|
8484
8875
|
|
8876
|
+
<xsl:template name="refine_figure-style">
|
8877
|
+
</xsl:template>
|
8878
|
+
|
8879
|
+
<xsl:attribute-set name="figure-number-style">
|
8880
|
+
</xsl:attribute-set>
|
8881
|
+
|
8882
|
+
<xsl:template name="refine_figure-number-style">
|
8883
|
+
</xsl:template>
|
8884
|
+
|
8485
8885
|
<xsl:attribute-set name="figure-name-style">
|
8486
8886
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
8487
8887
|
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
@@ -8490,7 +8890,7 @@
|
|
8490
8890
|
<xsl:attribute name="margin-top">2pt</xsl:attribute>
|
8491
8891
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
8492
8892
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
8493
|
-
</xsl:attribute-set>
|
8893
|
+
</xsl:attribute-set> <!-- figure-name-style -->
|
8494
8894
|
|
8495
8895
|
<xsl:template name="refine_figure-name-style">
|
8496
8896
|
</xsl:template> <!-- refine_figure-name-style -->
|
@@ -8498,7 +8898,7 @@
|
|
8498
8898
|
<xsl:attribute-set name="image-style">
|
8499
8899
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
8500
8900
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
8501
|
-
</xsl:attribute-set>
|
8901
|
+
</xsl:attribute-set> <!-- image-style -->
|
8502
8902
|
|
8503
8903
|
<xsl:template name="refine_image-style">
|
8504
8904
|
</xsl:template>
|
@@ -8508,14 +8908,51 @@
|
|
8508
8908
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
8509
8909
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
8510
8910
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
8511
|
-
</xsl:attribute-set>
|
8911
|
+
</xsl:attribute-set> <!-- image-graphic-style -->
|
8912
|
+
|
8913
|
+
<xsl:template name="refine_image-graphic-style">
|
8914
|
+
</xsl:template>
|
8512
8915
|
|
8513
8916
|
<xsl:attribute-set name="figure-source-style">
|
8514
8917
|
</xsl:attribute-set>
|
8515
8918
|
|
8919
|
+
<xsl:template name="refine_figure-source-style">
|
8920
|
+
</xsl:template>
|
8921
|
+
|
8516
8922
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
8517
8923
|
</xsl:attribute-set>
|
8518
8924
|
|
8925
|
+
<xsl:template name="refine_figure-pseudocode-p-style">
|
8926
|
+
</xsl:template>
|
8927
|
+
|
8928
|
+
<xsl:attribute-set name="figure-fn-number-style">
|
8929
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
8930
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
8931
|
+
|
8932
|
+
<xsl:template name="refine_figure-fn-number-style">
|
8933
|
+
</xsl:template>
|
8934
|
+
|
8935
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
8936
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
8937
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
8938
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
8939
|
+
|
8940
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
8941
|
+
</xsl:template>
|
8942
|
+
|
8943
|
+
<xsl:attribute-set name="figure-fn-body-style">
|
8944
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
8945
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
8946
|
+
</xsl:attribute-set>
|
8947
|
+
|
8948
|
+
<xsl:template name="refine_figure-fn-body-style">
|
8949
|
+
<xsl:variable name="key_iso">
|
8950
|
+
</xsl:variable>
|
8951
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
8952
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
8953
|
+
</xsl:if>
|
8954
|
+
</xsl:template>
|
8955
|
+
|
8519
8956
|
<!-- ============================ -->
|
8520
8957
|
<!-- figure's footnotes rendering -->
|
8521
8958
|
<!-- ============================ -->
|
@@ -8628,9 +9065,8 @@
|
|
8628
9065
|
</fo:table-cell>
|
8629
9066
|
<fo:table-cell>
|
8630
9067
|
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
8631
|
-
<xsl:
|
8632
|
-
|
8633
|
-
</xsl:if>
|
9068
|
+
<xsl:call-template name="refine_figure-fn-body-style"/>
|
9069
|
+
|
8634
9070
|
<!-- <xsl:copy-of select="./node()"/> -->
|
8635
9071
|
<xsl:apply-templates/>
|
8636
9072
|
</fo:block>
|
@@ -8648,6 +9084,7 @@
|
|
8648
9084
|
<xsl:param name="process">false</xsl:param>
|
8649
9085
|
<xsl:if test="$process = 'true'">
|
8650
9086
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
9087
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
8651
9088
|
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
8652
9089
|
|
8653
9090
|
<!-- tab is padding-right -->
|
@@ -8685,6 +9122,7 @@
|
|
8685
9122
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
8686
9123
|
</xsl:if>
|
8687
9124
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
9125
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
8688
9126
|
<!-- <xsl:value-of select="@reference"/> -->
|
8689
9127
|
<xsl:apply-templates/>
|
8690
9128
|
</fo:inline>
|
@@ -8730,6 +9168,8 @@
|
|
8730
9168
|
|
8731
9169
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
8732
9170
|
|
9171
|
+
<xsl:call-template name="refine_figure-style"/>
|
9172
|
+
|
8733
9173
|
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
8734
9174
|
<xsl:call-template name="setIDforNamedDestination"/>
|
8735
9175
|
</xsl:for-each>
|
@@ -8773,6 +9213,7 @@
|
|
8773
9213
|
|
8774
9214
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
8775
9215
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
9216
|
+
<xsl:call-template name="refine_figure-pseudocode-p-style"/>
|
8776
9217
|
<xsl:apply-templates/>
|
8777
9218
|
</fo:block>
|
8778
9219
|
</xsl:template>
|
@@ -8902,6 +9343,8 @@
|
|
8902
9343
|
</xsl:variable>
|
8903
9344
|
<xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
|
8904
9345
|
|
9346
|
+
<xsl:call-template name="refine_image-graphic-style"/>
|
9347
|
+
|
8905
9348
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
|
8906
9349
|
<xsl:variable name="scale">
|
8907
9350
|
<xsl:call-template name="getImageScale">
|
@@ -9601,6 +10044,9 @@
|
|
9601
10044
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
9602
10045
|
</xsl:attribute-set> <!-- formula-style -->
|
9603
10046
|
|
10047
|
+
<xsl:template name="refine_formula-style">
|
10048
|
+
</xsl:template>
|
10049
|
+
|
9604
10050
|
<xsl:attribute-set name="formula-stem-block-style">
|
9605
10051
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
9606
10052
|
</xsl:attribute-set> <!-- formula-stem-block-style -->
|
@@ -9669,6 +10115,8 @@
|
|
9669
10115
|
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
9670
10116
|
<fo:block xsl:use-attribute-sets="formula-style">
|
9671
10117
|
|
10118
|
+
<xsl:call-template name="refine_formula-style"/>
|
10119
|
+
|
9672
10120
|
<fo:table table-layout="fixed" width="100%">
|
9673
10121
|
<fo:table-column column-width="95%"/>
|
9674
10122
|
<fo:table-column column-width="5%"/>
|
@@ -10088,11 +10536,17 @@
|
|
10088
10536
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
10089
10537
|
</xsl:attribute-set> <!-- list-name-style -->
|
10090
10538
|
|
10539
|
+
<xsl:template name="refine_list-name-style">
|
10540
|
+
</xsl:template>
|
10541
|
+
|
10091
10542
|
<xsl:attribute-set name="list-item-style">
|
10092
10543
|
<xsl:attribute name="margin-bottom">3pt</xsl:attribute>
|
10093
10544
|
</xsl:attribute-set>
|
10094
10545
|
|
10095
10546
|
<xsl:template name="refine_list-item-style">
|
10547
|
+
<xsl:if test="ancestor::mn:table">
|
10548
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
10549
|
+
</xsl:if>
|
10096
10550
|
</xsl:template> <!-- refine_list-item-style -->
|
10097
10551
|
|
10098
10552
|
<xsl:attribute-set name="list-item-label-style">
|
@@ -10389,6 +10843,7 @@
|
|
10389
10843
|
<xsl:param name="process">false</xsl:param>
|
10390
10844
|
<xsl:if test="$process = 'true'">
|
10391
10845
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
10846
|
+
<xsl:call-template name="refine_list-name-style"/>
|
10392
10847
|
<xsl:apply-templates/>
|
10393
10848
|
</fo:block>
|
10394
10849
|
</xsl:if>
|
@@ -10449,24 +10904,45 @@
|
|
10449
10904
|
<!-- END Lists processing -->
|
10450
10905
|
<!-- ===================================== -->
|
10451
10906
|
|
10907
|
+
<xsl:attribute-set name="footnote-separator-leader-style">
|
10908
|
+
</xsl:attribute-set>
|
10909
|
+
|
10910
|
+
<xsl:template name="refine_footnote-separator-leader-style">
|
10911
|
+
</xsl:template>
|
10912
|
+
|
10913
|
+
<xsl:attribute-set name="fn-container-body-style">
|
10914
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
10915
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
10916
|
+
</xsl:attribute-set>
|
10917
|
+
|
10918
|
+
<xsl:template name="refine_fn-container-body-style">
|
10919
|
+
</xsl:template>
|
10920
|
+
|
10452
10921
|
<xsl:attribute-set name="fn-reference-style">
|
10453
10922
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
10454
10923
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
10455
|
-
|
10456
|
-
</xsl:attribute-set>
|
10924
|
+
</xsl:attribute-set> <!-- fn-reference-style -->
|
10457
10925
|
|
10458
10926
|
<xsl:template name="refine_fn-reference-style">
|
10927
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
10928
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
10459
10929
|
</xsl:template> <!-- refine_fn-reference-style -->
|
10460
10930
|
|
10461
10931
|
<xsl:attribute-set name="fn-style">
|
10462
10932
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
10463
10933
|
</xsl:attribute-set>
|
10464
10934
|
|
10935
|
+
<xsl:template name="refine_fn-style">
|
10936
|
+
</xsl:template>
|
10937
|
+
|
10465
10938
|
<xsl:attribute-set name="fn-num-style">
|
10466
10939
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
10467
10940
|
<xsl:attribute name="font-size">70%</xsl:attribute>
|
10468
10941
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
10469
|
-
</xsl:attribute-set>
|
10942
|
+
</xsl:attribute-set> <!-- fn-num-style -->
|
10943
|
+
|
10944
|
+
<xsl:template name="refine_fn-num-style">
|
10945
|
+
</xsl:template>
|
10470
10946
|
|
10471
10947
|
<xsl:attribute-set name="fn-body-style">
|
10472
10948
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
@@ -10475,7 +10951,7 @@
|
|
10475
10951
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
10476
10952
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
10477
10953
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10478
|
-
</xsl:attribute-set>
|
10954
|
+
</xsl:attribute-set> <!-- fn-body-style" -->
|
10479
10955
|
|
10480
10956
|
<xsl:template name="refine_fn-body-style">
|
10481
10957
|
</xsl:template> <!-- refine_fn-body-style -->
|
@@ -10540,10 +11016,12 @@
|
|
10540
11016
|
<xsl:choose>
|
10541
11017
|
<xsl:when test="ancestor::mn:bibitem">
|
10542
11018
|
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
11019
|
+
<xsl:call-template name="refine_bibitem-note-fn-style"/>
|
10543
11020
|
</fn_styles>
|
10544
11021
|
</xsl:when>
|
10545
11022
|
<xsl:otherwise>
|
10546
11023
|
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
11024
|
+
<xsl:call-template name="refine_fn-num-style"/>
|
10547
11025
|
</fn_styles>
|
10548
11026
|
</xsl:otherwise>
|
10549
11027
|
</xsl:choose>
|
@@ -10553,9 +11031,12 @@
|
|
10553
11031
|
<xsl:copy-of select="."/>
|
10554
11032
|
</xsl:for-each>
|
10555
11033
|
|
10556
|
-
|
11034
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
11035
|
+
<!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
|
10557
11036
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
10558
|
-
</xsl:if>
|
11037
|
+
</xsl:if> -->
|
11038
|
+
|
11039
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
10559
11040
|
|
10560
11041
|
<xsl:call-template name="insert_basic_link">
|
10561
11042
|
<xsl:with-param name="element">
|
@@ -10578,10 +11059,12 @@
|
|
10578
11059
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
10579
11060
|
|
10580
11061
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
11062
|
+
<xsl:call-template name="refine_fn-style"/>
|
10581
11063
|
<xsl:copy-of select="$footnote_inline"/>
|
10582
11064
|
<fo:footnote-body role="Note">
|
10583
11065
|
|
10584
11066
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
11067
|
+
<xsl:call-template name="refine_fn-container-body-style"/>
|
10585
11068
|
|
10586
11069
|
<xsl:variable name="fn_block">
|
10587
11070
|
<xsl:call-template name="refine_fn-body-style"/>
|
@@ -10683,6 +11166,9 @@
|
|
10683
11166
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10684
11167
|
</xsl:attribute-set> <!-- admonition-style -->
|
10685
11168
|
|
11169
|
+
<xsl:template name="refine_admonition-style">
|
11170
|
+
</xsl:template>
|
11171
|
+
|
10686
11172
|
<xsl:attribute-set name="admonition-container-style">
|
10687
11173
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
10688
11174
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -10690,6 +11176,9 @@
|
|
10690
11176
|
<xsl:attribute name="padding-top">3mm</xsl:attribute>
|
10691
11177
|
</xsl:attribute-set> <!-- admonition-container-style -->
|
10692
11178
|
|
11179
|
+
<xsl:template name="refine_admonition-container-style">
|
11180
|
+
</xsl:template>
|
11181
|
+
|
10693
11182
|
<xsl:attribute-set name="admonition-name-style">
|
10694
11183
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
10695
11184
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
@@ -10699,9 +11188,16 @@
|
|
10699
11188
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
10700
11189
|
</xsl:attribute-set> <!-- admonition-name-style -->
|
10701
11190
|
|
11191
|
+
<xsl:template name="refine_admonition-name-style">
|
11192
|
+
</xsl:template>
|
11193
|
+
|
10702
11194
|
<xsl:attribute-set name="admonition-p-style">
|
10703
11195
|
<xsl:attribute name="font-style">italic</xsl:attribute>
|
10704
11196
|
</xsl:attribute-set> <!-- admonition-p-style -->
|
11197
|
+
|
11198
|
+
<xsl:template name="refine_admonition-p-style">
|
11199
|
+
</xsl:template>
|
11200
|
+
|
10705
11201
|
<!-- end admonition -->
|
10706
11202
|
|
10707
11203
|
<!-- ================ -->
|
@@ -10711,12 +11207,18 @@
|
|
10711
11207
|
<xsl:call-template name="setNamedDestination"/>
|
10712
11208
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
10713
11209
|
|
11210
|
+
<xsl:call-template name="refine_admonition-style"/>
|
11211
|
+
|
10714
11212
|
<xsl:call-template name="setBlockSpanAll"/>
|
10715
11213
|
<fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
|
11214
|
+
|
11215
|
+
<xsl:call-template name="refine_admonition-container-style"/>
|
10716
11216
|
<fo:block xsl:use-attribute-sets="admonition-name-style">
|
11217
|
+
<xsl:call-template name="refine_admonition-name-style"/>
|
10717
11218
|
<xsl:call-template name="displayAdmonitionName"/>
|
10718
11219
|
</fo:block>
|
10719
11220
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
11221
|
+
<xsl:call-template name="refine_admonition-p-style"/>
|
10720
11222
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
10721
11223
|
</fo:block>
|
10722
11224
|
|
@@ -10777,10 +11279,27 @@
|
|
10777
11279
|
<!-- END Admonition -->
|
10778
11280
|
<!-- ================ -->
|
10779
11281
|
|
11282
|
+
<xsl:attribute-set name="references-non-normative-title-style">
|
11283
|
+
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
11284
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
11285
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
11286
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
11287
|
+
<xsl:attribute name="margin-bottom">36pt</xsl:attribute>
|
11288
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
11289
|
+
<xsl:attribute name="role">H1</xsl:attribute>
|
11290
|
+
</xsl:attribute-set>
|
11291
|
+
|
11292
|
+
<xsl:template name="refine_references-non-normative-title-style">
|
11293
|
+
|
11294
|
+
</xsl:template>
|
11295
|
+
|
10780
11296
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
10781
11297
|
<xsl:attribute-set name="bibitem-normative-style">
|
10782
11298
|
</xsl:attribute-set> <!-- bibitem-normative-style -->
|
10783
11299
|
|
11300
|
+
<xsl:template name="refine_bibitem-normative-style">
|
11301
|
+
</xsl:template>
|
11302
|
+
|
10784
11303
|
<!-- bibitem in Normative References (references/@normative="true"), renders as list -->
|
10785
11304
|
<xsl:attribute-set name="bibitem-normative-list-style">
|
10786
11305
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
@@ -10789,9 +11308,28 @@
|
|
10789
11308
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
10790
11309
|
</xsl:attribute-set> <!-- bibitem-normative-list-style -->
|
10791
11310
|
|
11311
|
+
<xsl:template name="refine_bibitem-normative-list-style">
|
11312
|
+
<xsl:variable name="docidentifier">
|
11313
|
+
<xsl:apply-templates select="mn:biblio-tag">
|
11314
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
11315
|
+
</xsl:apply-templates>
|
11316
|
+
</xsl:variable>
|
11317
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
11318
|
+
<xsl:choose>
|
11319
|
+
<xsl:when test="string-length($docidentifier) = 0">0mm</xsl:when>
|
11320
|
+
<xsl:when test="string-length($docidentifier) > 19">46.5mm</xsl:when>
|
11321
|
+
<xsl:when test="string-length($docidentifier) > 10">37mm</xsl:when>
|
11322
|
+
<xsl:otherwise>24.5mm</xsl:otherwise>
|
11323
|
+
</xsl:choose>
|
11324
|
+
</xsl:attribute>
|
11325
|
+
</xsl:template>
|
11326
|
+
|
10792
11327
|
<xsl:attribute-set name="bibitem-non-normative-style">
|
10793
11328
|
</xsl:attribute-set> <!-- bibitem-non-normative-style -->
|
10794
11329
|
|
11330
|
+
<xsl:template name="refine_bibitem-non-normative-style">
|
11331
|
+
</xsl:template>
|
11332
|
+
|
10795
11333
|
<!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
|
10796
11334
|
<xsl:attribute-set name="bibitem-non-normative-list-style">
|
10797
11335
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
@@ -10799,17 +11337,29 @@
|
|
10799
11337
|
<xsl:attribute name="line-height">115%</xsl:attribute>
|
10800
11338
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
10801
11339
|
|
11340
|
+
<xsl:template name="refine_bibitem-non-normative-list-style">
|
11341
|
+
</xsl:template>
|
11342
|
+
|
10802
11343
|
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
10803
11344
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10804
11345
|
</xsl:attribute-set>
|
10805
11346
|
|
11347
|
+
<xsl:template name="refine_bibitem-non-normative-list-item-style">
|
11348
|
+
</xsl:template>
|
11349
|
+
|
10806
11350
|
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
|
10807
11351
|
<xsl:attribute-set name="bibitem-normative-list-body-style">
|
10808
11352
|
</xsl:attribute-set>
|
10809
11353
|
|
11354
|
+
<xsl:template name="refine_bibitem-normative-list-body-style">
|
11355
|
+
</xsl:template>
|
11356
|
+
|
10810
11357
|
<xsl:attribute-set name="bibitem-non-normative-list-body-style">
|
10811
11358
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
|
10812
11359
|
|
11360
|
+
<xsl:template name="refine_bibitem-non-normative-list-body-style">
|
11361
|
+
</xsl:template>
|
11362
|
+
|
10813
11363
|
<!-- footnote reference number for bibitem, in the text -->
|
10814
11364
|
<xsl:attribute-set name="bibitem-note-fn-style">
|
10815
11365
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
@@ -10818,6 +11368,9 @@
|
|
10818
11368
|
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
10819
11369
|
</xsl:attribute-set> <!-- bibitem-note-fn-style -->
|
10820
11370
|
|
11371
|
+
<xsl:template name="refine_bibitem-note-fn-style">
|
11372
|
+
</xsl:template>
|
11373
|
+
|
10821
11374
|
<!-- footnote number on the page bottom -->
|
10822
11375
|
<xsl:attribute-set name="bibitem-note-fn-number-style">
|
10823
11376
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
@@ -10836,6 +11389,9 @@
|
|
10836
11389
|
<xsl:attribute-set name="references-non-normative-style">
|
10837
11390
|
</xsl:attribute-set> <!-- references-non-normative-style -->
|
10838
11391
|
|
11392
|
+
<xsl:template name="refine_references-non-normative-style">
|
11393
|
+
</xsl:template>
|
11394
|
+
|
10839
11395
|
<!-- ======================= -->
|
10840
11396
|
<!-- Bibliography rendering -->
|
10841
11397
|
<!-- ======================= -->
|
@@ -10876,6 +11432,7 @@
|
|
10876
11432
|
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
10877
11433
|
|
10878
11434
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
11435
|
+
<xsl:call-template name="refine_references-non-normative-style"/>
|
10879
11436
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
10880
11437
|
</fo:block>
|
10881
11438
|
</xsl:template> <!-- references -->
|
@@ -10890,19 +11447,13 @@
|
|
10890
11447
|
<xsl:call-template name="setNamedDestination"/>
|
10891
11448
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-normative-list-style">
|
10892
11449
|
|
11450
|
+
<xsl:call-template name="refine_bibitem-normative-list-style"/>
|
11451
|
+
|
10893
11452
|
<xsl:variable name="docidentifier">
|
10894
11453
|
<xsl:apply-templates select="mn:biblio-tag">
|
10895
11454
|
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
10896
11455
|
</xsl:apply-templates>
|
10897
11456
|
</xsl:variable>
|
10898
|
-
<xsl:attribute name="provisional-distance-between-starts">
|
10899
|
-
<xsl:choose>
|
10900
|
-
<xsl:when test="string-length($docidentifier) = 0">0mm</xsl:when>
|
10901
|
-
<xsl:when test="string-length($docidentifier) > 19">46.5mm</xsl:when>
|
10902
|
-
<xsl:when test="string-length($docidentifier) > 10">37mm</xsl:when>
|
10903
|
-
<xsl:otherwise>24.5mm</xsl:otherwise>
|
10904
|
-
</xsl:choose>
|
10905
|
-
</xsl:attribute>
|
10906
11457
|
|
10907
11458
|
<fo:list-item>
|
10908
11459
|
<fo:list-item-label end-indent="label-end()">
|
@@ -10914,6 +11465,7 @@
|
|
10914
11465
|
</fo:list-item-label>
|
10915
11466
|
<fo:list-item-body start-indent="body-start()">
|
10916
11467
|
<fo:block xsl:use-attribute-sets="bibitem-normative-list-body-style">
|
11468
|
+
<xsl:call-template name="refine_bibitem-normative-list-body-style"/>
|
10917
11469
|
<xsl:call-template name="processBibitem">
|
10918
11470
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
10919
11471
|
</xsl:call-template>
|
@@ -10925,18 +11477,23 @@
|
|
10925
11477
|
</xsl:template> <!-- bibitem -->
|
10926
11478
|
|
10927
11479
|
<!-- Bibliography (non-normative references) -->
|
10928
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem
|
11480
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
10929
11481
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
10930
11482
|
<xsl:call-template name="bibitem"/>
|
10931
11483
|
|
10932
11484
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
10933
11485
|
|
11486
|
+
<!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
|
11487
|
+
<xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
|
11488
|
+
|
10934
11489
|
<xsl:template name="insertListItem_Bibitem">
|
10935
11490
|
<xsl:choose>
|
10936
11491
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
10937
11492
|
<xsl:otherwise>
|
10938
11493
|
<xsl:call-template name="setNamedDestination"/>
|
10939
11494
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
11495
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
|
11496
|
+
|
10940
11497
|
<fo:list-item-label end-indent="label-end()">
|
10941
11498
|
<fo:block role="SKIP">
|
10942
11499
|
<fo:inline role="SKIP">
|
@@ -10947,16 +11504,18 @@
|
|
10947
11504
|
</fo:block>
|
10948
11505
|
</fo:list-item-label>
|
10949
11506
|
<fo:list-item-body start-indent="body-start()">
|
10950
|
-
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP"
|
11507
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
|
11508
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
|
10951
11509
|
<xsl:call-template name="processBibitem">
|
10952
11510
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
10953
11511
|
</xsl:call-template>
|
10954
11512
|
</fo:block>
|
11513
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
10955
11514
|
</fo:list-item-body>
|
10956
11515
|
</fo:list-item>
|
10957
11516
|
</xsl:otherwise>
|
10958
11517
|
</xsl:choose>
|
10959
|
-
<xsl:apply-templates select="following-sibling::*[
|
11518
|
+
<xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
|
10960
11519
|
<xsl:with-param name="skip">false</xsl:with-param>
|
10961
11520
|
</xsl:apply-templates>
|
10962
11521
|
</xsl:template>
|
@@ -10972,25 +11531,16 @@
|
|
10972
11531
|
<xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
|
10973
11532
|
</xsl:apply-templates>
|
10974
11533
|
<xsl:apply-templates select="mn:formattedref"/>
|
11534
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
10975
11535
|
<!-- end bibitem processing -->
|
10976
|
-
|
10977
|
-
<xsl:call-template name="processBibliographyNote"/>
|
10978
11536
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
10979
11537
|
|
10980
|
-
<xsl:template name="
|
10981
|
-
|
10982
|
-
|
10983
|
-
|
10984
|
-
<xsl:copy> <!-- skip @id -->
|
10985
|
-
<xsl:copy-of select="node()"/>
|
10986
|
-
</xsl:copy>
|
10987
|
-
</xsl:element>
|
10988
|
-
</xsl:variable>
|
10989
|
-
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
10990
|
-
<xsl:call-template name="note"/>
|
10991
|
-
</xsl:for-each> -->
|
11538
|
+
<xsl:template name="processBibitemFollowingNotes">
|
11539
|
+
<!-- current context is bibitem element -->
|
11540
|
+
<xsl:variable name="bibitem_id" select="@id"/>
|
11541
|
+
<xsl:for-each select="following-sibling::mn:note[preceding-sibling::mn:bibitem[1][@id = $bibitem_id] and preceding-sibling::*[1][self::mn:note or self::mn:bibitem]]">
|
10992
11542
|
<xsl:call-template name="note"/>
|
10993
|
-
</xsl:
|
11543
|
+
</xsl:for-each>
|
10994
11544
|
</xsl:template>
|
10995
11545
|
|
10996
11546
|
<xsl:template match="mn:title" mode="title">
|
@@ -11190,11 +11740,17 @@
|
|
11190
11740
|
<!-- Index section styles -->
|
11191
11741
|
<xsl:attribute-set name="indexsect-title-style">
|
11192
11742
|
<xsl:attribute name="role">H1</xsl:attribute>
|
11193
|
-
</xsl:attribute-set>
|
11743
|
+
</xsl:attribute-set> <!-- indexsect-title-style -->
|
11744
|
+
|
11745
|
+
<xsl:template name="refine_indexsect-title-style">
|
11746
|
+
</xsl:template>
|
11194
11747
|
|
11195
11748
|
<xsl:attribute-set name="indexsect-clause-title-style">
|
11196
11749
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
11197
|
-
</xsl:attribute-set>
|
11750
|
+
</xsl:attribute-set> <!-- indexsect-clause-title-style -->
|
11751
|
+
|
11752
|
+
<xsl:template name="refine_indexsect-clause-title-style">
|
11753
|
+
</xsl:template>
|
11198
11754
|
<!-- End Index section styles -->
|
11199
11755
|
|
11200
11756
|
<!-- =================== -->
|
@@ -11388,6 +11944,7 @@
|
|
11388
11944
|
|
11389
11945
|
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
11390
11946
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
11947
|
+
<xsl:call-template name="refine_indexsect-title-style"/>
|
11391
11948
|
<!-- Index -->
|
11392
11949
|
<xsl:apply-templates/>
|
11393
11950
|
</fo:block>
|
@@ -11396,6 +11953,7 @@
|
|
11396
11953
|
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
11397
11954
|
<!-- Letter A, B, C, ... -->
|
11398
11955
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
11956
|
+
<xsl:call-template name="refine_indexsect-clause-title-style"/>
|
11399
11957
|
<xsl:apply-templates/>
|
11400
11958
|
</fo:block>
|
11401
11959
|
</xsl:template>
|
@@ -11590,10 +12148,32 @@
|
|
11590
12148
|
<xsl:when test="@level >= 1 and @root = 'preface'">0mm</xsl:when>
|
11591
12149
|
<xsl:when test="@level >= 1 and @root = 'annex' and not(@type = 'annex')">13mm</xsl:when>
|
11592
12150
|
<xsl:when test="@level >= 1 and not(@type = 'annex')">
|
12151
|
+
<!-- for default values, maximum digits for 2nd level is 4, for example 20.19,
|
12152
|
+
for 3rd level is 5, for example 2.15.12
|
12153
|
+
if not, then increase -->
|
12154
|
+
<xsl:variable name="default_value_">
|
12155
|
+
<xsl:choose>
|
12156
|
+
<xsl:when test="$toc_level = 3">12.9</xsl:when>
|
12157
|
+
<xsl:when test="$toc_level > 3">15</xsl:when>
|
12158
|
+
<xsl:otherwise>10</xsl:otherwise>
|
12159
|
+
</xsl:choose>
|
12160
|
+
</xsl:variable>
|
12161
|
+
<xsl:variable name="default_value" select="number($default_value_)"/>
|
12162
|
+
<xsl:variable name="root-style"><root-style xsl:use-attribute-sets="root-style"/></xsl:variable>
|
12163
|
+
<xsl:variable name="font_size" select="normalize-space(translate(xalan:nodeset($root-style)/root-style/@font-size, 'pt', ''))"/>
|
12164
|
+
<xsl:variable name="item_section_max">
|
12165
|
+
<xsl:choose>
|
12166
|
+
<xsl:when test="following-sibling::mnx:item"><xsl:value-of select="following-sibling::mnx:item[last()]/@section"/></xsl:when>
|
12167
|
+
<xsl:otherwise><xsl:value-of select="@section"/></xsl:otherwise>
|
12168
|
+
</xsl:choose>
|
12169
|
+
</xsl:variable>
|
12170
|
+
<!-- in em -->
|
12171
|
+
<xsl:variable name="text_rt_width_em" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($item_section_max, $font_main, $font_size)"/>
|
12172
|
+
<!-- in mm, multiplier 3.175 for Arial em size -->
|
12173
|
+
<xsl:variable name="text_rt_width_mm" select="number($text_rt_width_em) div 10 * 3.175 + 2"/>
|
11593
12174
|
<xsl:choose>
|
11594
|
-
<xsl:when test="$
|
11595
|
-
<xsl:
|
11596
|
-
<xsl:otherwise>10mm</xsl:otherwise>
|
12175
|
+
<xsl:when test="$text_rt_width_mm > $default_value"><xsl:value-of select="ceiling($text_rt_width_mm) + 1"/>mm</xsl:when>
|
12176
|
+
<xsl:otherwise><xsl:value-of select="$default_value"/>mm</xsl:otherwise>
|
11597
12177
|
</xsl:choose>
|
11598
12178
|
</xsl:when>
|
11599
12179
|
<xsl:otherwise>0mm</xsl:otherwise>
|
@@ -11618,9 +12198,15 @@
|
|
11618
12198
|
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
11619
12199
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
11620
12200
|
|
12201
|
+
<xsl:template name="refine_toc-leader-style">
|
12202
|
+
</xsl:template>
|
12203
|
+
|
11621
12204
|
<xsl:attribute-set name="toc-pagenumber-style">
|
11622
12205
|
</xsl:attribute-set>
|
11623
12206
|
|
12207
|
+
<xsl:template name="refine_toc-pagenumber-style">
|
12208
|
+
</xsl:template>
|
12209
|
+
|
11624
12210
|
<!-- List of Figures, Tables -->
|
11625
12211
|
<xsl:attribute-set name="toc-listof-title-style">
|
11626
12212
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
@@ -11635,6 +12221,9 @@
|
|
11635
12221
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
11636
12222
|
</xsl:attribute-set>
|
11637
12223
|
|
12224
|
+
<xsl:template name="refine_toc-listof-item-block-style">
|
12225
|
+
</xsl:template>
|
12226
|
+
|
11638
12227
|
<xsl:attribute-set name="toc-listof-item-style">
|
11639
12228
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11640
12229
|
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
@@ -11642,6 +12231,9 @@
|
|
11642
12231
|
<xsl:attribute name="text-indent">-12mm</xsl:attribute>
|
11643
12232
|
</xsl:attribute-set>
|
11644
12233
|
|
12234
|
+
<xsl:template name="refine_toc-listof-item-style">
|
12235
|
+
</xsl:template>
|
12236
|
+
|
11645
12237
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
11646
12238
|
<xsl:variable name="nodes_preface_">
|
11647
12239
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -12754,23 +13346,55 @@
|
|
12754
13346
|
<!-- Ruby text (CJK languages) rendering -->
|
12755
13347
|
<!-- ===================================== -->
|
12756
13348
|
<!-- ===================================== -->
|
13349
|
+
|
13350
|
+
<xsl:attribute-set name="ruby-style">
|
13351
|
+
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
13352
|
+
<xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
|
13353
|
+
</xsl:attribute-set>
|
13354
|
+
|
13355
|
+
<xsl:template name="refine_ruby-style">
|
13356
|
+
<xsl:if test="not(ancestor::mn:ruby)">
|
13357
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
13358
|
+
</xsl:if>
|
13359
|
+
<xsl:variable name="rt_text" select="mn:rt"/>
|
13360
|
+
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
13361
|
+
<!-- Example: width="2em" -->
|
13362
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
13363
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
13364
|
+
<xsl:variable name="text_width">
|
13365
|
+
<xsl:choose>
|
13366
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
13367
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
13368
|
+
</xsl:choose>
|
13369
|
+
</xsl:variable>
|
13370
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
13371
|
+
</xsl:template> <!-- refine_ruby-style -->
|
13372
|
+
|
13373
|
+
<xsl:attribute-set name="rb-style">
|
13374
|
+
<xsl:attribute name="line-height">1em</xsl:attribute>
|
13375
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
13376
|
+
</xsl:attribute-set>
|
13377
|
+
|
13378
|
+
<xsl:template name="refine_rb-style">
|
13379
|
+
</xsl:template>
|
13380
|
+
|
13381
|
+
<xsl:attribute-set name="rt-style">
|
13382
|
+
<xsl:attribute name="font-size">0.5em</xsl:attribute>
|
13383
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
13384
|
+
<xsl:attribute name="line-height">1.2em</xsl:attribute>
|
13385
|
+
<xsl:attribute name="space-before">-1.4em</xsl:attribute>
|
13386
|
+
<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
|
13387
|
+
</xsl:attribute-set>
|
13388
|
+
|
13389
|
+
<xsl:template name="refine_rt-style">
|
13390
|
+
<xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
|
13391
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
13392
|
+
</xsl:if>
|
13393
|
+
</xsl:template>
|
13394
|
+
|
12757
13395
|
<xsl:template match="mn:ruby">
|
12758
|
-
<fo:inline-container
|
12759
|
-
<xsl:
|
12760
|
-
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
12761
|
-
</xsl:if>
|
12762
|
-
<xsl:variable name="rt_text" select="mn:rt"/>
|
12763
|
-
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
12764
|
-
<!-- Example: width="2em" -->
|
12765
|
-
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
12766
|
-
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
12767
|
-
<xsl:variable name="text_width">
|
12768
|
-
<xsl:choose>
|
12769
|
-
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
12770
|
-
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
12771
|
-
</xsl:choose>
|
12772
|
-
</xsl:variable>
|
12773
|
-
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
13396
|
+
<fo:inline-container xsl:use-attribute-sets="ruby-style">
|
13397
|
+
<xsl:call-template name="refine_ruby-style"/>
|
12774
13398
|
|
12775
13399
|
<xsl:choose>
|
12776
13400
|
<xsl:when test="ancestor::mn:ruby">
|
@@ -12788,17 +13412,14 @@
|
|
12788
13412
|
</xsl:template>
|
12789
13413
|
|
12790
13414
|
<xsl:template match="mn:rb">
|
12791
|
-
<fo:block
|
13415
|
+
<fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
|
12792
13416
|
</xsl:template>
|
12793
13417
|
|
12794
13418
|
<xsl:template match="mn:rt">
|
12795
|
-
<fo:block
|
12796
|
-
<xsl:
|
12797
|
-
<xsl:attribute name="space-before">0em</xsl:attribute>
|
12798
|
-
</xsl:if>
|
13419
|
+
<fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
|
13420
|
+
<xsl:call-template name="refine_rt-style"/>
|
12799
13421
|
<xsl:apply-templates/>
|
12800
13422
|
</fo:block>
|
12801
|
-
|
12802
13423
|
</xsl:template>
|
12803
13424
|
|
12804
13425
|
<!-- ===================================== -->
|
@@ -12807,6 +13428,24 @@
|
|
12807
13428
|
<!-- ===================================== -->
|
12808
13429
|
<!-- ===================================== -->
|
12809
13430
|
|
13431
|
+
<xsl:attribute-set name="annex-title-style">
|
13432
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
13433
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
13434
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
13435
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
13436
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
13437
|
+
<xsl:attribute name="role">H1</xsl:attribute>
|
13438
|
+
</xsl:attribute-set>
|
13439
|
+
|
13440
|
+
<xsl:template name="refine_annex-title-style">
|
13441
|
+
</xsl:template>
|
13442
|
+
|
13443
|
+
<xsl:attribute-set name="p-zzSTDTitle1-style">
|
13444
|
+
</xsl:attribute-set>
|
13445
|
+
|
13446
|
+
<xsl:template name="refine_p-zzSTDTitle1-style">
|
13447
|
+
</xsl:template>
|
13448
|
+
|
12810
13449
|
<xsl:template name="processPrefaceSectionsDefault">
|
12811
13450
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
12812
13451
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -13145,10 +13784,17 @@
|
|
13145
13784
|
</xsl:choose>
|
13146
13785
|
</xsl:template>
|
13147
13786
|
|
13787
|
+
<xsl:attribute-set name="clause-style">
|
13788
|
+
|
13789
|
+
</xsl:attribute-set>
|
13790
|
+
|
13791
|
+
<xsl:template name="refine_clause-style">
|
13792
|
+
</xsl:template>
|
13793
|
+
|
13148
13794
|
<!-- main sections -->
|
13149
13795
|
<xsl:template match="/*/mn:sections/*" name="sections_node" priority="2">
|
13150
13796
|
<xsl:call-template name="setNamedDestination"/>
|
13151
|
-
<fo:block>
|
13797
|
+
<fo:block role="Sect">
|
13152
13798
|
<xsl:call-template name="setId"/>
|
13153
13799
|
|
13154
13800
|
<xsl:call-template name="sections_element_style"/>
|
@@ -13272,6 +13918,10 @@
|
|
13272
13918
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
13273
13919
|
</xsl:template>
|
13274
13920
|
|
13921
|
+
<!-- for case when update_xml_step1 (common.updatexml.xsl) doesn't apply when $table_if = 'true' -->
|
13922
|
+
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]"/>
|
13923
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
13924
|
+
|
13275
13925
|
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
13276
13926
|
<xsl:template name="insert_basic_link">
|
13277
13927
|
<xsl:param name="element"/>
|