metanorma-ogc 2.7.9 → 2.8.0
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/ogc/base_convert.rb +2 -3
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +763 -593
- data/lib/isodoc/ogc/ogc.best-practice.xsl +763 -593
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +763 -593
- data/lib/isodoc/ogc/ogc.community-practice.xsl +763 -593
- data/lib/isodoc/ogc/ogc.community-standard.xsl +763 -593
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +763 -593
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +763 -593
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +763 -593
- data/lib/isodoc/ogc/ogc.other.xsl +763 -593
- data/lib/isodoc/ogc/ogc.policy.xsl +763 -593
- data/lib/isodoc/ogc/ogc.reference-model.xsl +763 -593
- data/lib/isodoc/ogc/ogc.release-notes.xsl +763 -593
- data/lib/isodoc/ogc/ogc.standard.xsl +763 -593
- data/lib/isodoc/ogc/ogc.test-suite.xsl +763 -593
- data/lib/isodoc/ogc/ogc.user-guide.xsl +763 -593
- data/lib/isodoc/ogc/ogc.white-paper.xsl +548 -376
- data/lib/isodoc/ogc/presentation_sections.rb +3 -2
- data/lib/metanorma/ogc/basicdoc.rng +5 -5
- data/lib/metanorma/ogc/isodoc.rng +57 -6
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
5
|
-
<xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:name))]" use="@reference"/>
|
5
|
+
<xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:fmt-name))]" use="@reference"/>
|
6
6
|
|
7
7
|
<xsl:variable name="debug">false</xsl:variable>
|
8
8
|
|
@@ -27,13 +27,7 @@
|
|
27
27
|
<xsl:variable name="color_text_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'color-text-title']/mn:value"/>
|
28
28
|
<xsl:variable name="color_table_header_row" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'color-background-table-header']/mn:value"/>
|
29
29
|
|
30
|
-
<xsl:attribute-set name="title-toc-style">
|
31
|
-
<xsl:attribute name="font-size">26pt</xsl:attribute>
|
32
|
-
<xsl:attribute name="border-bottom">2pt solid rgb(21, 43, 77)</xsl:attribute>
|
33
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
34
|
-
</xsl:attribute-set>
|
35
|
-
|
36
|
-
<xsl:attribute-set name="title-depth1-style" use-attribute-sets="title-toc-style">
|
30
|
+
<xsl:attribute-set name="title-depth1-style" use-attribute-sets="toc-title-style">
|
37
31
|
<xsl:attribute name="font-family">Lato</xsl:attribute>
|
38
32
|
<xsl:attribute name="color">rgb(59, 56, 56)</xsl:attribute>
|
39
33
|
<xsl:attribute name="margin-top">18pt</xsl:attribute>
|
@@ -80,6 +74,29 @@
|
|
80
74
|
</xsl:variable>
|
81
75
|
<xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
|
82
76
|
|
77
|
+
<xsl:template name="layout-master-set">
|
78
|
+
<fo:layout-master-set>
|
79
|
+
|
80
|
+
<!-- Document pages -->
|
81
|
+
<fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
82
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
83
|
+
<fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
|
84
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm" precedence="true"/>
|
85
|
+
<fo:region-start region-name="left" extent="{$marginLeftRight1}mm"/>
|
86
|
+
<fo:region-end region-name="right" extent="{$marginLeftRight2}mm"/>
|
87
|
+
</fo:simple-page-master>
|
88
|
+
|
89
|
+
<fo:simple-page-master master-name="document-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
90
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
91
|
+
<fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
|
92
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm" precedence="true"/>
|
93
|
+
<fo:region-start region-name="left" extent="{$marginLeftRight1}mm"/>
|
94
|
+
<fo:region-end region-name="right" extent="{$marginLeftRight2}mm"/>
|
95
|
+
</fo:simple-page-master>
|
96
|
+
|
97
|
+
</fo:layout-master-set>
|
98
|
+
</xsl:template> <!-- END: layout-master-set -->
|
99
|
+
|
83
100
|
<xsl:template match="/">
|
84
101
|
|
85
102
|
<fo:root xml:lang="{$lang}">
|
@@ -89,26 +106,8 @@
|
|
89
106
|
<xsl:call-template name="insertRootStyle">
|
90
107
|
<xsl:with-param name="root-style" select="$root-style"/>
|
91
108
|
</xsl:call-template>
|
92
|
-
|
93
|
-
|
94
|
-
<!-- Document pages -->
|
95
|
-
<fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
96
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
97
|
-
<fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
|
98
|
-
<fo:region-after region-name="footer" extent="{$marginBottom}mm" precedence="true"/>
|
99
|
-
<fo:region-start region-name="left" extent="{$marginLeftRight1}mm"/>
|
100
|
-
<fo:region-end region-name="right" extent="{$marginLeftRight2}mm"/>
|
101
|
-
</fo:simple-page-master>
|
102
|
-
|
103
|
-
<fo:simple-page-master master-name="document-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
104
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
105
|
-
<fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
|
106
|
-
<fo:region-after region-name="footer" extent="{$marginBottom}mm" precedence="true"/>
|
107
|
-
<fo:region-start region-name="left" extent="{$marginLeftRight1}mm"/>
|
108
|
-
<fo:region-end region-name="right" extent="{$marginLeftRight2}mm"/>
|
109
|
-
</fo:simple-page-master>
|
110
|
-
|
111
|
-
</fo:layout-master-set>
|
109
|
+
|
110
|
+
<xsl:call-template name="layout-master-set"/>
|
112
111
|
|
113
112
|
<fo:declarations>
|
114
113
|
<xsl:call-template name="addPDFUAmeta"/>
|
@@ -118,7 +117,7 @@
|
|
118
117
|
<xsl:with-param name="contents" select="$contents"/>
|
119
118
|
<xsl:with-param name="contents_addon">
|
120
119
|
<xsl:variable name="list_of_tables_figures_">
|
121
|
-
<xsl:for-each select="//mn:table[@id and mn:name] | //mn:figure[@id and mn:name]">
|
120
|
+
<xsl:for-each select="//mn:table[@id and mn:fmt-name] | //mn:figure[@id and mn:fmt-name]">
|
122
121
|
<table_figure id="{@id}"><xsl:apply-templates select="mn:fmt-name" mode="bookmarks"/></table_figure>
|
123
122
|
</xsl:for-each>
|
124
123
|
</xsl:variable>
|
@@ -147,83 +146,7 @@
|
|
147
146
|
</xsl:with-param>
|
148
147
|
</xsl:call-template>
|
149
148
|
|
150
|
-
|
151
|
-
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
152
|
-
<xsl:call-template name="insertHeaderFooter"/>
|
153
|
-
<fo:flow flow-name="xsl-region-body">
|
154
|
-
|
155
|
-
<fo:block-container margin-left="-12mm" margin-right="-9mm">
|
156
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
157
|
-
<fo:block font-size="36pt" background-color="{$color}" color="white" margin-left="2.5mm" padding-top="1mm" padding-left="1mm" role="H1">
|
158
|
-
<xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title/node()"/>
|
159
|
-
</fo:block>
|
160
|
-
</fo:block-container>
|
161
|
-
</fo:block-container>
|
162
|
-
|
163
|
-
<!-- <fo:block font-family="Lato" font-weight="300" font-size="14pt" font-style="italic" margin-top="6pt" color="rgb(21, 43, 77)">
|
164
|
-
<xsl:text>Additional context, inspirational quote, etc. fits into this subheading area</xsl:text>
|
165
|
-
</fo:block> -->
|
166
|
-
|
167
|
-
<fo:block text-align="right" font-size="10pt" margin-top="12pt" margin-bottom="24pt">
|
168
|
-
<fo:block margin-top="6pt">Submission Date: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on"/></fo:block>
|
169
|
-
<fo:block margin-top="6pt">Approval Date: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on"/></fo:block>
|
170
|
-
<fo:block margin-top="6pt">Publication Date: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']/mn:on"/></fo:block>
|
171
|
-
<fo:block margin-top="6pt">External identifier of this OGC® document: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'ogc-external']"/></fo:block>
|
172
|
-
<fo:block margin-top="6pt">Internal reference number of this OGC® document: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docnumber"/></fo:block>
|
173
|
-
|
174
|
-
<xsl:variable name="url" select="/mn:metanorma/mn:bibdata/mn:uri"/>
|
175
|
-
<xsl:if test="normalize-space($url) != ''">
|
176
|
-
<fo:block margin-top="6pt">URL for this OGC® document: <xsl:value-of select="$url"/></fo:block>
|
177
|
-
</xsl:if>
|
178
|
-
|
179
|
-
<xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/>
|
180
|
-
|
181
|
-
<fo:block margin-top="6pt"><xsl:text>Category: </xsl:text>
|
182
|
-
<xsl:call-template name="capitalizeWords">
|
183
|
-
<xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype"/>
|
184
|
-
</xsl:call-template>
|
185
|
-
</fo:block>
|
186
|
-
|
187
|
-
<xsl:variable name="editors">
|
188
|
-
<xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
|
189
|
-
<xsl:value-of select="."/>
|
190
|
-
<xsl:if test="position() != last()">, </xsl:if>
|
191
|
-
</xsl:for-each>
|
192
|
-
</xsl:variable>
|
193
|
-
<xsl:if test="normalize-space($editors) != ''">
|
194
|
-
<fo:block margin-top="6pt">
|
195
|
-
<!-- Editor: -->
|
196
|
-
<xsl:call-template name="getLocalizedString">
|
197
|
-
<xsl:with-param name="key">editor_full</xsl:with-param>
|
198
|
-
</xsl:call-template><xsl:text>: </xsl:text><xsl:value-of select="$editors"/>
|
199
|
-
</fo:block>
|
200
|
-
</xsl:if>
|
201
|
-
</fo:block>
|
202
|
-
|
203
|
-
<!-- absolute-position="fixed" left="20mm" top="91mm" width="175mm" -->
|
204
|
-
<fo:block-container font-size="9pt" margin-left="-5mm" margin-right="-5mm">
|
205
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
206
|
-
<fo:block margin-top="8pt">
|
207
|
-
<xsl:variable name="copyright_statement">
|
208
|
-
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:copyright-statement" mode="update_xml_step1"/>
|
209
|
-
</xsl:variable>
|
210
|
-
<xsl:apply-templates select="xalan:nodeset($copyright_statement)/*"/>
|
211
|
-
</fo:block>
|
212
|
-
<fo:block margin-top="8pt"> </fo:block>
|
213
|
-
<fo:block margin-top="8pt">
|
214
|
-
<xsl:variable name="legal_statement">
|
215
|
-
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
|
216
|
-
</xsl:variable>
|
217
|
-
<xsl:apply-templates select="xalan:nodeset($legal_statement)/*"/>
|
218
|
-
</fo:block>
|
219
|
-
</fo:block-container>
|
220
|
-
</fo:block-container>
|
221
|
-
|
222
|
-
<xsl:call-template name="insertLogo"/>
|
223
|
-
|
224
|
-
</fo:flow>
|
225
|
-
</fo:page-sequence>
|
226
|
-
<!-- End Cover Page -->
|
149
|
+
<xsl:call-template name="cover-page"/>
|
227
150
|
|
228
151
|
<xsl:variable name="updated_xml">
|
229
152
|
<xsl:call-template name="updateXML"/>
|
@@ -313,6 +236,86 @@
|
|
313
236
|
|
314
237
|
</xsl:template>
|
315
238
|
|
239
|
+
<xsl:template name="cover-page">
|
240
|
+
<!-- Cover Page -->
|
241
|
+
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
242
|
+
<xsl:call-template name="insertHeaderFooter"/>
|
243
|
+
<fo:flow flow-name="xsl-region-body">
|
244
|
+
|
245
|
+
<fo:block-container margin-left="-12mm" margin-right="-9mm">
|
246
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
247
|
+
<fo:block font-size="36pt" background-color="{$color}" color="white" margin-left="2.5mm" padding-top="1mm" padding-left="1mm" role="H1">
|
248
|
+
<xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title/node()"/>
|
249
|
+
</fo:block>
|
250
|
+
</fo:block-container>
|
251
|
+
</fo:block-container>
|
252
|
+
|
253
|
+
<!-- <fo:block font-family="Lato" font-weight="300" font-size="14pt" font-style="italic" margin-top="6pt" color="rgb(21, 43, 77)">
|
254
|
+
<xsl:text>Additional context, inspirational quote, etc. fits into this subheading area</xsl:text>
|
255
|
+
</fo:block> -->
|
256
|
+
|
257
|
+
<fo:block text-align="right" font-size="10pt" margin-top="12pt" margin-bottom="24pt">
|
258
|
+
<fo:block margin-top="6pt">Submission Date: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on"/></fo:block>
|
259
|
+
<fo:block margin-top="6pt">Approval Date: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on"/></fo:block>
|
260
|
+
<fo:block margin-top="6pt">Publication Date: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']/mn:on"/></fo:block>
|
261
|
+
<fo:block margin-top="6pt">External identifier of this OGC® document: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'ogc-external']"/></fo:block>
|
262
|
+
<fo:block margin-top="6pt">Internal reference number of this OGC® document: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docnumber"/></fo:block>
|
263
|
+
|
264
|
+
<xsl:variable name="url" select="/mn:metanorma/mn:bibdata/mn:uri"/>
|
265
|
+
<xsl:if test="normalize-space($url) != ''">
|
266
|
+
<fo:block margin-top="6pt">URL for this OGC® document: <xsl:value-of select="$url"/></fo:block>
|
267
|
+
</xsl:if>
|
268
|
+
|
269
|
+
<xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/>
|
270
|
+
|
271
|
+
<fo:block margin-top="6pt"><xsl:text>Category: </xsl:text>
|
272
|
+
<xsl:call-template name="capitalizeWords">
|
273
|
+
<xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype"/>
|
274
|
+
</xsl:call-template>
|
275
|
+
</fo:block>
|
276
|
+
|
277
|
+
<xsl:variable name="editors">
|
278
|
+
<xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
|
279
|
+
<xsl:value-of select="."/>
|
280
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
281
|
+
</xsl:for-each>
|
282
|
+
</xsl:variable>
|
283
|
+
<xsl:if test="normalize-space($editors) != ''">
|
284
|
+
<fo:block margin-top="6pt">
|
285
|
+
<!-- Editor: -->
|
286
|
+
<xsl:call-template name="getLocalizedString">
|
287
|
+
<xsl:with-param name="key">editor_full</xsl:with-param>
|
288
|
+
</xsl:call-template><xsl:text>: </xsl:text><xsl:value-of select="$editors"/>
|
289
|
+
</fo:block>
|
290
|
+
</xsl:if>
|
291
|
+
</fo:block>
|
292
|
+
|
293
|
+
<!-- absolute-position="fixed" left="20mm" top="91mm" width="175mm" -->
|
294
|
+
<fo:block-container font-size="9pt" margin-left="-5mm" margin-right="-5mm">
|
295
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
296
|
+
<fo:block margin-top="8pt">
|
297
|
+
<xsl:variable name="copyright_statement">
|
298
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:copyright-statement" mode="update_xml_step1"/>
|
299
|
+
</xsl:variable>
|
300
|
+
<xsl:apply-templates select="xalan:nodeset($copyright_statement)/*"/>
|
301
|
+
</fo:block>
|
302
|
+
<fo:block margin-top="8pt"> </fo:block>
|
303
|
+
<fo:block margin-top="8pt">
|
304
|
+
<xsl:variable name="legal_statement">
|
305
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
|
306
|
+
</xsl:variable>
|
307
|
+
<xsl:apply-templates select="xalan:nodeset($legal_statement)/*"/>
|
308
|
+
</fo:block>
|
309
|
+
</fo:block-container>
|
310
|
+
</fo:block-container>
|
311
|
+
|
312
|
+
<xsl:call-template name="insertLogo"/>
|
313
|
+
|
314
|
+
</fo:flow>
|
315
|
+
</fo:page-sequence>
|
316
|
+
<!-- End Cover Page -->
|
317
|
+
</xsl:template> <!-- END: cover-page -->
|
318
|
+
|
316
319
|
<xsl:template name="processPrefaceAndMainSectionsOGC_items">
|
317
320
|
<xsl:variable name="updated_xml_step_move_pagebreak">
|
318
321
|
|
@@ -368,49 +371,51 @@
|
|
368
371
|
</xsl:call-template>
|
369
372
|
</xsl:template> <!-- END: processPrefaceAndMainSectionsOGC_items -->
|
370
373
|
|
371
|
-
<xsl:template match="mn:preface//mn:clause[@type = 'toc']" priority="4">
|
374
|
+
<xsl:template match="mn:preface//mn:clause[@type = 'toc']" name="toc" priority="4">
|
372
375
|
<fo:block break-after="page"/>
|
373
376
|
<fo:block-container line-height="1.08" font-family="Lato">
|
374
377
|
|
375
|
-
<xsl:apply-templates select="mn:title"/>
|
378
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
376
379
|
|
377
380
|
<fo:block role="TOC">
|
378
381
|
|
379
|
-
<xsl:apply-templates select="*[not(self::mn:title)]"/>
|
382
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-title)]"/>
|
380
383
|
|
381
|
-
<xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
|
384
|
+
<xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
|
382
385
|
|
383
|
-
<xsl:variable name="margin-left">3.9</xsl:variable>
|
384
386
|
<xsl:for-each select="$contents//mnx:item[@display = 'true']">
|
385
|
-
<fo:block
|
387
|
+
<fo:block xsl:use-attribute-sets="toc-item-style">
|
388
|
+
|
389
|
+
<xsl:call-template name="refine_toc-item-style"/>
|
390
|
+
|
386
391
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}">
|
387
392
|
<xsl:if test="@section != ''">
|
388
393
|
<xsl:value-of select="@section"/><xsl:text> </xsl:text>
|
389
394
|
</xsl:if>
|
390
395
|
<xsl:apply-templates select="mnx:title"/>
|
391
396
|
<fo:inline keep-together.within-line="always">
|
392
|
-
<fo:leader
|
393
|
-
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
397
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
398
|
+
<fo:inline xsl:use-attribute-sets="toc-pagenumber-style"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
394
399
|
</fo:inline>
|
395
400
|
</fo:basic-link>
|
396
401
|
</fo:block>
|
397
402
|
</xsl:for-each>
|
398
403
|
|
399
|
-
<xsl:if test="//mn:figure[@id and mn:name] or //mn:table[@id and mn:name]">
|
404
|
+
<xsl:if test="//mn:figure[@id and mn:fmt-name] or //mn:table[@id and mn:fmt-name]">
|
400
405
|
<fo:block font-size="11pt" margin-top="8pt"> </fo:block>
|
401
406
|
<fo:block font-size="11pt" margin-top="8pt"> </fo:block>
|
402
|
-
<fo:block xsl:use-attribute-sets="title-
|
407
|
+
<fo:block xsl:use-attribute-sets="toc-title-style">
|
403
408
|
<!-- <xsl:text>Table of Figures</xsl:text> -->
|
404
409
|
<xsl:call-template name="getLocalizedString">
|
405
410
|
<xsl:with-param name="key">table_of_figures</xsl:with-param>
|
406
411
|
</xsl:call-template>
|
407
412
|
</fo:block>
|
408
|
-
<xsl:for-each select="//mn:figure[@id and mn:name] | //mn:table[@id and mn:name]">
|
409
|
-
<fo:block
|
410
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:name}">
|
411
|
-
<xsl:apply-templates select="mn:name" mode="contents"/>
|
413
|
+
<xsl:for-each select="//mn:figure[@id and mn:fmt-name] | //mn:table[@id and mn:fmt-name]">
|
414
|
+
<fo:block xsl:use-attribute-sets="toc-listof-item-style">
|
415
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:fmt-name}">
|
416
|
+
<xsl:apply-templates select="mn:fmt-name" mode="contents"/>
|
412
417
|
<fo:inline keep-together.within-line="always">
|
413
|
-
<fo:leader
|
418
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
414
419
|
<fo:page-number-citation ref-id="{@id}"/>
|
415
420
|
</fo:inline>
|
416
421
|
</fo:basic-link>
|
@@ -422,8 +427,8 @@
|
|
422
427
|
</fo:block-container>
|
423
428
|
</xsl:template>
|
424
429
|
|
425
|
-
<xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:title" priority="3">
|
426
|
-
<fo:block xsl:use-attribute-sets="title-
|
430
|
+
<xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
|
431
|
+
<fo:block xsl:use-attribute-sets="toc-title-style" role="H1">
|
427
432
|
<!-- <xsl:call-template name="getTitle">
|
428
433
|
<xsl:with-param name="name" select="'title-toc'"/>
|
429
434
|
</xsl:call-template> -->
|
@@ -558,14 +563,14 @@
|
|
558
563
|
<!-- title -->
|
559
564
|
<!-- ====== -->
|
560
565
|
|
561
|
-
<xsl:template match="mn:annex/mn:title">
|
566
|
+
<xsl:template match="mn:annex/mn:fmt-title">
|
562
567
|
<fo:block xsl:use-attribute-sets="title-depth1-style" role="H1">
|
563
568
|
<xsl:apply-templates/>
|
564
569
|
<xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
565
570
|
</fo:block>
|
566
571
|
</xsl:template>
|
567
572
|
|
568
|
-
<xsl:template match="mn:title" name="title">
|
573
|
+
<xsl:template match="mn:fmt-title" name="title">
|
569
574
|
|
570
575
|
<xsl:variable name="level">
|
571
576
|
<xsl:call-template name="getLevel"/>
|
@@ -637,7 +642,7 @@
|
|
637
642
|
<xsl:variable name="element-name">
|
638
643
|
<xsl:choose>
|
639
644
|
<xsl:when test="$inline = 'true'">fo:inline</xsl:when>
|
640
|
-
<xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
|
645
|
+
<xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
|
641
646
|
<xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
|
642
647
|
<xsl:otherwise>fo:block</xsl:otherwise>
|
643
648
|
</xsl:choose>
|
@@ -906,10 +911,6 @@
|
|
906
911
|
<title-part lang="ru">
|
907
912
|
</title-part>
|
908
913
|
<title-part lang="zh">第 # 部分:</title-part>
|
909
|
-
|
910
|
-
<title-subpart lang="en">Sub-part #</title-subpart>
|
911
|
-
<title-subpart lang="fr">Partie de sub #</title-subpart>
|
912
|
-
|
913
914
|
</xsl:variable>
|
914
915
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
915
916
|
|
@@ -1362,7 +1363,8 @@
|
|
1362
1363
|
<xsl:template match="mn:stem" mode="update_xml_step1"/>
|
1363
1364
|
|
1364
1365
|
<xsl:template match="mn:fmt-stem" mode="update_xml_step1">
|
1365
|
-
<xsl:element name="stem" namespace="{$namespace_full}">
|
1366
|
+
<!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
|
1367
|
+
<xsl:copy>
|
1366
1368
|
<xsl:copy-of select="@*"/>
|
1367
1369
|
<xsl:choose>
|
1368
1370
|
<xsl:when test="mn:semx and count(node()) = 1">
|
@@ -1386,7 +1388,8 @@
|
|
1386
1388
|
</xsl:choose>
|
1387
1389
|
</xsl:otherwise>
|
1388
1390
|
</xsl:choose>
|
1389
|
-
</xsl:
|
1391
|
+
</xsl:copy>
|
1392
|
+
<!-- </xsl:element> -->
|
1390
1393
|
</xsl:template>
|
1391
1394
|
|
1392
1395
|
<xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
|
@@ -1548,12 +1551,14 @@
|
|
1548
1551
|
</xsl:template>
|
1549
1552
|
|
1550
1553
|
<xsl:template match="mn:fmt-title" mode="update_xml_step1">
|
1551
|
-
<xsl:element name="title" namespace="{$namespace_full}">
|
1554
|
+
<!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
|
1555
|
+
<xsl:copy>
|
1552
1556
|
<xsl:copy-of select="@*"/>
|
1553
1557
|
<xsl:call-template name="addNamedDestinationAttribute"/>
|
1554
1558
|
|
1555
1559
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1556
|
-
</xsl:
|
1560
|
+
</xsl:copy>
|
1561
|
+
<!-- </xsl:element> -->
|
1557
1562
|
</xsl:template>
|
1558
1563
|
|
1559
1564
|
<xsl:template name="addNamedDestinationAttribute">
|
@@ -1565,12 +1570,14 @@
|
|
1565
1570
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1566
1571
|
</xsl:when>
|
1567
1572
|
<xsl:otherwise>
|
1568
|
-
<xsl:element name="name" namespace="{$namespace_full}">
|
1573
|
+
<!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
|
1574
|
+
<xsl:copy>
|
1569
1575
|
<xsl:copy-of select="@*"/>
|
1570
1576
|
<xsl:call-template name="addNamedDestinationAttribute"/>
|
1571
1577
|
|
1572
1578
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1573
|
-
</xsl:
|
1579
|
+
</xsl:copy>
|
1580
|
+
<!-- </xsl:element> -->
|
1574
1581
|
</xsl:otherwise>
|
1575
1582
|
</xsl:choose>
|
1576
1583
|
</xsl:template>
|
@@ -1585,7 +1592,7 @@
|
|
1585
1592
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1586
1593
|
</xsl:template>
|
1587
1594
|
<xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="update_xml_step1">
|
1588
|
-
<xsl:element name="preferred" namespace="{$namespace_full}">
|
1595
|
+
<xsl:element name="fmt-preferred" namespace="{$namespace_full}">
|
1589
1596
|
<xsl:copy-of select="@*"/>
|
1590
1597
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1591
1598
|
</xsl:element>
|
@@ -1595,7 +1602,7 @@
|
|
1595
1602
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1596
1603
|
</xsl:template>
|
1597
1604
|
<xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="update_xml_step1">
|
1598
|
-
<xsl:element name="admitted" namespace="{$namespace_full}">
|
1605
|
+
<xsl:element name="fmt-admitted" namespace="{$namespace_full}">
|
1599
1606
|
<xsl:copy-of select="@*"/>
|
1600
1607
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1601
1608
|
</xsl:element>
|
@@ -1605,32 +1612,32 @@
|
|
1605
1612
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1606
1613
|
</xsl:template>
|
1607
1614
|
<xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="update_xml_step1">
|
1608
|
-
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
1615
|
+
<xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
|
1609
1616
|
<xsl:copy-of select="@*"/>
|
1610
1617
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1611
1618
|
</xsl:element>
|
1612
1619
|
</xsl:template>
|
1613
1620
|
|
1614
|
-
<xsl:template match="mn:fmt-definition" mode="update_xml_step1">
|
1621
|
+
<!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
|
1615
1622
|
<xsl:element name="definition" namespace="{$namespace_full}">
|
1616
1623
|
<xsl:copy-of select="@*"/>
|
1617
1624
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1618
1625
|
</xsl:element>
|
1619
1626
|
</xsl:template>
|
1620
|
-
|
1627
|
+
|
1621
1628
|
<xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
|
1622
1629
|
<xsl:element name="termsource" namespace="{$namespace_full}">
|
1623
1630
|
<xsl:copy-of select="@*"/>
|
1624
1631
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1625
1632
|
</xsl:element>
|
1626
1633
|
</xsl:template>
|
1627
|
-
|
1634
|
+
|
1628
1635
|
<xsl:template match="mn:fmt-source" mode="update_xml_step1">
|
1629
1636
|
<xsl:element name="source" namespace="{$namespace_full}">
|
1630
1637
|
<xsl:copy-of select="@*"/>
|
1631
1638
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1632
1639
|
</xsl:element>
|
1633
|
-
</xsl:template>
|
1640
|
+
</xsl:template> -->
|
1634
1641
|
|
1635
1642
|
<xsl:template match="mn:span[ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
|
1636
1643
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -1653,12 +1660,12 @@
|
|
1653
1660
|
</xsl:template>
|
1654
1661
|
|
1655
1662
|
<xsl:template match="mn:identifier" mode="update_xml_step1"/>
|
1656
|
-
<xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
|
1663
|
+
<!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
|
1657
1664
|
<xsl:element name="identifier" namespace="{$namespace_full}">
|
1658
1665
|
<xsl:copy-of select="@*"/>
|
1659
1666
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1660
1667
|
</xsl:element>
|
1661
|
-
</xsl:template>
|
1668
|
+
</xsl:template> -->
|
1662
1669
|
|
1663
1670
|
<xsl:template match="mn:concept" mode="update_xml_step1"/>
|
1664
1671
|
|
@@ -1668,51 +1675,53 @@
|
|
1668
1675
|
|
1669
1676
|
<xsl:template match="mn:eref" mode="update_xml_step1"/>
|
1670
1677
|
|
1671
|
-
<xsl:template match="mn:fmt-eref" mode="update_xml_step1">
|
1678
|
+
<!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
|
1672
1679
|
<xsl:element name="eref" namespace="{$namespace_full}">
|
1673
1680
|
<xsl:copy-of select="@*"/>
|
1674
1681
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1675
1682
|
</xsl:element>
|
1676
|
-
</xsl:template>
|
1683
|
+
</xsl:template> -->
|
1677
1684
|
|
1678
1685
|
<xsl:template match="mn:xref" mode="update_xml_step1"/>
|
1679
1686
|
|
1680
|
-
<xsl:template match="mn:fmt-xref" mode="update_xml_step1">
|
1687
|
+
<!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
|
1681
1688
|
<xsl:element name="xref" namespace="{$namespace_full}">
|
1682
1689
|
<xsl:copy-of select="@*"/>
|
1683
1690
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1684
1691
|
</xsl:element>
|
1685
|
-
</xsl:template>
|
1692
|
+
</xsl:template> -->
|
1686
1693
|
|
1687
1694
|
<xsl:template match="mn:link" mode="update_xml_step1"/>
|
1688
1695
|
|
1689
|
-
<xsl:template match="mn:fmt-link" mode="update_xml_step1">
|
1696
|
+
<!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
|
1690
1697
|
<xsl:element name="link" namespace="{$namespace_full}">
|
1691
1698
|
<xsl:copy-of select="@*"/>
|
1692
1699
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1693
1700
|
</xsl:element>
|
1694
|
-
</xsl:template>
|
1701
|
+
</xsl:template> -->
|
1695
1702
|
|
1696
1703
|
<xsl:template match="mn:origin" mode="update_xml_step1"/>
|
1697
1704
|
|
1698
|
-
<xsl:template match="mn:fmt-origin" mode="update_xml_step1">
|
1705
|
+
<!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
|
1699
1706
|
<xsl:element name="origin" namespace="{$namespace_full}">
|
1700
1707
|
<xsl:copy-of select="@*"/>
|
1701
1708
|
<xsl:apply-templates mode="update_xml_step1"/>
|
1702
1709
|
</xsl:element>
|
1703
|
-
</xsl:template>
|
1710
|
+
</xsl:template> -->
|
1704
1711
|
|
1705
1712
|
<xsl:template match="mn:erefstack" mode="update_xml_step1"/>
|
1706
1713
|
|
1707
1714
|
<xsl:template match="mn:svgmap" mode="update_xml_step1"/>
|
1708
1715
|
|
1709
|
-
<xsl:template match="mn:
|
1716
|
+
<xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
|
1710
1717
|
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1718
|
+
<xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
|
1719
|
+
<xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
|
1720
|
+
<xsl:value-of select="."/>
|
1721
|
+
</xsl:element>
|
1722
|
+
</xsl:template>
|
1723
|
+
|
1724
|
+
<xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
|
1716
1725
|
|
1717
1726
|
<!-- END: update new Presentation XML -->
|
1718
1727
|
|
@@ -1908,7 +1917,7 @@
|
|
1908
1917
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
1909
1918
|
<xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
|
1910
1919
|
|
1911
|
-
<xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:link[not(contains(
|
1920
|
+
<xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
1912
1921
|
|
1913
1922
|
<xsl:variable name="parent" select="local-name(..)"/>
|
1914
1923
|
|
@@ -2027,7 +2036,7 @@
|
|
2027
2036
|
</xsl:if>
|
2028
2037
|
</xsl:template>
|
2029
2038
|
|
2030
|
-
<xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
|
2039
|
+
<xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
|
2031
2040
|
<xsl:copy-of select="."/>
|
2032
2041
|
</xsl:template>
|
2033
2042
|
|
@@ -2369,7 +2378,7 @@
|
|
2369
2378
|
</fo:block>
|
2370
2379
|
</xsl:template> <!-- copyright-statement -->
|
2371
2380
|
|
2372
|
-
<xsl:template match="mn:copyright-statement//mn:title">
|
2381
|
+
<xsl:template match="mn:copyright-statement//mn:fmt-title">
|
2373
2382
|
<xsl:variable name="level">
|
2374
2383
|
<xsl:call-template name="getLevel"/>
|
2375
2384
|
</xsl:variable>
|
@@ -2398,7 +2407,7 @@
|
|
2398
2407
|
</fo:block>
|
2399
2408
|
</xsl:template> <!-- license-statement -->
|
2400
2409
|
|
2401
|
-
<xsl:template match="mn:license-statement//mn:title">
|
2410
|
+
<xsl:template match="mn:license-statement//mn:fmt-title">
|
2402
2411
|
<xsl:variable name="level">
|
2403
2412
|
<xsl:call-template name="getLevel"/>
|
2404
2413
|
</xsl:variable>
|
@@ -2426,7 +2435,7 @@
|
|
2426
2435
|
</fo:block>
|
2427
2436
|
</xsl:template> <!-- legal-statement -->
|
2428
2437
|
|
2429
|
-
<xsl:template match="mn:legal-statement//mn:title">
|
2438
|
+
<xsl:template match="mn:legal-statement//mn:fmt-title">
|
2430
2439
|
<!-- ogc-white-paper rsd -->
|
2431
2440
|
<xsl:variable name="level">
|
2432
2441
|
<xsl:call-template name="getLevel"/>
|
@@ -2459,7 +2468,7 @@
|
|
2459
2468
|
</fo:block>
|
2460
2469
|
</xsl:template> <!-- feedback-statement -->
|
2461
2470
|
|
2462
|
-
<xsl:template match="mn:feedback-statement//mn:title">
|
2471
|
+
<xsl:template match="mn:feedback-statement//mn:fmt-title">
|
2463
2472
|
<!-- process in the template 'title' -->
|
2464
2473
|
<xsl:call-template name="title"/>
|
2465
2474
|
</xsl:template>
|
@@ -2484,7 +2493,7 @@
|
|
2484
2493
|
<xsl:template name="refine_link-style">
|
2485
2494
|
</xsl:template> <!-- refine_link-style -->
|
2486
2495
|
|
2487
|
-
<xsl:template match="mn:link" name="link">
|
2496
|
+
<xsl:template match="mn:fmt-link" name="link">
|
2488
2497
|
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
2489
2498
|
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
2490
2499
|
<xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
|
@@ -2710,7 +2719,7 @@
|
|
2710
2719
|
<xsl:value-of select="."/>
|
2711
2720
|
</xsl:attribute>
|
2712
2721
|
</xsl:for-each>
|
2713
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
2722
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
2714
2723
|
</xsl:when>
|
2715
2724
|
|
2716
2725
|
<xsl:otherwise>
|
@@ -2752,11 +2761,11 @@
|
|
2752
2761
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2753
2762
|
</xsl:if>
|
2754
2763
|
|
2755
|
-
<xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
|
2764
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
|
2756
2765
|
</fo:block>
|
2757
2766
|
|
2758
2767
|
<xsl:apply-templates select="mn:dl"/> <!-- Key table -->
|
2759
|
-
<xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
|
2768
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
|
2760
2769
|
|
2761
2770
|
</fo:block-container>
|
2762
2771
|
</fo:block-container>
|
@@ -3057,7 +3066,7 @@
|
|
3057
3066
|
|
3058
3067
|
<!-- end mode="syntax_highlight" -->
|
3059
3068
|
|
3060
|
-
<xsl:template match="mn:sourcecode/mn:name">
|
3069
|
+
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
3061
3070
|
<xsl:if test="normalize-space() != ''">
|
3062
3071
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3063
3072
|
<xsl:apply-templates/>
|
@@ -3075,7 +3084,7 @@
|
|
3075
3084
|
</xsl:choose>
|
3076
3085
|
</xsl:template>
|
3077
3086
|
|
3078
|
-
<xsl:template match="mn:annotation">
|
3087
|
+
<xsl:template match="mn:callout-annotation">
|
3079
3088
|
<xsl:variable name="annotation-id" select="@id"/>
|
3080
3089
|
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
3081
3090
|
<fo:block id="{$annotation-id}" white-space="nowrap">
|
@@ -3087,7 +3096,7 @@
|
|
3087
3096
|
</fo:block>
|
3088
3097
|
</xsl:template>
|
3089
3098
|
|
3090
|
-
<xsl:template match="mn:annotation/mn:p">
|
3099
|
+
<xsl:template match="mn:callout-annotation/mn:p">
|
3091
3100
|
<xsl:param name="callout"/>
|
3092
3101
|
<fo:inline id="{@id}">
|
3093
3102
|
<xsl:call-template name="setNamedDestination"/>
|
@@ -3243,7 +3252,7 @@
|
|
3243
3252
|
<xsl:when test="starts-with(., $ace_tag) or self::mn:change-open-tag or self::mn:change-close-tag"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
|
3244
3253
|
<change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
|
3245
3254
|
<xsl:choose>
|
3246
|
-
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (
|
3255
|
+
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (parent::mn:fmt-title and preceding-sibling::node()[1][self::mn:tab]) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][self::mn:add][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
|
3247
3256
|
<xsl:otherwise>
|
3248
3257
|
<xsl:variable name="tag">
|
3249
3258
|
<xsl:call-template name="insertTag">
|
@@ -3673,12 +3682,12 @@
|
|
3673
3682
|
<xsl:template match="mn:permission">
|
3674
3683
|
<xsl:call-template name="setNamedDestination"/>
|
3675
3684
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
3676
|
-
<xsl:apply-templates select="mn:name"/>
|
3677
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
3685
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
3686
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
3678
3687
|
</fo:block>
|
3679
3688
|
</xsl:template>
|
3680
3689
|
|
3681
|
-
<xsl:template match="mn:permission/mn:name">
|
3690
|
+
<xsl:template match="mn:permission/mn:fmt-name">
|
3682
3691
|
<xsl:if test="normalize-space() != ''">
|
3683
3692
|
<fo:block xsl:use-attribute-sets="permission-name-style">
|
3684
3693
|
<xsl:apply-templates/>
|
@@ -3701,15 +3710,15 @@
|
|
3701
3710
|
<xsl:template match="mn:requirement">
|
3702
3711
|
<xsl:call-template name="setNamedDestination"/>
|
3703
3712
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
3704
|
-
<xsl:apply-templates select="mn:name"/>
|
3713
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
3705
3714
|
<xsl:apply-templates select="mn:label"/>
|
3706
3715
|
<xsl:apply-templates select="@obligation"/>
|
3707
3716
|
<xsl:apply-templates select="mn:subject"/>
|
3708
|
-
<xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:label) and not(self::mn:subject)]"/>
|
3717
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
|
3709
3718
|
</fo:block>
|
3710
3719
|
</xsl:template>
|
3711
3720
|
|
3712
|
-
<xsl:template match="mn:requirement/mn:name">
|
3721
|
+
<xsl:template match="mn:requirement/mn:fmt-name">
|
3713
3722
|
<xsl:if test="normalize-space() != ''">
|
3714
3723
|
|
3715
3724
|
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
@@ -3749,12 +3758,12 @@
|
|
3749
3758
|
<xsl:template match="mn:recommendation">
|
3750
3759
|
<xsl:call-template name="setNamedDestination"/>
|
3751
3760
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
3752
|
-
<xsl:apply-templates select="mn:name"/>
|
3753
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
3761
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
3762
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
3754
3763
|
</fo:block>
|
3755
3764
|
</xsl:template>
|
3756
3765
|
|
3757
|
-
<xsl:template match="mn:recommendation/mn:name">
|
3766
|
+
<xsl:template match="mn:recommendation/mn:fmt-name">
|
3758
3767
|
<xsl:if test="normalize-space() != ''">
|
3759
3768
|
|
3760
3769
|
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
@@ -4022,11 +4031,11 @@
|
|
4022
4031
|
|
4023
4032
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
4024
4033
|
</xsl:if>
|
4025
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
4034
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4026
4035
|
</fo:block>
|
4027
4036
|
</xsl:template>
|
4028
4037
|
|
4029
|
-
<xsl:template match="mn:term/mn:name">
|
4038
|
+
<xsl:template match="mn:term/mn:fmt-name">
|
4030
4039
|
<xsl:if test="normalize-space() != ''">
|
4031
4040
|
<!-- <xsl:variable name="level">
|
4032
4041
|
<xsl:call-template name="getLevelTermName"/>
|
@@ -4045,7 +4054,7 @@
|
|
4045
4054
|
<!-- origin -->
|
4046
4055
|
<!-- modification -->
|
4047
4056
|
<!-- ====== -->
|
4048
|
-
<xsl:template match="mn:termsource" name="termsource">
|
4057
|
+
<xsl:template match="mn:fmt-termsource" name="termsource">
|
4049
4058
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4050
4059
|
|
4051
4060
|
<xsl:call-template name="refine_termsource-style"/>
|
@@ -4084,24 +4093,24 @@
|
|
4084
4093
|
</fo:block>
|
4085
4094
|
</xsl:template>
|
4086
4095
|
|
4087
|
-
<xsl:template match="mn:termsource/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
|
4096
|
+
<xsl:template match="mn:fmt-termsource/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
|
4088
4097
|
<xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
|
4089
4098
|
</xsl:template>
|
4090
4099
|
|
4091
|
-
<xsl:template match="mn:termsource/text()">
|
4100
|
+
<xsl:template match="mn:fmt-termsource/text()">
|
4092
4101
|
<xsl:if test="normalize-space() != ''">
|
4093
4102
|
<xsl:value-of select="."/>
|
4094
4103
|
</xsl:if>
|
4095
4104
|
</xsl:template>
|
4096
4105
|
|
4097
4106
|
<!-- text SOURCE: -->
|
4098
|
-
<xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
|
4107
|
+
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
4099
4108
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
4100
4109
|
<xsl:value-of select="."/>
|
4101
4110
|
</fo:inline>
|
4102
4111
|
</xsl:template>
|
4103
4112
|
|
4104
|
-
<xsl:template match="mn:origin">
|
4113
|
+
<xsl:template match="mn:fmt-origin">
|
4105
4114
|
<xsl:call-template name="insert_basic_link">
|
4106
4115
|
<xsl:with-param name="element">
|
4107
4116
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -4147,7 +4156,7 @@
|
|
4147
4156
|
<!-- ====== -->
|
4148
4157
|
|
4149
4158
|
<!-- Preferred, admitted, deprecated -->
|
4150
|
-
<xsl:template match="mn:preferred">
|
4159
|
+
<xsl:template match="mn:fmt-preferred">
|
4151
4160
|
<xsl:variable name="level">
|
4152
4161
|
<xsl:call-template name="getLevel"/>
|
4153
4162
|
</xsl:variable>
|
@@ -4163,15 +4172,15 @@
|
|
4163
4172
|
</xsl:variable>
|
4164
4173
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
4165
4174
|
|
4166
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
|
4175
|
+
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
4167
4176
|
|
4168
4177
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
4169
4178
|
|
4170
|
-
<xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
|
4179
|
+
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
4171
4180
|
<xsl:call-template name="setIDforNamedDestination"/>
|
4172
4181
|
</xsl:for-each>
|
4173
4182
|
|
4174
|
-
<xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
|
4183
|
+
<xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
|
4175
4184
|
</fo:block>
|
4176
4185
|
</xsl:if>
|
4177
4186
|
|
@@ -4195,13 +4204,13 @@
|
|
4195
4204
|
<!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
|
4196
4205
|
<xsl:template match="mn:domain"/>
|
4197
4206
|
|
4198
|
-
<xsl:template match="mn:admitted">
|
4207
|
+
<xsl:template match="mn:fmt-admitted">
|
4199
4208
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
4200
4209
|
<xsl:apply-templates/>
|
4201
4210
|
</fo:block>
|
4202
4211
|
</xsl:template>
|
4203
4212
|
|
4204
|
-
<xsl:template match="mn:deprecates">
|
4213
|
+
<xsl:template match="mn:fmt-deprecates">
|
4205
4214
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
4206
4215
|
<xsl:apply-templates/>
|
4207
4216
|
</fo:block>
|
@@ -4215,7 +4224,7 @@
|
|
4215
4224
|
|
4216
4225
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
4217
4226
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
4218
|
-
<xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
|
4227
|
+
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
4219
4228
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
|
4220
4229
|
</xsl:template>
|
4221
4230
|
<!-- End Preferred, admitted, deprecated -->
|
@@ -4234,16 +4243,16 @@
|
|
4234
4243
|
<!-- ========== -->
|
4235
4244
|
<!-- definition -->
|
4236
4245
|
<!-- ========== -->
|
4237
|
-
<xsl:template match="mn:definition">
|
4246
|
+
<xsl:template match="mn:fmt-definition">
|
4238
4247
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
4239
4248
|
<xsl:apply-templates/>
|
4240
4249
|
</fo:block>
|
4241
4250
|
</xsl:template>
|
4242
4251
|
|
4243
|
-
<xsl:template match="mn:definition[preceding-sibling::mn:domain]">
|
4252
|
+
<xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
|
4244
4253
|
<xsl:apply-templates/>
|
4245
4254
|
</xsl:template>
|
4246
|
-
<xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
|
4255
|
+
<xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
|
4247
4256
|
<fo:inline> <xsl:apply-templates/></fo:inline>
|
4248
4257
|
<fo:block/>
|
4249
4258
|
</xsl:template>
|
@@ -4313,12 +4322,12 @@
|
|
4313
4322
|
<xsl:call-template name="refine_termexample-style"/>
|
4314
4323
|
<xsl:call-template name="setBlockSpanAll"/>
|
4315
4324
|
|
4316
|
-
<xsl:apply-templates select="mn:name"/>
|
4317
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
4325
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
4326
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4318
4327
|
</fo:block>
|
4319
4328
|
</xsl:template>
|
4320
4329
|
|
4321
|
-
<xsl:template match="mn:termexample/mn:name">
|
4330
|
+
<xsl:template match="mn:termexample/mn:fmt-name">
|
4322
4331
|
<xsl:if test="normalize-space() != ''">
|
4323
4332
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
4324
4333
|
<xsl:call-template name="refine_termexample-name-style"/>
|
@@ -4369,7 +4378,7 @@
|
|
4369
4378
|
<xsl:call-template name="refine_example-style"/>
|
4370
4379
|
|
4371
4380
|
<xsl:variable name="fo_element">
|
4372
|
-
<xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:name)][1][self::mn:sourcecode]">block</xsl:if>block
|
4381
|
+
<xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>block
|
4373
4382
|
</xsl:variable>
|
4374
4383
|
|
4375
4384
|
<fo:block-container margin-left="0mm" role="SKIP">
|
@@ -4380,7 +4389,7 @@
|
|
4380
4389
|
|
4381
4390
|
<!-- display name 'EXAMPLE' in a separate block -->
|
4382
4391
|
<fo:block>
|
4383
|
-
<xsl:apply-templates select="mn:name">
|
4392
|
+
<xsl:apply-templates select="mn:fmt-name">
|
4384
4393
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
4385
4394
|
</xsl:apply-templates>
|
4386
4395
|
</fo:block>
|
@@ -4388,7 +4397,7 @@
|
|
4388
4397
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
4389
4398
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
4390
4399
|
<xsl:variable name="example_body">
|
4391
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]">
|
4400
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
4392
4401
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
4393
4402
|
</xsl:apply-templates>
|
4394
4403
|
</xsl:variable>
|
@@ -4415,14 +4424,14 @@
|
|
4415
4424
|
<fo:list-item>
|
4416
4425
|
<fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
|
4417
4426
|
<fo:block>
|
4418
|
-
<xsl:apply-templates select="mn:name">
|
4427
|
+
<xsl:apply-templates select="mn:fmt-name">
|
4419
4428
|
<xsl:with-param name="fo_element">block</xsl:with-param>
|
4420
4429
|
</xsl:apply-templates>
|
4421
4430
|
</fo:block>
|
4422
4431
|
</fo:list-item-label>
|
4423
4432
|
<fo:list-item-body start-indent="body-start()">
|
4424
4433
|
<fo:block>
|
4425
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]">
|
4434
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
4426
4435
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
4427
4436
|
</xsl:apply-templates>
|
4428
4437
|
</fo:block>
|
@@ -4435,21 +4444,21 @@
|
|
4435
4444
|
|
4436
4445
|
<!-- display 'EXAMPLE' and first element in the same line -->
|
4437
4446
|
<fo:block>
|
4438
|
-
<xsl:apply-templates select="mn:name">
|
4447
|
+
<xsl:apply-templates select="mn:fmt-name">
|
4439
4448
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
4440
4449
|
</xsl:apply-templates>
|
4441
4450
|
<fo:inline>
|
4442
|
-
<xsl:apply-templates select="*[not(self::mn:name)][1]">
|
4451
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
|
4443
4452
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
4444
4453
|
</xsl:apply-templates>
|
4445
4454
|
</fo:inline>
|
4446
4455
|
</fo:block>
|
4447
4456
|
|
4448
|
-
<xsl:if test="*[not(self::mn:name)][position() > 1]">
|
4457
|
+
<xsl:if test="*[not(self::mn:fmt-name)][position() > 1]">
|
4449
4458
|
<!-- display further elements in blocks -->
|
4450
4459
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
4451
4460
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
4452
|
-
<xsl:apply-templates select="*[not(self::mn:name)][position() > 1]">
|
4461
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-name)][position() > 1]">
|
4453
4462
|
<xsl:with-param name="fo_element" select="'block'"/>
|
4454
4463
|
</xsl:apply-templates>
|
4455
4464
|
</fo:block-container>
|
@@ -4463,7 +4472,7 @@
|
|
4463
4472
|
</xsl:template>
|
4464
4473
|
|
4465
4474
|
<!-- example/name -->
|
4466
|
-
<xsl:template match="mn:example/mn:name">
|
4475
|
+
<xsl:template match="mn:example/mn:fmt-name">
|
4467
4476
|
<xsl:param name="fo_element">block</xsl:param>
|
4468
4477
|
|
4469
4478
|
<xsl:choose>
|
@@ -4488,7 +4497,7 @@
|
|
4488
4497
|
</xsl:template>
|
4489
4498
|
|
4490
4499
|
<!-- table/example/name, table/tfoot//example/name -->
|
4491
|
-
<xsl:template match="mn:table/mn:example/mn:name | mn:table/mn:tfoot//mn:example/mn:name">
|
4500
|
+
<xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
|
4492
4501
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
4493
4502
|
<xsl:apply-templates/>
|
4494
4503
|
</fo:inline>
|
@@ -4804,7 +4813,7 @@
|
|
4804
4813
|
|
4805
4814
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
4806
4815
|
|
4807
|
-
<xsl:for-each select="mn:name">
|
4816
|
+
<xsl:for-each select="mn:fmt-name">
|
4808
4817
|
<xsl:call-template name="setIDforNamedDestination"/>
|
4809
4818
|
</xsl:for-each>
|
4810
4819
|
|
@@ -4840,6 +4849,10 @@
|
|
4840
4849
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
4841
4850
|
</xsl:call-template>
|
4842
4851
|
|
4852
|
+
<xsl:call-template name="setTableStyles">
|
4853
|
+
<xsl:with-param name="scope">table</xsl:with-param>
|
4854
|
+
</xsl:call-template>
|
4855
|
+
|
4843
4856
|
</xsl:element>
|
4844
4857
|
</xsl:variable>
|
4845
4858
|
|
@@ -4860,7 +4873,7 @@
|
|
4860
4873
|
</xsl:attribute>
|
4861
4874
|
</xsl:for-each>
|
4862
4875
|
|
4863
|
-
<xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[
|
4876
|
+
<xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[not(parent::mn:fmt-name)] or ./mn:fmt-source"/>
|
4864
4877
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
4865
4878
|
<!-- <xsl:choose>
|
4866
4879
|
<xsl:when test="$namespace = 'plateau'"></xsl:when>
|
@@ -4916,7 +4929,7 @@
|
|
4916
4929
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
4917
4930
|
</xsl:when>
|
4918
4931
|
<xsl:otherwise>
|
4919
|
-
<xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note) and not(self::mn:example) and not(self::mn:dl) and not(self::mn:source) and not(self::mn:p) and not(self::mn:thead) and not(self::mn:tfoot) and not(self::mn:fmt-footnote-container)]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
4932
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note) and not(self::mn:example) and not(self::mn:dl) and not(self::mn:fmt-source) and not(self::mn:p) and not(self::mn:thead) and not(self::mn:tfoot) and not(self::mn:fmt-footnote-container)]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
4920
4933
|
</xsl:otherwise>
|
4921
4934
|
</xsl:choose>
|
4922
4935
|
|
@@ -4936,7 +4949,7 @@
|
|
4936
4949
|
<xsl:with-param name="colgroup" select="$colgroup"/>
|
4937
4950
|
</xsl:call-template>
|
4938
4951
|
</xsl:for-each>
|
4939
|
-
<xsl:apply-templates select="mn:name"/>
|
4952
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
4940
4953
|
|
4941
4954
|
<!-- https://github.com/metanorma/metanorma-plateau/issues/171
|
4942
4955
|
<xsl:if test="$namespace = 'plateau'">
|
@@ -5011,7 +5024,7 @@
|
|
5011
5024
|
</xsl:template>
|
5012
5025
|
|
5013
5026
|
<!-- table/name-->
|
5014
|
-
<xsl:template match="*[local-name()='table']/mn:name">
|
5027
|
+
<xsl:template match="*[local-name()='table']/mn:fmt-name">
|
5015
5028
|
<xsl:param name="continued"/>
|
5016
5029
|
<xsl:param name="cols-count"/>
|
5017
5030
|
<xsl:if test="normalize-space() != ''">
|
@@ -5076,7 +5089,7 @@
|
|
5076
5089
|
</xsl:template>
|
5077
5090
|
|
5078
5091
|
<!-- SOURCE: ... -->
|
5079
|
-
<xsl:template match="*[local-name()='table']/mn:source" priority="2">
|
5092
|
+
<xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
|
5080
5093
|
<xsl:call-template name="termsource"/>
|
5081
5094
|
</xsl:template>
|
5082
5095
|
|
@@ -5241,11 +5254,11 @@
|
|
5241
5254
|
<xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
|
5242
5255
|
</xsl:template>
|
5243
5256
|
|
5244
|
-
<xsl:template match="mn:termsource" mode="td_text">
|
5245
|
-
<xsl:value-of select="
|
5257
|
+
<xsl:template match="mn:fmt-termsource" mode="td_text">
|
5258
|
+
<xsl:value-of select="mn:fmt-origin/@citeas"/>
|
5246
5259
|
</xsl:template>
|
5247
5260
|
|
5248
|
-
<xsl:template match="mn:link" mode="td_text">
|
5261
|
+
<xsl:template match="mn:fmt-link" mode="td_text">
|
5249
5262
|
<xsl:value-of select="@target"/>
|
5250
5263
|
</xsl:template>
|
5251
5264
|
|
@@ -5447,12 +5460,12 @@
|
|
5447
5460
|
|
5448
5461
|
<xsl:call-template name="refine_table-header-title-style"/>
|
5449
5462
|
|
5450
|
-
<xsl:apply-templates select="ancestor::mn:table/mn:name">
|
5463
|
+
<xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
|
5451
5464
|
<xsl:with-param name="continued">true</xsl:with-param>
|
5452
5465
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5453
5466
|
</xsl:apply-templates>
|
5454
5467
|
|
5455
|
-
<xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
5468
|
+
<xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
5456
5469
|
<fo:block role="SKIP"/>
|
5457
5470
|
</xsl:if>
|
5458
5471
|
|
@@ -5487,7 +5500,7 @@
|
|
5487
5500
|
<xsl:param name="colwidths"/>
|
5488
5501
|
<xsl:param name="colgroup"/>
|
5489
5502
|
|
5490
|
-
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ..//mn:fn[
|
5503
|
+
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ..//mn:fn[not(parent::mn:fmt-name)] or ../mn:fmt-source or ../mn:p"/>
|
5491
5504
|
|
5492
5505
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
5493
5506
|
</xsl:variable>
|
@@ -5528,6 +5541,12 @@
|
|
5528
5541
|
</xsl:choose>
|
5529
5542
|
</xsl:for-each>
|
5530
5543
|
|
5544
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
5545
|
+
<xsl:call-template name="setTableStyles">
|
5546
|
+
<xsl:with-param name="scope">table</xsl:with-param>
|
5547
|
+
</xsl:call-template>
|
5548
|
+
</xsl:for-each>
|
5549
|
+
|
5531
5550
|
<xsl:choose>
|
5532
5551
|
<xsl:when test="xalan:nodeset($colgroup)//mn:col">
|
5533
5552
|
<xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
|
@@ -5544,10 +5563,22 @@
|
|
5544
5563
|
|
5545
5564
|
<fo:table-body role="SKIP">
|
5546
5565
|
<fo:table-row role="SKIP">
|
5566
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
5567
|
+
<xsl:call-template name="setTableStyles">
|
5568
|
+
<xsl:with-param name="scope">ancestor_table</xsl:with-param>
|
5569
|
+
</xsl:call-template>
|
5570
|
+
</xsl:for-each>
|
5571
|
+
|
5547
5572
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
|
5548
5573
|
|
5549
5574
|
<xsl:call-template name="refine_table-footer-cell-style"/>
|
5550
5575
|
|
5576
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
5577
|
+
<xsl:call-template name="setTableStyles">
|
5578
|
+
<xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
|
5579
|
+
</xsl:call-template>
|
5580
|
+
</xsl:for-each>
|
5581
|
+
|
5551
5582
|
<xsl:call-template name="setBordersTableArray"/>
|
5552
5583
|
|
5553
5584
|
<!-- fn will be processed inside 'note' processing -->
|
@@ -5555,7 +5586,7 @@
|
|
5555
5586
|
<xsl:apply-templates select="../mn:dl"/>
|
5556
5587
|
<xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
|
5557
5588
|
<xsl:apply-templates select="../mn:example"/>
|
5558
|
-
<xsl:apply-templates select="../mn:source"/>
|
5589
|
+
<xsl:apply-templates select="../mn:fmt-source"/>
|
5559
5590
|
|
5560
5591
|
<xsl:variable name="isDisplayRowSeparator">
|
5561
5592
|
</xsl:variable>
|
@@ -5744,7 +5775,12 @@
|
|
5744
5775
|
|
5745
5776
|
<xsl:template name="setTableRowAttributes">
|
5746
5777
|
|
5747
|
-
<xsl:
|
5778
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
5779
|
+
<xsl:call-template name="setTableStyles">
|
5780
|
+
<xsl:with-param name="scope">ancestor_table</xsl:with-param>
|
5781
|
+
</xsl:call-template>
|
5782
|
+
</xsl:for-each>
|
5783
|
+
<xsl:call-template name="setTableStyles"/>
|
5748
5784
|
|
5749
5785
|
</xsl:template> <!-- setTableRowAttributes -->
|
5750
5786
|
<!-- ===================== -->
|
@@ -5797,7 +5833,13 @@
|
|
5797
5833
|
</xsl:attribute>
|
5798
5834
|
</xsl:if>
|
5799
5835
|
<xsl:call-template name="display-align"/>
|
5800
|
-
|
5836
|
+
|
5837
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
5838
|
+
<xsl:call-template name="setTableStyles">
|
5839
|
+
<xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
|
5840
|
+
</xsl:call-template>
|
5841
|
+
</xsl:for-each>
|
5842
|
+
<xsl:call-template name="setTableStyles"/>
|
5801
5843
|
</xsl:template>
|
5802
5844
|
|
5803
5845
|
<xsl:template name="display-align">
|
@@ -5813,7 +5855,8 @@
|
|
5813
5855
|
</xsl:if>
|
5814
5856
|
</xsl:template>
|
5815
5857
|
|
5816
|
-
<xsl:template name="
|
5858
|
+
<xsl:template name="setTableStyles">
|
5859
|
+
<xsl:param name="scope">cell</xsl:param>
|
5817
5860
|
<xsl:variable name="styles__">
|
5818
5861
|
<xsl:call-template name="split">
|
5819
5862
|
<xsl:with-param name="pText" select="concat(@style,';')"/>
|
@@ -5822,19 +5865,35 @@
|
|
5822
5865
|
</xsl:variable>
|
5823
5866
|
<xsl:variable name="quot">"</xsl:variable>
|
5824
5867
|
<xsl:variable name="styles_">
|
5868
|
+
<!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
|
5869
|
+
<xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
|
5870
|
+
<style name="border-top">none</style>
|
5871
|
+
<style name="border-right">none</style>
|
5872
|
+
<style name="border-left">none</style>
|
5873
|
+
<style name="border-bottom">none</style>
|
5874
|
+
<style name="color">inherit</style>
|
5875
|
+
<style name="background-color">transparent</style>
|
5876
|
+
</xsl:if>
|
5877
|
+
|
5825
5878
|
<xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
|
5826
5879
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
5827
5880
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
5828
|
-
<xsl:if test="$key = 'color' or $key = 'background-color' or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
|
5881
|
+
<xsl:if test="($key = 'color' and ($scope = 'cell' or $scope = 'table')) or ($key = 'background-color' and ($scope = 'cell' or $scope = 'ancestor_table')) or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
|
5829
5882
|
<style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
|
5830
5883
|
</xsl:if>
|
5884
|
+
<xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
|
5885
|
+
<style name="{$key}-top"><xsl:value-of select="$value"/></style>
|
5886
|
+
<style name="{$key}-right"><xsl:value-of select="$value"/></style>
|
5887
|
+
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
5888
|
+
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
5889
|
+
</xsl:if>
|
5831
5890
|
</xsl:for-each>
|
5832
5891
|
</xsl:variable>
|
5833
5892
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
5834
5893
|
<xsl:for-each select="$styles/style">
|
5835
5894
|
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
5836
5895
|
</xsl:for-each>
|
5837
|
-
</xsl:template> <!--
|
5896
|
+
</xsl:template> <!-- setTableStyles -->
|
5838
5897
|
|
5839
5898
|
<!-- cell in table body, footer -->
|
5840
5899
|
<xsl:template match="*[local-name()='td']" name="td">
|
@@ -5898,11 +5957,11 @@
|
|
5898
5957
|
|
5899
5958
|
<xsl:call-template name="refine_table-note-name-style"/>
|
5900
5959
|
|
5901
|
-
<xsl:apply-templates select="mn:name"/>
|
5960
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
5902
5961
|
|
5903
5962
|
</fo:inline>
|
5904
5963
|
|
5905
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
5964
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
5906
5965
|
</fo:block>
|
5907
5966
|
</xsl:template> <!-- table/note -->
|
5908
5967
|
|
@@ -6041,7 +6100,7 @@
|
|
6041
6100
|
|
6042
6101
|
<!-- footnotes for table's name rendering -->
|
6043
6102
|
<xsl:template name="table_name_fn_display">
|
6044
|
-
<xsl:for-each select="mn:name//mn:fn">
|
6103
|
+
<xsl:for-each select="mn:fmt-name//mn:fn">
|
6045
6104
|
<xsl:variable name="reference" select="@reference"/>
|
6046
6105
|
<fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
|
6047
6106
|
<fo:block margin-bottom="12pt">
|
@@ -6698,7 +6757,7 @@
|
|
6698
6757
|
</xsl:if> -->
|
6699
6758
|
|
6700
6759
|
<xsl:variable name="words">
|
6701
|
-
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
|
6760
|
+
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
|
6702
6761
|
<word>
|
6703
6762
|
<xsl:copy-of select="."/>
|
6704
6763
|
</word>
|
@@ -6757,7 +6816,7 @@
|
|
6757
6816
|
</xsl:copy>
|
6758
6817
|
</xsl:template>
|
6759
6818
|
|
6760
|
-
<xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
|
6819
|
+
<xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
|
6761
6820
|
|
6762
6821
|
<xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
|
6763
6822
|
<xsl:variable name="formatting_tags">
|
@@ -6792,7 +6851,7 @@
|
|
6792
6851
|
</xsl:call-template>
|
6793
6852
|
</xsl:template>
|
6794
6853
|
|
6795
|
-
<xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
|
6854
|
+
<xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
|
6796
6855
|
<xsl:variable name="link">
|
6797
6856
|
<link_updated>
|
6798
6857
|
<xsl:variable name="target_text">
|
@@ -7008,7 +7067,7 @@
|
|
7008
7067
|
|
7009
7068
|
<xsl:call-template name="refine_multicomponent_block_style"/>
|
7010
7069
|
|
7011
|
-
<xsl:apply-templates select="mn:name">
|
7070
|
+
<xsl:apply-templates select="mn:fmt-name">
|
7012
7071
|
<xsl:with-param name="process">true</xsl:with-param>
|
7013
7072
|
</xsl:apply-templates>
|
7014
7073
|
|
@@ -7191,7 +7250,7 @@
|
|
7191
7250
|
</xsl:template> <!-- refine_multicomponent_block_style -->
|
7192
7251
|
|
7193
7252
|
<!-- dl/name -->
|
7194
|
-
<xsl:template match="mn:dl/mn:name">
|
7253
|
+
<xsl:template match="mn:dl/mn:fmt-name">
|
7195
7254
|
<xsl:param name="process">false</xsl:param>
|
7196
7255
|
<xsl:if test="$process = 'true'">
|
7197
7256
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
@@ -7609,12 +7668,12 @@
|
|
7609
7668
|
<xsl:template match="mn:appendix">
|
7610
7669
|
<xsl:call-template name="setNamedDestination"/>
|
7611
7670
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
7612
|
-
<xsl:apply-templates select="mn:title"/>
|
7671
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
7613
7672
|
</fo:block>
|
7614
|
-
<xsl:apply-templates select="node()[not(
|
7673
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
7615
7674
|
</xsl:template>
|
7616
7675
|
|
7617
|
-
<xsl:template match="mn:appendix/mn:title" priority="2">
|
7676
|
+
<xsl:template match="mn:appendix/mn:fmt-title" priority="2">
|
7618
7677
|
<xsl:variable name="level">
|
7619
7678
|
<xsl:call-template name="getLevel"/>
|
7620
7679
|
</xsl:variable>
|
@@ -7627,9 +7686,9 @@
|
|
7627
7686
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
7628
7687
|
<xsl:call-template name="setNamedDestination"/>
|
7629
7688
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
7630
|
-
<xsl:apply-templates select="mn:name"/>
|
7689
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
7631
7690
|
</fo:block>
|
7632
|
-
<xsl:apply-templates select="node()[not(
|
7691
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
7633
7692
|
</xsl:template>
|
7634
7693
|
|
7635
7694
|
<xsl:attribute-set name="xref-style">
|
@@ -7637,7 +7696,7 @@
|
|
7637
7696
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
7638
7697
|
</xsl:attribute-set>
|
7639
7698
|
|
7640
|
-
<xsl:template match="mn:xref">
|
7699
|
+
<xsl:template match="mn:fmt-xref">
|
7641
7700
|
<xsl:call-template name="insert_basic_link">
|
7642
7701
|
<xsl:with-param name="element">
|
7643
7702
|
<xsl:variable name="alt_text">
|
@@ -7657,7 +7716,7 @@
|
|
7657
7716
|
</xsl:template> <!-- xref -->
|
7658
7717
|
|
7659
7718
|
<!-- command between two xref points to non-standard bibitem -->
|
7660
|
-
<xsl:template match="text()[. = ','][preceding-sibling::node()[1][self::mn:sup][mn:xref[@type = 'footnote']] and following-sibling::node()[1][self::mn:sup][mn:xref[@type = 'footnote']]]"><xsl:value-of select="."/>
|
7719
|
+
<xsl:template match="text()[. = ','][preceding-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']] and following-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']]]"><xsl:value-of select="."/>
|
7661
7720
|
</xsl:template>
|
7662
7721
|
|
7663
7722
|
<xsl:attribute-set name="eref-style">
|
@@ -7690,7 +7749,7 @@
|
|
7690
7749
|
<!-- ====== -->
|
7691
7750
|
<!-- eref -->
|
7692
7751
|
<!-- ====== -->
|
7693
|
-
<xsl:template match="mn:eref" name="eref">
|
7752
|
+
<xsl:template match="mn:fmt-eref" name="eref">
|
7694
7753
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
7695
7754
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
|
7696
7755
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
|
@@ -7821,7 +7880,10 @@
|
|
7821
7880
|
|
7822
7881
|
<xsl:call-template name="setNamedDestination"/>
|
7823
7882
|
|
7824
|
-
<fo:block-container
|
7883
|
+
<fo:block-container xsl:use-attribute-sets="note-style" role="SKIP">
|
7884
|
+
<xsl:if test="not(parent::mn:references)">
|
7885
|
+
<xsl:copy-of select="@id"/>
|
7886
|
+
</xsl:if>
|
7825
7887
|
|
7826
7888
|
<xsl:call-template name="setBlockSpanAll"/>
|
7827
7889
|
|
@@ -7834,28 +7896,28 @@
|
|
7834
7896
|
|
7835
7897
|
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
7836
7898
|
|
7837
|
-
<xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
|
7899
|
+
<xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
|
7838
7900
|
|
7839
7901
|
<xsl:call-template name="refine_note-name-style"/>
|
7840
7902
|
|
7841
7903
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7842
7904
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
7843
|
-
<xsl:if test="*[not(
|
7905
|
+
<xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
|
7844
7906
|
<xsl:call-template name="append_add-style"/>
|
7845
7907
|
</xsl:if>
|
7846
7908
|
|
7847
7909
|
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
7848
|
-
<xsl:if test="count(*[not(self::mn:name)]) = 1 and *[not(self::mn:name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
|
7849
|
-
<xsl:apply-templates select="*[not(self::mn:name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
|
7910
|
+
<xsl:if test="count(*[not(self::mn:fmt-name)]) = 1 and *[not(self::mn:fmt-name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
|
7911
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
|
7850
7912
|
<xsl:with-param name="skip">false</xsl:with-param>
|
7851
7913
|
</xsl:apply-templates>
|
7852
7914
|
</xsl:if>
|
7853
7915
|
|
7854
|
-
<xsl:apply-templates select="mn:name"/>
|
7916
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
7855
7917
|
|
7856
7918
|
</fo:inline>
|
7857
7919
|
|
7858
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
7920
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
7859
7921
|
</fo:block>
|
7860
7922
|
</fo:block-container>
|
7861
7923
|
</fo:block-container>
|
@@ -7894,19 +7956,19 @@
|
|
7894
7956
|
|
7895
7957
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7896
7958
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
7897
|
-
<xsl:if test="*[not(
|
7959
|
+
<xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
|
7898
7960
|
<xsl:call-template name="append_add-style"/>
|
7899
7961
|
</xsl:if>
|
7900
7962
|
|
7901
|
-
<xsl:apply-templates select="mn:name"/>
|
7963
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
7902
7964
|
|
7903
7965
|
</fo:inline>
|
7904
7966
|
|
7905
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
7967
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
7906
7968
|
</fo:block>
|
7907
7969
|
</xsl:template>
|
7908
7970
|
|
7909
|
-
<xsl:template match="mn:note/mn:name">
|
7971
|
+
<xsl:template match="mn:note/mn:fmt-name">
|
7910
7972
|
<xsl:param name="sfx"/>
|
7911
7973
|
<xsl:variable name="suffix">
|
7912
7974
|
<xsl:choose>
|
@@ -7933,7 +7995,7 @@
|
|
7933
7995
|
</xsl:if>
|
7934
7996
|
</xsl:template>
|
7935
7997
|
|
7936
|
-
<xsl:template match="mn:termnote/mn:name">
|
7998
|
+
<xsl:template match="mn:termnote/mn:fmt-name">
|
7937
7999
|
<xsl:param name="sfx"/>
|
7938
8000
|
<xsl:variable name="suffix">
|
7939
8001
|
<xsl:choose>
|
@@ -8016,15 +8078,15 @@
|
|
8016
8078
|
|
8017
8079
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
8018
8080
|
<fo:block role="BlockQuote">
|
8019
|
-
<xsl:apply-templates select="./node()[not(self::mn:author) and not(self::mn:source) and not(self::mn:attribution)]"/> <!-- process all nested nodes, except author and source -->
|
8081
|
+
<xsl:apply-templates select="./node()[not(self::mn:author) and not(self::mn:fmt-source) and not(self::mn:attribution)]"/> <!-- process all nested nodes, except author and source -->
|
8020
8082
|
</fo:block>
|
8021
8083
|
</fo:block-container>
|
8022
8084
|
</fo:block-container>
|
8023
|
-
<xsl:if test="mn:author or mn:source or mn:attribution">
|
8085
|
+
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
8024
8086
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
8025
8087
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
8026
8088
|
<xsl:apply-templates select="mn:author"/>
|
8027
|
-
<xsl:apply-templates select="mn:source"/>
|
8089
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
8028
8090
|
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
8029
8091
|
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
8030
8092
|
</fo:block>
|
@@ -8034,17 +8096,32 @@
|
|
8034
8096
|
</fo:block-container>
|
8035
8097
|
</xsl:template>
|
8036
8098
|
|
8037
|
-
<xsl:template match="mn:source">
|
8099
|
+
<xsl:template match="mn:fmt-source">
|
8038
8100
|
<xsl:if test="../mn:author">
|
8039
8101
|
<xsl:text>, </xsl:text>
|
8040
8102
|
</xsl:if>
|
8041
|
-
<xsl:
|
8042
|
-
<xsl:
|
8043
|
-
<fo:
|
8044
|
-
<xsl:
|
8045
|
-
|
8046
|
-
|
8047
|
-
|
8103
|
+
<xsl:choose>
|
8104
|
+
<xsl:when test="not(parent::quote)">
|
8105
|
+
<fo:block>
|
8106
|
+
<xsl:call-template name="insert_basic_link">
|
8107
|
+
<xsl:with-param name="element">
|
8108
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
8109
|
+
<xsl:apply-templates/>
|
8110
|
+
</fo:basic-link>
|
8111
|
+
</xsl:with-param>
|
8112
|
+
</xsl:call-template>
|
8113
|
+
</fo:block>
|
8114
|
+
</xsl:when>
|
8115
|
+
<xsl:otherwise>
|
8116
|
+
<xsl:call-template name="insert_basic_link">
|
8117
|
+
<xsl:with-param name="element">
|
8118
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
8119
|
+
<xsl:apply-templates/>
|
8120
|
+
</fo:basic-link>
|
8121
|
+
</xsl:with-param>
|
8122
|
+
</xsl:call-template>
|
8123
|
+
</xsl:otherwise>
|
8124
|
+
</xsl:choose>
|
8048
8125
|
</xsl:template>
|
8049
8126
|
|
8050
8127
|
<xsl:template match="mn:author">
|
@@ -8125,7 +8202,7 @@
|
|
8125
8202
|
<ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
|
8126
8203
|
<xsl:choose>
|
8127
8204
|
<!-- skip figure/name/fn -->
|
8128
|
-
<xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
|
8205
|
+
<xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
|
8129
8206
|
<xsl:otherwise>
|
8130
8207
|
<xsl:element name="figure" namespace="{$namespace_full}">
|
8131
8208
|
<xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
|
@@ -8321,17 +8398,17 @@
|
|
8321
8398
|
|
8322
8399
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
8323
8400
|
|
8324
|
-
<xsl:for-each select="mn:name"> <!-- set context -->
|
8401
|
+
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
8325
8402
|
<xsl:call-template name="setIDforNamedDestination"/>
|
8326
8403
|
</xsl:for-each>
|
8327
8404
|
|
8328
|
-
<xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
|
8405
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
|
8329
8406
|
</fo:block>
|
8330
8407
|
|
8331
8408
|
<xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
|
8332
8409
|
<xsl:call-template name="showFigureKey"/>
|
8333
8410
|
</xsl:if>
|
8334
|
-
<xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
|
8411
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
|
8335
8412
|
|
8336
8413
|
</fo:block-container>
|
8337
8414
|
</xsl:template>
|
@@ -8357,9 +8434,9 @@
|
|
8357
8434
|
<xsl:template match="mn:figure[@class = 'pseudocode']">
|
8358
8435
|
<xsl:call-template name="setNamedDestination"/>
|
8359
8436
|
<fo:block id="{@id}">
|
8360
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
8437
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
8361
8438
|
</fo:block>
|
8362
|
-
<xsl:apply-templates select="mn:name"/>
|
8439
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
8363
8440
|
</xsl:template>
|
8364
8441
|
|
8365
8442
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
@@ -8370,7 +8447,7 @@
|
|
8370
8447
|
|
8371
8448
|
<!-- SOURCE: ... -->
|
8372
8449
|
<!-- figure/source -->
|
8373
|
-
<xsl:template match="mn:figure/mn:source" priority="2">
|
8450
|
+
<xsl:template match="mn:figure/mn:fmt-source" priority="2">
|
8374
8451
|
<xsl:call-template name="termsource"/>
|
8375
8452
|
</xsl:template>
|
8376
8453
|
|
@@ -8380,7 +8457,7 @@
|
|
8380
8457
|
<xsl:variable name="isAdded" select="../@added"/>
|
8381
8458
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
8382
8459
|
<xsl:choose>
|
8383
|
-
<xsl:when test="ancestor::mn:title or not(parent::mn:figure) or parent::mn:p"> <!-- inline image ( 'image:path' in adoc, with one colon after image) -->
|
8460
|
+
<xsl:when test="ancestor::mn:fmt-title or not(parent::mn:figure) or parent::mn:p"> <!-- inline image ( 'image:path' in adoc, with one colon after image) -->
|
8384
8461
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
8385
8462
|
<xsl:if test="not(parent::mn:figure) or parent::mn:p">
|
8386
8463
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -8401,13 +8478,26 @@
|
|
8401
8478
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
|
8402
8479
|
|
8403
8480
|
<xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
|
8404
|
-
<xsl:attribute name="
|
8481
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
8482
|
+
<xsl:choose>
|
8483
|
+
<xsl:when test="@width and not(@height)">
|
8484
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
8485
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
8486
|
+
</xsl:when>
|
8487
|
+
<xsl:when test="@height and not(@width)">
|
8488
|
+
<xsl:attribute name="height">100%</xsl:attribute>
|
8489
|
+
<xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
|
8490
|
+
</xsl:when>
|
8491
|
+
<xsl:when test="not(@width) and not(@height)">
|
8492
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
8493
|
+
</xsl:when>
|
8494
|
+
</xsl:choose>
|
8495
|
+
|
8405
8496
|
<xsl:if test="normalize-space($logo_width) != ''">
|
8406
8497
|
<xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
|
8407
8498
|
</xsl:if>
|
8408
|
-
<xsl:attribute name="content-height">100%</xsl:attribute>
|
8409
8499
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
8410
|
-
<xsl:attribute name="
|
8500
|
+
<xsl:attribute name="vertical-align">top</xsl:attribute>
|
8411
8501
|
</xsl:if>
|
8412
8502
|
|
8413
8503
|
<xsl:variable name="width">
|
@@ -8696,7 +8786,7 @@
|
|
8696
8786
|
<xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
|
8697
8787
|
<xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
|
8698
8788
|
|
8699
|
-
<xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
|
8789
|
+
<xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
|
8700
8790
|
<xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
|
8701
8791
|
<xsl:param name="name"/>
|
8702
8792
|
|
@@ -8706,8 +8796,8 @@
|
|
8706
8796
|
|
8707
8797
|
<xsl:variable name="alt-text">
|
8708
8798
|
<xsl:choose>
|
8709
|
-
<xsl:when test="normalize-space(../mn:name) != ''">
|
8710
|
-
<xsl:value-of select="../mn:name"/>
|
8799
|
+
<xsl:when test="normalize-space(../mn:fmt-name) != ''">
|
8800
|
+
<xsl:value-of select="../mn:fmt-name"/>
|
8711
8801
|
</xsl:when>
|
8712
8802
|
<xsl:when test="normalize-space($name) != ''">
|
8713
8803
|
<xsl:value-of select="$name"/>
|
@@ -8716,7 +8806,7 @@
|
|
8716
8806
|
</xsl:choose>
|
8717
8807
|
</xsl:variable>
|
8718
8808
|
|
8719
|
-
<xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
|
8809
|
+
<xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
|
8720
8810
|
|
8721
8811
|
<xsl:choose>
|
8722
8812
|
<xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
|
@@ -8765,9 +8855,9 @@
|
|
8765
8855
|
<fo:table-cell column-number="2">
|
8766
8856
|
<fo:block>
|
8767
8857
|
<fo:block-container width="{$width_scale}px" height="{$height_scale}px">
|
8768
|
-
<xsl:if test="../mn:name/mn:bookmark">
|
8858
|
+
<xsl:if test="../mn:fmt-name/mn:bookmark">
|
8769
8859
|
<fo:block line-height="0" font-size="0">
|
8770
|
-
<xsl:for-each select="../mn:name/mn:bookmark">
|
8860
|
+
<xsl:for-each select="../mn:fmt-name/mn:bookmark">
|
8771
8861
|
<xsl:call-template name="bookmark"/>
|
8772
8862
|
</xsl:for-each>
|
8773
8863
|
</fo:block>
|
@@ -9007,7 +9097,7 @@
|
|
9007
9097
|
|
9008
9098
|
<!-- image with svg and emf -->
|
9009
9099
|
<xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
|
9010
|
-
<xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
|
9100
|
+
<xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
|
9011
9101
|
<xsl:for-each select="*[local-name() = 'svg']">
|
9012
9102
|
<xsl:call-template name="image_svg">
|
9013
9103
|
<xsl:with-param name="name" select="$name"/>
|
@@ -9024,7 +9114,7 @@
|
|
9024
9114
|
|
9025
9115
|
<xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
9026
9116
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
9027
|
-
<xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
|
9117
|
+
<xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
|
9028
9118
|
<xsl:for-each select="xalan:nodeset($svg_content)/node()">
|
9029
9119
|
<xsl:call-template name="image_svg">
|
9030
9120
|
<xsl:with-param name="name" select="$name"/>
|
@@ -9147,7 +9237,7 @@
|
|
9147
9237
|
<xsl:template match="mn:emf"/>
|
9148
9238
|
|
9149
9239
|
<!-- figure/name -->
|
9150
|
-
<xsl:template match="mn:figure/mn:name | mn:image/mn:name">
|
9240
|
+
<xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
|
9151
9241
|
<xsl:if test="normalize-space() != ''">
|
9152
9242
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
9153
9243
|
|
@@ -9219,25 +9309,25 @@
|
|
9219
9309
|
<fo:block-container margin-left="0mm" role="SKIP">
|
9220
9310
|
<xsl:call-template name="setNamedDestination"/>
|
9221
9311
|
<fo:block id="{@id}">
|
9222
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
|
9312
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
|
9223
9313
|
</fo:block>
|
9224
9314
|
</fo:block-container>
|
9225
9315
|
</fo:block-container>
|
9226
9316
|
</xsl:template>
|
9227
9317
|
|
9228
|
-
<xsl:template match="mn:formula/mn:dt/mn:stem">
|
9318
|
+
<xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
|
9229
9319
|
<fo:inline>
|
9230
9320
|
<xsl:apply-templates/>
|
9231
9321
|
</fo:inline>
|
9232
9322
|
</xsl:template>
|
9233
9323
|
|
9234
|
-
<xsl:template match="mn:admitted/mn:stem">
|
9324
|
+
<xsl:template match="mn:fmt-admitted/mn:fmt-stem">
|
9235
9325
|
<fo:inline>
|
9236
9326
|
<xsl:apply-templates/>
|
9237
9327
|
</fo:inline>
|
9238
9328
|
</xsl:template>
|
9239
9329
|
|
9240
|
-
<xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
|
9330
|
+
<xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
|
9241
9331
|
<!-- https://github.com/metanorma/isodoc/issues/607
|
9242
9332
|
<xsl:if test="normalize-space() != ''">
|
9243
9333
|
<xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
|
@@ -9246,7 +9336,7 @@
|
|
9246
9336
|
</xsl:template>
|
9247
9337
|
|
9248
9338
|
<!-- stem inside formula with name (with formula's number) -->
|
9249
|
-
<xsl:template match="mn:formula[mn:name]/mn:stem">
|
9339
|
+
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
9250
9340
|
<fo:block xsl:use-attribute-sets="formula-style">
|
9251
9341
|
|
9252
9342
|
<fo:table table-layout="fixed" width="100%">
|
@@ -9266,13 +9356,13 @@
|
|
9266
9356
|
|
9267
9357
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
9268
9358
|
|
9269
|
-
<xsl:for-each select="../mn:name">
|
9359
|
+
<xsl:for-each select="../mn:fmt-name">
|
9270
9360
|
<xsl:call-template name="setIDforNamedDestination"/>
|
9271
9361
|
</xsl:for-each>
|
9272
9362
|
|
9273
9363
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
9274
9364
|
|
9275
|
-
<xsl:apply-templates select="../mn:name"/>
|
9365
|
+
<xsl:apply-templates select="../mn:fmt-name"/>
|
9276
9366
|
</fo:block>
|
9277
9367
|
</fo:table-cell>
|
9278
9368
|
</fo:table-row>
|
@@ -9282,7 +9372,7 @@
|
|
9282
9372
|
</xsl:template>
|
9283
9373
|
|
9284
9374
|
<!-- stem inside formula without name (without formula's number) -->
|
9285
|
-
<xsl:template match="mn:formula[not(mn:name)]/mn:stem">
|
9375
|
+
<xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
|
9286
9376
|
<fo:block xsl:use-attribute-sets="formula-style">
|
9287
9377
|
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
9288
9378
|
<xsl:apply-templates/>
|
@@ -9636,7 +9726,7 @@
|
|
9636
9726
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
9637
9727
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
|
9638
9728
|
-->
|
9639
|
-
<xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
|
9729
|
+
<xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
|
9640
9730
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
9641
9731
|
|
9642
9732
|
<xsl:call-template name="refine_mathml-style"/>
|
@@ -9903,7 +9993,7 @@
|
|
9903
9993
|
|
9904
9994
|
<xsl:template match="mn:ul | mn:ol" mode="list" name="list">
|
9905
9995
|
|
9906
|
-
<xsl:apply-templates select="mn:name">
|
9996
|
+
<xsl:apply-templates select="mn:fmt-name">
|
9907
9997
|
<xsl:with-param name="process">true</xsl:with-param>
|
9908
9998
|
</xsl:apply-templates>
|
9909
9999
|
|
@@ -9949,7 +10039,7 @@
|
|
9949
10039
|
|
9950
10040
|
<xsl:call-template name="refine_list-style"/>
|
9951
10041
|
|
9952
|
-
<xsl:if test="mn:name">
|
10042
|
+
<xsl:if test="mn:fmt-name">
|
9953
10043
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
9954
10044
|
</xsl:if>
|
9955
10045
|
|
@@ -9964,7 +10054,7 @@
|
|
9964
10054
|
<xsl:template name="refine_list-style_provisional-distance-between-starts">
|
9965
10055
|
</xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
|
9966
10056
|
|
9967
|
-
<xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
|
10057
|
+
<xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
|
9968
10058
|
<xsl:param name="process">false</xsl:param>
|
9969
10059
|
<xsl:if test="$process = 'true'">
|
9970
10060
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
@@ -10096,7 +10186,7 @@
|
|
10096
10186
|
-->
|
10097
10187
|
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
10098
10188
|
<!-- fn in text -->
|
10099
|
-
<xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" priority="2" name="fn">
|
10189
|
+
<xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" priority="2" name="fn">
|
10100
10190
|
<xsl:param name="footnote_body_from_table">false</xsl:param>
|
10101
10191
|
|
10102
10192
|
<!-- list of unique footnotes -->
|
@@ -10220,7 +10310,7 @@
|
|
10220
10310
|
<!-- commented:
|
10221
10311
|
.//mn:bibitem[ancestor::mn:references]/mn:note |
|
10222
10312
|
because 'fn' there is in biblio-tag -->
|
10223
|
-
<xsl:for-each select=".//mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
10313
|
+
<xsl:for-each select=".//mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
10224
10314
|
<!-- copy unique fn -->
|
10225
10315
|
<fn gen_id="{generate-id(.)}">
|
10226
10316
|
<xsl:copy-of select="@*"/>
|
@@ -10305,7 +10395,7 @@
|
|
10305
10395
|
<xsl:call-template name="displayAdmonitionName"/>
|
10306
10396
|
</fo:block>
|
10307
10397
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
10308
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
10398
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
10309
10399
|
</fo:block>
|
10310
10400
|
|
10311
10401
|
</fo:block-container>
|
@@ -10331,7 +10421,7 @@
|
|
10331
10421
|
</xsl:otherwise>
|
10332
10422
|
</xsl:choose> -->
|
10333
10423
|
<xsl:variable name="name">
|
10334
|
-
<xsl:apply-templates select="mn:name"/>
|
10424
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
10335
10425
|
</xsl:variable>
|
10336
10426
|
<xsl:copy-of select="$name"/>
|
10337
10427
|
<xsl:if test="normalize-space($name) != ''">
|
@@ -10339,7 +10429,7 @@
|
|
10339
10429
|
</xsl:if>
|
10340
10430
|
</xsl:template>
|
10341
10431
|
|
10342
|
-
<xsl:template match="mn:admonition/mn:name">
|
10432
|
+
<xsl:template match="mn:admonition/mn:fmt-name">
|
10343
10433
|
<xsl:apply-templates/>
|
10344
10434
|
</xsl:template>
|
10345
10435
|
|
@@ -10464,10 +10554,10 @@
|
|
10464
10554
|
<xsl:call-template name="setNamedDestination"/>
|
10465
10555
|
<fo:block id="{@id}"/>
|
10466
10556
|
|
10467
|
-
<xsl:apply-templates select="mn:title[@columns = 1]"/>
|
10557
|
+
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
10468
10558
|
|
10469
10559
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
10470
|
-
<xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
|
10560
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
10471
10561
|
</fo:block>
|
10472
10562
|
</xsl:template> <!-- references -->
|
10473
10563
|
|
@@ -10486,8 +10576,8 @@
|
|
10486
10576
|
</xsl:template> <!-- bibitem -->
|
10487
10577
|
|
10488
10578
|
<!-- Bibliography (non-normative references) -->
|
10489
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
10490
|
-
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
10579
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
|
10580
|
+
<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 --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
10491
10581
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
10492
10582
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
10493
10583
|
<xsl:call-template name="setNamedDestination"/>
|
@@ -10539,7 +10629,7 @@
|
|
10539
10629
|
</fo:list-item>
|
10540
10630
|
</xsl:otherwise>
|
10541
10631
|
</xsl:choose>
|
10542
|
-
<xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]
|
10632
|
+
<xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
|
10543
10633
|
<xsl:with-param name="skip">false</xsl:with-param>
|
10544
10634
|
</xsl:apply-templates>
|
10545
10635
|
</xsl:template>
|
@@ -10556,8 +10646,26 @@
|
|
10556
10646
|
</xsl:apply-templates>
|
10557
10647
|
<xsl:apply-templates select="mn:formattedref"/>
|
10558
10648
|
<!-- end bibitem processing -->
|
10649
|
+
|
10650
|
+
<xsl:call-template name="processBibliographyNote"/>
|
10559
10651
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
10560
10652
|
|
10653
|
+
<xsl:template name="processBibliographyNote">
|
10654
|
+
<xsl:if test="self::mn:note">
|
10655
|
+
<xsl:variable name="note_node">
|
10656
|
+
<xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
|
10657
|
+
<xsl:copy> <!-- skip @id -->
|
10658
|
+
<xsl:copy-of select="node()"/>
|
10659
|
+
</xsl:copy>
|
10660
|
+
</xsl:element>
|
10661
|
+
</xsl:variable>
|
10662
|
+
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
10663
|
+
<xsl:call-template name="note"/>
|
10664
|
+
</xsl:for-each> -->
|
10665
|
+
<xsl:call-template name="note"/>
|
10666
|
+
</xsl:if>
|
10667
|
+
</xsl:template>
|
10668
|
+
|
10561
10669
|
<xsl:template match="mn:title" mode="title">
|
10562
10670
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
10563
10671
|
</xsl:template>
|
@@ -10783,7 +10891,8 @@
|
|
10783
10891
|
</xsl:copy>
|
10784
10892
|
</xsl:template>
|
10785
10893
|
|
10786
|
-
<xsl:template match="mn:xref" mode="index_add_id"
|
10894
|
+
<xsl:template match="mn:xref" mode="index_add_id"/>
|
10895
|
+
<xsl:template match="mn:fmt-xref" mode="index_add_id">
|
10787
10896
|
<xsl:param name="docid"/>
|
10788
10897
|
<xsl:variable name="id">
|
10789
10898
|
<xsl:call-template name="generateIndexXrefId">
|
@@ -10825,7 +10934,7 @@
|
|
10825
10934
|
<xsl:template match="mn:indexsect//mn:li" mode="index_update">
|
10826
10935
|
<xsl:copy>
|
10827
10936
|
<xsl:apply-templates select="@*" mode="index_update"/>
|
10828
|
-
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
10937
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
|
10829
10938
|
</xsl:copy>
|
10830
10939
|
</xsl:template>
|
10831
10940
|
|
@@ -10846,11 +10955,11 @@
|
|
10846
10955
|
<xsl:value-of select="."/>
|
10847
10956
|
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
10848
10957
|
</xsl:when>
|
10849
|
-
<xsl:when test="self::* and local-name(.) = 'xref'">
|
10958
|
+
<xsl:when test="self::* and local-name(.) = 'fmt-xref'">
|
10850
10959
|
<xsl:variable name="id" select="@id"/>
|
10851
10960
|
|
10852
|
-
<xsl:variable name="id_next" select="following-sibling::mn:xref[1]/@id"/>
|
10853
|
-
<xsl:variable name="id_prev" select="preceding-sibling::mn:xref[1]/@id"/>
|
10961
|
+
<xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
|
10962
|
+
<xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
|
10854
10963
|
|
10855
10964
|
<xsl:variable name="pages_">
|
10856
10965
|
<xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
|
@@ -10946,18 +11055,18 @@
|
|
10946
11055
|
<xsl:variable name="item_number">
|
10947
11056
|
<xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
|
10948
11057
|
</xsl:variable>
|
10949
|
-
<xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
|
11058
|
+
<xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
|
10950
11059
|
<xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
10951
11060
|
</xsl:template>
|
10952
11061
|
|
10953
|
-
<xsl:template match="mn:indexsect/mn:title" priority="4">
|
11062
|
+
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
10954
11063
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
10955
11064
|
<!-- Index -->
|
10956
11065
|
<xsl:apply-templates/>
|
10957
11066
|
</fo:block>
|
10958
11067
|
</xsl:template>
|
10959
11068
|
|
10960
|
-
<xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
|
11069
|
+
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
10961
11070
|
<!-- Letter A, B, C, ... -->
|
10962
11071
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
10963
11072
|
<xsl:apply-templates/>
|
@@ -10998,12 +11107,12 @@
|
|
10998
11107
|
<fmt-review-start id="_7ef81cf7-3f6c-4ed4-9c1f-1ba092052bbd" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" end="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/>
|
10999
11108
|
<bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
|
11000
11109
|
<fmt-review-end id="_f336a8d0-08a8-4b7f-a1aa-b04688ed40c1" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" start="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/> -->
|
11001
|
-
<xsl:when test="1 = 2 and preceding-sibling::node()[self::mn:fmt-
|
11110
|
+
<xsl:when test="1 = 2 and preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]">
|
11002
11111
|
<!-- skip here, see the template 'fmt-review-start' -->
|
11003
11112
|
</xsl:when>
|
11004
11113
|
<xsl:otherwise>
|
11005
11114
|
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
11006
|
-
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-
|
11115
|
+
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
|
11007
11116
|
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
11008
11117
|
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
11009
11118
|
</xsl:otherwise>
|
@@ -11102,6 +11211,61 @@
|
|
11102
11211
|
<!-- End Form's elements processing -->
|
11103
11212
|
<!-- =================== -->
|
11104
11213
|
|
11214
|
+
<xsl:attribute-set name="toc-style">
|
11215
|
+
</xsl:attribute-set>
|
11216
|
+
|
11217
|
+
<xsl:template name="refine_toc-style">
|
11218
|
+
</xsl:template>
|
11219
|
+
|
11220
|
+
<xsl:attribute-set name="toc-title-style">
|
11221
|
+
<xsl:attribute name="font-size">26pt</xsl:attribute>
|
11222
|
+
<xsl:attribute name="border-bottom">2pt solid rgb(21, 43, 77)</xsl:attribute>
|
11223
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
11224
|
+
</xsl:attribute-set>
|
11225
|
+
|
11226
|
+
<xsl:attribute-set name="toc-title-page-style">
|
11227
|
+
</xsl:attribute-set> <!-- toc-title-page-style -->
|
11228
|
+
|
11229
|
+
<xsl:attribute-set name="toc-item-block-style">
|
11230
|
+
</xsl:attribute-set>
|
11231
|
+
|
11232
|
+
<xsl:template name="refine_toc-item-block-style">
|
11233
|
+
</xsl:template>
|
11234
|
+
|
11235
|
+
<xsl:attribute-set name="toc-item-style">
|
11236
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11237
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
11238
|
+
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
11239
|
+
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
11240
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11241
|
+
</xsl:attribute-set> <!-- END: toc-item-style -->
|
11242
|
+
|
11243
|
+
<xsl:template name="refine_toc-item-style">
|
11244
|
+
<xsl:variable name="margin-left">3.9</xsl:variable>
|
11245
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="(@level - 1) * $margin-left"/>mm</xsl:attribute>
|
11246
|
+
</xsl:template> <!-- END: refine_toc-item-style -->
|
11247
|
+
|
11248
|
+
<xsl:attribute-set name="toc-leader-style">
|
11249
|
+
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
11250
|
+
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
11251
|
+
|
11252
|
+
<xsl:attribute-set name="toc-pagenumber-style">
|
11253
|
+
</xsl:attribute-set>
|
11254
|
+
|
11255
|
+
<!-- List of Figures, Tables -->
|
11256
|
+
<xsl:attribute-set name="toc-listof-title-style">
|
11257
|
+
</xsl:attribute-set>
|
11258
|
+
|
11259
|
+
<xsl:attribute-set name="toc-listof-item-block-style">
|
11260
|
+
</xsl:attribute-set>
|
11261
|
+
|
11262
|
+
<xsl:attribute-set name="toc-listof-item-style">
|
11263
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11264
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
11265
|
+
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
11266
|
+
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
11267
|
+
</xsl:attribute-set>
|
11268
|
+
|
11105
11269
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
11106
11270
|
<xsl:variable name="nodes_preface_">
|
11107
11271
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -11167,7 +11331,7 @@
|
|
11167
11331
|
|
11168
11332
|
<xsl:template name="processTables_Contents">
|
11169
11333
|
<mnx:tables>
|
11170
|
-
<xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
|
11334
|
+
<xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
|
11171
11335
|
<xsl:choose>
|
11172
11336
|
<xsl:when test="mn:fmt-name">
|
11173
11337
|
<xsl:variable name="fmt_name">
|
@@ -11189,7 +11353,7 @@
|
|
11189
11353
|
|
11190
11354
|
<xsl:template name="processFigures_Contents">
|
11191
11355
|
<mnx:figures>
|
11192
|
-
<xsl:for-each select="//mn:figure[@id and mn:name and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(mn:name, 'Figure ') and normalize-space(@id) != '']">
|
11356
|
+
<xsl:for-each select="//mn:figure[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(mn:name, 'Figure ') and normalize-space(@id) != '']">
|
11193
11357
|
<xsl:choose>
|
11194
11358
|
<xsl:when test="mn:fmt-name">
|
11195
11359
|
<xsl:variable name="fmt_name">
|
@@ -11218,7 +11382,7 @@
|
|
11218
11382
|
|
11219
11383
|
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
|
11220
11384
|
|
11221
|
-
<xsl:template match="mn:figure/mn:fmt-name |
|
11385
|
+
<xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name" mode="contents">
|
11222
11386
|
<xsl:apply-templates mode="contents"/>
|
11223
11387
|
<xsl:text> </xsl:text>
|
11224
11388
|
</xsl:template>
|
@@ -11230,7 +11394,7 @@
|
|
11230
11394
|
</xsl:if>
|
11231
11395
|
</xsl:template>
|
11232
11396
|
|
11233
|
-
<xsl:template match="mn:figure/mn:fmt-name | mn:table/mn:fmt-name |
|
11397
|
+
<xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name | mnx:sourcecode/mn:fmt-name" mode="bookmarks">
|
11234
11398
|
<xsl:apply-templates mode="bookmarks"/>
|
11235
11399
|
<xsl:text> </xsl:text>
|
11236
11400
|
</xsl:template>
|
@@ -11241,7 +11405,7 @@
|
|
11241
11405
|
</xsl:if>
|
11242
11406
|
</xsl:template>
|
11243
11407
|
|
11244
|
-
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
|
11408
|
+
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
|
11245
11409
|
<xsl:value-of select="."/>
|
11246
11410
|
</xsl:template>
|
11247
11411
|
|
@@ -11251,7 +11415,7 @@
|
|
11251
11415
|
</xsl:if>
|
11252
11416
|
</xsl:template>
|
11253
11417
|
|
11254
|
-
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
|
11418
|
+
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
|
11255
11419
|
<xsl:value-of select="."/>
|
11256
11420
|
</xsl:template>
|
11257
11421
|
|
@@ -11681,7 +11845,7 @@
|
|
11681
11845
|
<xsl:value-of select="."/>
|
11682
11846
|
</xsl:template>
|
11683
11847
|
|
11684
|
-
<xsl:template match="mn:
|
11848
|
+
<xsl:template match="mn:annotation" mode="contents_item"/>
|
11685
11849
|
|
11686
11850
|
<xsl:template match="mn:tab" mode="contents_item">
|
11687
11851
|
<xsl:text> </xsl:text>
|
@@ -11836,7 +12000,7 @@
|
|
11836
12000
|
<xsl:apply-templates/>
|
11837
12001
|
</xsl:template>
|
11838
12002
|
|
11839
|
-
<xsl:template match="mn:toc//mn:xref" priority="3">
|
12003
|
+
<xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
|
11840
12004
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
11841
12005
|
<!-- New format: one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
11842
12006
|
<!-- <test><xsl:copy-of select="."/></test> -->
|
@@ -11904,8 +12068,8 @@
|
|
11904
12068
|
<xsl:apply-templates mode="toc_table_width"/>
|
11905
12069
|
</xsl:template>
|
11906
12070
|
|
11907
|
-
<xsl:template match="mn:clause[@type = 'toc']/mn:title" mode="toc_table_width"/>
|
11908
|
-
<xsl:template match="mn:clause[not(@type = 'toc')]/mn:title" mode="toc_table_width"/>
|
12071
|
+
<xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
|
12072
|
+
<xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
|
11909
12073
|
|
11910
12074
|
<xsl:template match="mn:li" mode="toc_table_width">
|
11911
12075
|
<mn:tr>
|
@@ -11913,7 +12077,7 @@
|
|
11913
12077
|
</mn:tr>
|
11914
12078
|
</xsl:template>
|
11915
12079
|
|
11916
|
-
<xsl:template match="mn:xref" mode="toc_table_width">
|
12080
|
+
<xsl:template match="mn:fmt-xref" mode="toc_table_width">
|
11917
12081
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
11918
12082
|
<!-- New format - one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
11919
12083
|
<xsl:for-each select="mn:tab">
|
@@ -11959,7 +12123,7 @@
|
|
11959
12123
|
|
11960
12124
|
<xsl:variable name="padding">
|
11961
12125
|
<xsl:choose>
|
11962
|
-
<xsl:when test="ancestor::mn:note and ancestor::mn:name">4</xsl:when>
|
12126
|
+
<xsl:when test="ancestor::mn:note and ancestor::mn:fmt-name">4</xsl:when>
|
11963
12127
|
<xsl:when test="$depth >= 5"/>
|
11964
12128
|
<xsl:when test="$depth >= 4">5</xsl:when>
|
11965
12129
|
<xsl:when test="$depth >= 3 and ancestor::mn:terms">3</xsl:when>
|
@@ -11996,10 +12160,10 @@
|
|
11996
12160
|
|
11997
12161
|
</xsl:template> <!-- tab -->
|
11998
12162
|
|
11999
|
-
<xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
|
12000
|
-
<xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
|
12163
|
+
<xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
|
12164
|
+
<xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
|
12001
12165
|
|
12002
|
-
<xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
|
12166
|
+
<xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
|
12003
12167
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
12004
12168
|
</xsl:template>
|
12005
12169
|
|
@@ -12014,13 +12178,13 @@
|
|
12014
12178
|
</xsl:template>
|
12015
12179
|
|
12016
12180
|
<xsl:variable name="reviews_">
|
12017
|
-
<xsl:for-each select="//mn:
|
12181
|
+
<xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
|
12018
12182
|
<xsl:copy>
|
12019
12183
|
<xsl:copy-of select="@from"/>
|
12020
12184
|
<xsl:copy-of select="@id"/>
|
12021
12185
|
</xsl:copy>
|
12022
12186
|
</xsl:for-each>
|
12023
|
-
<xsl:for-each select="//mn:fmt-
|
12187
|
+
<xsl:for-each select="//mn:fmt-annotation-start[@source]">
|
12024
12188
|
<xsl:copy>
|
12025
12189
|
<xsl:copy-of select="@source"/>
|
12026
12190
|
<xsl:copy-of select="@id"/>
|
@@ -12034,7 +12198,7 @@
|
|
12034
12198
|
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
12035
12199
|
<xsl:variable name="curr_id" select="@id"/>
|
12036
12200
|
<!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
|
12037
|
-
<xsl:for-each select="$reviews//mn:
|
12201
|
+
<xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
|
12038
12202
|
<xsl:variable name="review_id" select="normalize-space(@id)"/>
|
12039
12203
|
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
12040
12204
|
<fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
@@ -12049,7 +12213,7 @@
|
|
12049
12213
|
|
12050
12214
|
<!-- document text (not figures, or tables) footnotes -->
|
12051
12215
|
<xsl:variable name="reviews_container_">
|
12052
|
-
<xsl:for-each select="//mn:
|
12216
|
+
<xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
|
12053
12217
|
<xsl:variable name="update_xml_step1">
|
12054
12218
|
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
12055
12219
|
</xsl:variable>
|
@@ -12058,10 +12222,10 @@
|
|
12058
12222
|
</xsl:variable>
|
12059
12223
|
<xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
|
12060
12224
|
|
12061
|
-
<xsl:template match="mn:
|
12225
|
+
<xsl:template match="mn:annotation-container"/>
|
12062
12226
|
|
12063
12227
|
<!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
|
12064
|
-
<xsl:template match="mn:
|
12228
|
+
<xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
12065
12229
|
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
12066
12230
|
<xsl:if test="$isGenerateTableIF = 'false'">
|
12067
12231
|
<xsl:choose>
|
@@ -12081,7 +12245,7 @@
|
|
12081
12245
|
</xsl:template>
|
12082
12246
|
|
12083
12247
|
<!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
|
12084
|
-
<xsl:template match="mn:fmt-
|
12248
|
+
<xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
12085
12249
|
<!-- comment 2019-11-29 -->
|
12086
12250
|
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
12087
12251
|
<xsl:apply-templates /> -->
|
@@ -12137,7 +12301,7 @@
|
|
12137
12301
|
</xsl:template>
|
12138
12302
|
|
12139
12303
|
<!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
|
12140
|
-
<xsl:template match="mn:
|
12304
|
+
<xsl:template match="mn:annotation[@type = 'other']"/>
|
12141
12305
|
|
12142
12306
|
<!-- ============ -->
|
12143
12307
|
<!-- errata -->
|
@@ -12530,9 +12694,12 @@
|
|
12530
12694
|
<xsl:choose>
|
12531
12695
|
<xsl:when test="mn:fmt-title">
|
12532
12696
|
<xsl:variable name="fmt_title_section">
|
12533
|
-
<xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:
|
12697
|
+
<xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
|
12534
12698
|
</xsl:variable>
|
12535
12699
|
<xsl:value-of select="normalize-space($fmt_title_section)"/>
|
12700
|
+
<xsl:if test="normalize-space($fmt_title_section) = ''">
|
12701
|
+
<xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
|
12702
|
+
</xsl:if>
|
12536
12703
|
</xsl:when>
|
12537
12704
|
<xsl:otherwise>
|
12538
12705
|
<xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
|
@@ -12545,6 +12712,9 @@
|
|
12545
12712
|
<xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
|
12546
12713
|
<xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
|
12547
12714
|
</xsl:when>
|
12715
|
+
<xsl:when test="mn:fmt-title/mn:tab">
|
12716
|
+
<xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
|
12717
|
+
</xsl:when>
|
12548
12718
|
<xsl:when test="mn:fmt-title">
|
12549
12719
|
<xsl:copy-of select="mn:fmt-title/node()"/>
|
12550
12720
|
</xsl:when>
|
@@ -12686,10 +12856,10 @@
|
|
12686
12856
|
|
12687
12857
|
</fo:block>
|
12688
12858
|
|
12689
|
-
<xsl:apply-templates select="mn:title[@columns = 1]"/>
|
12859
|
+
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
12690
12860
|
|
12691
12861
|
<fo:block>
|
12692
|
-
<xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
|
12862
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
12693
12863
|
</fo:block>
|
12694
12864
|
</xsl:otherwise>
|
12695
12865
|
</xsl:choose>
|
@@ -12698,7 +12868,7 @@
|
|
12698
12868
|
<xsl:template name="refine_annex_style">
|
12699
12869
|
</xsl:template>
|
12700
12870
|
|
12701
|
-
<xsl:template match="mn:name/text()">
|
12871
|
+
<xsl:template match="mn:name/text() | mn:fmt-name/text()">
|
12702
12872
|
<!-- 0xA0 to space replacement -->
|
12703
12873
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
12704
12874
|
</xsl:template>
|
@@ -12754,28 +12924,28 @@
|
|
12754
12924
|
<xsl:template match="mn:amend"/>
|
12755
12925
|
|
12756
12926
|
<!-- fmt-title renamed to title in update_xml_step1 -->
|
12757
|
-
<xsl:template match="mn:fmt-title"/>
|
12927
|
+
<!-- <xsl:template match="mn:fmt-title" /> -->
|
12758
12928
|
|
12759
12929
|
<!-- fmt-name renamed to name in update_xml_step1 -->
|
12760
|
-
<xsl:template match="mn:fmt-name"/>
|
12930
|
+
<!-- <xsl:template match="mn:fmt-name" /> -->
|
12761
12931
|
|
12762
12932
|
<!-- fmt-preferred renamed to preferred in update_xml_step1 -->
|
12763
|
-
<xsl:template match="mn:fmt-preferred"/>
|
12933
|
+
<!-- <xsl:template match="mn:fmt-preferred" /> -->
|
12764
12934
|
|
12765
12935
|
<!-- fmt-admitted renamed to admitted in update_xml_step1 -->
|
12766
|
-
<xsl:template match="mn:fmt-admitted"/>
|
12936
|
+
<!-- <xsl:template match="mn:fmt-admitted" /> -->
|
12767
12937
|
|
12768
12938
|
<!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
|
12769
|
-
<xsl:template match="mn:fmt-deprecates"/>
|
12939
|
+
<!-- <xsl:template match="mn:fmt-deprecates" /> -->
|
12770
12940
|
|
12771
12941
|
<!-- fmt-definition renamed to definition in update_xml_step1 -->
|
12772
|
-
<xsl:template match="mn:fmt-definition"/>
|
12942
|
+
<!-- <xsl:template match="mn:fmt-definition" /> -->
|
12773
12943
|
|
12774
12944
|
<!-- fmt-termsource renamed to termsource in update_xml_step1 -->
|
12775
|
-
<xsl:template match="mn:fmt-termsource"/>
|
12945
|
+
<!-- <xsl:template match="mn:fmt-termsource" /> -->
|
12776
12946
|
|
12777
12947
|
<!-- fmt-source renamed to source in update_xml_step1 -->
|
12778
|
-
<xsl:template match="mn:fmt-source"/>
|
12948
|
+
<!-- <xsl:template match="mn:fmt-source" /> -->
|
12779
12949
|
|
12780
12950
|
<xsl:template match="mn:semx">
|
12781
12951
|
<xsl:apply-templates/>
|
@@ -13220,12 +13390,12 @@
|
|
13220
13390
|
<xsl:when test="ancestor::mn:preface">
|
13221
13391
|
<xsl:value-of select="$level_total - 2"/>
|
13222
13392
|
</xsl:when>
|
13223
|
-
<xsl:when test="ancestor::mn:sections and self::mn:title">
|
13393
|
+
<xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
|
13224
13394
|
<!-- determine 'depth' depends on upper clause with title/@depth -->
|
13225
13395
|
<!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
|
13226
|
-
<xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:title/@depth][1]/mn:title/@depth"/>
|
13396
|
+
<xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
|
13227
13397
|
<!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
|
13228
|
-
<xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:title/@depth][1]/ancestor::*)"/>
|
13398
|
+
<xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
|
13229
13399
|
<!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
|
13230
13400
|
<xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
|
13231
13401
|
<!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
|
@@ -13241,8 +13411,8 @@
|
|
13241
13411
|
</xsl:otherwise>
|
13242
13412
|
</xsl:choose>
|
13243
13413
|
</xsl:when>
|
13244
|
-
<xsl:when test="ancestor::mn:sections and self::mn:name and parent::mn:term">
|
13245
|
-
<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:title/@depth)"/>
|
13414
|
+
<xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
|
13415
|
+
<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
|
13246
13416
|
<xsl:choose>
|
13247
13417
|
<xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
|
13248
13418
|
<xsl:value-of select="number($upper_terms_depth + 1)"/>
|
@@ -13253,7 +13423,7 @@
|
|
13253
13423
|
</xsl:choose>
|
13254
13424
|
</xsl:when>
|
13255
13425
|
<xsl:when test="ancestor::mn:sections">
|
13256
|
-
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:title/@depth)"/>
|
13426
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
|
13257
13427
|
<xsl:choose>
|
13258
13428
|
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13259
13429
|
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
@@ -13269,8 +13439,8 @@
|
|
13269
13439
|
<xsl:when test="parent::mn:annex">
|
13270
13440
|
<xsl:value-of select="$level_total - 1"/>
|
13271
13441
|
</xsl:when>
|
13272
|
-
<xsl:when test="ancestor::mn:annex and self::mn:title">
|
13273
|
-
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:title/@depth)"/>
|
13442
|
+
<xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
|
13443
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
|
13274
13444
|
<xsl:choose>
|
13275
13445
|
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
13276
13446
|
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
@@ -13303,7 +13473,7 @@
|
|
13303
13473
|
</xsl:when>
|
13304
13474
|
<xsl:otherwise>
|
13305
13475
|
<xsl:variable name="title_level_">
|
13306
|
-
<xsl:for-each select="../preceding-sibling::mn:title[1]">
|
13476
|
+
<xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
|
13307
13477
|
<xsl:call-template name="getLevel"/>
|
13308
13478
|
</xsl:for-each>
|
13309
13479
|
</xsl:variable>
|
@@ -13380,15 +13550,17 @@
|
|
13380
13550
|
</xsl:template>
|
13381
13551
|
|
13382
13552
|
<xsl:template name="setNamedDestination">
|
13383
|
-
|
13384
|
-
|
13385
|
-
<
|
13386
|
-
|
13387
|
-
<xsl:for-each select=". | mn:title | mn:name">
|
13388
|
-
<xsl:if test="@named_dest">
|
13389
|
-
<fox:destination internal-destination="{@named_dest}"/>
|
13553
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
13554
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
13555
|
+
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
|
13556
|
+
<fox:destination internal-destination="{@id}"/>
|
13390
13557
|
</xsl:if>
|
13391
|
-
|
13558
|
+
<xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
|
13559
|
+
<xsl:if test="@named_dest">
|
13560
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
13561
|
+
</xsl:if>
|
13562
|
+
</xsl:for-each>
|
13563
|
+
</xsl:if>
|
13392
13564
|
</xsl:template>
|
13393
13565
|
|
13394
13566
|
<xsl:template name="add-letter-spacing">
|
@@ -13736,7 +13908,7 @@
|
|
13736
13908
|
</xsl:when>
|
13737
13909
|
<xsl:otherwise>
|
13738
13910
|
<!-- namespace-uri(ancestor::mn:title) != '' to skip title from $contents -->
|
13739
|
-
<xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
|
13911
|
+
<xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
|
13740
13912
|
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
13741
13913
|
</xsl:if>
|
13742
13914
|
<fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm" role="SKIP" text-align-last="center">
|
@@ -13770,7 +13942,7 @@
|
|
13770
13942
|
</fo:block>
|
13771
13943
|
</fo:block-container>
|
13772
13944
|
</fo:inline-container>
|
13773
|
-
<xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
|
13945
|
+
<xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
|
13774
13946
|
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
13775
13947
|
</xsl:if>
|
13776
13948
|
</xsl:otherwise>
|