metanorma-bipm 2.6.10 → 2.7.1
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/bipm/base_convert.rb +26 -0
- data/lib/isodoc/bipm/bipm.brochure.xsl +725 -506
- data/lib/isodoc/bipm/bipm.guide.xsl +725 -506
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +725 -506
- data/lib/isodoc/bipm/bipm.rapport.xsl +725 -506
- data/lib/isodoc/bipm/html_convert.rb +1 -10
- data/lib/isodoc/bipm/i18n-en.yaml +12 -2
- data/lib/isodoc/bipm/i18n-fr.yaml +12 -2
- data/lib/isodoc/bipm/jcgm.standard.xsl +683 -507
- data/lib/isodoc/bipm/metadata.rb +8 -4
- data/lib/isodoc/bipm/presentation_biblio.rb +44 -4
- data/lib/isodoc/bipm/presentation_xml_convert.rb +24 -0
- data/lib/isodoc/bipm/xref.rb +1 -0
- data/lib/metanorma/bipm/basicdoc.rng +5 -5
- data/lib/metanorma/bipm/cleanup.rb +8 -21
- data/lib/metanorma/bipm/converter.rb +0 -4
- data/lib/metanorma/bipm/isodoc.rng +75 -7
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +2 -2
- metadata +6 -6
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<xsl:param name="align-cross-elements"/>
|
6
6
|
|
7
|
-
<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"/>
|
7
|
+
<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"/>
|
8
8
|
|
9
9
|
<xsl:variable name="align_cross_elements_default">clause</xsl:variable>
|
10
10
|
<xsl:variable name="align_cross_elements_doc">
|
@@ -147,6 +147,79 @@
|
|
147
147
|
</xsl:for-each>
|
148
148
|
</xsl:variable>
|
149
149
|
|
150
|
+
<xsl:template name="layout-master-set">
|
151
|
+
<fo:layout-master-set>
|
152
|
+
<!-- cover page -->
|
153
|
+
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
154
|
+
<fo:region-body margin-top="85mm" margin-bottom="30mm" margin-left="100mm" margin-right="19mm"/>
|
155
|
+
<fo:region-before extent="85mm"/>
|
156
|
+
<fo:region-after region-name="cover-page-footer" extent="30mm"/>
|
157
|
+
<fo:region-start extent="100mm"/>
|
158
|
+
<fo:region-end extent="19mm"/>
|
159
|
+
</fo:simple-page-master>
|
160
|
+
<!-- internal cover page -->
|
161
|
+
<fo:simple-page-master master-name="internal-cover-page-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
162
|
+
<fo:region-body margin-top="11mm" margin-bottom="21mm" margin-left="25mm" margin-right="19mm"/>
|
163
|
+
<fo:region-before region-name="header" extent="11mm"/>
|
164
|
+
<fo:region-after region-name="internal-cover-page-jcgm-footer" extent="21mm"/>
|
165
|
+
<fo:region-start extent="25mm"/>
|
166
|
+
<fo:region-end extent="19mm"/>
|
167
|
+
</fo:simple-page-master>
|
168
|
+
|
169
|
+
<!-- blank page -->
|
170
|
+
<fo:simple-page-master master-name="blankpage" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
171
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
172
|
+
<fo:region-before region-name="header-blank" extent="{$marginTop}mm"/>
|
173
|
+
<fo:region-after region-name="footer-blank" extent="{$marginBottom}mm"/>
|
174
|
+
<fo:region-start region-name="left-region" extent="17mm"/>
|
175
|
+
<fo:region-end region-name="right-region" extent="26.5mm"/>
|
176
|
+
</fo:simple-page-master>
|
177
|
+
|
178
|
+
<fo:simple-page-master master-name="odd-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
179
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
180
|
+
<fo:region-before region-name="header-odd-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
|
181
|
+
<fo:region-after region-name="footer-odd-jcgm" extent="{$marginBottom}mm"/>
|
182
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
183
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
184
|
+
</fo:simple-page-master>
|
185
|
+
<fo:simple-page-master master-name="odd-jcgm-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
186
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
187
|
+
<fo:region-before region-name="header-odd-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
|
188
|
+
<fo:region-after region-name="footer-odd-jcgm" extent="{$marginBottom}mm"/>
|
189
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
190
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
191
|
+
</fo:simple-page-master>
|
192
|
+
<fo:simple-page-master master-name="even-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
193
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
194
|
+
<fo:region-before region-name="header-even-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
|
195
|
+
<fo:region-after region-name="footer-even-jcgm" extent="{$marginBottom}mm"/>
|
196
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
197
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
198
|
+
</fo:simple-page-master>
|
199
|
+
<fo:simple-page-master master-name="even-jcgm-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
200
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
201
|
+
<fo:region-before region-name="header-even-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
|
202
|
+
<fo:region-after region-name="footer-even-jcgm" extent="{$marginBottom}mm"/>
|
203
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
204
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
205
|
+
</fo:simple-page-master>
|
206
|
+
<fo:page-sequence-master master-name="document">
|
207
|
+
<fo:repeatable-page-master-alternatives>
|
208
|
+
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
209
|
+
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even-jcgm"/>
|
210
|
+
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-jcgm"/>
|
211
|
+
</fo:repeatable-page-master-alternatives>
|
212
|
+
</fo:page-sequence-master>
|
213
|
+
<fo:page-sequence-master master-name="document-landscape">
|
214
|
+
<fo:repeatable-page-master-alternatives>
|
215
|
+
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
216
|
+
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even-jcgm-landscape"/>
|
217
|
+
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-jcgm-landscape"/>
|
218
|
+
</fo:repeatable-page-master-alternatives>
|
219
|
+
</fo:page-sequence-master>
|
220
|
+
</fo:layout-master-set>
|
221
|
+
</xsl:template> <!-- END: layout-master-set -->
|
222
|
+
|
150
223
|
<xsl:template match="/">
|
151
224
|
<fo:root xml:lang="{$lang}">
|
152
225
|
<xsl:variable name="root-style">
|
@@ -155,76 +228,8 @@
|
|
155
228
|
<xsl:call-template name="insertRootStyle">
|
156
229
|
<xsl:with-param name="root-style" select="$root-style"/>
|
157
230
|
</xsl:call-template>
|
158
|
-
|
159
|
-
|
160
|
-
<fo:simple-page-master master-name="cover-page-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
161
|
-
<fo:region-body margin-top="85mm" margin-bottom="30mm" margin-left="100mm" margin-right="19mm"/>
|
162
|
-
<fo:region-before extent="85mm"/>
|
163
|
-
<fo:region-after region-name="cover-page-jcgm-footer" extent="30mm"/>
|
164
|
-
<fo:region-start extent="100mm"/>
|
165
|
-
<fo:region-end extent="19mm"/>
|
166
|
-
</fo:simple-page-master>
|
167
|
-
<!-- internal cover page -->
|
168
|
-
<fo:simple-page-master master-name="internal-cover-page-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
169
|
-
<fo:region-body margin-top="11mm" margin-bottom="21mm" margin-left="25mm" margin-right="19mm"/>
|
170
|
-
<fo:region-before region-name="header" extent="11mm"/>
|
171
|
-
<fo:region-after region-name="internal-cover-page-jcgm-footer" extent="21mm"/>
|
172
|
-
<fo:region-start extent="25mm"/>
|
173
|
-
<fo:region-end extent="19mm"/>
|
174
|
-
</fo:simple-page-master>
|
175
|
-
|
176
|
-
<!-- blank page -->
|
177
|
-
<fo:simple-page-master master-name="blankpage" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
178
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
179
|
-
<fo:region-before region-name="header-blank" extent="{$marginTop}mm"/>
|
180
|
-
<fo:region-after region-name="footer-blank" extent="{$marginBottom}mm"/>
|
181
|
-
<fo:region-start region-name="left-region" extent="17mm"/>
|
182
|
-
<fo:region-end region-name="right-region" extent="26.5mm"/>
|
183
|
-
</fo:simple-page-master>
|
184
|
-
|
185
|
-
<fo:simple-page-master master-name="odd-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
186
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
187
|
-
<fo:region-before region-name="header-odd-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
|
188
|
-
<fo:region-after region-name="footer-odd-jcgm" extent="{$marginBottom}mm"/>
|
189
|
-
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
190
|
-
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
191
|
-
</fo:simple-page-master>
|
192
|
-
<fo:simple-page-master master-name="odd-jcgm-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
193
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
194
|
-
<fo:region-before region-name="header-odd-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
|
195
|
-
<fo:region-after region-name="footer-odd-jcgm" extent="{$marginBottom}mm"/>
|
196
|
-
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
197
|
-
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
198
|
-
</fo:simple-page-master>
|
199
|
-
<fo:simple-page-master master-name="even-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
200
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
201
|
-
<fo:region-before region-name="header-even-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
|
202
|
-
<fo:region-after region-name="footer-even-jcgm" extent="{$marginBottom}mm"/>
|
203
|
-
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
204
|
-
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
205
|
-
</fo:simple-page-master>
|
206
|
-
<fo:simple-page-master master-name="even-jcgm-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
207
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
|
208
|
-
<fo:region-before region-name="header-even-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
|
209
|
-
<fo:region-after region-name="footer-even-jcgm" extent="{$marginBottom}mm"/>
|
210
|
-
<fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
|
211
|
-
<fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
|
212
|
-
</fo:simple-page-master>
|
213
|
-
<fo:page-sequence-master master-name="document-jcgm">
|
214
|
-
<fo:repeatable-page-master-alternatives>
|
215
|
-
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
216
|
-
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even-jcgm"/>
|
217
|
-
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-jcgm"/>
|
218
|
-
</fo:repeatable-page-master-alternatives>
|
219
|
-
</fo:page-sequence-master>
|
220
|
-
<fo:page-sequence-master master-name="document-jcgm-landscape">
|
221
|
-
<fo:repeatable-page-master-alternatives>
|
222
|
-
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
223
|
-
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even-jcgm-landscape"/>
|
224
|
-
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-jcgm-landscape"/>
|
225
|
-
</fo:repeatable-page-master-alternatives>
|
226
|
-
</fo:page-sequence-master>
|
227
|
-
</fo:layout-master-set>
|
231
|
+
|
232
|
+
<xsl:call-template name="layout-master-set"/>
|
228
233
|
|
229
234
|
<fo:declarations>
|
230
235
|
<xsl:call-template name="addPDFUAmeta"/>
|
@@ -240,112 +245,7 @@
|
|
240
245
|
<xsl:with-param name="contents" select="$contents"/>
|
241
246
|
</xsl:call-template>
|
242
247
|
|
243
|
-
<
|
244
|
-
<fo:static-content flow-name="cover-page-jcgm-footer" font-size="10pt">
|
245
|
-
<fo:block font-size="10pt" border-bottom="0.5pt solid black" padding-bottom="2.5mm" margin-left="-1mm" space-after="4mm">
|
246
|
-
<!-- Example: First edition July 2009 -->
|
247
|
-
<xsl:call-template name="printEdition"/>
|
248
|
-
<xsl:text> </xsl:text>
|
249
|
-
<xsl:call-template name="convertDate">
|
250
|
-
<xsl:with-param name="date" select="(//mn:metanorma)[1]/mn:bibdata/mn:date[@type = 'published']/mn:on"/>
|
251
|
-
</xsl:call-template>
|
252
|
-
</fo:block>
|
253
|
-
<!-- Example © JCGM 2009 -->
|
254
|
-
<fo:block font-size="11pt">
|
255
|
-
<fo:inline font-family="Times New Roman" font-size="12pt"><xsl:text>© </xsl:text></fo:inline>
|
256
|
-
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>
|
257
|
-
<xsl:text> </xsl:text>
|
258
|
-
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/>
|
259
|
-
</fo:block>
|
260
|
-
</fo:static-content>
|
261
|
-
<fo:flow flow-name="xsl-region-body">
|
262
|
-
<xsl:call-template name="insert_Logo-BIPM-Metro"/>
|
263
|
-
<xsl:call-template name="insertDraftWatermark"/>
|
264
|
-
<fo:block-container font-weight="bold">
|
265
|
-
<fo:block font-size="16.5pt">
|
266
|
-
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>
|
267
|
-
<xsl:text> </xsl:text>
|
268
|
-
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:docnumber"/>
|
269
|
-
<fo:inline font-weight="normal">:</fo:inline>
|
270
|
-
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/>
|
271
|
-
</fo:block>
|
272
|
-
<fo:block font-size="13pt" font-weight="normal" space-after="19.5mm">
|
273
|
-
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@type = 'title-provenance']"/>
|
274
|
-
</fo:block>
|
275
|
-
<fo:block border-bottom="1pt solid black"> </fo:block>
|
276
|
-
<fo:block font-size="16.5pt" margin-left="-0.5mm" padding-top="3.5mm" space-after="7mm" margin-right="7mm" line-height="105%" role="H1">
|
277
|
-
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-main']" mode="title"/>
|
278
|
-
<xsl:variable name="title_part">
|
279
|
-
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-part']" mode="title"/>
|
280
|
-
</xsl:variable>
|
281
|
-
<xsl:if test="normalize-space($title_part) != ''">
|
282
|
-
<xsl:text> — </xsl:text>
|
283
|
-
<xsl:copy-of select="$title_part"/>
|
284
|
-
</xsl:if>
|
285
|
-
</fo:block>
|
286
|
-
<fo:block font-size="12pt" font-style="italic" line-height="140%" role="H1">
|
287
|
-
<xsl:variable name="secondLang" select="(//mn:metanorma)[1]/mn:bibdata/mn:title/@language[. != $lang]"/>
|
288
|
-
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-main']" mode="title"/>
|
289
|
-
<xsl:variable name="title_part">
|
290
|
-
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-part']" mode="title"/>
|
291
|
-
</xsl:variable>
|
292
|
-
<xsl:if test="normalize-space($title_part) != ''">
|
293
|
-
<xsl:text> — </xsl:text>
|
294
|
-
<xsl:copy-of select="$title_part"/>
|
295
|
-
</xsl:if>
|
296
|
-
</fo:block>
|
297
|
-
</fo:block-container>
|
298
|
-
</fo:flow>
|
299
|
-
</fo:page-sequence>
|
300
|
-
|
301
|
-
<fo:page-sequence master-reference="internal-cover-page-jcgm" force-page-count="no-force">
|
302
|
-
<fo:static-content flow-name="internal-cover-page-jcgm-footer" font-size="9pt">
|
303
|
-
<!-- example: (c) JCGM 2009— All rights reserved -->
|
304
|
-
<fo:block text-align="right">
|
305
|
-
<xsl:value-of select="$copyrightText"/>
|
306
|
-
</fo:block>
|
307
|
-
</fo:static-content>
|
308
|
-
<fo:flow flow-name="xsl-region-body">
|
309
|
-
<xsl:call-template name="insertDraftWatermark"/>
|
310
|
-
<fo:table table-layout="fixed" width="100%" font-size="13pt">
|
311
|
-
<fo:table-column column-width="134mm"/>
|
312
|
-
<fo:table-column column-width="30mm"/>
|
313
|
-
<fo:table-body>
|
314
|
-
<fo:table-row>
|
315
|
-
<fo:table-cell>
|
316
|
-
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/></fo:block>
|
317
|
-
</fo:table-cell>
|
318
|
-
<fo:table-cell line-height="140%">
|
319
|
-
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/></fo:block>
|
320
|
-
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:docnumber"/></fo:block>
|
321
|
-
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/></fo:block>
|
322
|
-
</fo:table-cell>
|
323
|
-
</fo:table-row>
|
324
|
-
</fo:table-body>
|
325
|
-
</fo:table>
|
326
|
-
<fo:block font-size="18pt" space-before="70mm" role="H1">
|
327
|
-
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-main']" mode="title"/>
|
328
|
-
<xsl:variable name="title_part">
|
329
|
-
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-part']" mode="title"/>
|
330
|
-
</xsl:variable>
|
331
|
-
<xsl:if test="normalize-space($title_part) != ''">
|
332
|
-
<xsl:text> — </xsl:text>
|
333
|
-
<xsl:copy-of select="$title_part"/>
|
334
|
-
</xsl:if>
|
335
|
-
</fo:block>
|
336
|
-
<fo:block font-size="13pt" space-before="35mm" role="H1">
|
337
|
-
<xsl:variable name="secondLang" select="(//mn:metanorma)[1]/mn:bibdata/mn:title/@language[. != $lang]"/>
|
338
|
-
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-main']" mode="title"/>
|
339
|
-
<xsl:variable name="title_part">
|
340
|
-
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-part']" mode="title"/>
|
341
|
-
</xsl:variable>
|
342
|
-
<xsl:if test="normalize-space($title_part) != ''">
|
343
|
-
<xsl:text> — </xsl:text>
|
344
|
-
<xsl:copy-of select="$title_part"/>
|
345
|
-
</xsl:if>
|
346
|
-
</fo:block>
|
347
|
-
</fo:flow>
|
348
|
-
</fo:page-sequence> <!-- END: internal-cover-page-jcgm -->
|
248
|
+
<xsl:call-template name="cover-page"/>
|
349
249
|
|
350
250
|
<xsl:variable name="updated_xml">
|
351
251
|
<xsl:call-template name="updateXML"/>
|
@@ -362,12 +262,9 @@
|
|
362
262
|
|
363
263
|
<xsl:for-each select=".//mn:page_sequence[parent::mn:boilerplate or parent::mn:preface][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
|
364
264
|
|
365
|
-
<
|
265
|
+
<xsl:variable name="page_orientation"><xsl:call-template name="getPageSequenceOrientation"/></xsl:variable>
|
366
266
|
|
367
|
-
|
368
|
-
<xsl:text>document-jcgm</xsl:text>
|
369
|
-
<xsl:call-template name="getPageSequenceOrientation"/>
|
370
|
-
</xsl:attribute>
|
267
|
+
<fo:page-sequence master-reference="document{$page_orientation}" format="i">
|
371
268
|
|
372
269
|
<xsl:if test="position() = 1">
|
373
270
|
<xsl:attribute name="initial-page-number">2</xsl:attribute>
|
@@ -394,13 +291,10 @@
|
|
394
291
|
|
395
292
|
<xsl:for-each select=".//mn:page_sequence[not(parent::mn:boilerplate or parent::mn:preface)][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
|
396
293
|
|
397
|
-
|
398
|
-
<fo:page-sequence master-reference="document-jcgm" force-page-count="no-force">
|
294
|
+
<xsl:variable name="page_orientation"><xsl:call-template name="getPageSequenceOrientation"/></xsl:variable>
|
399
295
|
|
400
|
-
|
401
|
-
|
402
|
-
<xsl:call-template name="getPageSequenceOrientation"/>
|
403
|
-
</xsl:attribute>
|
296
|
+
<!-- JCGM BODY -->
|
297
|
+
<fo:page-sequence master-reference="document{$page_orientation}" force-page-count="no-force">
|
404
298
|
|
405
299
|
<xsl:if test="position() = 1">
|
406
300
|
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
@@ -423,7 +317,7 @@
|
|
423
317
|
</xsl:when> <!-- END: count(//mn:metanorma) = 1 -->
|
424
318
|
|
425
319
|
<xsl:otherwise> <!-- count(//mn:metanorma) != 1 -->
|
426
|
-
<fo:page-sequence master-reference="document
|
320
|
+
<fo:page-sequence master-reference="document" initial-page-number="1" force-page-count="no-force">
|
427
321
|
|
428
322
|
<xsl:call-template name="insertHeaderFooter"/>
|
429
323
|
|
@@ -467,6 +361,115 @@
|
|
467
361
|
</fo:root>
|
468
362
|
</xsl:template>
|
469
363
|
|
364
|
+
<xsl:template name="cover-page">
|
365
|
+
<fo:page-sequence master-reference="cover-page" font-family="Arial" font-size="10.5pt" force-page-count="no-force">
|
366
|
+
<fo:static-content flow-name="cover-page-footer" font-size="10pt">
|
367
|
+
<fo:block font-size="10pt" border-bottom="0.5pt solid black" padding-bottom="2.5mm" margin-left="-1mm" space-after="4mm">
|
368
|
+
<!-- Example: First edition July 2009 -->
|
369
|
+
<xsl:call-template name="printEdition"/>
|
370
|
+
<xsl:text> </xsl:text>
|
371
|
+
<xsl:call-template name="convertDate">
|
372
|
+
<xsl:with-param name="date" select="(//mn:metanorma)[1]/mn:bibdata/mn:date[@type = 'published']/mn:on"/>
|
373
|
+
</xsl:call-template>
|
374
|
+
</fo:block>
|
375
|
+
<!-- Example © JCGM 2009 -->
|
376
|
+
<fo:block font-size="11pt">
|
377
|
+
<fo:inline font-family="Times New Roman" font-size="12pt"><xsl:text>© </xsl:text></fo:inline>
|
378
|
+
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>
|
379
|
+
<xsl:text> </xsl:text>
|
380
|
+
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/>
|
381
|
+
</fo:block>
|
382
|
+
</fo:static-content>
|
383
|
+
<fo:flow flow-name="xsl-region-body">
|
384
|
+
<xsl:call-template name="insert_Logo-BIPM-Metro"/>
|
385
|
+
<xsl:call-template name="insertDraftWatermark"/>
|
386
|
+
<fo:block-container font-weight="bold">
|
387
|
+
<fo:block font-size="16.5pt">
|
388
|
+
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>
|
389
|
+
<xsl:text> </xsl:text>
|
390
|
+
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:docnumber"/>
|
391
|
+
<fo:inline font-weight="normal">:</fo:inline>
|
392
|
+
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/>
|
393
|
+
</fo:block>
|
394
|
+
<fo:block font-size="13pt" font-weight="normal" space-after="19.5mm">
|
395
|
+
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@type = 'title-provenance']"/>
|
396
|
+
</fo:block>
|
397
|
+
<fo:block border-bottom="1pt solid black"> </fo:block>
|
398
|
+
<fo:block font-size="16.5pt" margin-left="-0.5mm" padding-top="3.5mm" space-after="7mm" margin-right="7mm" line-height="105%" role="H1">
|
399
|
+
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-main']" mode="title"/>
|
400
|
+
<xsl:variable name="title_part">
|
401
|
+
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-part']" mode="title"/>
|
402
|
+
</xsl:variable>
|
403
|
+
<xsl:if test="normalize-space($title_part) != ''">
|
404
|
+
<xsl:text> — </xsl:text>
|
405
|
+
<xsl:copy-of select="$title_part"/>
|
406
|
+
</xsl:if>
|
407
|
+
</fo:block>
|
408
|
+
<fo:block font-size="12pt" font-style="italic" line-height="140%" role="H1">
|
409
|
+
<xsl:variable name="secondLang" select="(//mn:metanorma)[1]/mn:bibdata/mn:title/@language[. != $lang]"/>
|
410
|
+
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-main']" mode="title"/>
|
411
|
+
<xsl:variable name="title_part">
|
412
|
+
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-part']" mode="title"/>
|
413
|
+
</xsl:variable>
|
414
|
+
<xsl:if test="normalize-space($title_part) != ''">
|
415
|
+
<xsl:text> — </xsl:text>
|
416
|
+
<xsl:copy-of select="$title_part"/>
|
417
|
+
</xsl:if>
|
418
|
+
</fo:block>
|
419
|
+
</fo:block-container>
|
420
|
+
</fo:flow>
|
421
|
+
</fo:page-sequence>
|
422
|
+
|
423
|
+
<fo:page-sequence master-reference="internal-cover-page-jcgm" force-page-count="no-force">
|
424
|
+
<fo:static-content flow-name="internal-cover-page-jcgm-footer" font-size="9pt">
|
425
|
+
<!-- example: (c) JCGM 2009— All rights reserved -->
|
426
|
+
<fo:block text-align="right">
|
427
|
+
<xsl:value-of select="$copyrightText"/>
|
428
|
+
</fo:block>
|
429
|
+
</fo:static-content>
|
430
|
+
<fo:flow flow-name="xsl-region-body">
|
431
|
+
<xsl:call-template name="insertDraftWatermark"/>
|
432
|
+
<fo:table table-layout="fixed" width="100%" font-size="13pt">
|
433
|
+
<fo:table-column column-width="134mm"/>
|
434
|
+
<fo:table-column column-width="30mm"/>
|
435
|
+
<fo:table-body>
|
436
|
+
<fo:table-row>
|
437
|
+
<fo:table-cell>
|
438
|
+
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/></fo:block>
|
439
|
+
</fo:table-cell>
|
440
|
+
<fo:table-cell line-height="140%">
|
441
|
+
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/></fo:block>
|
442
|
+
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:docnumber"/></fo:block>
|
443
|
+
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/></fo:block>
|
444
|
+
</fo:table-cell>
|
445
|
+
</fo:table-row>
|
446
|
+
</fo:table-body>
|
447
|
+
</fo:table>
|
448
|
+
<fo:block font-size="18pt" space-before="70mm" role="H1">
|
449
|
+
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-main']" mode="title"/>
|
450
|
+
<xsl:variable name="title_part">
|
451
|
+
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-part']" mode="title"/>
|
452
|
+
</xsl:variable>
|
453
|
+
<xsl:if test="normalize-space($title_part) != ''">
|
454
|
+
<xsl:text> — </xsl:text>
|
455
|
+
<xsl:copy-of select="$title_part"/>
|
456
|
+
</xsl:if>
|
457
|
+
</fo:block>
|
458
|
+
<fo:block font-size="13pt" space-before="35mm" role="H1">
|
459
|
+
<xsl:variable name="secondLang" select="(//mn:metanorma)[1]/mn:bibdata/mn:title/@language[. != $lang]"/>
|
460
|
+
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-main']" mode="title"/>
|
461
|
+
<xsl:variable name="title_part">
|
462
|
+
<xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-part']" mode="title"/>
|
463
|
+
</xsl:variable>
|
464
|
+
<xsl:if test="normalize-space($title_part) != ''">
|
465
|
+
<xsl:text> — </xsl:text>
|
466
|
+
<xsl:copy-of select="$title_part"/>
|
467
|
+
</xsl:if>
|
468
|
+
</fo:block>
|
469
|
+
</fo:flow>
|
470
|
+
</fo:page-sequence> <!-- END: internal-cover-page-jcgm -->
|
471
|
+
</xsl:template> <!-- END: cover-page -->
|
472
|
+
|
470
473
|
<xsl:template name="processPrefaceAndMainSectionsJCGM_items">
|
471
474
|
|
472
475
|
<xsl:variable name="updated_xml_step_move_pagebreak">
|
@@ -562,38 +565,36 @@
|
|
562
565
|
|
563
566
|
<xsl:template name="insertListOf_Title">
|
564
567
|
<xsl:param name="title"/>
|
565
|
-
<fo:block
|
568
|
+
<fo:block xsl:use-attribute-sets="toc-listof-title-style">
|
566
569
|
<xsl:value-of select="$title"/>
|
567
570
|
</fo:block>
|
568
571
|
</xsl:template>
|
569
572
|
|
570
573
|
<xsl:template name="insertListOf_Item">
|
571
|
-
<fo:block
|
572
|
-
<fo:
|
573
|
-
<
|
574
|
-
<xsl:
|
575
|
-
|
576
|
-
|
577
|
-
<
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
<fo:
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
</fo:basic-link>
|
586
|
-
</fo:block>
|
574
|
+
<fo:block xsl:use-attribute-sets="toc-listof-item-style">
|
575
|
+
<fo:basic-link internal-destination="{@id}">
|
576
|
+
<xsl:call-template name="setAltText">
|
577
|
+
<xsl:with-param name="value" select="@alt-text"/>
|
578
|
+
</xsl:call-template>
|
579
|
+
<fo:inline>
|
580
|
+
<xsl:apply-templates select="." mode="contents"/>
|
581
|
+
</fo:inline>
|
582
|
+
<xsl:text> </xsl:text>
|
583
|
+
<fo:inline keep-together.within-line="always" font-weight="normal">
|
584
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
585
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
586
|
+
</fo:inline>
|
587
|
+
</fo:basic-link>
|
587
588
|
</fo:block>
|
588
589
|
</xsl:template>
|
589
590
|
|
590
|
-
<xsl:template match="mn:preface//mn:clause[@type = 'toc']" priority="3">
|
591
|
+
<xsl:template match="mn:preface//mn:clause[@type = 'toc']" name="toc" priority="3">
|
591
592
|
<fo:block-container>
|
592
593
|
<fo:block role="TOC">
|
593
594
|
|
594
595
|
<xsl:apply-templates/>
|
595
596
|
|
596
|
-
<xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
|
597
|
+
<xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
|
597
598
|
|
598
599
|
<xsl:variable name="docid">
|
599
600
|
<xsl:call-template name="getDocumentId"/>
|
@@ -611,32 +612,33 @@
|
|
611
612
|
</xsl:for-each>
|
612
613
|
|
613
614
|
<!-- List of Tables -->
|
614
|
-
<xsl:
|
615
|
-
<xsl:
|
616
|
-
<xsl:
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
</xsl:
|
615
|
+
<xsl:for-each select="$contents//mnx:tables/mnx:table">
|
616
|
+
<xsl:if test="position() = 1">
|
617
|
+
<xsl:call-template name="insertListOf_Title">
|
618
|
+
<xsl:with-param name="title" select="$title-list-tables"/>
|
619
|
+
</xsl:call-template>
|
620
|
+
</xsl:if>
|
621
|
+
<xsl:call-template name="insertListOf_Item"/>
|
622
|
+
</xsl:for-each>
|
622
623
|
|
623
624
|
<!-- List of Figures -->
|
624
|
-
<xsl:
|
625
|
+
<xsl:for-each select="$contents//mnx:figures/mnx:figure">
|
626
|
+
<xsl:if test="position() = 1">
|
625
627
|
<xsl:call-template name="insertListOf_Title">
|
626
628
|
<xsl:with-param name="title" select="$title-list-figures"/>
|
627
629
|
</xsl:call-template>
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
630
|
+
</xsl:if>
|
631
|
+
<xsl:call-template name="insertListOf_Item"/>
|
632
|
+
</xsl:for-each>
|
633
|
+
|
632
634
|
</xsl:if>
|
633
635
|
</fo:block>
|
634
636
|
</fo:block-container>
|
635
637
|
</xsl:template>
|
636
638
|
|
637
|
-
<xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:title" priority="3">
|
639
|
+
<xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
|
638
640
|
<fo:block text-align-last="justify">
|
639
|
-
<fo:inline
|
641
|
+
<fo:inline xsl:use-attribute-sets="toc-title-style">
|
640
642
|
<xsl:call-template name="getLocalizedString">
|
641
643
|
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
642
644
|
</xsl:call-template>
|
@@ -766,8 +768,8 @@
|
|
766
768
|
<xsl:variable name="element-name">
|
767
769
|
<xsl:choose>
|
768
770
|
<xsl:when test="$inline = 'true'">fo:inline</xsl:when>
|
769
|
-
<xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
|
770
|
-
<xsl:when test="preceding-sibling::*[1]/@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title, for two columns layout -->
|
771
|
+
<xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
|
772
|
+
<xsl:when test="preceding-sibling::*[1]/@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title, for two columns layout -->
|
771
773
|
<xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
|
772
774
|
<xsl:otherwise>fo:block</xsl:otherwise>
|
773
775
|
</xsl:choose>
|
@@ -824,7 +826,7 @@
|
|
824
826
|
</fo:list-block>
|
825
827
|
</xsl:template>
|
826
828
|
|
827
|
-
<xsl:template match="mn:preferred[not(parent::mn:term)]" priority="2">
|
829
|
+
<xsl:template match="mn:fmt-preferred[not(parent::mn:term)]" priority="2">
|
828
830
|
<xsl:variable name="levelTerm">
|
829
831
|
<xsl:call-template name="getLevelTermName"/>
|
830
832
|
</xsl:variable>
|
@@ -858,7 +860,7 @@
|
|
858
860
|
</fo:block>
|
859
861
|
</xsl:template>
|
860
862
|
|
861
|
-
<xsl:template match="mn:definition/mn:p" priority="2">
|
863
|
+
<xsl:template match="mn:fmt-definition/mn:p" priority="2">
|
862
864
|
<fo:block widows="1" orphans="1"><xsl:apply-templates/></fo:block>
|
863
865
|
</xsl:template>
|
864
866
|
|
@@ -942,7 +944,7 @@
|
|
942
944
|
</xsl:if>
|
943
945
|
</xsl:template>
|
944
946
|
|
945
|
-
<xsl:template match="*[self::mn:td or self::mn:th]/mn:formula/mn:stem" priority="2">
|
947
|
+
<xsl:template match="*[self::mn:td or self::mn:th]/mn:formula/mn:fmt-stem" priority="2">
|
946
948
|
<fo:block>
|
947
949
|
<xsl:if test="ancestor::*[self::mn:td or self::mn:th][1][@align]">
|
948
950
|
<xsl:attribute name="text-align">
|
@@ -992,7 +994,7 @@
|
|
992
994
|
</fo:inline>
|
993
995
|
<xsl:text> </xsl:text>
|
994
996
|
<fo:inline keep-together.within-line="always" font-weight="normal">
|
995
|
-
<fo:leader
|
997
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
996
998
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
997
999
|
</fo:inline>
|
998
1000
|
</fo:basic-link>
|
@@ -1101,7 +1103,7 @@
|
|
1101
1103
|
</xsl:if>
|
1102
1104
|
</xsl:template>
|
1103
1105
|
|
1104
|
-
<xsl:template match="mn:title" name="title">
|
1106
|
+
<xsl:template match="mn:fmt-title" name="title">
|
1105
1107
|
|
1106
1108
|
<xsl:variable name="level">
|
1107
1109
|
<xsl:call-template name="getLevel"/>
|
@@ -1143,7 +1145,7 @@
|
|
1143
1145
|
<xsl:choose>
|
1144
1146
|
<xsl:when test="ancestor::mn:preface">12pt</xsl:when>
|
1145
1147
|
<xsl:when test="parent::mn:annex">30pt</xsl:when>
|
1146
|
-
<xsl:when test="following-sibling::*[1][self::mn:admitted]">0pt</xsl:when>
|
1148
|
+
<xsl:when test="following-sibling::*[1][self::mn:fmt-admitted]">0pt</xsl:when>
|
1147
1149
|
<!-- <xsl:otherwise>12pt</xsl:otherwise> -->
|
1148
1150
|
<xsl:otherwise>12pt</xsl:otherwise>
|
1149
1151
|
</xsl:choose>
|
@@ -1209,7 +1211,7 @@
|
|
1209
1211
|
<xsl:template match="mn:indexsect"/>
|
1210
1212
|
<xsl:template match="mn:indexsect" mode="index">
|
1211
1213
|
|
1212
|
-
<fo:page-sequence master-reference="document
|
1214
|
+
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
1213
1215
|
<xsl:variable name="header-title">
|
1214
1216
|
<xsl:choose>
|
1215
1217
|
<xsl:when test="./mn:title[1]/mn:tab">
|
@@ -1238,7 +1240,7 @@
|
|
1238
1240
|
<!-- End of Index processing -->
|
1239
1241
|
<!-- =================== -->
|
1240
1242
|
|
1241
|
-
<xsl:template match="mn:xref" priority="2">
|
1243
|
+
<xsl:template match="mn:xref | mn:fmt-xref" priority="2">
|
1242
1244
|
<xsl:call-template name="insert_basic_link">
|
1243
1245
|
<xsl:with-param name="element">
|
1244
1246
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
@@ -1514,7 +1516,8 @@
|
|
1514
1516
|
<!-- allow cross-align for element title -->
|
1515
1517
|
<xsl:template match="mn:sections//mn:title | mn:annex//mn:title" mode="flatxml_step1"/>
|
1516
1518
|
<xsl:template match="mn:sections//mn:fmt-title | mn:annex//mn:fmt-title" mode="flatxml_step1">
|
1517
|
-
<xsl:element name="title" namespace="{$namespace_full}">
|
1519
|
+
<!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
|
1520
|
+
<xsl:copy>
|
1518
1521
|
<xsl:apply-templates select="@*" mode="flatxml_step1"/>
|
1519
1522
|
<xsl:call-template name="setCrossAlignAttributes"/>
|
1520
1523
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
@@ -1525,7 +1528,8 @@
|
|
1525
1528
|
<xsl:copy-of select="../@inline-header"/>
|
1526
1529
|
</xsl:if>
|
1527
1530
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1528
|
-
</xsl:
|
1531
|
+
</xsl:copy>
|
1532
|
+
<!-- </xsl:element> -->
|
1529
1533
|
</xsl:template>
|
1530
1534
|
|
1531
1535
|
<xsl:template match="mn:annex" mode="flatxml_step1">
|
@@ -1642,11 +1646,13 @@
|
|
1642
1646
|
</xsl:copy>
|
1643
1647
|
</xsl:template>
|
1644
1648
|
<xsl:template match="mn:sections//mn:fmt-termsource | mn:annex//mn:fmt-termsource" mode="flatxml_step1">
|
1645
|
-
<xsl:element name="termsource" namespace="{$namespace_full}">
|
1649
|
+
<!-- <xsl:element name="fmt-termsource" namespace="{$namespace_full}"> -->
|
1650
|
+
<xsl:copy>
|
1646
1651
|
<xsl:apply-templates select="@*" mode="flatxml_step1"/>
|
1647
1652
|
<xsl:call-template name="setCrossAlignAttributes"/>
|
1648
1653
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1649
|
-
</xsl:
|
1654
|
+
</xsl:copy>
|
1655
|
+
<!-- </xsl:element> -->
|
1650
1656
|
</xsl:template>
|
1651
1657
|
|
1652
1658
|
<xsl:template match="mn:preferred" mode="flatxml_step1"/>
|
@@ -1659,7 +1665,7 @@
|
|
1659
1665
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1660
1666
|
</xsl:template>
|
1661
1667
|
<xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="flatxml_step1">
|
1662
|
-
<xsl:element name="preferred" namespace="{$namespace_full}">
|
1668
|
+
<xsl:element name="fmt-preferred" namespace="{$namespace_full}">
|
1663
1669
|
<xsl:copy-of select="@*"/>
|
1664
1670
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1665
1671
|
</xsl:element>
|
@@ -1668,7 +1674,7 @@
|
|
1668
1674
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1669
1675
|
</xsl:template>
|
1670
1676
|
<xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="flatxml_step1">
|
1671
|
-
<xsl:element name="admitted" namespace="{$namespace_full}">
|
1677
|
+
<xsl:element name="fmt-admitted" namespace="{$namespace_full}">
|
1672
1678
|
<xsl:copy-of select="@*"/>
|
1673
1679
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1674
1680
|
</xsl:element>
|
@@ -1677,17 +1683,17 @@
|
|
1677
1683
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1678
1684
|
</xsl:template>
|
1679
1685
|
<xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="flatxml_step1">
|
1680
|
-
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
1686
|
+
<xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
|
1681
1687
|
<xsl:copy-of select="@*"/>
|
1682
1688
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1683
1689
|
</xsl:element>
|
1684
1690
|
</xsl:template>
|
1685
|
-
<xsl:template match="mn:fmt-definition" mode="flatxml_step1">
|
1691
|
+
<!-- <xsl:template match="mn:fmt-definition" mode="flatxml_step1">
|
1686
1692
|
<xsl:element name="definition" namespace="{$namespace_full}">
|
1687
1693
|
<xsl:copy-of select="@*"/>
|
1688
1694
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1689
1695
|
</xsl:element>
|
1690
|
-
</xsl:template>
|
1696
|
+
</xsl:template> -->
|
1691
1697
|
|
1692
1698
|
<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="flatxml_step1" priority="3">
|
1693
1699
|
<xsl:apply-templates mode="flatxml_step1"/>
|
@@ -1702,7 +1708,8 @@
|
|
1702
1708
|
<xsl:template match="mn:stem" mode="flatxml_step1"/>
|
1703
1709
|
|
1704
1710
|
<xsl:template match="mn:fmt-stem[not(.//mn:passthrough) and not(.//*[@linebreak])]" mode="flatxml_step1">
|
1705
|
-
<xsl:element name="stem" namespace="{$namespace_full}">
|
1711
|
+
<!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
|
1712
|
+
<xsl:copy>
|
1706
1713
|
<xsl:copy-of select="@*"/>
|
1707
1714
|
<xsl:choose>
|
1708
1715
|
<xsl:when test="mn:semx and count(node()) = 1">
|
@@ -1712,7 +1719,8 @@
|
|
1712
1719
|
<xsl:copy-of select="node()"/>
|
1713
1720
|
</xsl:otherwise>
|
1714
1721
|
</xsl:choose>
|
1715
|
-
</xsl:
|
1722
|
+
</xsl:copy>
|
1723
|
+
<!-- </xsl:element> -->
|
1716
1724
|
</xsl:template>
|
1717
1725
|
|
1718
1726
|
<xsl:template match="mn:concept" mode="flatxml_step1"/>
|
@@ -1723,39 +1731,39 @@
|
|
1723
1731
|
|
1724
1732
|
<xsl:template match="mn:eref" mode="flatxml_step1"/>
|
1725
1733
|
|
1726
|
-
<xsl:template match="mn:fmt-eref" mode="flatxml_step1">
|
1734
|
+
<!-- <xsl:template match="mn:fmt-eref" mode="flatxml_step1">
|
1727
1735
|
<xsl:element name="eref" namespace="{$namespace_full}">
|
1728
1736
|
<xsl:copy-of select="@*"/>
|
1729
1737
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1730
1738
|
</xsl:element>
|
1731
|
-
</xsl:template>
|
1739
|
+
</xsl:template> -->
|
1732
1740
|
|
1733
1741
|
<xsl:template match="mn:xref" mode="flatxml_step1"/>
|
1734
1742
|
|
1735
|
-
<xsl:template match="mn:fmt-xref" mode="flatxml_step1">
|
1743
|
+
<!-- <xsl:template match="mn:fmt-xref" mode="flatxml_step1">
|
1736
1744
|
<xsl:element name="xref" namespace="{$namespace_full}">
|
1737
1745
|
<xsl:copy-of select="@*"/>
|
1738
1746
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1739
1747
|
</xsl:element>
|
1740
|
-
</xsl:template
|
1748
|
+
</xsl:template>-->
|
1741
1749
|
|
1742
1750
|
<xsl:template match="mn:link" mode="flatxml_step1"/>
|
1743
1751
|
|
1744
|
-
<xsl:template match="mn:fmt-link" mode="flatxml_step1">
|
1752
|
+
<!-- <xsl:template match="mn:fmt-link" mode="flatxml_step1">
|
1745
1753
|
<xsl:element name="link" namespace="{$namespace_full}">
|
1746
1754
|
<xsl:copy-of select="@*"/>
|
1747
1755
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1748
1756
|
</xsl:element>
|
1749
|
-
</xsl:template>
|
1757
|
+
</xsl:template> -->
|
1750
1758
|
|
1751
1759
|
<xsl:template match="mn:origin" mode="flatxml_step1"/>
|
1752
1760
|
|
1753
|
-
<xsl:template match="mn:fmt-origin" mode="flatxml_step1">
|
1761
|
+
<!-- <xsl:template match="mn:fmt-origin" mode="flatxml_step1">
|
1754
1762
|
<xsl:element name="origin" namespace="{$namespace_full}">
|
1755
1763
|
<xsl:copy-of select="@*"/>
|
1756
1764
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1757
1765
|
</xsl:element>
|
1758
|
-
</xsl:template>
|
1766
|
+
</xsl:template> -->
|
1759
1767
|
|
1760
1768
|
<xsl:template match="mn:erefstack" mode="flatxml_step1"/>
|
1761
1769
|
|
@@ -1793,13 +1801,13 @@
|
|
1793
1801
|
<!-- https://github.com/metanorma/isodoc/issues/687 -->
|
1794
1802
|
<xsl:template match="mn:source" mode="flatxml_step1"/>
|
1795
1803
|
|
1796
|
-
<xsl:template match="mn:fmt-source"/>
|
1797
|
-
<xsl:template match="mn:fmt-source" mode="flatxml_step1">
|
1804
|
+
<!-- <xsl:template match="mn:fmt-source" /> -->
|
1805
|
+
<!-- <xsl:template match="mn:fmt-source" mode="flatxml_step1">
|
1798
1806
|
<xsl:element name="source" namespace="{$namespace_full}">
|
1799
1807
|
<xsl:copy-of select="@*"/>
|
1800
1808
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1801
1809
|
</xsl:element>
|
1802
|
-
</xsl:template>
|
1810
|
+
</xsl:template> -->
|
1803
1811
|
|
1804
1812
|
<xsl:template name="setCrossAlignAttributes">
|
1805
1813
|
<xsl:variable name="is_cross_aligned">
|
@@ -1897,7 +1905,7 @@
|
|
1897
1905
|
<xsl:if test="self::mn:clause">
|
1898
1906
|
<xsl:copy-of select="@keep-with-next"/>
|
1899
1907
|
</xsl:if>
|
1900
|
-
<xsl:if test="self::mn:title">
|
1908
|
+
<xsl:if test="self::mn:fmt-title">
|
1901
1909
|
<xsl:copy-of select="@keep-with-next"/>
|
1902
1910
|
</xsl:if>
|
1903
1911
|
<xsl:copy-of select="@multilingual-rendering"/>
|
@@ -2086,10 +2094,6 @@
|
|
2086
2094
|
<title-part lang="ru">
|
2087
2095
|
</title-part>
|
2088
2096
|
<title-part lang="zh">第 # 部分:</title-part>
|
2089
|
-
|
2090
|
-
<title-subpart lang="en">Sub-part #</title-subpart>
|
2091
|
-
<title-subpart lang="fr">Partie de sub #</title-subpart>
|
2092
|
-
|
2093
2097
|
</xsl:variable>
|
2094
2098
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
2095
2099
|
|
@@ -2542,7 +2546,8 @@
|
|
2542
2546
|
<xsl:template match="mn:stem" mode="update_xml_step1"/>
|
2543
2547
|
|
2544
2548
|
<xsl:template match="mn:fmt-stem" mode="update_xml_step1">
|
2545
|
-
<xsl:element name="stem" namespace="{$namespace_full}">
|
2549
|
+
<!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
|
2550
|
+
<xsl:copy>
|
2546
2551
|
<xsl:copy-of select="@*"/>
|
2547
2552
|
<xsl:choose>
|
2548
2553
|
<xsl:when test="mn:semx and count(node()) = 1">
|
@@ -2566,7 +2571,8 @@
|
|
2566
2571
|
</xsl:choose>
|
2567
2572
|
</xsl:otherwise>
|
2568
2573
|
</xsl:choose>
|
2569
|
-
</xsl:
|
2574
|
+
</xsl:copy>
|
2575
|
+
<!-- </xsl:element> -->
|
2570
2576
|
</xsl:template>
|
2571
2577
|
|
2572
2578
|
<xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
|
@@ -2728,12 +2734,14 @@
|
|
2728
2734
|
</xsl:template>
|
2729
2735
|
|
2730
2736
|
<xsl:template match="mn:fmt-title" mode="update_xml_step1">
|
2731
|
-
<xsl:element name="title" namespace="{$namespace_full}">
|
2737
|
+
<!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
|
2738
|
+
<xsl:copy>
|
2732
2739
|
<xsl:copy-of select="@*"/>
|
2733
2740
|
<xsl:call-template name="addNamedDestinationAttribute"/>
|
2734
2741
|
|
2735
2742
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2736
|
-
</xsl:
|
2743
|
+
</xsl:copy>
|
2744
|
+
<!-- </xsl:element> -->
|
2737
2745
|
</xsl:template>
|
2738
2746
|
|
2739
2747
|
<xsl:template name="addNamedDestinationAttribute">
|
@@ -2745,12 +2753,14 @@
|
|
2745
2753
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2746
2754
|
</xsl:when>
|
2747
2755
|
<xsl:otherwise>
|
2748
|
-
<xsl:element name="name" namespace="{$namespace_full}">
|
2756
|
+
<!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
|
2757
|
+
<xsl:copy>
|
2749
2758
|
<xsl:copy-of select="@*"/>
|
2750
2759
|
<xsl:call-template name="addNamedDestinationAttribute"/>
|
2751
2760
|
|
2752
2761
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2753
|
-
</xsl:
|
2762
|
+
</xsl:copy>
|
2763
|
+
<!-- </xsl:element> -->
|
2754
2764
|
</xsl:otherwise>
|
2755
2765
|
</xsl:choose>
|
2756
2766
|
</xsl:template>
|
@@ -2765,7 +2775,7 @@
|
|
2765
2775
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2766
2776
|
</xsl:template>
|
2767
2777
|
<xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="update_xml_step1">
|
2768
|
-
<xsl:element name="preferred" namespace="{$namespace_full}">
|
2778
|
+
<xsl:element name="fmt-preferred" namespace="{$namespace_full}">
|
2769
2779
|
<xsl:copy-of select="@*"/>
|
2770
2780
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2771
2781
|
</xsl:element>
|
@@ -2775,7 +2785,7 @@
|
|
2775
2785
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2776
2786
|
</xsl:template>
|
2777
2787
|
<xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="update_xml_step1">
|
2778
|
-
<xsl:element name="admitted" namespace="{$namespace_full}">
|
2788
|
+
<xsl:element name="fmt-admitted" namespace="{$namespace_full}">
|
2779
2789
|
<xsl:copy-of select="@*"/>
|
2780
2790
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2781
2791
|
</xsl:element>
|
@@ -2785,32 +2795,32 @@
|
|
2785
2795
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2786
2796
|
</xsl:template>
|
2787
2797
|
<xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="update_xml_step1">
|
2788
|
-
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
2798
|
+
<xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
|
2789
2799
|
<xsl:copy-of select="@*"/>
|
2790
2800
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2791
2801
|
</xsl:element>
|
2792
2802
|
</xsl:template>
|
2793
2803
|
|
2794
|
-
<xsl:template match="mn:fmt-definition" mode="update_xml_step1">
|
2804
|
+
<!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
|
2795
2805
|
<xsl:element name="definition" namespace="{$namespace_full}">
|
2796
2806
|
<xsl:copy-of select="@*"/>
|
2797
2807
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2798
2808
|
</xsl:element>
|
2799
2809
|
</xsl:template>
|
2800
|
-
|
2810
|
+
|
2801
2811
|
<xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
|
2802
2812
|
<xsl:element name="termsource" namespace="{$namespace_full}">
|
2803
2813
|
<xsl:copy-of select="@*"/>
|
2804
2814
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2805
2815
|
</xsl:element>
|
2806
2816
|
</xsl:template>
|
2807
|
-
|
2817
|
+
|
2808
2818
|
<xsl:template match="mn:fmt-source" mode="update_xml_step1">
|
2809
2819
|
<xsl:element name="source" namespace="{$namespace_full}">
|
2810
2820
|
<xsl:copy-of select="@*"/>
|
2811
2821
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2812
2822
|
</xsl:element>
|
2813
|
-
</xsl:template>
|
2823
|
+
</xsl:template> -->
|
2814
2824
|
|
2815
2825
|
<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">
|
2816
2826
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -2833,12 +2843,12 @@
|
|
2833
2843
|
</xsl:template>
|
2834
2844
|
|
2835
2845
|
<xsl:template match="mn:identifier" mode="update_xml_step1"/>
|
2836
|
-
<xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
|
2846
|
+
<!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
|
2837
2847
|
<xsl:element name="identifier" namespace="{$namespace_full}">
|
2838
2848
|
<xsl:copy-of select="@*"/>
|
2839
2849
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2840
2850
|
</xsl:element>
|
2841
|
-
</xsl:template>
|
2851
|
+
</xsl:template> -->
|
2842
2852
|
|
2843
2853
|
<xsl:template match="mn:concept" mode="update_xml_step1"/>
|
2844
2854
|
|
@@ -2848,51 +2858,53 @@
|
|
2848
2858
|
|
2849
2859
|
<xsl:template match="mn:eref" mode="update_xml_step1"/>
|
2850
2860
|
|
2851
|
-
<xsl:template match="mn:fmt-eref" mode="update_xml_step1">
|
2861
|
+
<!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
|
2852
2862
|
<xsl:element name="eref" namespace="{$namespace_full}">
|
2853
2863
|
<xsl:copy-of select="@*"/>
|
2854
2864
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2855
2865
|
</xsl:element>
|
2856
|
-
</xsl:template>
|
2866
|
+
</xsl:template> -->
|
2857
2867
|
|
2858
2868
|
<xsl:template match="mn:xref" mode="update_xml_step1"/>
|
2859
2869
|
|
2860
|
-
<xsl:template match="mn:fmt-xref" mode="update_xml_step1">
|
2870
|
+
<!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
|
2861
2871
|
<xsl:element name="xref" namespace="{$namespace_full}">
|
2862
2872
|
<xsl:copy-of select="@*"/>
|
2863
2873
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2864
2874
|
</xsl:element>
|
2865
|
-
</xsl:template>
|
2875
|
+
</xsl:template> -->
|
2866
2876
|
|
2867
2877
|
<xsl:template match="mn:link" mode="update_xml_step1"/>
|
2868
2878
|
|
2869
|
-
<xsl:template match="mn:fmt-link" mode="update_xml_step1">
|
2879
|
+
<!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
|
2870
2880
|
<xsl:element name="link" namespace="{$namespace_full}">
|
2871
2881
|
<xsl:copy-of select="@*"/>
|
2872
2882
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2873
2883
|
</xsl:element>
|
2874
|
-
</xsl:template>
|
2884
|
+
</xsl:template> -->
|
2875
2885
|
|
2876
2886
|
<xsl:template match="mn:origin" mode="update_xml_step1"/>
|
2877
2887
|
|
2878
|
-
<xsl:template match="mn:fmt-origin" mode="update_xml_step1">
|
2888
|
+
<!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
|
2879
2889
|
<xsl:element name="origin" namespace="{$namespace_full}">
|
2880
2890
|
<xsl:copy-of select="@*"/>
|
2881
2891
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2882
2892
|
</xsl:element>
|
2883
|
-
</xsl:template>
|
2893
|
+
</xsl:template> -->
|
2884
2894
|
|
2885
2895
|
<xsl:template match="mn:erefstack" mode="update_xml_step1"/>
|
2886
2896
|
|
2887
2897
|
<xsl:template match="mn:svgmap" mode="update_xml_step1"/>
|
2888
2898
|
|
2889
|
-
<xsl:template match="mn:
|
2899
|
+
<xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
|
2890
2900
|
|
2891
|
-
|
2892
|
-
|
2893
|
-
|
2894
|
-
|
2895
|
-
|
2901
|
+
<xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
|
2902
|
+
<xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
|
2903
|
+
<xsl:value-of select="."/>
|
2904
|
+
</xsl:element>
|
2905
|
+
</xsl:template>
|
2906
|
+
|
2907
|
+
<xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
|
2896
2908
|
|
2897
2909
|
<!-- END: update new Presentation XML -->
|
2898
2910
|
|
@@ -3088,7 +3100,7 @@
|
|
3088
3100
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
3089
3101
|
<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>
|
3090
3102
|
|
3091
|
-
<xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:link[not(contains(
|
3103
|
+
<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">
|
3092
3104
|
|
3093
3105
|
<xsl:variable name="parent" select="local-name(..)"/>
|
3094
3106
|
|
@@ -3207,7 +3219,7 @@
|
|
3207
3219
|
</xsl:if>
|
3208
3220
|
</xsl:template>
|
3209
3221
|
|
3210
|
-
<xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
|
3222
|
+
<xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
|
3211
3223
|
<xsl:copy-of select="."/>
|
3212
3224
|
</xsl:template>
|
3213
3225
|
|
@@ -3534,7 +3546,7 @@
|
|
3534
3546
|
</fo:block>
|
3535
3547
|
</xsl:template> <!-- copyright-statement -->
|
3536
3548
|
|
3537
|
-
<xsl:template match="mn:copyright-statement//mn:title">
|
3549
|
+
<xsl:template match="mn:copyright-statement//mn:fmt-title">
|
3538
3550
|
<!-- process in the template 'title' -->
|
3539
3551
|
<xsl:call-template name="title"/>
|
3540
3552
|
</xsl:template> <!-- copyright-statement//title -->
|
@@ -3550,7 +3562,7 @@
|
|
3550
3562
|
</fo:block>
|
3551
3563
|
</xsl:template> <!-- license-statement -->
|
3552
3564
|
|
3553
|
-
<xsl:template match="mn:license-statement//mn:title">
|
3565
|
+
<xsl:template match="mn:license-statement//mn:fmt-title">
|
3554
3566
|
<!-- process in the template 'title' -->
|
3555
3567
|
<xsl:call-template name="title"/>
|
3556
3568
|
</xsl:template> <!-- license-statement/title -->
|
@@ -3567,7 +3579,7 @@
|
|
3567
3579
|
</fo:block>
|
3568
3580
|
</xsl:template> <!-- legal-statement -->
|
3569
3581
|
|
3570
|
-
<xsl:template match="mn:legal-statement//mn:title">
|
3582
|
+
<xsl:template match="mn:legal-statement//mn:fmt-title">
|
3571
3583
|
<!-- process in the template 'title' -->
|
3572
3584
|
<xsl:call-template name="title"/>
|
3573
3585
|
|
@@ -3587,7 +3599,7 @@
|
|
3587
3599
|
</fo:block>
|
3588
3600
|
</xsl:template> <!-- feedback-statement -->
|
3589
3601
|
|
3590
|
-
<xsl:template match="mn:feedback-statement//mn:title">
|
3602
|
+
<xsl:template match="mn:feedback-statement//mn:fmt-title">
|
3591
3603
|
<!-- process in the template 'title' -->
|
3592
3604
|
<xsl:call-template name="title"/>
|
3593
3605
|
</xsl:template>
|
@@ -3612,7 +3624,7 @@
|
|
3612
3624
|
<xsl:template name="refine_link-style">
|
3613
3625
|
</xsl:template> <!-- refine_link-style -->
|
3614
3626
|
|
3615
|
-
<xsl:template match="mn:link" name="link">
|
3627
|
+
<xsl:template match="mn:fmt-link" name="link">
|
3616
3628
|
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
3617
3629
|
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
3618
3630
|
<xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
|
@@ -3832,7 +3844,7 @@
|
|
3832
3844
|
<xsl:value-of select="."/>
|
3833
3845
|
</xsl:attribute>
|
3834
3846
|
</xsl:for-each>
|
3835
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
3847
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
3836
3848
|
</xsl:when>
|
3837
3849
|
|
3838
3850
|
<xsl:otherwise>
|
@@ -3874,11 +3886,11 @@
|
|
3874
3886
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3875
3887
|
</xsl:if>
|
3876
3888
|
|
3877
|
-
<xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
|
3889
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
|
3878
3890
|
</fo:block>
|
3879
3891
|
|
3880
3892
|
<xsl:apply-templates select="mn:dl"/> <!-- Key table -->
|
3881
|
-
<xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
|
3893
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
|
3882
3894
|
|
3883
3895
|
</fo:block-container>
|
3884
3896
|
</fo:block-container>
|
@@ -4179,7 +4191,7 @@
|
|
4179
4191
|
|
4180
4192
|
<!-- end mode="syntax_highlight" -->
|
4181
4193
|
|
4182
|
-
<xsl:template match="mn:sourcecode/mn:name">
|
4194
|
+
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
4183
4195
|
<xsl:if test="normalize-space() != ''">
|
4184
4196
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4185
4197
|
<xsl:apply-templates/>
|
@@ -4197,7 +4209,7 @@
|
|
4197
4209
|
</xsl:choose>
|
4198
4210
|
</xsl:template>
|
4199
4211
|
|
4200
|
-
<xsl:template match="mn:annotation">
|
4212
|
+
<xsl:template match="mn:callout-annotation">
|
4201
4213
|
<xsl:variable name="annotation-id" select="@id"/>
|
4202
4214
|
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
4203
4215
|
<fo:block id="{$annotation-id}" white-space="nowrap">
|
@@ -4209,7 +4221,7 @@
|
|
4209
4221
|
</fo:block>
|
4210
4222
|
</xsl:template>
|
4211
4223
|
|
4212
|
-
<xsl:template match="mn:annotation/mn:p">
|
4224
|
+
<xsl:template match="mn:callout-annotation/mn:p">
|
4213
4225
|
<xsl:param name="callout"/>
|
4214
4226
|
<fo:inline id="{@id}">
|
4215
4227
|
<xsl:call-template name="setNamedDestination"/>
|
@@ -4361,7 +4373,7 @@
|
|
4361
4373
|
<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
|
4362
4374
|
<change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
|
4363
4375
|
<xsl:choose>
|
4364
|
-
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (
|
4376
|
+
<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>
|
4365
4377
|
<xsl:otherwise>
|
4366
4378
|
<xsl:variable name="tag">
|
4367
4379
|
<xsl:call-template name="insertTag">
|
@@ -4762,12 +4774,12 @@
|
|
4762
4774
|
<xsl:template match="mn:permission">
|
4763
4775
|
<xsl:call-template name="setNamedDestination"/>
|
4764
4776
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
4765
|
-
<xsl:apply-templates select="mn:name"/>
|
4766
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
4777
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
4778
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4767
4779
|
</fo:block>
|
4768
4780
|
</xsl:template>
|
4769
4781
|
|
4770
|
-
<xsl:template match="mn:permission/mn:name">
|
4782
|
+
<xsl:template match="mn:permission/mn:fmt-name">
|
4771
4783
|
<xsl:if test="normalize-space() != ''">
|
4772
4784
|
<fo:block xsl:use-attribute-sets="permission-name-style">
|
4773
4785
|
<xsl:apply-templates/>
|
@@ -4789,15 +4801,15 @@
|
|
4789
4801
|
<xsl:template match="mn:requirement">
|
4790
4802
|
<xsl:call-template name="setNamedDestination"/>
|
4791
4803
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
4792
|
-
<xsl:apply-templates select="mn:name"/>
|
4804
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
4793
4805
|
<xsl:apply-templates select="mn:label"/>
|
4794
4806
|
<xsl:apply-templates select="@obligation"/>
|
4795
4807
|
<xsl:apply-templates select="mn:subject"/>
|
4796
|
-
<xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:label) and not(self::mn:subject)]"/>
|
4808
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
|
4797
4809
|
</fo:block>
|
4798
4810
|
</xsl:template>
|
4799
4811
|
|
4800
|
-
<xsl:template match="mn:requirement/mn:name">
|
4812
|
+
<xsl:template match="mn:requirement/mn:fmt-name">
|
4801
4813
|
<xsl:if test="normalize-space() != ''">
|
4802
4814
|
|
4803
4815
|
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
@@ -4833,12 +4845,12 @@
|
|
4833
4845
|
<xsl:template match="mn:recommendation">
|
4834
4846
|
<xsl:call-template name="setNamedDestination"/>
|
4835
4847
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
4836
|
-
<xsl:apply-templates select="mn:name"/>
|
4837
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
4848
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
4849
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4838
4850
|
</fo:block>
|
4839
4851
|
</xsl:template>
|
4840
4852
|
|
4841
|
-
<xsl:template match="mn:recommendation/mn:name">
|
4853
|
+
<xsl:template match="mn:recommendation/mn:fmt-name">
|
4842
4854
|
<xsl:if test="normalize-space() != ''">
|
4843
4855
|
|
4844
4856
|
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
@@ -5092,11 +5104,11 @@
|
|
5092
5104
|
|
5093
5105
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
5094
5106
|
</xsl:if>
|
5095
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
5107
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
5096
5108
|
</fo:block>
|
5097
5109
|
</xsl:template>
|
5098
5110
|
|
5099
|
-
<xsl:template match="mn:term/mn:name">
|
5111
|
+
<xsl:template match="mn:term/mn:fmt-name">
|
5100
5112
|
<xsl:if test="normalize-space() != ''">
|
5101
5113
|
<!-- <xsl:variable name="level">
|
5102
5114
|
<xsl:call-template name="getLevelTermName"/>
|
@@ -5115,7 +5127,7 @@
|
|
5115
5127
|
<!-- origin -->
|
5116
5128
|
<!-- modification -->
|
5117
5129
|
<!-- ====== -->
|
5118
|
-
<xsl:template match="mn:termsource" name="termsource">
|
5130
|
+
<xsl:template match="mn:fmt-termsource" name="termsource">
|
5119
5131
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
5120
5132
|
|
5121
5133
|
<xsl:call-template name="refine_termsource-style"/>
|
@@ -5154,24 +5166,24 @@
|
|
5154
5166
|
</fo:block>
|
5155
5167
|
</xsl:template>
|
5156
5168
|
|
5157
|
-
<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">
|
5169
|
+
<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">
|
5158
5170
|
<xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
|
5159
5171
|
</xsl:template>
|
5160
5172
|
|
5161
|
-
<xsl:template match="mn:termsource/text()">
|
5173
|
+
<xsl:template match="mn:fmt-termsource/text()">
|
5162
5174
|
<xsl:if test="normalize-space() != ''">
|
5163
5175
|
<xsl:value-of select="."/>
|
5164
5176
|
</xsl:if>
|
5165
5177
|
</xsl:template>
|
5166
5178
|
|
5167
5179
|
<!-- text SOURCE: -->
|
5168
|
-
<xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
|
5180
|
+
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
5169
5181
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
5170
5182
|
<xsl:value-of select="."/>
|
5171
5183
|
</fo:inline>
|
5172
5184
|
</xsl:template>
|
5173
5185
|
|
5174
|
-
<xsl:template match="mn:origin">
|
5186
|
+
<xsl:template match="mn:fmt-origin">
|
5175
5187
|
<xsl:call-template name="insert_basic_link">
|
5176
5188
|
<xsl:with-param name="element">
|
5177
5189
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -5217,7 +5229,7 @@
|
|
5217
5229
|
<!-- ====== -->
|
5218
5230
|
|
5219
5231
|
<!-- Preferred, admitted, deprecated -->
|
5220
|
-
<xsl:template match="mn:preferred">
|
5232
|
+
<xsl:template match="mn:fmt-preferred">
|
5221
5233
|
<xsl:variable name="level">
|
5222
5234
|
<xsl:call-template name="getLevel"/>
|
5223
5235
|
</xsl:variable>
|
@@ -5228,15 +5240,15 @@
|
|
5228
5240
|
</xsl:variable>
|
5229
5241
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
5230
5242
|
|
5231
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
|
5243
|
+
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
5232
5244
|
|
5233
5245
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
5234
5246
|
|
5235
|
-
<xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
|
5247
|
+
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
5236
5248
|
<xsl:call-template name="setIDforNamedDestination"/>
|
5237
5249
|
</xsl:for-each>
|
5238
5250
|
|
5239
|
-
<xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
|
5251
|
+
<xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
|
5240
5252
|
</fo:block>
|
5241
5253
|
</xsl:if>
|
5242
5254
|
|
@@ -5260,13 +5272,13 @@
|
|
5260
5272
|
<!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
|
5261
5273
|
<xsl:template match="mn:domain"/>
|
5262
5274
|
|
5263
|
-
<xsl:template match="mn:admitted">
|
5275
|
+
<xsl:template match="mn:fmt-admitted">
|
5264
5276
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
5265
5277
|
<xsl:apply-templates/>
|
5266
5278
|
</fo:block>
|
5267
5279
|
</xsl:template>
|
5268
5280
|
|
5269
|
-
<xsl:template match="mn:deprecates">
|
5281
|
+
<xsl:template match="mn:fmt-deprecates">
|
5270
5282
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
5271
5283
|
<xsl:apply-templates/>
|
5272
5284
|
</fo:block>
|
@@ -5280,7 +5292,7 @@
|
|
5280
5292
|
|
5281
5293
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
5282
5294
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
5283
|
-
<xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
|
5295
|
+
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
5284
5296
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
|
5285
5297
|
</xsl:template>
|
5286
5298
|
<!-- End Preferred, admitted, deprecated -->
|
@@ -5299,16 +5311,16 @@
|
|
5299
5311
|
<!-- ========== -->
|
5300
5312
|
<!-- definition -->
|
5301
5313
|
<!-- ========== -->
|
5302
|
-
<xsl:template match="mn:definition">
|
5314
|
+
<xsl:template match="mn:fmt-definition">
|
5303
5315
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
5304
5316
|
<xsl:apply-templates/>
|
5305
5317
|
</fo:block>
|
5306
5318
|
</xsl:template>
|
5307
5319
|
|
5308
|
-
<xsl:template match="mn:definition[preceding-sibling::mn:domain]">
|
5320
|
+
<xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
|
5309
5321
|
<xsl:apply-templates/>
|
5310
5322
|
</xsl:template>
|
5311
|
-
<xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
|
5323
|
+
<xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
|
5312
5324
|
<fo:inline> <xsl:apply-templates/></fo:inline>
|
5313
5325
|
<fo:block/>
|
5314
5326
|
</xsl:template>
|
@@ -5378,12 +5390,12 @@
|
|
5378
5390
|
<xsl:call-template name="refine_termexample-style"/>
|
5379
5391
|
<xsl:call-template name="setBlockSpanAll"/>
|
5380
5392
|
|
5381
|
-
<xsl:apply-templates select="mn:name"/>
|
5382
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
5393
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
5394
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
5383
5395
|
</fo:block>
|
5384
5396
|
</xsl:template>
|
5385
5397
|
|
5386
|
-
<xsl:template match="mn:termexample/mn:name">
|
5398
|
+
<xsl:template match="mn:termexample/mn:fmt-name">
|
5387
5399
|
<xsl:if test="normalize-space() != ''">
|
5388
5400
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
5389
5401
|
<xsl:call-template name="refine_termexample-name-style"/>
|
@@ -5434,7 +5446,7 @@
|
|
5434
5446
|
<xsl:call-template name="refine_example-style"/>
|
5435
5447
|
|
5436
5448
|
<xsl:variable name="fo_element">
|
5437
|
-
<xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:name)][1][self::mn:sourcecode]">block</xsl:if>inline
|
5449
|
+
<xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>inline
|
5438
5450
|
</xsl:variable>
|
5439
5451
|
|
5440
5452
|
<fo:block-container margin-left="0mm" role="SKIP">
|
@@ -5445,7 +5457,7 @@
|
|
5445
5457
|
|
5446
5458
|
<!-- display name 'EXAMPLE' in a separate block -->
|
5447
5459
|
<fo:block>
|
5448
|
-
<xsl:apply-templates select="mn:name">
|
5460
|
+
<xsl:apply-templates select="mn:fmt-name">
|
5449
5461
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5450
5462
|
</xsl:apply-templates>
|
5451
5463
|
</fo:block>
|
@@ -5453,7 +5465,7 @@
|
|
5453
5465
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
5454
5466
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
5455
5467
|
<xsl:variable name="example_body">
|
5456
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]">
|
5468
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
5457
5469
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5458
5470
|
</xsl:apply-templates>
|
5459
5471
|
</xsl:variable>
|
@@ -5480,14 +5492,14 @@
|
|
5480
5492
|
<fo:list-item>
|
5481
5493
|
<fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
|
5482
5494
|
<fo:block>
|
5483
|
-
<xsl:apply-templates select="mn:name">
|
5495
|
+
<xsl:apply-templates select="mn:fmt-name">
|
5484
5496
|
<xsl:with-param name="fo_element">block</xsl:with-param>
|
5485
5497
|
</xsl:apply-templates>
|
5486
5498
|
</fo:block>
|
5487
5499
|
</fo:list-item-label>
|
5488
5500
|
<fo:list-item-body start-indent="body-start()">
|
5489
5501
|
<fo:block>
|
5490
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]">
|
5502
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
5491
5503
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5492
5504
|
</xsl:apply-templates>
|
5493
5505
|
</fo:block>
|
@@ -5500,21 +5512,21 @@
|
|
5500
5512
|
|
5501
5513
|
<!-- display 'EXAMPLE' and first element in the same line -->
|
5502
5514
|
<fo:block>
|
5503
|
-
<xsl:apply-templates select="mn:name">
|
5515
|
+
<xsl:apply-templates select="mn:fmt-name">
|
5504
5516
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5505
5517
|
</xsl:apply-templates>
|
5506
5518
|
<fo:inline>
|
5507
|
-
<xsl:apply-templates select="*[not(self::mn:name)][1]">
|
5519
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
|
5508
5520
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5509
5521
|
</xsl:apply-templates>
|
5510
5522
|
</fo:inline>
|
5511
5523
|
</fo:block>
|
5512
5524
|
|
5513
|
-
<xsl:if test="*[not(self::mn:name)][position() > 1]">
|
5525
|
+
<xsl:if test="*[not(self::mn:fmt-name)][position() > 1]">
|
5514
5526
|
<!-- display further elements in blocks -->
|
5515
5527
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
5516
5528
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
5517
|
-
<xsl:apply-templates select="*[not(self::mn:name)][position() > 1]">
|
5529
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-name)][position() > 1]">
|
5518
5530
|
<xsl:with-param name="fo_element" select="'block'"/>
|
5519
5531
|
</xsl:apply-templates>
|
5520
5532
|
</fo:block-container>
|
@@ -5528,7 +5540,7 @@
|
|
5528
5540
|
</xsl:template>
|
5529
5541
|
|
5530
5542
|
<!-- example/name -->
|
5531
|
-
<xsl:template match="mn:example/mn:name">
|
5543
|
+
<xsl:template match="mn:example/mn:fmt-name">
|
5532
5544
|
<xsl:param name="fo_element">block</xsl:param>
|
5533
5545
|
|
5534
5546
|
<xsl:choose>
|
@@ -5553,7 +5565,7 @@
|
|
5553
5565
|
</xsl:template>
|
5554
5566
|
|
5555
5567
|
<!-- table/example/name, table/tfoot//example/name -->
|
5556
|
-
<xsl:template match="mn:table/mn:example/mn:name | mn:table/mn:tfoot//mn:example/mn:name">
|
5568
|
+
<xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
|
5557
5569
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
5558
5570
|
<xsl:apply-templates/>
|
5559
5571
|
</fo:inline>
|
@@ -5734,7 +5746,7 @@
|
|
5734
5746
|
</xsl:if>
|
5735
5747
|
|
5736
5748
|
<xsl:call-template name="setBordersTableArray"/>
|
5737
|
-
<xsl:if test="count(*) = 1 and (
|
5749
|
+
<xsl:if test="count(*) = 1 and (*[1][self::mn:fmt-stem] or *[1][self::mn:figure])">
|
5738
5750
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
5739
5751
|
</xsl:if>
|
5740
5752
|
<xsl:if test="ancestor::mn:tfoot">
|
@@ -5895,7 +5907,7 @@
|
|
5895
5907
|
|
5896
5908
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
5897
5909
|
|
5898
|
-
<xsl:for-each select="mn:name">
|
5910
|
+
<xsl:for-each select="mn:fmt-name">
|
5899
5911
|
<xsl:call-template name="setIDforNamedDestination"/>
|
5900
5912
|
</xsl:for-each>
|
5901
5913
|
|
@@ -5925,6 +5937,10 @@
|
|
5925
5937
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
5926
5938
|
</xsl:call-template>
|
5927
5939
|
|
5940
|
+
<xsl:call-template name="setTableStyles">
|
5941
|
+
<xsl:with-param name="scope">table</xsl:with-param>
|
5942
|
+
</xsl:call-template>
|
5943
|
+
|
5928
5944
|
</xsl:element>
|
5929
5945
|
</xsl:variable>
|
5930
5946
|
|
@@ -5945,7 +5961,7 @@
|
|
5945
5961
|
</xsl:attribute>
|
5946
5962
|
</xsl:for-each>
|
5947
5963
|
|
5948
|
-
<xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[
|
5964
|
+
<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"/>
|
5949
5965
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
5950
5966
|
<!-- <xsl:choose>
|
5951
5967
|
<xsl:when test="$namespace = 'plateau'"></xsl:when>
|
@@ -6001,7 +6017,7 @@
|
|
6001
6017
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
6002
6018
|
</xsl:when>
|
6003
6019
|
<xsl:otherwise>
|
6004
|
-
<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 -->
|
6020
|
+
<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 -->
|
6005
6021
|
</xsl:otherwise>
|
6006
6022
|
</xsl:choose>
|
6007
6023
|
|
@@ -6098,7 +6114,7 @@
|
|
6098
6114
|
</xsl:template>
|
6099
6115
|
|
6100
6116
|
<!-- table/name-->
|
6101
|
-
<xsl:template match="*[local-name()='table']/mn:name">
|
6117
|
+
<xsl:template match="*[local-name()='table']/mn:fmt-name">
|
6102
6118
|
<xsl:param name="continued"/>
|
6103
6119
|
<xsl:param name="cols-count"/>
|
6104
6120
|
<xsl:if test="normalize-space() != ''">
|
@@ -6164,7 +6180,7 @@
|
|
6164
6180
|
</xsl:template>
|
6165
6181
|
|
6166
6182
|
<!-- SOURCE: ... -->
|
6167
|
-
<xsl:template match="*[local-name()='table']/mn:source" priority="2">
|
6183
|
+
<xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
|
6168
6184
|
<xsl:call-template name="termsource"/>
|
6169
6185
|
</xsl:template>
|
6170
6186
|
|
@@ -6329,11 +6345,11 @@
|
|
6329
6345
|
<xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
|
6330
6346
|
</xsl:template>
|
6331
6347
|
|
6332
|
-
<xsl:template match="mn:termsource" mode="td_text">
|
6333
|
-
<xsl:value-of select="
|
6348
|
+
<xsl:template match="mn:fmt-termsource" mode="td_text">
|
6349
|
+
<xsl:value-of select="mn:fmt-origin/@citeas"/>
|
6334
6350
|
</xsl:template>
|
6335
6351
|
|
6336
|
-
<xsl:template match="mn:link" mode="td_text">
|
6352
|
+
<xsl:template match="mn:fmt-link" mode="td_text">
|
6337
6353
|
<xsl:value-of select="@target"/>
|
6338
6354
|
</xsl:template>
|
6339
6355
|
|
@@ -6538,12 +6554,12 @@
|
|
6538
6554
|
|
6539
6555
|
<xsl:call-template name="refine_table-header-title-style"/>
|
6540
6556
|
|
6541
|
-
<xsl:apply-templates select="ancestor::mn:table/mn:name">
|
6557
|
+
<xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
|
6542
6558
|
<xsl:with-param name="continued">true</xsl:with-param>
|
6543
6559
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
6544
6560
|
</xsl:apply-templates>
|
6545
6561
|
|
6546
|
-
<xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
6562
|
+
<xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
6547
6563
|
<fo:block role="SKIP"/>
|
6548
6564
|
</xsl:if>
|
6549
6565
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
@@ -6586,7 +6602,7 @@
|
|
6586
6602
|
<xsl:param name="colwidths"/>
|
6587
6603
|
<xsl:param name="colgroup"/>
|
6588
6604
|
|
6589
|
-
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ..//mn:fn[
|
6605
|
+
<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"/>
|
6590
6606
|
|
6591
6607
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
6592
6608
|
</xsl:variable>
|
@@ -6627,6 +6643,12 @@
|
|
6627
6643
|
</xsl:choose>
|
6628
6644
|
</xsl:for-each>
|
6629
6645
|
|
6646
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
6647
|
+
<xsl:call-template name="setTableStyles">
|
6648
|
+
<xsl:with-param name="scope">table</xsl:with-param>
|
6649
|
+
</xsl:call-template>
|
6650
|
+
</xsl:for-each>
|
6651
|
+
|
6630
6652
|
<xsl:choose>
|
6631
6653
|
<xsl:when test="xalan:nodeset($colgroup)//mn:col">
|
6632
6654
|
<xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
|
@@ -6643,10 +6665,22 @@
|
|
6643
6665
|
|
6644
6666
|
<fo:table-body role="SKIP">
|
6645
6667
|
<fo:table-row role="SKIP">
|
6668
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
6669
|
+
<xsl:call-template name="setTableStyles">
|
6670
|
+
<xsl:with-param name="scope">ancestor_table</xsl:with-param>
|
6671
|
+
</xsl:call-template>
|
6672
|
+
</xsl:for-each>
|
6673
|
+
|
6646
6674
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
|
6647
6675
|
|
6648
6676
|
<xsl:call-template name="refine_table-footer-cell-style"/>
|
6649
6677
|
|
6678
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
6679
|
+
<xsl:call-template name="setTableStyles">
|
6680
|
+
<xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
|
6681
|
+
</xsl:call-template>
|
6682
|
+
</xsl:for-each>
|
6683
|
+
|
6650
6684
|
<xsl:call-template name="setBordersTableArray"/>
|
6651
6685
|
|
6652
6686
|
<!-- fn will be processed inside 'note' processing -->
|
@@ -6654,7 +6688,7 @@
|
|
6654
6688
|
<xsl:apply-templates select="../mn:dl"/>
|
6655
6689
|
<xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
|
6656
6690
|
<xsl:apply-templates select="../mn:example"/>
|
6657
|
-
<xsl:apply-templates select="../mn:source"/>
|
6691
|
+
<xsl:apply-templates select="../mn:fmt-source"/>
|
6658
6692
|
|
6659
6693
|
<xsl:variable name="isDisplayRowSeparator">
|
6660
6694
|
</xsl:variable>
|
@@ -6704,7 +6738,7 @@
|
|
6704
6738
|
</xsl:choose>
|
6705
6739
|
</xsl:variable>
|
6706
6740
|
<!-- if there isn't 'thead' and there is a table's title -->
|
6707
|
-
<xsl:if test="not(ancestor::mn:table/mn:thead) and ancestor::mn:table/mn:name">
|
6741
|
+
<xsl:if test="not(ancestor::mn:table/mn:thead) and ancestor::mn:table/mn:fmt-name">
|
6708
6742
|
<fo:table-header>
|
6709
6743
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
6710
6744
|
<xsl:call-template name="table-header-title">
|
@@ -6732,7 +6766,7 @@
|
|
6732
6766
|
<xsl:variable name="title_continued"><xsl:value-of select="$title_continued_in_parenthesis"/>
|
6733
6767
|
</xsl:variable>
|
6734
6768
|
|
6735
|
-
<xsl:variable name="title_start" select="ancestor::mn:table[1]/mn:name/node()[1][self::text()]"/>
|
6769
|
+
<xsl:variable name="title_start" select="ancestor::mn:table[1]/mn:fmt-name/node()[1][self::text()]"/>
|
6736
6770
|
<xsl:variable name="table_number" select="substring-before($title_start, '—')"/>
|
6737
6771
|
|
6738
6772
|
<fo:table-row height="0" keep-with-next.within-page="always" role="SKIP">
|
@@ -6880,7 +6914,12 @@
|
|
6880
6914
|
|
6881
6915
|
<xsl:template name="setTableRowAttributes">
|
6882
6916
|
|
6883
|
-
<xsl:
|
6917
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
6918
|
+
<xsl:call-template name="setTableStyles">
|
6919
|
+
<xsl:with-param name="scope">ancestor_table</xsl:with-param>
|
6920
|
+
</xsl:call-template>
|
6921
|
+
</xsl:for-each>
|
6922
|
+
<xsl:call-template name="setTableStyles"/>
|
6884
6923
|
|
6885
6924
|
</xsl:template> <!-- setTableRowAttributes -->
|
6886
6925
|
<!-- ===================== -->
|
@@ -6933,7 +6972,13 @@
|
|
6933
6972
|
</xsl:attribute>
|
6934
6973
|
</xsl:if>
|
6935
6974
|
<xsl:call-template name="display-align"/>
|
6936
|
-
|
6975
|
+
|
6976
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
6977
|
+
<xsl:call-template name="setTableStyles">
|
6978
|
+
<xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
|
6979
|
+
</xsl:call-template>
|
6980
|
+
</xsl:for-each>
|
6981
|
+
<xsl:call-template name="setTableStyles"/>
|
6937
6982
|
</xsl:template>
|
6938
6983
|
|
6939
6984
|
<xsl:template name="display-align">
|
@@ -6949,7 +6994,8 @@
|
|
6949
6994
|
</xsl:if>
|
6950
6995
|
</xsl:template>
|
6951
6996
|
|
6952
|
-
<xsl:template name="
|
6997
|
+
<xsl:template name="setTableStyles">
|
6998
|
+
<xsl:param name="scope">cell</xsl:param>
|
6953
6999
|
<xsl:variable name="styles__">
|
6954
7000
|
<xsl:call-template name="split">
|
6955
7001
|
<xsl:with-param name="pText" select="concat(@style,';')"/>
|
@@ -6958,19 +7004,35 @@
|
|
6958
7004
|
</xsl:variable>
|
6959
7005
|
<xsl:variable name="quot">"</xsl:variable>
|
6960
7006
|
<xsl:variable name="styles_">
|
7007
|
+
<!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
|
7008
|
+
<xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
|
7009
|
+
<style name="border-top">none</style>
|
7010
|
+
<style name="border-right">none</style>
|
7011
|
+
<style name="border-left">none</style>
|
7012
|
+
<style name="border-bottom">none</style>
|
7013
|
+
<style name="color">inherit</style>
|
7014
|
+
<style name="background-color">transparent</style>
|
7015
|
+
</xsl:if>
|
7016
|
+
|
6961
7017
|
<xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
|
6962
7018
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
6963
7019
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
6964
|
-
<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'">
|
7020
|
+
<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'">
|
6965
7021
|
<style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
|
6966
7022
|
</xsl:if>
|
7023
|
+
<xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
|
7024
|
+
<style name="{$key}-top"><xsl:value-of select="$value"/></style>
|
7025
|
+
<style name="{$key}-right"><xsl:value-of select="$value"/></style>
|
7026
|
+
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
7027
|
+
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
7028
|
+
</xsl:if>
|
6967
7029
|
</xsl:for-each>
|
6968
7030
|
</xsl:variable>
|
6969
7031
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
6970
7032
|
<xsl:for-each select="$styles/style">
|
6971
7033
|
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
6972
7034
|
</xsl:for-each>
|
6973
|
-
</xsl:template> <!--
|
7035
|
+
</xsl:template> <!-- setTableStyles -->
|
6974
7036
|
|
6975
7037
|
<!-- cell in table body, footer -->
|
6976
7038
|
<xsl:template match="*[local-name()='td']" name="td">
|
@@ -7034,11 +7096,11 @@
|
|
7034
7096
|
|
7035
7097
|
<xsl:call-template name="refine_table-note-name-style"/>
|
7036
7098
|
|
7037
|
-
<xsl:apply-templates select="mn:name"/>
|
7099
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
7038
7100
|
|
7039
7101
|
</fo:inline>
|
7040
7102
|
|
7041
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
7103
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
7042
7104
|
</fo:block>
|
7043
7105
|
</xsl:template> <!-- table/note -->
|
7044
7106
|
|
@@ -7177,7 +7239,7 @@
|
|
7177
7239
|
|
7178
7240
|
<!-- footnotes for table's name rendering -->
|
7179
7241
|
<xsl:template name="table_name_fn_display">
|
7180
|
-
<xsl:for-each select="mn:name//mn:fn">
|
7242
|
+
<xsl:for-each select="mn:fmt-name//mn:fn">
|
7181
7243
|
<xsl:variable name="reference" select="@reference"/>
|
7182
7244
|
<fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
|
7183
7245
|
<fo:block margin-bottom="12pt">
|
@@ -7834,7 +7896,7 @@
|
|
7834
7896
|
</xsl:if> -->
|
7835
7897
|
|
7836
7898
|
<xsl:variable name="words">
|
7837
|
-
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
|
7899
|
+
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
|
7838
7900
|
<word>
|
7839
7901
|
<xsl:copy-of select="."/>
|
7840
7902
|
</word>
|
@@ -7893,7 +7955,7 @@
|
|
7893
7955
|
</xsl:copy>
|
7894
7956
|
</xsl:template>
|
7895
7957
|
|
7896
|
-
<xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
|
7958
|
+
<xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
|
7897
7959
|
|
7898
7960
|
<xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
|
7899
7961
|
<xsl:variable name="formatting_tags">
|
@@ -7928,7 +7990,7 @@
|
|
7928
7990
|
</xsl:call-template>
|
7929
7991
|
</xsl:template>
|
7930
7992
|
|
7931
|
-
<xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
|
7993
|
+
<xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
|
7932
7994
|
<xsl:variable name="link">
|
7933
7995
|
<link_updated>
|
7934
7996
|
<xsl:variable name="target_text">
|
@@ -8144,7 +8206,7 @@
|
|
8144
8206
|
|
8145
8207
|
<xsl:call-template name="refine_multicomponent_block_style"/>
|
8146
8208
|
|
8147
|
-
<xsl:apply-templates select="mn:name">
|
8209
|
+
<xsl:apply-templates select="mn:fmt-name">
|
8148
8210
|
<xsl:with-param name="process">true</xsl:with-param>
|
8149
8211
|
</xsl:apply-templates>
|
8150
8212
|
|
@@ -8332,7 +8394,7 @@
|
|
8332
8394
|
</xsl:template> <!-- refine_multicomponent_block_style -->
|
8333
8395
|
|
8334
8396
|
<!-- dl/name -->
|
8335
|
-
<xsl:template match="mn:dl/mn:name">
|
8397
|
+
<xsl:template match="mn:dl/mn:fmt-name">
|
8336
8398
|
<xsl:param name="process">false</xsl:param>
|
8337
8399
|
<xsl:if test="$process = 'true'">
|
8338
8400
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
@@ -8750,12 +8812,12 @@
|
|
8750
8812
|
<xsl:template match="mn:appendix">
|
8751
8813
|
<xsl:call-template name="setNamedDestination"/>
|
8752
8814
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
8753
|
-
<xsl:apply-templates select="mn:title"/>
|
8815
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
8754
8816
|
</fo:block>
|
8755
|
-
<xsl:apply-templates select="node()[not(
|
8817
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
8756
8818
|
</xsl:template>
|
8757
8819
|
|
8758
|
-
<xsl:template match="mn:appendix/mn:title" priority="2">
|
8820
|
+
<xsl:template match="mn:appendix/mn:fmt-title" priority="2">
|
8759
8821
|
<xsl:variable name="level">
|
8760
8822
|
<xsl:call-template name="getLevel"/>
|
8761
8823
|
</xsl:variable>
|
@@ -8768,9 +8830,9 @@
|
|
8768
8830
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
8769
8831
|
<xsl:call-template name="setNamedDestination"/>
|
8770
8832
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
8771
|
-
<xsl:apply-templates select="mn:name"/>
|
8833
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
8772
8834
|
</fo:block>
|
8773
|
-
<xsl:apply-templates select="node()[not(
|
8835
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
8774
8836
|
</xsl:template>
|
8775
8837
|
|
8776
8838
|
<xsl:attribute-set name="xref-style">
|
@@ -8778,7 +8840,7 @@
|
|
8778
8840
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
8779
8841
|
</xsl:attribute-set>
|
8780
8842
|
|
8781
|
-
<xsl:template match="mn:xref">
|
8843
|
+
<xsl:template match="mn:fmt-xref">
|
8782
8844
|
<xsl:call-template name="insert_basic_link">
|
8783
8845
|
<xsl:with-param name="element">
|
8784
8846
|
<xsl:variable name="alt_text">
|
@@ -8798,7 +8860,7 @@
|
|
8798
8860
|
</xsl:template> <!-- xref -->
|
8799
8861
|
|
8800
8862
|
<!-- command between two xref points to non-standard bibitem -->
|
8801
|
-
<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="."/>
|
8863
|
+
<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="."/>
|
8802
8864
|
</xsl:template>
|
8803
8865
|
|
8804
8866
|
<xsl:attribute-set name="eref-style">
|
@@ -8829,7 +8891,7 @@
|
|
8829
8891
|
<!-- ====== -->
|
8830
8892
|
<!-- eref -->
|
8831
8893
|
<!-- ====== -->
|
8832
|
-
<xsl:template match="mn:eref" name="eref">
|
8894
|
+
<xsl:template match="mn:fmt-eref" name="eref">
|
8833
8895
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
8834
8896
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
|
8835
8897
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
|
@@ -8904,6 +8966,10 @@
|
|
8904
8966
|
</xsl:attribute-set>
|
8905
8967
|
|
8906
8968
|
<xsl:template name="refine_note-style">
|
8969
|
+
<xsl:if test="parent::mn:references">
|
8970
|
+
<xsl:attribute name="margin-top">2pt</xsl:attribute>
|
8971
|
+
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
8972
|
+
</xsl:if>
|
8907
8973
|
</xsl:template>
|
8908
8974
|
|
8909
8975
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
@@ -8956,7 +9022,10 @@
|
|
8956
9022
|
|
8957
9023
|
<xsl:call-template name="setNamedDestination"/>
|
8958
9024
|
|
8959
|
-
<fo:block-container
|
9025
|
+
<fo:block-container xsl:use-attribute-sets="note-style" role="SKIP">
|
9026
|
+
<xsl:if test="not(parent::mn:references)">
|
9027
|
+
<xsl:copy-of select="@id"/>
|
9028
|
+
</xsl:if>
|
8960
9029
|
|
8961
9030
|
<xsl:call-template name="setBlockSpanAll"/>
|
8962
9031
|
|
@@ -8969,28 +9038,28 @@
|
|
8969
9038
|
|
8970
9039
|
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
8971
9040
|
|
8972
|
-
<xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
|
9041
|
+
<xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
|
8973
9042
|
|
8974
9043
|
<xsl:call-template name="refine_note-name-style"/>
|
8975
9044
|
|
8976
9045
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
8977
9046
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
8978
|
-
<xsl:if test="*[not(
|
9047
|
+
<xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
|
8979
9048
|
<xsl:call-template name="append_add-style"/>
|
8980
9049
|
</xsl:if>
|
8981
9050
|
|
8982
9051
|
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
8983
|
-
<xsl:if test="count(*[not(self::mn:name)]) = 1 and *[not(self::mn:name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
|
8984
|
-
<xsl:apply-templates select="*[not(self::mn:name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
|
9052
|
+
<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)]">
|
9053
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
|
8985
9054
|
<xsl:with-param name="skip">false</xsl:with-param>
|
8986
9055
|
</xsl:apply-templates>
|
8987
9056
|
</xsl:if>
|
8988
9057
|
|
8989
|
-
<xsl:apply-templates select="mn:name"/>
|
9058
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
8990
9059
|
|
8991
9060
|
</fo:inline>
|
8992
9061
|
|
8993
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
9062
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
8994
9063
|
</fo:block>
|
8995
9064
|
</fo:block-container>
|
8996
9065
|
</fo:block-container>
|
@@ -9029,19 +9098,19 @@
|
|
9029
9098
|
|
9030
9099
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
9031
9100
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
9032
|
-
<xsl:if test="*[not(
|
9101
|
+
<xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
|
9033
9102
|
<xsl:call-template name="append_add-style"/>
|
9034
9103
|
</xsl:if>
|
9035
9104
|
|
9036
|
-
<xsl:apply-templates select="mn:name"/>
|
9105
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
9037
9106
|
|
9038
9107
|
</fo:inline>
|
9039
9108
|
|
9040
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
9109
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
9041
9110
|
</fo:block>
|
9042
9111
|
</xsl:template>
|
9043
9112
|
|
9044
|
-
<xsl:template match="mn:note/mn:name">
|
9113
|
+
<xsl:template match="mn:note/mn:fmt-name">
|
9045
9114
|
<xsl:param name="sfx"/>
|
9046
9115
|
<xsl:variable name="suffix">
|
9047
9116
|
<xsl:choose>
|
@@ -9068,7 +9137,7 @@
|
|
9068
9137
|
</xsl:if>
|
9069
9138
|
</xsl:template>
|
9070
9139
|
|
9071
|
-
<xsl:template match="mn:termnote/mn:name">
|
9140
|
+
<xsl:template match="mn:termnote/mn:fmt-name">
|
9072
9141
|
<xsl:param name="sfx"/>
|
9073
9142
|
<xsl:variable name="suffix">
|
9074
9143
|
<xsl:choose>
|
@@ -9159,15 +9228,15 @@
|
|
9159
9228
|
|
9160
9229
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
9161
9230
|
<fo:block role="BlockQuote">
|
9162
|
-
<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 -->
|
9231
|
+
<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 -->
|
9163
9232
|
</fo:block>
|
9164
9233
|
</fo:block-container>
|
9165
9234
|
</fo:block-container>
|
9166
|
-
<xsl:if test="mn:author or mn:source or mn:attribution">
|
9235
|
+
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
9167
9236
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
9168
9237
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
9169
9238
|
<xsl:apply-templates select="mn:author"/>
|
9170
|
-
<xsl:apply-templates select="mn:source"/>
|
9239
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
9171
9240
|
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
9172
9241
|
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
9173
9242
|
</fo:block>
|
@@ -9177,17 +9246,32 @@
|
|
9177
9246
|
</fo:block-container>
|
9178
9247
|
</xsl:template>
|
9179
9248
|
|
9180
|
-
<xsl:template match="mn:source">
|
9249
|
+
<xsl:template match="mn:fmt-source">
|
9181
9250
|
<xsl:if test="../mn:author">
|
9182
9251
|
<xsl:text>, </xsl:text>
|
9183
9252
|
</xsl:if>
|
9184
|
-
<xsl:
|
9185
|
-
<xsl:
|
9186
|
-
<fo:
|
9187
|
-
<xsl:
|
9188
|
-
|
9189
|
-
|
9190
|
-
|
9253
|
+
<xsl:choose>
|
9254
|
+
<xsl:when test="not(parent::quote)">
|
9255
|
+
<fo:block>
|
9256
|
+
<xsl:call-template name="insert_basic_link">
|
9257
|
+
<xsl:with-param name="element">
|
9258
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
9259
|
+
<xsl:apply-templates/>
|
9260
|
+
</fo:basic-link>
|
9261
|
+
</xsl:with-param>
|
9262
|
+
</xsl:call-template>
|
9263
|
+
</fo:block>
|
9264
|
+
</xsl:when>
|
9265
|
+
<xsl:otherwise>
|
9266
|
+
<xsl:call-template name="insert_basic_link">
|
9267
|
+
<xsl:with-param name="element">
|
9268
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
9269
|
+
<xsl:apply-templates/>
|
9270
|
+
</fo:basic-link>
|
9271
|
+
</xsl:with-param>
|
9272
|
+
</xsl:call-template>
|
9273
|
+
</xsl:otherwise>
|
9274
|
+
</xsl:choose>
|
9191
9275
|
</xsl:template>
|
9192
9276
|
|
9193
9277
|
<xsl:template match="mn:author">
|
@@ -9263,7 +9347,7 @@
|
|
9263
9347
|
<ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
|
9264
9348
|
<xsl:choose>
|
9265
9349
|
<!-- skip figure/name/fn -->
|
9266
|
-
<xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
|
9350
|
+
<xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
|
9267
9351
|
<xsl:otherwise>
|
9268
9352
|
<xsl:element name="figure" namespace="{$namespace_full}">
|
9269
9353
|
<xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
|
@@ -9461,17 +9545,17 @@
|
|
9461
9545
|
|
9462
9546
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
9463
9547
|
|
9464
|
-
<xsl:for-each select="mn:name"> <!-- set context -->
|
9548
|
+
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
9465
9549
|
<xsl:call-template name="setIDforNamedDestination"/>
|
9466
9550
|
</xsl:for-each>
|
9467
9551
|
|
9468
|
-
<xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
|
9552
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
|
9469
9553
|
</fo:block>
|
9470
9554
|
|
9471
9555
|
<xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
|
9472
9556
|
<xsl:call-template name="showFigureKey"/>
|
9473
9557
|
</xsl:if>
|
9474
|
-
<xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
|
9558
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
|
9475
9559
|
|
9476
9560
|
</fo:block-container>
|
9477
9561
|
</xsl:template>
|
@@ -9497,9 +9581,9 @@
|
|
9497
9581
|
<xsl:template match="mn:figure[@class = 'pseudocode']">
|
9498
9582
|
<xsl:call-template name="setNamedDestination"/>
|
9499
9583
|
<fo:block id="{@id}">
|
9500
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
9584
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
9501
9585
|
</fo:block>
|
9502
|
-
<xsl:apply-templates select="mn:name"/>
|
9586
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
9503
9587
|
</xsl:template>
|
9504
9588
|
|
9505
9589
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
@@ -9510,7 +9594,7 @@
|
|
9510
9594
|
|
9511
9595
|
<!-- SOURCE: ... -->
|
9512
9596
|
<!-- figure/source -->
|
9513
|
-
<xsl:template match="mn:figure/mn:source" priority="2">
|
9597
|
+
<xsl:template match="mn:figure/mn:fmt-source" priority="2">
|
9514
9598
|
<xsl:call-template name="termsource"/>
|
9515
9599
|
</xsl:template>
|
9516
9600
|
|
@@ -9520,7 +9604,7 @@
|
|
9520
9604
|
<xsl:variable name="isAdded" select="../@added"/>
|
9521
9605
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
9522
9606
|
<xsl:choose>
|
9523
|
-
<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) -->
|
9607
|
+
<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) -->
|
9524
9608
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
9525
9609
|
<xsl:if test="not(parent::mn:figure) or parent::mn:p">
|
9526
9610
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -9541,13 +9625,26 @@
|
|
9541
9625
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
|
9542
9626
|
|
9543
9627
|
<xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
|
9544
|
-
<xsl:attribute name="
|
9628
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
9629
|
+
<xsl:choose>
|
9630
|
+
<xsl:when test="@width and not(@height)">
|
9631
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
9632
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
9633
|
+
</xsl:when>
|
9634
|
+
<xsl:when test="@height and not(@width)">
|
9635
|
+
<xsl:attribute name="height">100%</xsl:attribute>
|
9636
|
+
<xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
|
9637
|
+
</xsl:when>
|
9638
|
+
<xsl:when test="not(@width) and not(@height)">
|
9639
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
9640
|
+
</xsl:when>
|
9641
|
+
</xsl:choose>
|
9642
|
+
|
9545
9643
|
<xsl:if test="normalize-space($logo_width) != ''">
|
9546
9644
|
<xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
|
9547
9645
|
</xsl:if>
|
9548
|
-
<xsl:attribute name="content-height">100%</xsl:attribute>
|
9549
9646
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
9550
|
-
<xsl:attribute name="
|
9647
|
+
<xsl:attribute name="vertical-align">top</xsl:attribute>
|
9551
9648
|
</xsl:if>
|
9552
9649
|
|
9553
9650
|
<xsl:variable name="width">
|
@@ -9836,7 +9933,7 @@
|
|
9836
9933
|
<xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
|
9837
9934
|
<xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
|
9838
9935
|
|
9839
|
-
<xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
|
9936
|
+
<xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
|
9840
9937
|
<xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
|
9841
9938
|
<xsl:param name="name"/>
|
9842
9939
|
|
@@ -9846,8 +9943,8 @@
|
|
9846
9943
|
|
9847
9944
|
<xsl:variable name="alt-text">
|
9848
9945
|
<xsl:choose>
|
9849
|
-
<xsl:when test="normalize-space(../mn:name) != ''">
|
9850
|
-
<xsl:value-of select="../mn:name"/>
|
9946
|
+
<xsl:when test="normalize-space(../mn:fmt-name) != ''">
|
9947
|
+
<xsl:value-of select="../mn:fmt-name"/>
|
9851
9948
|
</xsl:when>
|
9852
9949
|
<xsl:when test="normalize-space($name) != ''">
|
9853
9950
|
<xsl:value-of select="$name"/>
|
@@ -9856,7 +9953,7 @@
|
|
9856
9953
|
</xsl:choose>
|
9857
9954
|
</xsl:variable>
|
9858
9955
|
|
9859
|
-
<xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
|
9956
|
+
<xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
|
9860
9957
|
|
9861
9958
|
<xsl:choose>
|
9862
9959
|
<xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
|
@@ -9905,9 +10002,9 @@
|
|
9905
10002
|
<fo:table-cell column-number="2">
|
9906
10003
|
<fo:block>
|
9907
10004
|
<fo:block-container width="{$width_scale}px" height="{$height_scale}px">
|
9908
|
-
<xsl:if test="../mn:name/mn:bookmark">
|
10005
|
+
<xsl:if test="../mn:fmt-name/mn:bookmark">
|
9909
10006
|
<fo:block line-height="0" font-size="0">
|
9910
|
-
<xsl:for-each select="../mn:name/mn:bookmark">
|
10007
|
+
<xsl:for-each select="../mn:fmt-name/mn:bookmark">
|
9911
10008
|
<xsl:call-template name="bookmark"/>
|
9912
10009
|
</xsl:for-each>
|
9913
10010
|
</fo:block>
|
@@ -10147,7 +10244,7 @@
|
|
10147
10244
|
|
10148
10245
|
<!-- image with svg and emf -->
|
10149
10246
|
<xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
|
10150
|
-
<xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
|
10247
|
+
<xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
|
10151
10248
|
<xsl:for-each select="*[local-name() = 'svg']">
|
10152
10249
|
<xsl:call-template name="image_svg">
|
10153
10250
|
<xsl:with-param name="name" select="$name"/>
|
@@ -10164,7 +10261,7 @@
|
|
10164
10261
|
|
10165
10262
|
<xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
10166
10263
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
10167
|
-
<xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
|
10264
|
+
<xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
|
10168
10265
|
<xsl:for-each select="xalan:nodeset($svg_content)/node()">
|
10169
10266
|
<xsl:call-template name="image_svg">
|
10170
10267
|
<xsl:with-param name="name" select="$name"/>
|
@@ -10287,7 +10384,7 @@
|
|
10287
10384
|
<xsl:template match="mn:emf"/>
|
10288
10385
|
|
10289
10386
|
<!-- figure/name -->
|
10290
|
-
<xsl:template match="mn:figure/mn:name | mn:image/mn:name">
|
10387
|
+
<xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
|
10291
10388
|
<xsl:if test="normalize-space() != ''">
|
10292
10389
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
10293
10390
|
|
@@ -10360,25 +10457,25 @@
|
|
10360
10457
|
<fo:block-container margin-left="0mm" role="SKIP">
|
10361
10458
|
<xsl:call-template name="setNamedDestination"/>
|
10362
10459
|
<fo:block id="{@id}">
|
10363
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
|
10460
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
|
10364
10461
|
</fo:block>
|
10365
10462
|
</fo:block-container>
|
10366
10463
|
</fo:block-container>
|
10367
10464
|
</xsl:template>
|
10368
10465
|
|
10369
|
-
<xsl:template match="mn:formula/mn:dt/mn:stem">
|
10466
|
+
<xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
|
10370
10467
|
<fo:inline>
|
10371
10468
|
<xsl:apply-templates/>
|
10372
10469
|
</fo:inline>
|
10373
10470
|
</xsl:template>
|
10374
10471
|
|
10375
|
-
<xsl:template match="mn:admitted/mn:stem">
|
10472
|
+
<xsl:template match="mn:fmt-admitted/mn:fmt-stem">
|
10376
10473
|
<fo:inline>
|
10377
10474
|
<xsl:apply-templates/>
|
10378
10475
|
</fo:inline>
|
10379
10476
|
</xsl:template>
|
10380
10477
|
|
10381
|
-
<xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
|
10478
|
+
<xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
|
10382
10479
|
<!-- https://github.com/metanorma/isodoc/issues/607
|
10383
10480
|
<xsl:if test="normalize-space() != ''">
|
10384
10481
|
<xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
|
@@ -10387,7 +10484,7 @@
|
|
10387
10484
|
</xsl:template>
|
10388
10485
|
|
10389
10486
|
<!-- stem inside formula with name (with formula's number) -->
|
10390
|
-
<xsl:template match="mn:formula[mn:name]/mn:stem">
|
10487
|
+
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
10391
10488
|
<fo:block xsl:use-attribute-sets="formula-style">
|
10392
10489
|
|
10393
10490
|
<fo:table table-layout="fixed" width="100%">
|
@@ -10407,13 +10504,13 @@
|
|
10407
10504
|
|
10408
10505
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
10409
10506
|
|
10410
|
-
<xsl:for-each select="../mn:name">
|
10507
|
+
<xsl:for-each select="../mn:fmt-name">
|
10411
10508
|
<xsl:call-template name="setIDforNamedDestination"/>
|
10412
10509
|
</xsl:for-each>
|
10413
10510
|
|
10414
10511
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
10415
10512
|
|
10416
|
-
<xsl:apply-templates select="../mn:name"/>
|
10513
|
+
<xsl:apply-templates select="../mn:fmt-name"/>
|
10417
10514
|
</fo:block>
|
10418
10515
|
</fo:table-cell>
|
10419
10516
|
</fo:table-row>
|
@@ -10423,7 +10520,7 @@
|
|
10423
10520
|
</xsl:template>
|
10424
10521
|
|
10425
10522
|
<!-- stem inside formula without name (without formula's number) -->
|
10426
|
-
<xsl:template match="mn:formula[not(mn:name)]/mn:stem">
|
10523
|
+
<xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
|
10427
10524
|
<fo:block xsl:use-attribute-sets="formula-style">
|
10428
10525
|
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
10429
10526
|
<xsl:apply-templates/>
|
@@ -10783,7 +10880,7 @@
|
|
10783
10880
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
10784
10881
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
|
10785
10882
|
-->
|
10786
|
-
<xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
|
10883
|
+
<xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
|
10787
10884
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
10788
10885
|
|
10789
10886
|
<xsl:call-template name="refine_mathml-style"/>
|
@@ -11050,7 +11147,7 @@
|
|
11050
11147
|
|
11051
11148
|
<xsl:template match="mn:ul | mn:ol" mode="list" name="list">
|
11052
11149
|
|
11053
|
-
<xsl:apply-templates select="mn:name">
|
11150
|
+
<xsl:apply-templates select="mn:fmt-name">
|
11054
11151
|
<xsl:with-param name="process">true</xsl:with-param>
|
11055
11152
|
</xsl:apply-templates>
|
11056
11153
|
|
@@ -11096,7 +11193,7 @@
|
|
11096
11193
|
|
11097
11194
|
<xsl:call-template name="refine_list-style"/>
|
11098
11195
|
|
11099
|
-
<xsl:if test="mn:name">
|
11196
|
+
<xsl:if test="mn:fmt-name">
|
11100
11197
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
11101
11198
|
</xsl:if>
|
11102
11199
|
|
@@ -11111,7 +11208,7 @@
|
|
11111
11208
|
<xsl:template name="refine_list-style_provisional-distance-between-starts">
|
11112
11209
|
</xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
|
11113
11210
|
|
11114
|
-
<xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
|
11211
|
+
<xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
|
11115
11212
|
<xsl:param name="process">false</xsl:param>
|
11116
11213
|
<xsl:if test="$process = 'true'">
|
11117
11214
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
@@ -11245,7 +11342,7 @@
|
|
11245
11342
|
-->
|
11246
11343
|
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
11247
11344
|
<!-- fn in text -->
|
11248
|
-
<xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" priority="2" name="fn">
|
11345
|
+
<xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" priority="2" name="fn">
|
11249
11346
|
<xsl:param name="footnote_body_from_table">false</xsl:param>
|
11250
11347
|
|
11251
11348
|
<!-- list of unique footnotes -->
|
@@ -11369,7 +11466,7 @@
|
|
11369
11466
|
<!-- commented:
|
11370
11467
|
.//mn:bibitem[ancestor::mn:references]/mn:note |
|
11371
11468
|
because 'fn' there is in biblio-tag -->
|
11372
|
-
<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])]">
|
11469
|
+
<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])]">
|
11373
11470
|
<!-- copy unique fn -->
|
11374
11471
|
<fn gen_id="{generate-id(.)}">
|
11375
11472
|
<xsl:copy-of select="@*"/>
|
@@ -11447,7 +11544,7 @@
|
|
11447
11544
|
<xsl:with-param name="sep"> — </xsl:with-param>
|
11448
11545
|
</xsl:call-template>
|
11449
11546
|
|
11450
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
11547
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
11451
11548
|
</fo:block>
|
11452
11549
|
|
11453
11550
|
</xsl:template>
|
@@ -11471,7 +11568,7 @@
|
|
11471
11568
|
</xsl:otherwise>
|
11472
11569
|
</xsl:choose> -->
|
11473
11570
|
<xsl:variable name="name">
|
11474
|
-
<xsl:apply-templates select="mn:name"/>
|
11571
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
11475
11572
|
</xsl:variable>
|
11476
11573
|
<xsl:copy-of select="$name"/>
|
11477
11574
|
<xsl:if test="normalize-space($name) != ''">
|
@@ -11479,7 +11576,7 @@
|
|
11479
11576
|
</xsl:if>
|
11480
11577
|
</xsl:template>
|
11481
11578
|
|
11482
|
-
<xsl:template match="mn:admonition/mn:name">
|
11579
|
+
<xsl:template match="mn:admonition/mn:fmt-name">
|
11483
11580
|
<xsl:apply-templates/>
|
11484
11581
|
</xsl:template>
|
11485
11582
|
|
@@ -11605,10 +11702,10 @@
|
|
11605
11702
|
<xsl:call-template name="setNamedDestination"/>
|
11606
11703
|
<fo:block id="{@id}"/>
|
11607
11704
|
|
11608
|
-
<xsl:apply-templates select="mn:title[@columns = 1]"/>
|
11705
|
+
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
11609
11706
|
|
11610
11707
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
11611
|
-
<xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
|
11708
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
11612
11709
|
</fo:block>
|
11613
11710
|
</xsl:template> <!-- references -->
|
11614
11711
|
|
@@ -11627,8 +11724,8 @@
|
|
11627
11724
|
</xsl:template> <!-- bibitem -->
|
11628
11725
|
|
11629
11726
|
<!-- Bibliography (non-normative references) -->
|
11630
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
11631
|
-
<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
|
11727
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
|
11728
|
+
<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
|
11632
11729
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
11633
11730
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
11634
11731
|
<xsl:call-template name="setNamedDestination"/>
|
@@ -11680,7 +11777,7 @@
|
|
11680
11777
|
</fo:list-item>
|
11681
11778
|
</xsl:otherwise>
|
11682
11779
|
</xsl:choose>
|
11683
|
-
<xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]
|
11780
|
+
<xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
|
11684
11781
|
<xsl:with-param name="skip">false</xsl:with-param>
|
11685
11782
|
</xsl:apply-templates>
|
11686
11783
|
</xsl:template>
|
@@ -11701,8 +11798,26 @@
|
|
11701
11798
|
</xsl:apply-templates>
|
11702
11799
|
<xsl:apply-templates select="mn:formattedref"/>
|
11703
11800
|
<!-- end bibitem processing -->
|
11801
|
+
|
11802
|
+
<xsl:call-template name="processBibliographyNote"/>
|
11704
11803
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
11705
11804
|
|
11805
|
+
<xsl:template name="processBibliographyNote">
|
11806
|
+
<xsl:if test="self::mn:note">
|
11807
|
+
<xsl:variable name="note_node">
|
11808
|
+
<xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
|
11809
|
+
<xsl:copy> <!-- skip @id -->
|
11810
|
+
<xsl:copy-of select="node()"/>
|
11811
|
+
</xsl:copy>
|
11812
|
+
</xsl:element>
|
11813
|
+
</xsl:variable>
|
11814
|
+
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
11815
|
+
<xsl:call-template name="note"/>
|
11816
|
+
</xsl:for-each> -->
|
11817
|
+
<xsl:call-template name="note"/>
|
11818
|
+
</xsl:if>
|
11819
|
+
</xsl:template>
|
11820
|
+
|
11706
11821
|
<xsl:template match="mn:title" mode="title">
|
11707
11822
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
11708
11823
|
</xsl:template>
|
@@ -11932,7 +12047,8 @@
|
|
11932
12047
|
</xsl:copy>
|
11933
12048
|
</xsl:template>
|
11934
12049
|
|
11935
|
-
<xsl:template match="mn:xref" mode="index_add_id"
|
12050
|
+
<xsl:template match="mn:xref" mode="index_add_id"/>
|
12051
|
+
<xsl:template match="mn:fmt-xref" mode="index_add_id">
|
11936
12052
|
<xsl:param name="docid"/>
|
11937
12053
|
<xsl:variable name="id">
|
11938
12054
|
<xsl:call-template name="generateIndexXrefId">
|
@@ -11974,7 +12090,7 @@
|
|
11974
12090
|
<xsl:template match="mn:indexsect//mn:li" mode="index_update">
|
11975
12091
|
<xsl:copy>
|
11976
12092
|
<xsl:apply-templates select="@*" mode="index_update"/>
|
11977
|
-
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
12093
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
|
11978
12094
|
</xsl:copy>
|
11979
12095
|
</xsl:template>
|
11980
12096
|
|
@@ -11995,11 +12111,11 @@
|
|
11995
12111
|
<xsl:value-of select="."/>
|
11996
12112
|
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
11997
12113
|
</xsl:when>
|
11998
|
-
<xsl:when test="self::* and local-name(.) = 'xref'">
|
12114
|
+
<xsl:when test="self::* and local-name(.) = 'fmt-xref'">
|
11999
12115
|
<xsl:variable name="id" select="@id"/>
|
12000
12116
|
|
12001
|
-
<xsl:variable name="id_next" select="following-sibling::mn:xref[1]/@id"/>
|
12002
|
-
<xsl:variable name="id_prev" select="preceding-sibling::mn:xref[1]/@id"/>
|
12117
|
+
<xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
|
12118
|
+
<xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
|
12003
12119
|
|
12004
12120
|
<xsl:variable name="pages_">
|
12005
12121
|
<xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
|
@@ -12095,18 +12211,18 @@
|
|
12095
12211
|
<xsl:variable name="item_number">
|
12096
12212
|
<xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
|
12097
12213
|
</xsl:variable>
|
12098
|
-
<xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
|
12214
|
+
<xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
|
12099
12215
|
<xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
12100
12216
|
</xsl:template>
|
12101
12217
|
|
12102
|
-
<xsl:template match="mn:indexsect/mn:title" priority="4">
|
12218
|
+
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
12103
12219
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
12104
12220
|
<!-- Index -->
|
12105
12221
|
<xsl:apply-templates/>
|
12106
12222
|
</fo:block>
|
12107
12223
|
</xsl:template>
|
12108
12224
|
|
12109
|
-
<xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
|
12225
|
+
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
12110
12226
|
<!-- Letter A, B, C, ... -->
|
12111
12227
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
12112
12228
|
<xsl:apply-templates/>
|
@@ -12147,12 +12263,12 @@
|
|
12147
12263
|
<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"/>
|
12148
12264
|
<bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
|
12149
12265
|
<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"/> -->
|
12150
|
-
<xsl:when test="1 = 2 and preceding-sibling::node()[self::mn:fmt-
|
12266
|
+
<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]">
|
12151
12267
|
<!-- skip here, see the template 'fmt-review-start' -->
|
12152
12268
|
</xsl:when>
|
12153
12269
|
<xsl:otherwise>
|
12154
12270
|
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
12155
|
-
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-
|
12271
|
+
<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>
|
12156
12272
|
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
12157
12273
|
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
12158
12274
|
</xsl:otherwise>
|
@@ -12251,6 +12367,58 @@
|
|
12251
12367
|
<!-- End Form's elements processing -->
|
12252
12368
|
<!-- =================== -->
|
12253
12369
|
|
12370
|
+
<xsl:attribute-set name="toc-style">
|
12371
|
+
</xsl:attribute-set>
|
12372
|
+
|
12373
|
+
<xsl:template name="refine_toc-style">
|
12374
|
+
</xsl:template>
|
12375
|
+
|
12376
|
+
<xsl:attribute-set name="toc-title-style">
|
12377
|
+
<xsl:attribute name="font-size">15pt</xsl:attribute>
|
12378
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
12379
|
+
<xsl:attribute name="role">H1</xsl:attribute>
|
12380
|
+
</xsl:attribute-set>
|
12381
|
+
|
12382
|
+
<xsl:attribute-set name="toc-title-page-style">
|
12383
|
+
</xsl:attribute-set> <!-- toc-title-page-style -->
|
12384
|
+
|
12385
|
+
<xsl:attribute-set name="toc-item-block-style">
|
12386
|
+
</xsl:attribute-set>
|
12387
|
+
|
12388
|
+
<xsl:template name="refine_toc-item-block-style">
|
12389
|
+
</xsl:template>
|
12390
|
+
|
12391
|
+
<xsl:attribute-set name="toc-item-style">
|
12392
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
12393
|
+
</xsl:attribute-set> <!-- END: toc-item-style -->
|
12394
|
+
|
12395
|
+
<xsl:template name="refine_toc-item-style">
|
12396
|
+
</xsl:template> <!-- END: refine_toc-item-style -->
|
12397
|
+
|
12398
|
+
<xsl:attribute-set name="toc-leader-style">
|
12399
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
12400
|
+
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
12401
|
+
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
12402
|
+
|
12403
|
+
<xsl:attribute-set name="toc-pagenumber-style">
|
12404
|
+
</xsl:attribute-set>
|
12405
|
+
|
12406
|
+
<!-- List of Figures, Tables -->
|
12407
|
+
<xsl:attribute-set name="toc-listof-title-style">
|
12408
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
12409
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
12410
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
12411
|
+
</xsl:attribute-set>
|
12412
|
+
|
12413
|
+
<xsl:attribute-set name="toc-listof-item-block-style">
|
12414
|
+
</xsl:attribute-set>
|
12415
|
+
|
12416
|
+
<xsl:attribute-set name="toc-listof-item-style">
|
12417
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
12418
|
+
<xsl:attribute name="margin-left">17mm</xsl:attribute>
|
12419
|
+
<xsl:attribute name="text-indent">-12mm</xsl:attribute>
|
12420
|
+
</xsl:attribute-set>
|
12421
|
+
|
12254
12422
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
12255
12423
|
<xsl:variable name="nodes_preface_">
|
12256
12424
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -12316,7 +12484,7 @@
|
|
12316
12484
|
|
12317
12485
|
<xsl:template name="processTables_Contents">
|
12318
12486
|
<mnx:tables>
|
12319
|
-
<xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
|
12487
|
+
<xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
|
12320
12488
|
<xsl:choose>
|
12321
12489
|
<xsl:when test="mn:fmt-name">
|
12322
12490
|
<xsl:variable name="fmt_name">
|
@@ -12338,7 +12506,7 @@
|
|
12338
12506
|
|
12339
12507
|
<xsl:template name="processFigures_Contents">
|
12340
12508
|
<mnx:figures>
|
12341
|
-
<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) != '']">
|
12509
|
+
<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) != '']">
|
12342
12510
|
<xsl:choose>
|
12343
12511
|
<xsl:when test="mn:fmt-name">
|
12344
12512
|
<xsl:variable name="fmt_name">
|
@@ -12367,7 +12535,7 @@
|
|
12367
12535
|
|
12368
12536
|
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
|
12369
12537
|
|
12370
|
-
<xsl:template match="mn:figure/mn:fmt-name |
|
12538
|
+
<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">
|
12371
12539
|
<xsl:apply-templates mode="contents"/>
|
12372
12540
|
<xsl:text> </xsl:text>
|
12373
12541
|
</xsl:template>
|
@@ -12379,7 +12547,7 @@
|
|
12379
12547
|
</xsl:if>
|
12380
12548
|
</xsl:template>
|
12381
12549
|
|
12382
|
-
<xsl:template match="mn:figure/mn:fmt-name | mn:table/mn:fmt-name |
|
12550
|
+
<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">
|
12383
12551
|
<xsl:apply-templates mode="bookmarks"/>
|
12384
12552
|
<xsl:text> </xsl:text>
|
12385
12553
|
</xsl:template>
|
@@ -12390,7 +12558,7 @@
|
|
12390
12558
|
</xsl:if>
|
12391
12559
|
</xsl:template>
|
12392
12560
|
|
12393
|
-
<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">
|
12561
|
+
<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">
|
12394
12562
|
<xsl:value-of select="."/>
|
12395
12563
|
</xsl:template>
|
12396
12564
|
|
@@ -12400,7 +12568,7 @@
|
|
12400
12568
|
</xsl:if>
|
12401
12569
|
</xsl:template>
|
12402
12570
|
|
12403
|
-
<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">
|
12571
|
+
<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">
|
12404
12572
|
<xsl:value-of select="."/>
|
12405
12573
|
</xsl:template>
|
12406
12574
|
|
@@ -12861,7 +13029,7 @@
|
|
12861
13029
|
<xsl:value-of select="."/>
|
12862
13030
|
</xsl:template>
|
12863
13031
|
|
12864
|
-
<xsl:template match="mn:
|
13032
|
+
<xsl:template match="mn:annotation" mode="contents_item"/>
|
12865
13033
|
|
12866
13034
|
<xsl:template match="mn:tab" mode="contents_item">
|
12867
13035
|
<xsl:text> </xsl:text>
|
@@ -13016,7 +13184,7 @@
|
|
13016
13184
|
<xsl:apply-templates/>
|
13017
13185
|
</xsl:template>
|
13018
13186
|
|
13019
|
-
<xsl:template match="mn:toc//mn:xref" priority="3">
|
13187
|
+
<xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
|
13020
13188
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13021
13189
|
<!-- New format: one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13022
13190
|
<!-- <test><xsl:copy-of select="."/></test> -->
|
@@ -13084,8 +13252,8 @@
|
|
13084
13252
|
<xsl:apply-templates mode="toc_table_width"/>
|
13085
13253
|
</xsl:template>
|
13086
13254
|
|
13087
|
-
<xsl:template match="mn:clause[@type = 'toc']/mn:title" mode="toc_table_width"/>
|
13088
|
-
<xsl:template match="mn:clause[not(@type = 'toc')]/mn:title" mode="toc_table_width"/>
|
13255
|
+
<xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
|
13256
|
+
<xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
|
13089
13257
|
|
13090
13258
|
<xsl:template match="mn:li" mode="toc_table_width">
|
13091
13259
|
<mn:tr>
|
@@ -13093,7 +13261,7 @@
|
|
13093
13261
|
</mn:tr>
|
13094
13262
|
</xsl:template>
|
13095
13263
|
|
13096
|
-
<xsl:template match="mn:xref" mode="toc_table_width">
|
13264
|
+
<xsl:template match="mn:fmt-xref" mode="toc_table_width">
|
13097
13265
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13098
13266
|
<!-- New format - one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13099
13267
|
<xsl:for-each select="mn:tab">
|
@@ -13171,10 +13339,10 @@
|
|
13171
13339
|
|
13172
13340
|
</xsl:template> <!-- tab -->
|
13173
13341
|
|
13174
|
-
<xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
|
13175
|
-
<xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
|
13342
|
+
<xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
|
13343
|
+
<xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
|
13176
13344
|
|
13177
|
-
<xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
|
13345
|
+
<xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
|
13178
13346
|
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
13179
13347
|
</xsl:template>
|
13180
13348
|
|
@@ -13189,13 +13357,13 @@
|
|
13189
13357
|
</xsl:template>
|
13190
13358
|
|
13191
13359
|
<xsl:variable name="reviews_">
|
13192
|
-
<xsl:for-each select="//mn:
|
13360
|
+
<xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
|
13193
13361
|
<xsl:copy>
|
13194
13362
|
<xsl:copy-of select="@from"/>
|
13195
13363
|
<xsl:copy-of select="@id"/>
|
13196
13364
|
</xsl:copy>
|
13197
13365
|
</xsl:for-each>
|
13198
|
-
<xsl:for-each select="//mn:fmt-
|
13366
|
+
<xsl:for-each select="//mn:fmt-annotation-start[@source]">
|
13199
13367
|
<xsl:copy>
|
13200
13368
|
<xsl:copy-of select="@source"/>
|
13201
13369
|
<xsl:copy-of select="@id"/>
|
@@ -13209,7 +13377,7 @@
|
|
13209
13377
|
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
13210
13378
|
<xsl:variable name="curr_id" select="@id"/>
|
13211
13379
|
<!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
|
13212
|
-
<xsl:for-each select="$reviews//mn:
|
13380
|
+
<xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
|
13213
13381
|
<xsl:variable name="review_id" select="normalize-space(@id)"/>
|
13214
13382
|
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
13215
13383
|
<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>
|
@@ -13224,7 +13392,7 @@
|
|
13224
13392
|
|
13225
13393
|
<!-- document text (not figures, or tables) footnotes -->
|
13226
13394
|
<xsl:variable name="reviews_container_">
|
13227
|
-
<xsl:for-each select="//mn:
|
13395
|
+
<xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
|
13228
13396
|
<xsl:variable name="update_xml_step1">
|
13229
13397
|
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
13230
13398
|
</xsl:variable>
|
@@ -13233,10 +13401,10 @@
|
|
13233
13401
|
</xsl:variable>
|
13234
13402
|
<xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
|
13235
13403
|
|
13236
|
-
<xsl:template match="mn:
|
13404
|
+
<xsl:template match="mn:annotation-container"/>
|
13237
13405
|
|
13238
13406
|
<!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
|
13239
|
-
<xsl:template match="mn:
|
13407
|
+
<xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
13240
13408
|
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
13241
13409
|
<xsl:if test="$isGenerateTableIF = 'false'">
|
13242
13410
|
<xsl:choose>
|
@@ -13256,7 +13424,7 @@
|
|
13256
13424
|
</xsl:template>
|
13257
13425
|
|
13258
13426
|
<!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
|
13259
|
-
<xsl:template match="mn:fmt-
|
13427
|
+
<xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
13260
13428
|
<!-- comment 2019-11-29 -->
|
13261
13429
|
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
13262
13430
|
<xsl:apply-templates /> -->
|
@@ -13312,7 +13480,7 @@
|
|
13312
13480
|
</xsl:template>
|
13313
13481
|
|
13314
13482
|
<!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
|
13315
|
-
<xsl:template match="mn:
|
13483
|
+
<xsl:template match="mn:annotation[@type = 'other']"/>
|
13316
13484
|
|
13317
13485
|
<!-- ============ -->
|
13318
13486
|
<!-- errata -->
|
@@ -13705,9 +13873,12 @@
|
|
13705
13873
|
<xsl:choose>
|
13706
13874
|
<xsl:when test="mn:fmt-title">
|
13707
13875
|
<xsl:variable name="fmt_title_section">
|
13708
|
-
<xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:
|
13876
|
+
<xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
|
13709
13877
|
</xsl:variable>
|
13710
13878
|
<xsl:value-of select="normalize-space($fmt_title_section)"/>
|
13879
|
+
<xsl:if test="normalize-space($fmt_title_section) = ''">
|
13880
|
+
<xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
|
13881
|
+
</xsl:if>
|
13711
13882
|
</xsl:when>
|
13712
13883
|
<xsl:otherwise>
|
13713
13884
|
<xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
|
@@ -13720,6 +13891,9 @@
|
|
13720
13891
|
<xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
|
13721
13892
|
<xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
|
13722
13893
|
</xsl:when>
|
13894
|
+
<xsl:when test="mn:fmt-title/mn:tab">
|
13895
|
+
<xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
|
13896
|
+
</xsl:when>
|
13723
13897
|
<xsl:when test="mn:fmt-title">
|
13724
13898
|
<xsl:copy-of select="mn:fmt-title/node()"/>
|
13725
13899
|
</xsl:when>
|
@@ -13863,10 +14037,10 @@
|
|
13863
14037
|
|
13864
14038
|
</fo:block>
|
13865
14039
|
|
13866
|
-
<xsl:apply-templates select="mn:title[@columns = 1]"/>
|
14040
|
+
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
13867
14041
|
|
13868
14042
|
<fo:block>
|
13869
|
-
<xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
|
14043
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
13870
14044
|
</fo:block>
|
13871
14045
|
</xsl:otherwise>
|
13872
14046
|
</xsl:choose>
|
@@ -13875,7 +14049,7 @@
|
|
13875
14049
|
<xsl:template name="refine_annex_style">
|
13876
14050
|
</xsl:template>
|
13877
14051
|
|
13878
|
-
<xsl:template match="mn:name/text()">
|
14052
|
+
<xsl:template match="mn:name/text() | mn:fmt-name/text()">
|
13879
14053
|
<!-- 0xA0 to space replacement -->
|
13880
14054
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
13881
14055
|
</xsl:template>
|
@@ -13931,28 +14105,28 @@
|
|
13931
14105
|
<xsl:template match="mn:amend"/>
|
13932
14106
|
|
13933
14107
|
<!-- fmt-title renamed to title in update_xml_step1 -->
|
13934
|
-
<xsl:template match="mn:fmt-title"/>
|
14108
|
+
<!-- <xsl:template match="mn:fmt-title" /> -->
|
13935
14109
|
|
13936
14110
|
<!-- fmt-name renamed to name in update_xml_step1 -->
|
13937
|
-
<xsl:template match="mn:fmt-name"/>
|
14111
|
+
<!-- <xsl:template match="mn:fmt-name" /> -->
|
13938
14112
|
|
13939
14113
|
<!-- fmt-preferred renamed to preferred in update_xml_step1 -->
|
13940
|
-
<xsl:template match="mn:fmt-preferred"/>
|
14114
|
+
<!-- <xsl:template match="mn:fmt-preferred" /> -->
|
13941
14115
|
|
13942
14116
|
<!-- fmt-admitted renamed to admitted in update_xml_step1 -->
|
13943
|
-
<xsl:template match="mn:fmt-admitted"/>
|
14117
|
+
<!-- <xsl:template match="mn:fmt-admitted" /> -->
|
13944
14118
|
|
13945
14119
|
<!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
|
13946
|
-
<xsl:template match="mn:fmt-deprecates"/>
|
14120
|
+
<!-- <xsl:template match="mn:fmt-deprecates" /> -->
|
13947
14121
|
|
13948
14122
|
<!-- fmt-definition renamed to definition in update_xml_step1 -->
|
13949
|
-
<xsl:template match="mn:fmt-definition"/>
|
14123
|
+
<!-- <xsl:template match="mn:fmt-definition" /> -->
|
13950
14124
|
|
13951
14125
|
<!-- fmt-termsource renamed to termsource in update_xml_step1 -->
|
13952
|
-
<xsl:template match="mn:fmt-termsource"/>
|
14126
|
+
<!-- <xsl:template match="mn:fmt-termsource" /> -->
|
13953
14127
|
|
13954
14128
|
<!-- fmt-source renamed to source in update_xml_step1 -->
|
13955
|
-
<xsl:template match="mn:fmt-source"/>
|
14129
|
+
<!-- <xsl:template match="mn:fmt-source" /> -->
|
13956
14130
|
|
13957
14131
|
<xsl:template match="mn:semx">
|
13958
14132
|
<xsl:apply-templates/>
|
@@ -14396,12 +14570,12 @@
|
|
14396
14570
|
<xsl:when test="ancestor::mn:preface">
|
14397
14571
|
<xsl:value-of select="$level_total - 2"/>
|
14398
14572
|
</xsl:when>
|
14399
|
-
<xsl:when test="ancestor::mn:sections and self::mn:title">
|
14573
|
+
<xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
|
14400
14574
|
<!-- determine 'depth' depends on upper clause with title/@depth -->
|
14401
14575
|
<!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
|
14402
|
-
<xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:title/@depth][1]/mn:title/@depth"/>
|
14576
|
+
<xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
|
14403
14577
|
<!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
|
14404
|
-
<xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:title/@depth][1]/ancestor::*)"/>
|
14578
|
+
<xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
|
14405
14579
|
<!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
|
14406
14580
|
<xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
|
14407
14581
|
<!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
|
@@ -14417,8 +14591,8 @@
|
|
14417
14591
|
</xsl:otherwise>
|
14418
14592
|
</xsl:choose>
|
14419
14593
|
</xsl:when>
|
14420
|
-
<xsl:when test="ancestor::mn:sections and self::mn:name and parent::mn:term">
|
14421
|
-
<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:title/@depth)"/>
|
14594
|
+
<xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
|
14595
|
+
<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
|
14422
14596
|
<xsl:choose>
|
14423
14597
|
<xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
|
14424
14598
|
<xsl:value-of select="number($upper_terms_depth + 1)"/>
|
@@ -14429,7 +14603,7 @@
|
|
14429
14603
|
</xsl:choose>
|
14430
14604
|
</xsl:when>
|
14431
14605
|
<xsl:when test="ancestor::mn:sections">
|
14432
|
-
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:title/@depth)"/>
|
14606
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
|
14433
14607
|
<xsl:choose>
|
14434
14608
|
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
14435
14609
|
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
@@ -14445,8 +14619,8 @@
|
|
14445
14619
|
<xsl:when test="parent::mn:annex">
|
14446
14620
|
<xsl:value-of select="$level_total - 1"/>
|
14447
14621
|
</xsl:when>
|
14448
|
-
<xsl:when test="ancestor::mn:annex and self::mn:title">
|
14449
|
-
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:title/@depth)"/>
|
14622
|
+
<xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
|
14623
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
|
14450
14624
|
<xsl:choose>
|
14451
14625
|
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
14452
14626
|
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
@@ -14479,7 +14653,7 @@
|
|
14479
14653
|
</xsl:when>
|
14480
14654
|
<xsl:otherwise>
|
14481
14655
|
<xsl:variable name="title_level_">
|
14482
|
-
<xsl:for-each select="../preceding-sibling::mn:title[1]">
|
14656
|
+
<xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
|
14483
14657
|
<xsl:call-template name="getLevel"/>
|
14484
14658
|
</xsl:for-each>
|
14485
14659
|
</xsl:variable>
|
@@ -14556,15 +14730,17 @@
|
|
14556
14730
|
</xsl:template>
|
14557
14731
|
|
14558
14732
|
<xsl:template name="setNamedDestination">
|
14559
|
-
|
14560
|
-
|
14561
|
-
<
|
14562
|
-
|
14563
|
-
<xsl:for-each select=". | mn:title | mn:name">
|
14564
|
-
<xsl:if test="@named_dest">
|
14565
|
-
<fox:destination internal-destination="{@named_dest}"/>
|
14733
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
14734
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
14735
|
+
<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'">
|
14736
|
+
<fox:destination internal-destination="{@id}"/>
|
14566
14737
|
</xsl:if>
|
14567
|
-
|
14738
|
+
<xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
|
14739
|
+
<xsl:if test="@named_dest">
|
14740
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
14741
|
+
</xsl:if>
|
14742
|
+
</xsl:for-each>
|
14743
|
+
</xsl:if>
|
14568
14744
|
</xsl:template>
|
14569
14745
|
|
14570
14746
|
<xsl:template name="add-letter-spacing">
|
@@ -14912,7 +15088,7 @@
|
|
14912
15088
|
</xsl:when>
|
14913
15089
|
<xsl:otherwise>
|
14914
15090
|
<!-- namespace-uri(ancestor::mn:title) != '' to skip title from $contents -->
|
14915
|
-
<xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
|
15091
|
+
<xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
|
14916
15092
|
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
14917
15093
|
</xsl:if>
|
14918
15094
|
<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">
|
@@ -14946,7 +15122,7 @@
|
|
14946
15122
|
</fo:block>
|
14947
15123
|
</fo:block-container>
|
14948
15124
|
</fo:inline-container>
|
14949
|
-
<xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
|
15125
|
+
<xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
|
14950
15126
|
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
14951
15127
|
</xsl:if>
|
14952
15128
|
</xsl:otherwise>
|