metanorma-bipm 1.2.0 → 1.2.4
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/asciidoctor/bipm/converter.rb +1 -1
- data/lib/asciidoctor/bipm/isodoc.rng +68 -18
- data/lib/isodoc/bipm/base_convert.rb +4 -13
- data/lib/isodoc/bipm/bipm.brochure.xsl +444 -111
- data/lib/isodoc/bipm/bipm.guide.xsl +444 -111
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +444 -111
- data/lib/isodoc/bipm/bipm.rapport.xsl +444 -111
- data/lib/isodoc/bipm/html/htmlstyle.css +4 -2
- data/lib/isodoc/bipm/html/htmlstyle.scss +4 -1
- data/lib/isodoc/bipm/html/scripts.html +0 -1
- data/lib/isodoc/bipm/jcgm.standard.xsl +362 -155
- data/lib/isodoc/bipm/presentation_xml_convert.rb +8 -2
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +1 -1
- metadata +8 -8
@@ -17,6 +17,8 @@
|
|
17
17
|
|
18
18
|
<xsl:param name="add_math_as_attachment">true</xsl:param>
|
19
19
|
|
20
|
+
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
|
21
|
+
|
20
22
|
<xsl:variable name="first_pass" select="count($index//item) = 0"/>
|
21
23
|
|
22
24
|
<xsl:variable name="pageWidth" select="210"/>
|
@@ -247,33 +249,68 @@
|
|
247
249
|
<xsl:template match="/">
|
248
250
|
<fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
|
249
251
|
<fo:layout-master-set>
|
252
|
+
|
253
|
+
<!-- blank page -->
|
254
|
+
<fo:simple-page-master master-name="blankpage" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
255
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
256
|
+
<fo:region-before region-name="header-blank" extent="{$marginTop}mm"/>
|
257
|
+
<fo:region-after region-name="footer-blank" extent="{$marginBottom}mm"/>
|
258
|
+
<fo:region-start region-name="left-region" extent="17mm"/>
|
259
|
+
<fo:region-end region-name="right-region" extent="26.5mm"/>
|
260
|
+
</fo:simple-page-master>
|
261
|
+
|
250
262
|
<!-- Cover page -->
|
251
|
-
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
263
|
+
<fo:simple-page-master master-name="simple-cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
252
264
|
<fo:region-body margin-top="36mm" margin-bottom="43mm" margin-left="49mm" margin-right="48mm"/>
|
253
|
-
<fo:region-before extent="36mm"/>
|
265
|
+
<fo:region-before region-name="header" extent="36mm"/>
|
254
266
|
<fo:region-after extent="43mm"/>
|
255
267
|
<fo:region-start extent="49mm"/>
|
256
268
|
<fo:region-end extent="48mm"/>
|
257
269
|
</fo:simple-page-master>
|
258
270
|
|
271
|
+
<fo:page-sequence-master master-name="cover-page">
|
272
|
+
<fo:repeatable-page-master-alternatives>
|
273
|
+
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
274
|
+
<fo:conditional-page-master-reference master-reference="simple-cover-page" odd-or-even="odd"/>
|
275
|
+
<fo:conditional-page-master-reference master-reference="simple-cover-page" odd-or-even="even"/>
|
276
|
+
</fo:repeatable-page-master-alternatives>
|
277
|
+
</fo:page-sequence-master>
|
278
|
+
|
259
279
|
<!-- Cover page -->
|
260
|
-
<fo:simple-page-master master-name="cover-page-appendix" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
280
|
+
<fo:simple-page-master master-name="simple-cover-page-appendix" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
261
281
|
<fo:region-body margin-top="90mm" margin-bottom="40mm" margin-left="12.5mm" margin-right="53mm"/>
|
262
|
-
<fo:region-before extent="60mm"/>
|
282
|
+
<fo:region-before region-name="header" extent="60mm"/>
|
263
283
|
<fo:region-after extent="40mm"/>
|
264
284
|
<fo:region-start extent="12.5mm"/>
|
265
285
|
<fo:region-end extent="53mm"/>
|
266
286
|
</fo:simple-page-master>
|
267
287
|
|
288
|
+
<fo:page-sequence-master master-name="cover-page-appendix">
|
289
|
+
<fo:repeatable-page-master-alternatives>
|
290
|
+
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
291
|
+
<fo:conditional-page-master-reference master-reference="simple-cover-page-appendix" odd-or-even="odd"/>
|
292
|
+
<fo:conditional-page-master-reference master-reference="simple-cover-page-appendix" odd-or-even="even"/>
|
293
|
+
</fo:repeatable-page-master-alternatives>
|
294
|
+
</fo:page-sequence-master>
|
295
|
+
|
296
|
+
|
268
297
|
<!-- Title page -->
|
269
|
-
<fo:simple-page-master master-name="title-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
298
|
+
<fo:simple-page-master master-name="simple-title-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
270
299
|
<fo:region-body margin-top="38mm" margin-bottom="25mm" margin-left="95mm" margin-right="12mm"/>
|
271
|
-
<fo:region-before extent="38mm"/>
|
300
|
+
<fo:region-before region-name="header" extent="38mm"/>
|
272
301
|
<fo:region-after extent="25mm"/>
|
273
302
|
<fo:region-start extent="95mm"/>
|
274
303
|
<fo:region-end extent="12mm"/>
|
275
304
|
</fo:simple-page-master>
|
276
305
|
|
306
|
+
<fo:page-sequence-master master-name="title-page">
|
307
|
+
<fo:repeatable-page-master-alternatives>
|
308
|
+
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
309
|
+
<fo:conditional-page-master-reference master-reference="simple-title-page" odd-or-even="odd"/>
|
310
|
+
<fo:conditional-page-master-reference master-reference="simple-title-page" odd-or-even="even"/>
|
311
|
+
</fo:repeatable-page-master-alternatives>
|
312
|
+
</fo:page-sequence-master>
|
313
|
+
|
277
314
|
<!-- Document pages -->
|
278
315
|
<fo:simple-page-master master-name="document-odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
279
316
|
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
@@ -291,6 +328,7 @@
|
|
291
328
|
</fo:simple-page-master>
|
292
329
|
<fo:page-sequence-master master-name="document">
|
293
330
|
<fo:repeatable-page-master-alternatives>
|
331
|
+
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
294
332
|
<fo:conditional-page-master-reference odd-or-even="even" master-reference="document-even"/>
|
295
333
|
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="document-odd"/>
|
296
334
|
</fo:repeatable-page-master-alternatives>
|
@@ -312,7 +350,8 @@
|
|
312
350
|
<fo:region-end region-name="right-region" extent="26.5mm"/>
|
313
351
|
</fo:simple-page-master>
|
314
352
|
<fo:page-sequence-master master-name="document-landscape">
|
315
|
-
<fo:repeatable-page-master-alternatives>
|
353
|
+
<fo:repeatable-page-master-alternatives>
|
354
|
+
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
316
355
|
<fo:conditional-page-master-reference odd-or-even="even" master-reference="document-landscape-even"/>
|
317
356
|
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="document-landscape-odd"/>
|
318
357
|
</fo:repeatable-page-master-alternatives>
|
@@ -334,7 +373,8 @@
|
|
334
373
|
<fo:region-end region-name="right-region" extent="26.5mm"/>
|
335
374
|
</fo:simple-page-master>
|
336
375
|
<fo:page-sequence-master master-name="index">
|
337
|
-
<fo:repeatable-page-master-alternatives>
|
376
|
+
<fo:repeatable-page-master-alternatives>
|
377
|
+
<fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
|
338
378
|
<fo:conditional-page-master-reference odd-or-even="even" master-reference="index-even"/>
|
339
379
|
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="index-odd"/>
|
340
380
|
</fo:repeatable-page-master-alternatives>
|
@@ -1106,6 +1146,9 @@
|
|
1106
1146
|
</xsl:if>
|
1107
1147
|
|
1108
1148
|
<xsl:call-template name="insertFootnoteSeparator"/>
|
1149
|
+
|
1150
|
+
<xsl:call-template name="insertHeaderDraftWatermark"/>
|
1151
|
+
|
1109
1152
|
<fo:flow flow-name="xsl-region-body" font-family="Arial">
|
1110
1153
|
|
1111
1154
|
<fo:block-container font-size="12pt" font-weight="bold" border-top="1pt solid black" width="82mm" margin-top="2mm" padding-top="2mm">
|
@@ -1303,7 +1346,9 @@
|
|
1303
1346
|
|
1304
1347
|
<!-- Index -->
|
1305
1348
|
<!-- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index" /> -->
|
1306
|
-
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index"
|
1349
|
+
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index">
|
1350
|
+
<xsl:with-param name="isDraft" select="normalize-space(//bipm:bipm-standard/bipm:bibdata/bipm:version/bipm:draft or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'draft') or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'projet'))"/>
|
1351
|
+
</xsl:apply-templates>
|
1307
1352
|
|
1308
1353
|
<!-- End Document Pages -->
|
1309
1354
|
|
@@ -1322,6 +1367,8 @@
|
|
1322
1367
|
|
1323
1368
|
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
1324
1369
|
|
1370
|
+
<xsl:call-template name="insertHeaderDraftWatermark"/>
|
1371
|
+
|
1325
1372
|
<fo:flow flow-name="xsl-region-body" font-family="Arial">
|
1326
1373
|
|
1327
1374
|
<fo:block-container font-size="12pt" font-weight="bold" border-top="1pt solid black" width="82mm" margin-top="2mm" padding-top="2mm">
|
@@ -1471,7 +1518,9 @@
|
|
1471
1518
|
|
1472
1519
|
<!-- Index -->
|
1473
1520
|
<!-- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index" /> -->
|
1474
|
-
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index"
|
1521
|
+
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index">
|
1522
|
+
<xsl:with-param name="isDraft" select="normalize-space(//bipm:bipm-standard/bipm:bibdata/bipm:version/bipm:draft or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'draft') or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'projet'))"/>
|
1523
|
+
</xsl:apply-templates>
|
1475
1524
|
|
1476
1525
|
</xsl:otherwise>
|
1477
1526
|
</xsl:choose>
|
@@ -1485,6 +1534,8 @@
|
|
1485
1534
|
|
1486
1535
|
<fo:page-sequence master-reference="cover-page" force-page-count="even">
|
1487
1536
|
|
1537
|
+
<xsl:call-template name="insertHeaderDraftWatermark"/>
|
1538
|
+
|
1488
1539
|
<fo:flow flow-name="xsl-region-body">
|
1489
1540
|
|
1490
1541
|
<xsl:call-template name="insertCoverPageCommon"/>
|
@@ -1820,6 +1871,8 @@
|
|
1820
1871
|
</fo:block>
|
1821
1872
|
</fo:block-container>
|
1822
1873
|
|
1874
|
+
<xsl:call-template name="insertDraftWatermark"/>
|
1875
|
+
|
1823
1876
|
<!-- BIPM logo -->
|
1824
1877
|
<fo:block-container absolute-position="fixed" left="12.8mm" top="12.2mm">
|
1825
1878
|
<fo:block>
|
@@ -1844,6 +1897,8 @@
|
|
1844
1897
|
|
1845
1898
|
<fo:page-sequence master-reference="title-page" format="1" initial-page-number="1" force-page-count="even">
|
1846
1899
|
|
1900
|
+
<xsl:call-template name="insertHeaderDraftWatermark"/>
|
1901
|
+
|
1847
1902
|
<fo:flow flow-name="xsl-region-body" font-family="Arial">
|
1848
1903
|
|
1849
1904
|
<xsl:variable name="languages">
|
@@ -2126,7 +2181,7 @@
|
|
2126
2181
|
|
2127
2182
|
<xsl:variable name="display">
|
2128
2183
|
<xsl:choose>
|
2129
|
-
<xsl:when test="$level >
|
2184
|
+
<xsl:when test="$level > $toc_level">false</xsl:when>
|
2130
2185
|
<xsl:otherwise>true</xsl:otherwise>
|
2131
2186
|
</xsl:choose>
|
2132
2187
|
</xsl:variable>
|
@@ -3036,35 +3091,6 @@
|
|
3036
3091
|
</xsl:choose>
|
3037
3092
|
</xsl:template>
|
3038
3093
|
|
3039
|
-
<!--
|
3040
|
-
<fn reference="1">
|
3041
|
-
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
3042
|
-
</fn>
|
3043
|
-
-->
|
3044
|
-
<xsl:template match="bipm:title//bipm:fn | bipm:name//bipm:fn | bipm:p/bipm:fn[not(ancestor::bipm:table)] | bipm:p/*/bipm:fn[not(ancestor::bipm:table)] | bipm:sourcecode/bipm:fn[not(ancestor::bipm:table)]" priority="2" name="fn">
|
3045
|
-
<fo:footnote keep-with-previous.within-line="always">
|
3046
|
-
<xsl:variable name="number"> <!-- select="@reference"/> -->
|
3047
|
-
<xsl:number count="bipm:fn[not(ancestor::bipm:table)]" level="any"/>
|
3048
|
-
</xsl:variable>
|
3049
|
-
<xsl:variable name="gen_id" select="generate-id()"/>
|
3050
|
-
<xsl:variable name="lang" select="ancestor::bipm:bipm-standard/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
3051
|
-
<fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super">
|
3052
|
-
<fo:basic-link internal-destination="{$lang}_footnote_{@reference}_{$number}_{$gen_id}" fox:alt-text="footnote {@reference}">
|
3053
|
-
<xsl:value-of select="$number"/><!-- + count(//bipm:bibitem/bipm:note) -->
|
3054
|
-
</fo:basic-link>
|
3055
|
-
</fo:inline>
|
3056
|
-
<fo:footnote-body>
|
3057
|
-
<fo:block font-size="9pt" margin-bottom="12pt" font-weight="normal" text-indent="0" start-indent="0" line-height="124%" text-align="justify">
|
3058
|
-
<fo:inline id="{$lang}_footnote_{@reference}_{$number}_{$gen_id}" keep-with-next.within-line="always" font-size="60%" vertical-align="super" padding-right="1mm"> <!-- baseline-shift="30%" padding-right="3mm" font-size="60%" alignment-baseline="hanging" -->
|
3059
|
-
<xsl:value-of select="$number "/><!-- + count(//bipm:bibitem/bipm:note) -->
|
3060
|
-
</fo:inline>
|
3061
|
-
<xsl:for-each select="bipm:p">
|
3062
|
-
<xsl:apply-templates/>
|
3063
|
-
</xsl:for-each>
|
3064
|
-
</fo:block>
|
3065
|
-
</fo:footnote-body>
|
3066
|
-
</fo:footnote>
|
3067
|
-
</xsl:template>
|
3068
3094
|
|
3069
3095
|
<xsl:template match="bipm:fn/bipm:p">
|
3070
3096
|
<fo:block>
|
@@ -3326,13 +3352,14 @@
|
|
3326
3352
|
|
3327
3353
|
<xsl:template match="bipm:preferred">
|
3328
3354
|
<fo:block font-weight="bold" keep-with-next="always" space-before="8pt" margin-bottom="6pt">
|
3329
|
-
<xsl:
|
3355
|
+
<xsl:call-template name="setStyle_preferred"/>
|
3356
|
+
<xsl:if test="ancestor::bipm:term[1]/bipm:name">
|
3330
3357
|
<xsl:variable name="level">
|
3331
3358
|
<xsl:call-template name="getLevelTermName"/>
|
3332
3359
|
</xsl:variable>
|
3333
|
-
<fo:inline role="H{$level}">
|
3360
|
+
<fo:inline role="H{$level}" font-weight="bold">
|
3334
3361
|
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
3335
|
-
<xsl:apply-templates select="ancestor::bipm:term/bipm:name" mode="presentation"/>
|
3362
|
+
<xsl:apply-templates select="ancestor::bipm:term[1]/bipm:name" mode="presentation"/>
|
3336
3363
|
</fo:inline>
|
3337
3364
|
</xsl:if>
|
3338
3365
|
<xsl:apply-templates/>
|
@@ -3908,7 +3935,11 @@
|
|
3908
3935
|
<xsl:template name="insertHeaderFooter">
|
3909
3936
|
<xsl:param name="header-title"/>
|
3910
3937
|
<xsl:param name="orientation"/>
|
3938
|
+
<xsl:param name="isDraft"/>
|
3911
3939
|
<fo:static-content flow-name="header-odd" role="artifact">
|
3940
|
+
<xsl:call-template name="insertDraftWatermark">
|
3941
|
+
<xsl:with-param name="isDraft" select="$isDraft"/>
|
3942
|
+
</xsl:call-template>
|
3912
3943
|
<fo:block-container font-family="Arial" font-size="8pt" padding-top="12.5mm">
|
3913
3944
|
<fo:block text-align="right">
|
3914
3945
|
<xsl:copy-of select="$header-title"/>
|
@@ -3929,6 +3960,9 @@
|
|
3929
3960
|
</fo:block-container>
|
3930
3961
|
</fo:static-content>
|
3931
3962
|
<fo:static-content flow-name="header-even" role="artifact">
|
3963
|
+
<xsl:call-template name="insertDraftWatermark">
|
3964
|
+
<xsl:with-param name="isDraft" select="$isDraft"/>
|
3965
|
+
</xsl:call-template>
|
3932
3966
|
<fo:block-container font-family="Arial" font-size="8pt" padding-top="12.5mm">
|
3933
3967
|
<fo:block>
|
3934
3968
|
<fo:inline font-weight="bold"><fo:page-number/></fo:inline>
|
@@ -3944,7 +3978,74 @@
|
|
3944
3978
|
<fo:block> </fo:block>
|
3945
3979
|
</fo:block-container>
|
3946
3980
|
</fo:block-container>
|
3947
|
-
</fo:static-content>
|
3981
|
+
</fo:static-content>
|
3982
|
+
<fo:static-content flow-name="header-blank" role="artifact">
|
3983
|
+
<xsl:call-template name="insertDraftWatermark">
|
3984
|
+
<xsl:with-param name="isDraft" select="$isDraft"/>
|
3985
|
+
</xsl:call-template>
|
3986
|
+
<fo:block/>
|
3987
|
+
</fo:static-content>
|
3988
|
+
</xsl:template>
|
3989
|
+
|
3990
|
+
<xsl:template name="insertDraftWatermark">
|
3991
|
+
<xsl:param name="isDraft"/>
|
3992
|
+
<xsl:if test="$isDraft = 'true' or normalize-space(//bipm:bipm-standard/bipm:bibdata/bipm:version/bipm:draft or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'draft') or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'projet')) = 'true'">
|
3993
|
+
<!-- DRAFT -->
|
3994
|
+
<xsl:variable name="draft_label">
|
3995
|
+
<xsl:call-template name="getLocalizedString">
|
3996
|
+
<xsl:with-param name="key">draft_label</xsl:with-param>
|
3997
|
+
</xsl:call-template>
|
3998
|
+
</xsl:variable>
|
3999
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="30mm">
|
4000
|
+
<fo:block line-height="0">
|
4001
|
+
<fo:instream-foreign-object fox:alt-text="DRAFT">
|
4002
|
+
<svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="200mm" height="250mm">
|
4003
|
+
<svg:g transform="rotate(-45) scale(0.6, 1)">
|
4004
|
+
<xsl:variable name="font-size">
|
4005
|
+
<xsl:choose>
|
4006
|
+
<xsl:when test="string-length($draft_label) > 5">150</xsl:when>
|
4007
|
+
<xsl:otherwise>260</xsl:otherwise>
|
4008
|
+
</xsl:choose>
|
4009
|
+
</xsl:variable>
|
4010
|
+
<svg:text x="-175mm" y="205mm" style="font-family:Arial;font-size:{$font-size}pt;font-weight:normal;fill:rgb(223, 223, 223);">
|
4011
|
+
<xsl:if test="string-length($draft_label) > 5">
|
4012
|
+
<xsl:attribute name="x">-175mm</xsl:attribute>
|
4013
|
+
<xsl:attribute name="y">180mm</xsl:attribute>
|
4014
|
+
</xsl:if>
|
4015
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($draft_label))"/>
|
4016
|
+
</svg:text>
|
4017
|
+
</svg:g>
|
4018
|
+
</svg:svg>
|
4019
|
+
</fo:instream-foreign-object>
|
4020
|
+
</fo:block>
|
4021
|
+
</fo:block-container>
|
4022
|
+
</xsl:if>
|
4023
|
+
</xsl:template>
|
4024
|
+
|
4025
|
+
<xsl:template name="insertHeaderDraftWatermark">
|
4026
|
+
<xsl:variable name="isDraft" select="normalize-space(//bipm:bipm-standard/bipm:bibdata/bipm:version/bipm:draft or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'draft') or contains(//bipm:bipm-standard/bipm:bibdata/bipm:status/bipm:stage, 'projet'))"/>
|
4027
|
+
<xsl:if test="$isDraft = 'true'">
|
4028
|
+
<fo:static-content flow-name="header-blank" role="artifact">
|
4029
|
+
<xsl:call-template name="insertDraftWatermark">
|
4030
|
+
<xsl:with-param name="isDraft" select="$isDraft"/>
|
4031
|
+
</xsl:call-template>
|
4032
|
+
</fo:static-content>
|
4033
|
+
<fo:static-content flow-name="header" role="artifact">
|
4034
|
+
<xsl:call-template name="insertDraftWatermark">
|
4035
|
+
<xsl:with-param name="isDraft" select="$isDraft"/>
|
4036
|
+
</xsl:call-template>
|
4037
|
+
</fo:static-content>
|
4038
|
+
<fo:static-content flow-name="header-odd" role="artifact">
|
4039
|
+
<xsl:call-template name="insertDraftWatermark">
|
4040
|
+
<xsl:with-param name="isDraft" select="$isDraft"/>
|
4041
|
+
</xsl:call-template>
|
4042
|
+
</fo:static-content>
|
4043
|
+
<fo:static-content flow-name="header-even" role="artifact">
|
4044
|
+
<xsl:call-template name="insertDraftWatermark">
|
4045
|
+
<xsl:with-param name="isDraft" select="$isDraft"/>
|
4046
|
+
</xsl:call-template>
|
4047
|
+
</fo:static-content>
|
4048
|
+
</xsl:if>
|
3948
4049
|
</xsl:template>
|
3949
4050
|
|
3950
4051
|
<!-- <xsl:template name="insertHeaderFooterAppendix">
|
@@ -4089,6 +4190,7 @@
|
|
4089
4190
|
<!-- <xsl:template match="bipm:clause[@type = 'index']" mode="index"> -->
|
4090
4191
|
<xsl:template match="bipm:indexsect"/>
|
4091
4192
|
<xsl:template match="bipm:indexsect" mode="index">
|
4193
|
+
<xsl:param name="isDraft"/>
|
4092
4194
|
|
4093
4195
|
<fo:page-sequence master-reference="index" force-page-count="no-force">
|
4094
4196
|
<xsl:variable name="header-title">
|
@@ -4103,6 +4205,7 @@
|
|
4103
4205
|
</xsl:variable>
|
4104
4206
|
<xsl:call-template name="insertHeaderFooter">
|
4105
4207
|
<xsl:with-param name="header-title" select="$header-title"/>
|
4208
|
+
<xsl:with-param name="isDraft" select="$isDraft"/>
|
4106
4209
|
</xsl:call-template>
|
4107
4210
|
|
4108
4211
|
<fo:flow flow-name="xsl-region-body">
|
@@ -5079,6 +5182,80 @@
|
|
5079
5182
|
|
5080
5183
|
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
5081
5184
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
5185
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-style">
|
5186
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
5187
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-num-style">
|
5188
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
5189
|
+
|
5190
|
+
<xsl:attribute name="font-size">65%</xsl:attribute>
|
5191
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
5192
|
+
|
5193
|
+
|
5194
|
+
|
5195
|
+
|
5196
|
+
|
5197
|
+
|
5198
|
+
|
5199
|
+
|
5200
|
+
|
5201
|
+
|
5202
|
+
|
5203
|
+
|
5204
|
+
|
5205
|
+
|
5206
|
+
|
5207
|
+
|
5208
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
5209
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
5210
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
5211
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
5212
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
5213
|
+
|
5214
|
+
|
5215
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
5216
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
5217
|
+
<xsl:attribute name="line-height">124%</xsl:attribute>
|
5218
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
5219
|
+
|
5220
|
+
|
5221
|
+
|
5222
|
+
|
5223
|
+
|
5224
|
+
|
5225
|
+
|
5226
|
+
|
5227
|
+
|
5228
|
+
|
5229
|
+
|
5230
|
+
|
5231
|
+
|
5232
|
+
|
5233
|
+
|
5234
|
+
|
5235
|
+
|
5236
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
5237
|
+
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
5238
|
+
|
5239
|
+
<xsl:attribute name="font-size">60%</xsl:attribute>
|
5240
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
5241
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
5242
|
+
|
5243
|
+
|
5244
|
+
|
5245
|
+
|
5246
|
+
|
5247
|
+
|
5248
|
+
|
5249
|
+
|
5250
|
+
|
5251
|
+
|
5252
|
+
|
5253
|
+
|
5254
|
+
|
5255
|
+
|
5256
|
+
|
5257
|
+
|
5258
|
+
|
5082
5259
|
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
5083
5260
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
5084
5261
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
@@ -5104,7 +5281,8 @@
|
|
5104
5281
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
5105
5282
|
|
5106
5283
|
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
5107
|
-
|
5284
|
+
|
5285
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
|
5108
5286
|
<xsl:sort select="@displayorder" data-type="number"/>
|
5109
5287
|
<xsl:apply-templates select="." mode="contents"/>
|
5110
5288
|
</xsl:for-each>
|
@@ -5114,7 +5292,7 @@
|
|
5114
5292
|
<xsl:apply-templates select="." mode="contents"/>
|
5115
5293
|
</xsl:for-each>
|
5116
5294
|
|
5117
|
-
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
5295
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
5118
5296
|
<xsl:sort select="@displayorder" data-type="number"/>
|
5119
5297
|
<xsl:apply-templates select="." mode="contents"/>
|
5120
5298
|
</xsl:for-each>
|
@@ -6116,6 +6294,102 @@
|
|
6116
6294
|
|
6117
6295
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
6118
6296
|
<xsl:apply-templates/>
|
6297
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
|
6298
|
+
|
6299
|
+
<!-- list of footnotes to calculate actual footnotes number -->
|
6300
|
+
<xsl:variable name="p_fn_">
|
6301
|
+
<xsl:choose>
|
6302
|
+
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
6303
|
+
<fn gen_id="{generate-id(.)}">
|
6304
|
+
<xsl:copy-of select="@*"/>
|
6305
|
+
<xsl:copy-of select="node()"/>
|
6306
|
+
</fn>
|
6307
|
+
</xsl:when>
|
6308
|
+
<xsl:otherwise>
|
6309
|
+
<!-- itetation for:
|
6310
|
+
footnotes in bibdata/title
|
6311
|
+
footnotes in bibliography
|
6312
|
+
footnotes in document's body (except table's head/body/foot and figure text)
|
6313
|
+
-->
|
6314
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
6315
|
+
<fn gen_id="{generate-id(.)}">
|
6316
|
+
<xsl:copy-of select="@*"/>
|
6317
|
+
<xsl:copy-of select="node()"/>
|
6318
|
+
</fn>
|
6319
|
+
</xsl:for-each>
|
6320
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
6321
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
6322
|
+
<xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
6323
|
+
<!-- copy unique fn -->
|
6324
|
+
<fn gen_id="{generate-id(.)}">
|
6325
|
+
<xsl:copy-of select="@*"/>
|
6326
|
+
<xsl:copy-of select="node()"/>
|
6327
|
+
</fn>
|
6328
|
+
</xsl:for-each>
|
6329
|
+
</xsl:for-each>
|
6330
|
+
</xsl:otherwise>
|
6331
|
+
</xsl:choose>
|
6332
|
+
</xsl:variable>
|
6333
|
+
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
6334
|
+
|
6335
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
6336
|
+
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
6337
|
+
<xsl:variable name="reference" select="@reference"/>
|
6338
|
+
<!-- fn sequence number in document -->
|
6339
|
+
<xsl:variable name="current_fn_number">
|
6340
|
+
<xsl:choose>
|
6341
|
+
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
6342
|
+
<xsl:otherwise>
|
6343
|
+
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
6344
|
+
</xsl:otherwise>
|
6345
|
+
</xsl:choose>
|
6346
|
+
</xsl:variable>
|
6347
|
+
<xsl:variable name="current_fn_number_text">
|
6348
|
+
<xsl:value-of select="$current_fn_number"/>
|
6349
|
+
|
6350
|
+
|
6351
|
+
</xsl:variable>
|
6352
|
+
|
6353
|
+
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
6354
|
+
<xsl:variable name="footnote_inline">
|
6355
|
+
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
6356
|
+
|
6357
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
6358
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
6359
|
+
</fo:basic-link>
|
6360
|
+
</fo:inline>
|
6361
|
+
</xsl:variable>
|
6362
|
+
<!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
|
6363
|
+
gen_id=<xsl:value-of select="$gen_id"/> -->
|
6364
|
+
<xsl:choose>
|
6365
|
+
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
6366
|
+
<xsl:copy-of select="$footnote_inline"/>
|
6367
|
+
</xsl:when>
|
6368
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
6369
|
+
<fo:footnote xsl:use-attribute-sets="fn-style">
|
6370
|
+
<xsl:copy-of select="$footnote_inline"/>
|
6371
|
+
<fo:footnote-body>
|
6372
|
+
|
6373
|
+
<fo:block-container text-indent="0" start-indent="0">
|
6374
|
+
|
6375
|
+
|
6376
|
+
<fo:block xsl:use-attribute-sets="fn-body-style">
|
6377
|
+
|
6378
|
+
|
6379
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
6380
|
+
|
6381
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
6382
|
+
</fo:inline>
|
6383
|
+
<xsl:apply-templates/>
|
6384
|
+
</fo:block>
|
6385
|
+
</fo:block-container>
|
6386
|
+
</fo:footnote-body>
|
6387
|
+
</fo:footnote>
|
6388
|
+
</xsl:when>
|
6389
|
+
<xsl:otherwise>
|
6390
|
+
<xsl:copy-of select="$footnote_inline"/>
|
6391
|
+
</xsl:otherwise>
|
6392
|
+
</xsl:choose>
|
6119
6393
|
</xsl:template><xsl:template name="fn_display">
|
6120
6394
|
<xsl:variable name="references">
|
6121
6395
|
|
@@ -6326,6 +6600,8 @@
|
|
6326
6600
|
|
6327
6601
|
</fo:basic-link>
|
6328
6602
|
</fo:inline>
|
6603
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
6604
|
+
<fo:inline><xsl:value-of select="."/></fo:inline>
|
6329
6605
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
6330
6606
|
<fo:inline>
|
6331
6607
|
<xsl:apply-templates/>
|
@@ -6629,6 +6905,7 @@
|
|
6629
6905
|
<fo:table-cell>
|
6630
6906
|
|
6631
6907
|
<fo:block margin-top="6pt">
|
6908
|
+
<xsl:copy-of select="@id"/>
|
6632
6909
|
|
6633
6910
|
|
6634
6911
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
@@ -7350,22 +7627,6 @@
|
|
7350
7627
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
7351
7628
|
<xsl:apply-templates/>
|
7352
7629
|
</fo:inline>
|
7353
|
-
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
7354
|
-
<xsl:variable name="title-modified">
|
7355
|
-
|
7356
|
-
|
7357
|
-
<xsl:call-template name="getTitle">
|
7358
|
-
<xsl:with-param name="name" select="'title-modified'"/>
|
7359
|
-
</xsl:call-template>
|
7360
|
-
|
7361
|
-
</xsl:variable>
|
7362
|
-
|
7363
|
-
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
7364
|
-
<xsl:choose>
|
7365
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
7366
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
7367
|
-
</xsl:choose>
|
7368
|
-
<xsl:apply-templates/>
|
7369
7630
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
7370
7631
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
7371
7632
|
|
@@ -7511,14 +7772,18 @@
|
|
7511
7772
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
7512
7773
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
7513
7774
|
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
7775
|
+
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
7514
7776
|
<fo:block id="{@id}">
|
7515
7777
|
<xsl:apply-templates/>
|
7516
7778
|
</fo:block>
|
7517
7779
|
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
7780
|
+
<!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
|
7518
7781
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
7519
7782
|
|
7520
7783
|
|
7521
|
-
|
7784
|
+
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
7785
|
+
|
7786
|
+
</xsl:if>
|
7522
7787
|
<xsl:apply-templates/>
|
7523
7788
|
</fo:block>
|
7524
7789
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
@@ -7946,12 +8211,12 @@
|
|
7946
8211
|
</xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
7947
8212
|
<xsl:apply-templates mode="contents"/>
|
7948
8213
|
<xsl:text> </xsl:text>
|
7949
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
8214
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
|
7950
8215
|
<xsl:apply-templates mode="bookmarks"/>
|
7951
8216
|
<xsl:text> </xsl:text>
|
7952
8217
|
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
7953
8218
|
<xsl:value-of select="."/>
|
7954
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
8219
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
7955
8220
|
<xsl:value-of select="."/>
|
7956
8221
|
</xsl:template><xsl:template match="node()" mode="contents">
|
7957
8222
|
<xsl:apply-templates mode="contents"/>
|
@@ -8235,6 +8500,8 @@
|
|
8235
8500
|
|
8236
8501
|
|
8237
8502
|
|
8503
|
+
|
8504
|
+
|
8238
8505
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
8239
8506
|
<xsl:variable name="_font-size">
|
8240
8507
|
|
@@ -8268,13 +8535,17 @@
|
|
8268
8535
|
|
8269
8536
|
|
8270
8537
|
|
8538
|
+
|
8539
|
+
|
8271
8540
|
<xsl:apply-templates/>
|
8272
8541
|
</fo:block>
|
8273
|
-
|
8542
|
+
|
8274
8543
|
|
8275
8544
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
8276
8545
|
|
8277
8546
|
|
8547
|
+
|
8548
|
+
|
8278
8549
|
</fo:block-container>
|
8279
8550
|
</fo:block-container>
|
8280
8551
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -8510,7 +8781,8 @@
|
|
8510
8781
|
</fo:block>
|
8511
8782
|
</fo:table-cell>
|
8512
8783
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
8513
|
-
<fo:block font-size="11pt"
|
8784
|
+
<fo:block font-size="11pt">
|
8785
|
+
|
8514
8786
|
<xsl:apply-templates/>
|
8515
8787
|
</fo:block>
|
8516
8788
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
@@ -8620,58 +8892,69 @@
|
|
8620
8892
|
<xsl:variable name="termsource_text">
|
8621
8893
|
<xsl:apply-templates/>
|
8622
8894
|
</xsl:variable>
|
8623
|
-
|
8624
|
-
<xsl:choose>
|
8895
|
+
<xsl:copy-of select="$termsource_text"/>
|
8896
|
+
<!-- <xsl:choose>
|
8625
8897
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
8626
|
-
<!-- <xsl:apply-templates /> -->
|
8627
8898
|
<xsl:copy-of select="$termsource_text"/>
|
8628
8899
|
</xsl:when>
|
8629
|
-
<xsl:otherwise>
|
8630
|
-
|
8900
|
+
<xsl:otherwise>
|
8901
|
+
<xsl:if test="$namespace = 'bsi'">
|
8902
|
+
<xsl:choose>
|
8903
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
|
8904
|
+
<xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
|
8905
|
+
</xsl:choose>
|
8906
|
+
</xsl:if>
|
8907
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
8631
8908
|
<xsl:text>[</xsl:text>
|
8632
|
-
|
8633
|
-
<!-- <xsl:apply-templates /> -->
|
8909
|
+
</xsl:if>
|
8634
8910
|
<xsl:copy-of select="$termsource_text"/>
|
8635
|
-
|
8911
|
+
<xsl:if test="$namespace = 'bsi'">
|
8912
|
+
<xsl:choose>
|
8913
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
|
8914
|
+
<xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
|
8915
|
+
</xsl:choose>
|
8916
|
+
</xsl:if>
|
8917
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
8636
8918
|
<xsl:text>]</xsl:text>
|
8637
|
-
|
8919
|
+
</xsl:if>
|
8638
8920
|
</xsl:otherwise>
|
8639
|
-
</xsl:choose>
|
8921
|
+
</xsl:choose> -->
|
8640
8922
|
</fo:block>
|
8641
8923
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
8642
8924
|
<xsl:if test="normalize-space() != ''">
|
8643
8925
|
<xsl:value-of select="."/>
|
8644
8926
|
</xsl:if>
|
8645
|
-
</xsl:template><xsl:
|
8646
|
-
<
|
8647
|
-
|
8648
|
-
|
8649
|
-
|
8927
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
|
8928
|
+
<fo:inline>
|
8929
|
+
|
8930
|
+
|
8931
|
+
<xsl:value-of select="."/>
|
8932
|
+
</fo:inline>
|
8933
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
8650
8934
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
8651
8935
|
<xsl:if test="normalize-space(@citeas) = ''">
|
8652
8936
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
8653
8937
|
</xsl:if>
|
8654
|
-
|
8655
|
-
|
8656
|
-
<fo:inline>
|
8657
|
-
|
8658
|
-
|
8659
|
-
|
8660
|
-
|
8661
|
-
|
8662
|
-
|
8663
|
-
<xsl:value-of select="$localized.source"/>
|
8664
|
-
<xsl:text> </xsl:text>
|
8665
|
-
|
8666
|
-
|
8667
|
-
|
8668
|
-
</fo:inline>
|
8669
|
-
|
8670
8938
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
8671
8939
|
<xsl:apply-templates/>
|
8672
8940
|
</fo:inline>
|
8941
|
+
</fo:basic-link>
|
8942
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
8943
|
+
<xsl:variable name="title-modified">
|
8673
8944
|
|
8674
|
-
|
8945
|
+
|
8946
|
+
<xsl:call-template name="getTitle">
|
8947
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
8948
|
+
</xsl:call-template>
|
8949
|
+
|
8950
|
+
</xsl:variable>
|
8951
|
+
|
8952
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
8953
|
+
<xsl:choose>
|
8954
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
8955
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
8956
|
+
</xsl:choose>
|
8957
|
+
<xsl:apply-templates/>
|
8675
8958
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
8676
8959
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
8677
8960
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
@@ -8714,12 +8997,20 @@
|
|
8714
8997
|
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
8715
8998
|
<xsl:text>— </xsl:text>
|
8716
8999
|
<xsl:apply-templates/>
|
8717
|
-
</xsl:template><xsl:
|
9000
|
+
</xsl:template><xsl:variable name="bibitem_hidden_">
|
9001
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden='true']">
|
9002
|
+
<xsl:copy-of select="."/>
|
9003
|
+
</xsl:for-each>
|
9004
|
+
<xsl:for-each select="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem']">
|
9005
|
+
<xsl:copy-of select="."/>
|
9006
|
+
</xsl:for-each>
|
9007
|
+
</xsl:variable><xsl:variable name="bibitem_hidden" select="xalan:nodeset($bibitem_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
|
8718
9008
|
|
8719
9009
|
<xsl:variable name="bibitemid">
|
8720
9010
|
<xsl:choose>
|
8721
|
-
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"
|
8722
|
-
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"
|
9011
|
+
<!-- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"></xsl:when>
|
9012
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"></xsl:when> -->
|
9013
|
+
<xsl:when test="$bibitem_hidden/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
8723
9014
|
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
8724
9015
|
</xsl:choose>
|
8725
9016
|
</xsl:variable>
|
@@ -8817,10 +9108,10 @@
|
|
8817
9108
|
</xsl:choose>
|
8818
9109
|
</xsl:variable>
|
8819
9110
|
|
8820
|
-
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
9111
|
+
<!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
|
8821
9112
|
|
8822
9113
|
<xsl:choose>
|
8823
|
-
<xsl:when test="$
|
9114
|
+
<xsl:when test="$lang = 'zh'">
|
8824
9115
|
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
8825
9116
|
</xsl:when>
|
8826
9117
|
<xsl:when test="../../@inline-header = 'true'">
|
@@ -8854,24 +9145,29 @@
|
|
8854
9145
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
8855
9146
|
<xsl:variable name="title-deprecated">
|
8856
9147
|
|
8857
|
-
|
8858
|
-
|
8859
|
-
<xsl:with-param name="name" select="'title-deprecated'"/>
|
9148
|
+
<xsl:call-template name="getLocalizedString">
|
9149
|
+
<xsl:with-param name="key">deprecated</xsl:with-param>
|
8860
9150
|
</xsl:call-template>
|
8861
9151
|
|
9152
|
+
|
8862
9153
|
</xsl:variable>
|
8863
9154
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
8864
9155
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
8865
9156
|
</fo:block>
|
9157
|
+
</xsl:template><xsl:template name="setStyle_preferred">
|
9158
|
+
<xsl:if test="*[local-name() = 'strong']">
|
9159
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
9160
|
+
</xsl:if>
|
8866
9161
|
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
8867
9162
|
<fo:block xsl:use-attribute-sets="definition-style">
|
8868
9163
|
<xsl:apply-templates/>
|
8869
9164
|
</fo:block>
|
8870
9165
|
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
|
8871
9166
|
<xsl:apply-templates/>
|
8872
|
-
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
|
9167
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
|
8873
9168
|
<fo:inline> <xsl:apply-templates/></fo:inline>
|
8874
|
-
<fo:block
|
9169
|
+
<!-- <fo:block> </fo:block> -->
|
9170
|
+
<fo:block/>
|
8875
9171
|
</xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
|
8876
9172
|
|
8877
9173
|
<fo:block>
|
@@ -9298,7 +9594,31 @@
|
|
9298
9594
|
<fo:block-container border="1pt solid black" width="50%">
|
9299
9595
|
<fo:block> </fo:block>
|
9300
9596
|
</fo:block-container>
|
9301
|
-
</xsl:template><xsl:
|
9597
|
+
</xsl:template><xsl:variable name="toc_level">
|
9598
|
+
<xsl:choose>
|
9599
|
+
<xsl:when test="1 = 2"/> <!-- to do https://github.com/metanorma/mn-native-pdf/issues/337: if there is value in xml -->
|
9600
|
+
<xsl:otherwise><!-- default value -->
|
9601
|
+
3
|
9602
|
+
|
9603
|
+
|
9604
|
+
|
9605
|
+
|
9606
|
+
|
9607
|
+
|
9608
|
+
|
9609
|
+
|
9610
|
+
|
9611
|
+
|
9612
|
+
|
9613
|
+
|
9614
|
+
|
9615
|
+
|
9616
|
+
|
9617
|
+
|
9618
|
+
|
9619
|
+
</xsl:otherwise>
|
9620
|
+
</xsl:choose>
|
9621
|
+
</xsl:variable><xsl:template match="*[local-name() = 'toc']">
|
9302
9622
|
<xsl:param name="colwidths"/>
|
9303
9623
|
<xsl:variable name="colwidths_">
|
9304
9624
|
<xsl:choose>
|
@@ -9833,12 +10153,15 @@
|
|
9833
10153
|
<xsl:param name="default">left</xsl:param>
|
9834
10154
|
<xsl:attribute name="text-align">
|
9835
10155
|
<xsl:choose>
|
9836
|
-
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
10156
|
+
<xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
|
9837
10157
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
9838
10158
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
9839
10159
|
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
9840
10160
|
</xsl:choose>
|
9841
10161
|
</xsl:attribute>
|
10162
|
+
<xsl:if test="@align = 'indent'">
|
10163
|
+
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
10164
|
+
</xsl:if>
|
9842
10165
|
</xsl:template><xsl:template name="number-to-words">
|
9843
10166
|
<xsl:param name="number"/>
|
9844
10167
|
<xsl:param name="first"/>
|
@@ -9935,4 +10258,14 @@
|
|
9935
10258
|
</xsl:otherwise>
|
9936
10259
|
</xsl:choose>
|
9937
10260
|
</xsl:if>
|
10261
|
+
</xsl:template><xsl:template name="setAltText">
|
10262
|
+
<xsl:param name="value"/>
|
10263
|
+
<xsl:attribute name="fox:alt-text">
|
10264
|
+
<xsl:choose>
|
10265
|
+
<xsl:when test="normalize-space($value) != ''">
|
10266
|
+
<xsl:value-of select="$value"/>
|
10267
|
+
</xsl:when>
|
10268
|
+
<xsl:otherwise>_</xsl:otherwise>
|
10269
|
+
</xsl:choose>
|
10270
|
+
</xsl:attribute>
|
9938
10271
|
</xsl:template></xsl:stylesheet>
|