metanorma-bipm 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +12 -11
- data/.hound.yml +5 -0
- data/.rubocop.yml +3 -5
- data/lib/asciidoctor/bipm/biblio.rng +1 -0
- data/lib/asciidoctor/bipm/bipm.rng +3 -0
- data/lib/asciidoctor/bipm/converter.rb +2 -1
- data/lib/asciidoctor/bipm/isodoc.rng +17 -3
- data/lib/isodoc/bipm/bipm.brochure.xsl +127 -31
- data/lib/isodoc/bipm/bipm.guide.xsl +127 -31
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +127 -31
- data/lib/isodoc/bipm/bipm.rapport.xsl +127 -31
- data/lib/isodoc/bipm/jcgm.standard.xsl +146 -37
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05cfafc9fd505c192fdc441582a028bf9a843bd83019ebcc5b34c96fe9a74957
|
4
|
+
data.tar.gz: 8fc6e66fd0d5aeffc2fcdcd8f2efe14cf24efa4ba9d97e76fe96e7c7f7524f38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 504a7edc465d5519b341aed7aafea97d3ebae1908fed1984ca2d99800b63bc068adf31184dad33f7ce4b0919a12a5b2e763f4c90c620f8fe4d51c4e6c9a61d3a
|
7
|
+
data.tar.gz: 4db2cdc12258c9a5be1277e1761226b04b7b09cdd710bf0d436ccb081a9cacf2754ca8a2b3a4a9e4e6c830e9930f883ee230d6256ce6a190c93c703f350cef69
|
data/.github/workflows/rake.yml
CHANGED
@@ -16,19 +16,9 @@ jobs:
|
|
16
16
|
strategy:
|
17
17
|
fail-fast: false
|
18
18
|
matrix:
|
19
|
-
ruby: [ '2.7', '2.6', '2.5', '2.4' ]
|
19
|
+
ruby: [ '3.0', '2.7', '2.6', '2.5', '2.4' ]
|
20
20
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
21
|
experimental: [ false ]
|
22
|
-
include:
|
23
|
-
- ruby: '3.0'
|
24
|
-
os: 'ubuntu-latest'
|
25
|
-
experimental: true
|
26
|
-
- ruby: '3.0'
|
27
|
-
os: 'windows-latest'
|
28
|
-
experimental: true
|
29
|
-
- ruby: '3.0'
|
30
|
-
os: 'macos-latest'
|
31
|
-
experimental: true
|
32
22
|
steps:
|
33
23
|
- uses: actions/checkout@v2
|
34
24
|
with:
|
@@ -40,3 +30,14 @@ jobs:
|
|
40
30
|
bundler-cache: true
|
41
31
|
|
42
32
|
- run: bundle exec rake
|
33
|
+
|
34
|
+
tests-passed:
|
35
|
+
needs: rake
|
36
|
+
runs-on: ubuntu-latest
|
37
|
+
steps:
|
38
|
+
- uses: peter-evans/repository-dispatch@v1
|
39
|
+
with:
|
40
|
+
token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
41
|
+
repository: ${{ github.repository }}
|
42
|
+
event-type: tests-passed
|
43
|
+
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
data/.hound.yml
ADDED
data/.rubocop.yml
CHANGED
@@ -1,12 +1,10 @@
|
|
1
|
-
#
|
2
|
-
# https://github.com/
|
3
|
-
# All project-specific additions and overrides should be specified in this file.
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
4
3
|
inherit_from:
|
5
4
|
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
6
5
|
|
7
6
|
# local repo-specific modifications
|
7
|
+
# ...
|
8
8
|
|
9
9
|
AllCops:
|
10
|
-
DisplayCopNames: false
|
11
|
-
StyleGuideCopsOnly: false
|
12
10
|
TargetRubyVersion: 2.4
|
@@ -198,7 +198,8 @@ module Asciidoctor
|
|
198
198
|
end
|
199
199
|
|
200
200
|
def jcgm_untitled_sections_cleanup(xml)
|
201
|
-
xml.xpath("//clause//clause | //annex//clause")
|
201
|
+
xml.xpath("//clause//clause | //annex//clause | //introduction/clause")
|
202
|
+
.each do |c|
|
202
203
|
next if !c&.at("./title")&.text&.empty?
|
203
204
|
|
204
205
|
c["inline-header"] = true
|
@@ -45,6 +45,11 @@
|
|
45
45
|
<optional>
|
46
46
|
<attribute name="alt"/>
|
47
47
|
</optional>
|
48
|
+
<optional>
|
49
|
+
<attribute name="updatetype">
|
50
|
+
<data type="boolean"/>
|
51
|
+
</attribute>
|
52
|
+
</optional>
|
48
53
|
<text/>
|
49
54
|
</element>
|
50
55
|
</define>
|
@@ -543,6 +548,9 @@
|
|
543
548
|
</define>
|
544
549
|
<define name="BibDataExtensionType">
|
545
550
|
<ref name="doctype"/>
|
551
|
+
<optional>
|
552
|
+
<ref name="docsubtype"/>
|
553
|
+
</optional>
|
546
554
|
<optional>
|
547
555
|
<ref name="editorialgroup"/>
|
548
556
|
</optional>
|
@@ -890,6 +898,14 @@
|
|
890
898
|
</define>
|
891
899
|
</include>
|
892
900
|
<!-- end overrides -->
|
901
|
+
<define name="docsubtype">
|
902
|
+
<element name="docsubtype">
|
903
|
+
<ref name="DocumentSubtype"/>
|
904
|
+
</element>
|
905
|
+
</define>
|
906
|
+
<define name="DocumentSubtype">
|
907
|
+
<text/>
|
908
|
+
</define>
|
893
909
|
<define name="colgroup">
|
894
910
|
<element name="colgroup">
|
895
911
|
<oneOrMore>
|
@@ -1191,9 +1207,7 @@
|
|
1191
1207
|
</define>
|
1192
1208
|
<define name="IsoWorkgroup">
|
1193
1209
|
<optional>
|
1194
|
-
<attribute name="number"
|
1195
|
-
<data type="int"/>
|
1196
|
-
</attribute>
|
1210
|
+
<attribute name="number"/>
|
1197
1211
|
</optional>
|
1198
1212
|
<optional>
|
1199
1213
|
<attribute name="type"/>
|
@@ -4314,6 +4314,9 @@
|
|
4314
4314
|
<title-continued lang="en">(continued)</title-continued>
|
4315
4315
|
<title-continued lang="fr">(continué)</title-continued>
|
4316
4316
|
|
4317
|
+
</xsl:variable><xsl:variable name="bibdata">
|
4318
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
4319
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
4317
4320
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
4318
4321
|
<xsl:param name="name"/>
|
4319
4322
|
<xsl:param name="lang"/>
|
@@ -4345,11 +4348,13 @@
|
|
4345
4348
|
|
4346
4349
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
4347
4350
|
|
4351
|
+
|
4348
4352
|
<xsl:attribute name="color">blue</xsl:attribute>
|
4349
4353
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4350
4354
|
|
4351
4355
|
|
4352
4356
|
|
4357
|
+
|
4353
4358
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
4354
4359
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
4355
4360
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -4407,6 +4412,7 @@
|
|
4407
4412
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
4408
4413
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
4409
4414
|
|
4415
|
+
|
4410
4416
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
4411
4417
|
|
4412
4418
|
|
@@ -4423,9 +4429,7 @@
|
|
4423
4429
|
|
4424
4430
|
|
4425
4431
|
|
4426
|
-
|
4427
|
-
|
4428
|
-
|
4432
|
+
|
4429
4433
|
|
4430
4434
|
|
4431
4435
|
|
@@ -4454,6 +4458,7 @@
|
|
4454
4458
|
|
4455
4459
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
4456
4460
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4461
|
+
|
4457
4462
|
|
4458
4463
|
|
4459
4464
|
|
@@ -4473,6 +4478,7 @@
|
|
4473
4478
|
<xsl:attribute name="text-indent">-25mm</xsl:attribute>
|
4474
4479
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
4475
4480
|
|
4481
|
+
|
4476
4482
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
4477
4483
|
|
4478
4484
|
|
@@ -4485,15 +4491,19 @@
|
|
4485
4491
|
|
4486
4492
|
|
4487
4493
|
|
4494
|
+
|
4495
|
+
|
4488
4496
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
4489
4497
|
|
4490
4498
|
|
4491
4499
|
|
4492
4500
|
|
4501
|
+
|
4493
4502
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
4494
4503
|
|
4495
4504
|
|
4496
4505
|
|
4506
|
+
|
4497
4507
|
|
4498
4508
|
|
4499
4509
|
|
@@ -4520,6 +4530,7 @@
|
|
4520
4530
|
|
4521
4531
|
|
4522
4532
|
|
4533
|
+
|
4523
4534
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
4524
4535
|
|
4525
4536
|
|
@@ -4542,7 +4553,9 @@
|
|
4542
4553
|
|
4543
4554
|
|
4544
4555
|
|
4556
|
+
|
4545
4557
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
4558
|
+
|
4546
4559
|
|
4547
4560
|
|
4548
4561
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
@@ -4565,14 +4578,18 @@
|
|
4565
4578
|
|
4566
4579
|
|
4567
4580
|
|
4581
|
+
|
4582
|
+
|
4568
4583
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
4569
4584
|
|
4570
4585
|
|
4571
4586
|
|
4587
|
+
|
4572
4588
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
4573
4589
|
|
4574
4590
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
4575
4591
|
|
4592
|
+
|
4576
4593
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
4577
4594
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4578
4595
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -4605,10 +4622,12 @@
|
|
4605
4622
|
|
4606
4623
|
|
4607
4624
|
|
4625
|
+
|
4608
4626
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
4609
4627
|
|
4610
4628
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
4611
4629
|
|
4630
|
+
|
4612
4631
|
<xsl:attribute name="width">100%</xsl:attribute>
|
4613
4632
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
4614
4633
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -4633,11 +4652,14 @@
|
|
4633
4652
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
4634
4653
|
|
4635
4654
|
|
4655
|
+
|
4636
4656
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
4637
4657
|
|
4658
|
+
|
4638
4659
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
4639
4660
|
|
4640
4661
|
|
4662
|
+
|
4641
4663
|
</xsl:attribute-set><xsl:variable name="color-added-text">
|
4642
4664
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
4643
4665
|
</xsl:variable><xsl:attribute-set name="add-style">
|
@@ -4776,6 +4798,7 @@
|
|
4776
4798
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
4777
4799
|
|
4778
4800
|
|
4801
|
+
|
4779
4802
|
|
4780
4803
|
|
4781
4804
|
|
@@ -4787,6 +4810,8 @@
|
|
4787
4810
|
|
4788
4811
|
|
4789
4812
|
|
4813
|
+
|
4814
|
+
|
4790
4815
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
4791
4816
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
4792
4817
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -4822,6 +4847,7 @@
|
|
4822
4847
|
|
4823
4848
|
|
4824
4849
|
|
4850
|
+
|
4825
4851
|
|
4826
4852
|
|
4827
4853
|
|
@@ -4968,6 +4994,7 @@
|
|
4968
4994
|
</xsl:choose>
|
4969
4995
|
|
4970
4996
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
4997
|
+
<xsl:param name="continued"/>
|
4971
4998
|
<xsl:if test="normalize-space() != ''">
|
4972
4999
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
4973
5000
|
|
@@ -4979,7 +5006,17 @@
|
|
4979
5006
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
4980
5007
|
</xsl:if>
|
4981
5008
|
|
4982
|
-
<xsl:
|
5009
|
+
<xsl:choose>
|
5010
|
+
<xsl:when test="$continued = 'true'">
|
5011
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
5012
|
+
|
5013
|
+
</xsl:when>
|
5014
|
+
<xsl:otherwise>
|
5015
|
+
<xsl:apply-templates/>
|
5016
|
+
</xsl:otherwise>
|
5017
|
+
</xsl:choose>
|
5018
|
+
|
5019
|
+
|
4983
5020
|
</fo:block>
|
4984
5021
|
</xsl:if>
|
4985
5022
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -5119,18 +5156,18 @@
|
|
5119
5156
|
<xsl:apply-templates/>
|
5120
5157
|
</fo:table-header>
|
5121
5158
|
</xsl:template><xsl:template name="table-header-title">
|
5122
|
-
<xsl:param name="cols-count"/>
|
5159
|
+
<xsl:param name="cols-count"/>
|
5123
5160
|
<!-- row for title -->
|
5124
5161
|
<fo:table-row>
|
5125
5162
|
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
5126
|
-
|
5163
|
+
|
5164
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
5165
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
5166
|
+
</xsl:apply-templates>
|
5127
5167
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
5128
5168
|
<xsl:call-template name="fn_name_display"/>
|
5129
|
-
</xsl:for-each>
|
5130
|
-
|
5131
|
-
<xsl:text> </xsl:text>
|
5132
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
5133
|
-
</fo:block>
|
5169
|
+
</xsl:for-each>
|
5170
|
+
|
5134
5171
|
</fo:table-cell>
|
5135
5172
|
</fo:table-row>
|
5136
5173
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -5365,6 +5402,7 @@
|
|
5365
5402
|
|
5366
5403
|
|
5367
5404
|
|
5405
|
+
|
5368
5406
|
</xsl:if>
|
5369
5407
|
<xsl:if test="$parent-name = 'tfoot'">
|
5370
5408
|
|
@@ -5409,6 +5447,7 @@
|
|
5409
5447
|
|
5410
5448
|
|
5411
5449
|
|
5450
|
+
|
5412
5451
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
5413
5452
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
5414
5453
|
<!-- <xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute> -->
|
@@ -5431,6 +5470,7 @@
|
|
5431
5470
|
<xsl:attribute name="display-align">before</xsl:attribute>
|
5432
5471
|
</xsl:if>
|
5433
5472
|
|
5473
|
+
|
5434
5474
|
<xsl:if test="$lang = 'ar'">
|
5435
5475
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
5436
5476
|
</xsl:if>
|
@@ -5847,6 +5887,7 @@
|
|
5847
5887
|
|
5848
5888
|
|
5849
5889
|
|
5890
|
+
|
5850
5891
|
<xsl:variable name="title-key">
|
5851
5892
|
|
5852
5893
|
|
@@ -6131,6 +6172,8 @@
|
|
6131
6172
|
|
6132
6173
|
<xsl:apply-templates/>
|
6133
6174
|
</fo:inline>
|
6175
|
+
</xsl:template><xsl:template match="*[local-name()='padding']">
|
6176
|
+
<fo:inline padding-right="{@value}"> </fo:inline>
|
6134
6177
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
6135
6178
|
<fo:inline font-size="80%" vertical-align="super">
|
6136
6179
|
<xsl:apply-templates/>
|
@@ -6156,6 +6199,7 @@
|
|
6156
6199
|
|
6157
6200
|
|
6158
6201
|
|
6202
|
+
|
6159
6203
|
|
6160
6204
|
</xsl:variable>
|
6161
6205
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -6537,11 +6581,15 @@
|
|
6537
6581
|
</xsl:apply-templates>
|
6538
6582
|
</xsl:template><xsl:template name="getLang">
|
6539
6583
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
6584
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
6540
6585
|
<xsl:variable name="language">
|
6541
6586
|
<xsl:choose>
|
6542
6587
|
<xsl:when test="$language_current != ''">
|
6543
6588
|
<xsl:value-of select="$language_current"/>
|
6544
6589
|
</xsl:when>
|
6590
|
+
<xsl:when test="$language_current_2 != ''">
|
6591
|
+
<xsl:value-of select="$language_current_2"/>
|
6592
|
+
</xsl:when>
|
6545
6593
|
<xsl:otherwise>
|
6546
6594
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
6547
6595
|
</xsl:otherwise>
|
@@ -6629,6 +6677,16 @@
|
|
6629
6677
|
<mathml:mspace width="0.5ex"/>
|
6630
6678
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
6631
6679
|
<xsl:variable name="target">
|
6680
|
+
<xsl:choose>
|
6681
|
+
<xsl:when test="@updatetype = 'true'">
|
6682
|
+
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
6683
|
+
</xsl:when>
|
6684
|
+
<xsl:otherwise>
|
6685
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
6686
|
+
</xsl:otherwise>
|
6687
|
+
</xsl:choose>
|
6688
|
+
</xsl:variable>
|
6689
|
+
<xsl:variable name="target_text">
|
6632
6690
|
<xsl:choose>
|
6633
6691
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
6634
6692
|
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
@@ -6641,19 +6699,19 @@
|
|
6641
6699
|
<fo:inline xsl:use-attribute-sets="link-style">
|
6642
6700
|
|
6643
6701
|
<xsl:choose>
|
6644
|
-
<xsl:when test="$
|
6702
|
+
<xsl:when test="$target_text = ''">
|
6645
6703
|
<xsl:apply-templates/>
|
6646
6704
|
</xsl:when>
|
6647
6705
|
<xsl:otherwise>
|
6648
|
-
<fo:basic-link external-destination="{
|
6706
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
6649
6707
|
<xsl:choose>
|
6650
6708
|
<xsl:when test="normalize-space(.) = ''">
|
6651
|
-
<!-- <xsl:value-of select="$target"/> -->
|
6652
6709
|
<xsl:call-template name="add-zero-spaces-link-java">
|
6653
|
-
<xsl:with-param name="text" select="$
|
6710
|
+
<xsl:with-param name="text" select="$target_text"/>
|
6654
6711
|
</xsl:call-template>
|
6655
6712
|
</xsl:when>
|
6656
6713
|
<xsl:otherwise>
|
6714
|
+
<!-- output text from <link>text</link> -->
|
6657
6715
|
<xsl:apply-templates/>
|
6658
6716
|
</xsl:otherwise>
|
6659
6717
|
</xsl:choose>
|
@@ -6772,6 +6830,7 @@
|
|
6772
6830
|
|
6773
6831
|
|
6774
6832
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
6833
|
+
|
6775
6834
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
6776
6835
|
</fo:inline>
|
6777
6836
|
<xsl:apply-templates/>
|
@@ -6798,6 +6857,7 @@
|
|
6798
6857
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
6799
6858
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
6800
6859
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
6860
|
+
|
6801
6861
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
6802
6862
|
</fo:inline>
|
6803
6863
|
<xsl:apply-templates/>
|
@@ -6883,7 +6943,10 @@
|
|
6883
6943
|
<xsl:for-each select="*[local-name() = 'note']">
|
6884
6944
|
<xsl:call-template name="note"/>
|
6885
6945
|
</xsl:for-each>
|
6886
|
-
|
6946
|
+
|
6947
|
+
|
6948
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
6949
|
+
|
6887
6950
|
</fo:block-container>
|
6888
6951
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
6889
6952
|
<fo:block id="{@id}">
|
@@ -7002,15 +7065,15 @@
|
|
7002
7065
|
</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">
|
7003
7066
|
<xsl:apply-templates mode="bookmarks"/>
|
7004
7067
|
<xsl:text> </xsl:text>
|
7005
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
7068
|
+
</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">
|
7006
7069
|
<xsl:value-of select="."/>
|
7007
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
7070
|
+
</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">
|
7008
7071
|
<xsl:value-of select="."/>
|
7009
7072
|
</xsl:template><xsl:template match="node()" mode="contents">
|
7010
7073
|
<xsl:apply-templates mode="contents"/>
|
7011
7074
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
7012
7075
|
<xsl:apply-templates mode="bookmarks"/>
|
7013
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
7076
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
7014
7077
|
<xsl:apply-templates select="."/>
|
7015
7078
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
7016
7079
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -7223,6 +7286,8 @@
|
|
7223
7286
|
</fo:list-item-body>
|
7224
7287
|
</fo:list-item>
|
7225
7288
|
</fo:list-block>
|
7289
|
+
</xsl:template><xsl:template name="extractSection">
|
7290
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
7226
7291
|
</xsl:template><xsl:template name="extractTitle">
|
7227
7292
|
<xsl:choose>
|
7228
7293
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -7249,6 +7314,7 @@
|
|
7249
7314
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
7250
7315
|
|
7251
7316
|
<fo:block-container margin-left="0mm">
|
7317
|
+
<xsl:copy-of select="@id"/>
|
7252
7318
|
<xsl:if test="parent::*[local-name() = 'note']">
|
7253
7319
|
<xsl:attribute name="margin-left">
|
7254
7320
|
<xsl:choose>
|
@@ -7270,6 +7336,7 @@
|
|
7270
7336
|
|
7271
7337
|
|
7272
7338
|
|
7339
|
+
|
7273
7340
|
|
7274
7341
|
|
7275
7342
|
|
@@ -7525,6 +7592,7 @@
|
|
7525
7592
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
7526
7593
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
7527
7594
|
|
7595
|
+
|
7528
7596
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
7529
7597
|
|
7530
7598
|
<xsl:variable name="element">
|
@@ -7592,7 +7660,7 @@
|
|
7592
7660
|
</fo:inline>
|
7593
7661
|
</xsl:otherwise>
|
7594
7662
|
</xsl:choose>
|
7595
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
7663
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
7596
7664
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
7597
7665
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
7598
7666
|
<xsl:variable name="termsource_text">
|
@@ -7601,13 +7669,15 @@
|
|
7601
7669
|
|
7602
7670
|
<xsl:choose>
|
7603
7671
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
7604
|
-
<xsl:apply-templates/>
|
7672
|
+
<!-- <xsl:apply-templates /> -->
|
7673
|
+
<xsl:copy-of select="$termsource_text"/>
|
7605
7674
|
</xsl:when>
|
7606
7675
|
<xsl:otherwise>
|
7607
7676
|
|
7608
7677
|
<xsl:text>[</xsl:text>
|
7609
7678
|
|
7610
|
-
<xsl:apply-templates/>
|
7679
|
+
<!-- <xsl:apply-templates /> -->
|
7680
|
+
<xsl:copy-of select="$termsource_text"/>
|
7611
7681
|
|
7612
7682
|
<xsl:text>]</xsl:text>
|
7613
7683
|
|
@@ -7618,20 +7688,25 @@
|
|
7618
7688
|
<xsl:if test="normalize-space() != ''">
|
7619
7689
|
<xsl:value-of select="."/>
|
7620
7690
|
</xsl:if>
|
7621
|
-
</xsl:template><xsl:
|
7691
|
+
</xsl:template><xsl:variable name="localized.source">
|
7692
|
+
<xsl:call-template name="getLocalizedString">
|
7693
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
7694
|
+
</xsl:call-template>
|
7695
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
7622
7696
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
7697
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
7698
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
7699
|
+
</xsl:if>
|
7623
7700
|
|
7624
7701
|
<fo:inline>
|
7625
7702
|
|
7626
7703
|
|
7627
7704
|
|
7705
|
+
<xsl:value-of select="$localized.source"/>
|
7706
|
+
<xsl:text> </xsl:text>
|
7628
7707
|
|
7629
|
-
<xsl:call-template name="getTitle">
|
7630
|
-
<xsl:with-param name="name" select="'title-source'"/>
|
7631
|
-
</xsl:call-template>
|
7632
7708
|
|
7633
7709
|
|
7634
|
-
<xsl:text>: </xsl:text>
|
7635
7710
|
</fo:inline>
|
7636
7711
|
|
7637
7712
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
@@ -7752,6 +7827,7 @@
|
|
7752
7827
|
|
7753
7828
|
|
7754
7829
|
|
7830
|
+
|
7755
7831
|
<xsl:choose>
|
7756
7832
|
<xsl:when test="ancestor::bipm:annex">2</xsl:when>
|
7757
7833
|
<xsl:otherwise>8</xsl:otherwise>
|
@@ -7837,7 +7913,6 @@
|
|
7837
7913
|
|
7838
7914
|
|
7839
7915
|
|
7840
|
-
|
7841
7916
|
<xsl:apply-templates/>
|
7842
7917
|
</fo:block>
|
7843
7918
|
|
@@ -7882,7 +7957,7 @@
|
|
7882
7957
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
7883
7958
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
7884
7959
|
<xsl:choose>
|
7885
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
7960
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
7886
7961
|
<fo:block-container>
|
7887
7962
|
<xsl:attribute name="margin-left">
|
7888
7963
|
<xsl:choose>
|
@@ -7894,6 +7969,7 @@
|
|
7894
7969
|
|
7895
7970
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
7896
7971
|
|
7972
|
+
|
7897
7973
|
<fo:block-container margin-left="0mm">
|
7898
7974
|
<fo:block>
|
7899
7975
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -8123,6 +8199,10 @@
|
|
8123
8199
|
|
8124
8200
|
|
8125
8201
|
|
8202
|
+
|
8203
|
+
|
8204
|
+
|
8205
|
+
|
8126
8206
|
</xsl:template><xsl:template name="processBibitemDocId">
|
8127
8207
|
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
8128
8208
|
<xsl:choose>
|
@@ -8450,6 +8530,9 @@
|
|
8450
8530
|
<xsl:when test="parent::*[local-name() = 'preface']">
|
8451
8531
|
<xsl:value-of select="$level_total - 1"/>
|
8452
8532
|
</xsl:when>
|
8533
|
+
<xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
|
8534
|
+
<xsl:value-of select="$level_total - 1"/>
|
8535
|
+
</xsl:when>
|
8453
8536
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
8454
8537
|
<xsl:value-of select="$level_total - 2"/>
|
8455
8538
|
</xsl:when>
|
@@ -8514,6 +8597,7 @@
|
|
8514
8597
|
|
8515
8598
|
|
8516
8599
|
|
8600
|
+
|
8517
8601
|
|
8518
8602
|
|
8519
8603
|
|
@@ -8574,17 +8658,29 @@
|
|
8574
8658
|
</xsl:call-template>
|
8575
8659
|
</xsl:if>
|
8576
8660
|
</xsl:template><xsl:template name="getLocalizedString">
|
8577
|
-
<xsl:param name="key"/>
|
8661
|
+
<xsl:param name="key"/>
|
8578
8662
|
|
8579
8663
|
<xsl:variable name="curr_lang">
|
8580
8664
|
<xsl:call-template name="getLang"/>
|
8581
8665
|
</xsl:variable>
|
8582
8666
|
|
8667
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
8668
|
+
|
8583
8669
|
<xsl:choose>
|
8670
|
+
<xsl:when test="$data_value != ''">
|
8671
|
+
<xsl:value-of select="$data_value"/>
|
8672
|
+
</xsl:when>
|
8584
8673
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
8585
8674
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
8586
8675
|
</xsl:when>
|
8587
|
-
<xsl:otherwise
|
8676
|
+
<xsl:otherwise>
|
8677
|
+
<xsl:variable name="key_">
|
8678
|
+
<xsl:call-template name="capitalize">
|
8679
|
+
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
|
8680
|
+
</xsl:call-template>
|
8681
|
+
</xsl:variable>
|
8682
|
+
<xsl:value-of select="$key_"/>
|
8683
|
+
</xsl:otherwise>
|
8588
8684
|
</xsl:choose>
|
8589
8685
|
|
8590
8686
|
</xsl:template><xsl:template name="setTrackChangesStyles">
|