metanorma-bipm 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/asciidoctor/bipm/bipm.rng +6 -0
- data/lib/asciidoctor/bipm/isodoc.rng +19 -1
- data/lib/isodoc/bipm/bipm.brochure.xsl +33 -16
- data/lib/isodoc/bipm/bipm.guide.xsl +33 -16
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +33 -16
- data/lib/isodoc/bipm/bipm.rapport.xsl +33 -16
- data/lib/isodoc/bipm/html/html_bipm_titlepage.html +2 -2
- data/lib/isodoc/bipm/index.rb +7 -3
- data/lib/isodoc/bipm/jcgm.standard.xsl +1 -0
- data/lib/isodoc/bipm/metadata.rb +2 -0
- data/lib/isodoc/bipm/xref.rb +34 -39
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma.yml +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c0b4698a24ef97618afbec45c35c528cadb9552b49d1dcd89bd15ad7c8a6876a
|
|
4
|
+
data.tar.gz: 96c9a111515b7df05186ffae09bcf19c5409929ea13809499ec583a3e97da0cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d76e1b157bbe5c6fbff33ac87424c239965e9c1fa6ea6649a2dd5098b72460c988b92235ed0149400996c6d4a339409cdda396f271a7f08a0d8a00b9b689395
|
|
7
|
+
data.tar.gz: 995c9cb871a5b5ca91d00f370d1d6bc0ff0c7040c8362300bfd77c52978e9a479edf5deb242b837d21f2755be6cf6980110fd5c87b39c0d161dbe1c7b70a6c6e
|
|
@@ -340,6 +340,9 @@
|
|
|
340
340
|
<zeroOrMore>
|
|
341
341
|
<ref name="termdocsource"/>
|
|
342
342
|
</zeroOrMore>
|
|
343
|
+
<optional>
|
|
344
|
+
<ref name="misccontainer"/>
|
|
345
|
+
</optional>
|
|
343
346
|
<optional>
|
|
344
347
|
<ref name="boilerplate"/>
|
|
345
348
|
</optional>
|
|
@@ -355,6 +358,9 @@
|
|
|
355
358
|
<optional>
|
|
356
359
|
<ref name="bibliography"/>
|
|
357
360
|
</optional>
|
|
361
|
+
<zeroOrMore>
|
|
362
|
+
<ref name="indexsect"/>
|
|
363
|
+
</zeroOrMore>
|
|
358
364
|
</element>
|
|
359
365
|
</define>
|
|
360
366
|
</grammar>
|
|
@@ -919,6 +919,9 @@
|
|
|
919
919
|
</choice>
|
|
920
920
|
</attribute>
|
|
921
921
|
<ref name="bibdata"/>
|
|
922
|
+
<optional>
|
|
923
|
+
<ref name="misccontainer"/>
|
|
924
|
+
</optional>
|
|
922
925
|
<optional>
|
|
923
926
|
<ref name="boilerplate"/>
|
|
924
927
|
</optional>
|
|
@@ -929,11 +932,21 @@
|
|
|
929
932
|
<zeroOrMore>
|
|
930
933
|
<ref name="annex"/>
|
|
931
934
|
</zeroOrMore>
|
|
935
|
+
<optional>
|
|
936
|
+
<ref name="bibliography"/>
|
|
937
|
+
</optional>
|
|
932
938
|
<zeroOrMore>
|
|
933
|
-
<ref name="
|
|
939
|
+
<ref name="indexsect"/>
|
|
934
940
|
</zeroOrMore>
|
|
935
941
|
</element>
|
|
936
942
|
</define>
|
|
943
|
+
<define name="misccontainer">
|
|
944
|
+
<element name="misc-container">
|
|
945
|
+
<oneOrMore>
|
|
946
|
+
<ref name="AnyElement"/>
|
|
947
|
+
</oneOrMore>
|
|
948
|
+
</element>
|
|
949
|
+
</define>
|
|
937
950
|
<define name="preface">
|
|
938
951
|
<element name="preface">
|
|
939
952
|
<oneOrMore>
|
|
@@ -957,6 +970,11 @@
|
|
|
957
970
|
<ref name="Content-Section"/>
|
|
958
971
|
</element>
|
|
959
972
|
</define>
|
|
973
|
+
<define name="indexsect">
|
|
974
|
+
<element name="indexsect">
|
|
975
|
+
<ref name="Content-Section"/>
|
|
976
|
+
</element>
|
|
977
|
+
</define>
|
|
960
978
|
<define name="boilerplate">
|
|
961
979
|
<element name="boilerplate">
|
|
962
980
|
<optional>
|
|
@@ -114,7 +114,8 @@
|
|
|
114
114
|
|
|
115
115
|
<!-- add id to xref and split xref with @to into two xref -->
|
|
116
116
|
<xsl:variable name="current_document_index_id">
|
|
117
|
-
<xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/>
|
|
117
|
+
<!-- <xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/> -->
|
|
118
|
+
<xsl:apply-templates select=".//bipm:indexsect" mode="index_add_id"/>
|
|
118
119
|
</xsl:variable>
|
|
119
120
|
|
|
120
121
|
<xsl:variable name="current_document_index">
|
|
@@ -145,7 +146,8 @@
|
|
|
145
146
|
</xsl:variable>
|
|
146
147
|
|
|
147
148
|
<xsl:variable name="current_document_index_id">
|
|
148
|
-
<xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/>
|
|
149
|
+
<!-- <xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/> -->
|
|
150
|
+
<xsl:apply-templates select=".//bipm:indexsect" mode="index_add_id"/>
|
|
149
151
|
</xsl:variable>
|
|
150
152
|
|
|
151
153
|
<xsl:variable name="current_document_index">
|
|
@@ -200,7 +202,8 @@
|
|
|
200
202
|
<xsl:apply-templates select="/*/bipm:bibliography/bipm:references[not(@normative='true')]" mode="contents"/>
|
|
201
203
|
|
|
202
204
|
<!-- Index -->
|
|
203
|
-
<xsl:apply-templates select="//bipm:clause[@type = 'index']" mode="contents"/>
|
|
205
|
+
<!-- <xsl:apply-templates select="//bipm:clause[@type = 'index']" mode="contents"/> -->
|
|
206
|
+
<xsl:apply-templates select="//bipm:indexsect" mode="contents"/>
|
|
204
207
|
|
|
205
208
|
</contents>
|
|
206
209
|
</xsl:template>
|
|
@@ -836,7 +839,8 @@
|
|
|
836
839
|
</xsl:choose>
|
|
837
840
|
</xsl:template>
|
|
838
841
|
|
|
839
|
-
<xsl:template match="bipm:clause[@type = 'index']" mode="flatxml"/>
|
|
842
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']" mode="flatxml"/> -->
|
|
843
|
+
<xsl:template match="bipm:indexsect" mode="flatxml"/>
|
|
840
844
|
<!-- <xsl:template match="bipm:clause[@type = 'index']" mode="flatxml">
|
|
841
845
|
<xsl:copy>
|
|
842
846
|
<xsl:apply-templates select="@*" mode="flatxml_index"/>
|
|
@@ -1089,7 +1093,8 @@
|
|
|
1089
1093
|
<xsl:apply-templates select="bipm:bibliography/bipm:references[not(@normative='true')]" mode="sections"/>
|
|
1090
1094
|
|
|
1091
1095
|
<!-- Index -->
|
|
1092
|
-
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index"/>
|
|
1096
|
+
<!-- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index" /> -->
|
|
1097
|
+
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index"/>
|
|
1093
1098
|
|
|
1094
1099
|
<!-- End Document Pages -->
|
|
1095
1100
|
|
|
@@ -1253,7 +1258,8 @@
|
|
|
1253
1258
|
<xsl:apply-templates select="bipm:bibliography/bipm:references[not(@normative='true')]" mode="sections"/>
|
|
1254
1259
|
|
|
1255
1260
|
<!-- Index -->
|
|
1256
|
-
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index"/>
|
|
1261
|
+
<!-- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index" /> -->
|
|
1262
|
+
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index"/>
|
|
1257
1263
|
|
|
1258
1264
|
</xsl:otherwise>
|
|
1259
1265
|
</xsl:choose>
|
|
@@ -1920,6 +1926,7 @@
|
|
|
1920
1926
|
<xsl:variable name="type">
|
|
1921
1927
|
<xsl:choose>
|
|
1922
1928
|
<xsl:when test="@type = 'index'">index</xsl:when>
|
|
1929
|
+
<xsl:when test="local-name() = 'indexsect'">index</xsl:when>
|
|
1923
1930
|
<xsl:otherwise><xsl:value-of select="local-name()"/></xsl:otherwise>
|
|
1924
1931
|
</xsl:choose>
|
|
1925
1932
|
</xsl:variable>
|
|
@@ -3545,14 +3552,16 @@
|
|
|
3545
3552
|
</xsl:copy>
|
|
3546
3553
|
</xsl:template>
|
|
3547
3554
|
|
|
3548
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:li" mode="index_update">
|
|
3555
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:li" mode="index_update"> -->
|
|
3556
|
+
<xsl:template match="bipm:indexsect//bipm:li" mode="index_update">
|
|
3549
3557
|
<xsl:copy>
|
|
3550
3558
|
<xsl:apply-templates select="@*" mode="index_update"/>
|
|
3551
3559
|
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
|
3552
3560
|
</xsl:copy>
|
|
3553
3561
|
</xsl:template>
|
|
3554
3562
|
|
|
3555
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:li/node()" mode="process_li_element" priority="2">
|
|
3563
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:li/node()" mode="process_li_element" priority="2"> -->
|
|
3564
|
+
<xsl:template match="bipm:indexsect//bipm:li/node()" mode="process_li_element" priority="2">
|
|
3556
3565
|
<xsl:param name="element"/>
|
|
3557
3566
|
<xsl:param name="remove" select="'false'"/>
|
|
3558
3567
|
<xsl:param name="target"/>
|
|
@@ -3644,14 +3653,17 @@
|
|
|
3644
3653
|
<xsl:call-template name="getDocumentId"/>
|
|
3645
3654
|
</xsl:variable>
|
|
3646
3655
|
<xsl:variable name="item_number">
|
|
3647
|
-
<xsl:number count="bipm:li[ancestor::bipm:clause[@type = 'index']]" level="any"/>
|
|
3656
|
+
<!-- <xsl:number count="bipm:li[ancestor::bipm:clause[@type = 'index']]" level="any" /> -->
|
|
3657
|
+
<xsl:number count="bipm:li[ancestor::bipm:indexsect]" level="any"/>
|
|
3648
3658
|
</xsl:variable>
|
|
3649
3659
|
<xsl:variable name="xref_number"><xsl:number count="bipm:xref"/></xsl:variable>
|
|
3650
3660
|
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
|
3651
3661
|
</xsl:template>
|
|
3652
3662
|
|
|
3653
|
-
<xsl:template match="bipm:clause[@type = 'index']"/>
|
|
3654
|
-
<xsl:template match="bipm:clause[@type = 'index']" mode="index">
|
|
3663
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']" /> -->
|
|
3664
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']" mode="index"> -->
|
|
3665
|
+
<xsl:template match="bipm:indexsect"/>
|
|
3666
|
+
<xsl:template match="bipm:indexsect" mode="index">
|
|
3655
3667
|
|
|
3656
3668
|
<fo:page-sequence master-reference="index" force-page-count="no-force">
|
|
3657
3669
|
<xsl:variable name="header-title">
|
|
@@ -3696,14 +3708,16 @@
|
|
|
3696
3708
|
</fo:page-sequence>
|
|
3697
3709
|
</xsl:template>
|
|
3698
3710
|
|
|
3699
|
-
<xsl:template match="bipm:clause[@type = 'index']/bipm:title" priority="4">
|
|
3711
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']/bipm:title" priority="4"> -->
|
|
3712
|
+
<xsl:template match="bipm:indexsect/bipm:title" priority="4">
|
|
3700
3713
|
<fo:block font-size="16pt" font-weight="bold" margin-bottom="84pt" margin-left="-18mm">
|
|
3701
3714
|
<!-- Index -->
|
|
3702
3715
|
<xsl:apply-templates/>
|
|
3703
3716
|
</fo:block>
|
|
3704
3717
|
</xsl:template>
|
|
3705
3718
|
|
|
3706
|
-
<xsl:template match="bipm:clause[@type = 'index']/bipm:clause" priority="4">
|
|
3719
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']/bipm:clause" priority="4"> -->
|
|
3720
|
+
<xsl:template match="bipm:indexsect/bipm:clause" priority="4">
|
|
3707
3721
|
<xsl:apply-templates/>
|
|
3708
3722
|
<fo:block>
|
|
3709
3723
|
<xsl:if test="following-sibling::bipm:clause">
|
|
@@ -3712,18 +3726,21 @@
|
|
|
3712
3726
|
</fo:block>
|
|
3713
3727
|
</xsl:template>
|
|
3714
3728
|
|
|
3715
|
-
<xsl:template match="bipm:clause[@type = 'index']/bipm:clause/bipm:title" priority="4">
|
|
3729
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']/bipm:clause/bipm:title" priority="4"> -->
|
|
3730
|
+
<xsl:template match="bipm:indexsect/bipm:clause/bipm:title" priority="4">
|
|
3716
3731
|
<!-- Letter A, B, C, ... -->
|
|
3717
3732
|
<fo:block font-size="10pt" font-weight="bold" margin-bottom="3pt" keep-with-next="always">
|
|
3718
3733
|
<xsl:apply-templates/>
|
|
3719
3734
|
</fo:block>
|
|
3720
3735
|
</xsl:template>
|
|
3721
3736
|
|
|
3722
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:ul" priority="4">
|
|
3737
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:ul" priority="4"> -->
|
|
3738
|
+
<xsl:template match="bipm:indexsect//bipm:ul" priority="4">
|
|
3723
3739
|
<xsl:apply-templates/>
|
|
3724
3740
|
</xsl:template>
|
|
3725
3741
|
|
|
3726
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:li" priority="4">
|
|
3742
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:li" priority="4"> -->
|
|
3743
|
+
<xsl:template match="bipm:indexsect//bipm:li" priority="4">
|
|
3727
3744
|
<xsl:variable name="level" select="count(ancestor::bipm:ul)"/>
|
|
3728
3745
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
|
3729
3746
|
<xsl:apply-templates/>
|
|
@@ -114,7 +114,8 @@
|
|
|
114
114
|
|
|
115
115
|
<!-- add id to xref and split xref with @to into two xref -->
|
|
116
116
|
<xsl:variable name="current_document_index_id">
|
|
117
|
-
<xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/>
|
|
117
|
+
<!-- <xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/> -->
|
|
118
|
+
<xsl:apply-templates select=".//bipm:indexsect" mode="index_add_id"/>
|
|
118
119
|
</xsl:variable>
|
|
119
120
|
|
|
120
121
|
<xsl:variable name="current_document_index">
|
|
@@ -145,7 +146,8 @@
|
|
|
145
146
|
</xsl:variable>
|
|
146
147
|
|
|
147
148
|
<xsl:variable name="current_document_index_id">
|
|
148
|
-
<xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/>
|
|
149
|
+
<!-- <xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/> -->
|
|
150
|
+
<xsl:apply-templates select=".//bipm:indexsect" mode="index_add_id"/>
|
|
149
151
|
</xsl:variable>
|
|
150
152
|
|
|
151
153
|
<xsl:variable name="current_document_index">
|
|
@@ -200,7 +202,8 @@
|
|
|
200
202
|
<xsl:apply-templates select="/*/bipm:bibliography/bipm:references[not(@normative='true')]" mode="contents"/>
|
|
201
203
|
|
|
202
204
|
<!-- Index -->
|
|
203
|
-
<xsl:apply-templates select="//bipm:clause[@type = 'index']" mode="contents"/>
|
|
205
|
+
<!-- <xsl:apply-templates select="//bipm:clause[@type = 'index']" mode="contents"/> -->
|
|
206
|
+
<xsl:apply-templates select="//bipm:indexsect" mode="contents"/>
|
|
204
207
|
|
|
205
208
|
</contents>
|
|
206
209
|
</xsl:template>
|
|
@@ -836,7 +839,8 @@
|
|
|
836
839
|
</xsl:choose>
|
|
837
840
|
</xsl:template>
|
|
838
841
|
|
|
839
|
-
<xsl:template match="bipm:clause[@type = 'index']" mode="flatxml"/>
|
|
842
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']" mode="flatxml"/> -->
|
|
843
|
+
<xsl:template match="bipm:indexsect" mode="flatxml"/>
|
|
840
844
|
<!-- <xsl:template match="bipm:clause[@type = 'index']" mode="flatxml">
|
|
841
845
|
<xsl:copy>
|
|
842
846
|
<xsl:apply-templates select="@*" mode="flatxml_index"/>
|
|
@@ -1089,7 +1093,8 @@
|
|
|
1089
1093
|
<xsl:apply-templates select="bipm:bibliography/bipm:references[not(@normative='true')]" mode="sections"/>
|
|
1090
1094
|
|
|
1091
1095
|
<!-- Index -->
|
|
1092
|
-
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index"/>
|
|
1096
|
+
<!-- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index" /> -->
|
|
1097
|
+
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index"/>
|
|
1093
1098
|
|
|
1094
1099
|
<!-- End Document Pages -->
|
|
1095
1100
|
|
|
@@ -1253,7 +1258,8 @@
|
|
|
1253
1258
|
<xsl:apply-templates select="bipm:bibliography/bipm:references[not(@normative='true')]" mode="sections"/>
|
|
1254
1259
|
|
|
1255
1260
|
<!-- Index -->
|
|
1256
|
-
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index"/>
|
|
1261
|
+
<!-- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index" /> -->
|
|
1262
|
+
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index"/>
|
|
1257
1263
|
|
|
1258
1264
|
</xsl:otherwise>
|
|
1259
1265
|
</xsl:choose>
|
|
@@ -1920,6 +1926,7 @@
|
|
|
1920
1926
|
<xsl:variable name="type">
|
|
1921
1927
|
<xsl:choose>
|
|
1922
1928
|
<xsl:when test="@type = 'index'">index</xsl:when>
|
|
1929
|
+
<xsl:when test="local-name() = 'indexsect'">index</xsl:when>
|
|
1923
1930
|
<xsl:otherwise><xsl:value-of select="local-name()"/></xsl:otherwise>
|
|
1924
1931
|
</xsl:choose>
|
|
1925
1932
|
</xsl:variable>
|
|
@@ -3545,14 +3552,16 @@
|
|
|
3545
3552
|
</xsl:copy>
|
|
3546
3553
|
</xsl:template>
|
|
3547
3554
|
|
|
3548
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:li" mode="index_update">
|
|
3555
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:li" mode="index_update"> -->
|
|
3556
|
+
<xsl:template match="bipm:indexsect//bipm:li" mode="index_update">
|
|
3549
3557
|
<xsl:copy>
|
|
3550
3558
|
<xsl:apply-templates select="@*" mode="index_update"/>
|
|
3551
3559
|
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
|
3552
3560
|
</xsl:copy>
|
|
3553
3561
|
</xsl:template>
|
|
3554
3562
|
|
|
3555
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:li/node()" mode="process_li_element" priority="2">
|
|
3563
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:li/node()" mode="process_li_element" priority="2"> -->
|
|
3564
|
+
<xsl:template match="bipm:indexsect//bipm:li/node()" mode="process_li_element" priority="2">
|
|
3556
3565
|
<xsl:param name="element"/>
|
|
3557
3566
|
<xsl:param name="remove" select="'false'"/>
|
|
3558
3567
|
<xsl:param name="target"/>
|
|
@@ -3644,14 +3653,17 @@
|
|
|
3644
3653
|
<xsl:call-template name="getDocumentId"/>
|
|
3645
3654
|
</xsl:variable>
|
|
3646
3655
|
<xsl:variable name="item_number">
|
|
3647
|
-
<xsl:number count="bipm:li[ancestor::bipm:clause[@type = 'index']]" level="any"/>
|
|
3656
|
+
<!-- <xsl:number count="bipm:li[ancestor::bipm:clause[@type = 'index']]" level="any" /> -->
|
|
3657
|
+
<xsl:number count="bipm:li[ancestor::bipm:indexsect]" level="any"/>
|
|
3648
3658
|
</xsl:variable>
|
|
3649
3659
|
<xsl:variable name="xref_number"><xsl:number count="bipm:xref"/></xsl:variable>
|
|
3650
3660
|
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
|
3651
3661
|
</xsl:template>
|
|
3652
3662
|
|
|
3653
|
-
<xsl:template match="bipm:clause[@type = 'index']"/>
|
|
3654
|
-
<xsl:template match="bipm:clause[@type = 'index']" mode="index">
|
|
3663
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']" /> -->
|
|
3664
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']" mode="index"> -->
|
|
3665
|
+
<xsl:template match="bipm:indexsect"/>
|
|
3666
|
+
<xsl:template match="bipm:indexsect" mode="index">
|
|
3655
3667
|
|
|
3656
3668
|
<fo:page-sequence master-reference="index" force-page-count="no-force">
|
|
3657
3669
|
<xsl:variable name="header-title">
|
|
@@ -3696,14 +3708,16 @@
|
|
|
3696
3708
|
</fo:page-sequence>
|
|
3697
3709
|
</xsl:template>
|
|
3698
3710
|
|
|
3699
|
-
<xsl:template match="bipm:clause[@type = 'index']/bipm:title" priority="4">
|
|
3711
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']/bipm:title" priority="4"> -->
|
|
3712
|
+
<xsl:template match="bipm:indexsect/bipm:title" priority="4">
|
|
3700
3713
|
<fo:block font-size="16pt" font-weight="bold" margin-bottom="84pt" margin-left="-18mm">
|
|
3701
3714
|
<!-- Index -->
|
|
3702
3715
|
<xsl:apply-templates/>
|
|
3703
3716
|
</fo:block>
|
|
3704
3717
|
</xsl:template>
|
|
3705
3718
|
|
|
3706
|
-
<xsl:template match="bipm:clause[@type = 'index']/bipm:clause" priority="4">
|
|
3719
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']/bipm:clause" priority="4"> -->
|
|
3720
|
+
<xsl:template match="bipm:indexsect/bipm:clause" priority="4">
|
|
3707
3721
|
<xsl:apply-templates/>
|
|
3708
3722
|
<fo:block>
|
|
3709
3723
|
<xsl:if test="following-sibling::bipm:clause">
|
|
@@ -3712,18 +3726,21 @@
|
|
|
3712
3726
|
</fo:block>
|
|
3713
3727
|
</xsl:template>
|
|
3714
3728
|
|
|
3715
|
-
<xsl:template match="bipm:clause[@type = 'index']/bipm:clause/bipm:title" priority="4">
|
|
3729
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']/bipm:clause/bipm:title" priority="4"> -->
|
|
3730
|
+
<xsl:template match="bipm:indexsect/bipm:clause/bipm:title" priority="4">
|
|
3716
3731
|
<!-- Letter A, B, C, ... -->
|
|
3717
3732
|
<fo:block font-size="10pt" font-weight="bold" margin-bottom="3pt" keep-with-next="always">
|
|
3718
3733
|
<xsl:apply-templates/>
|
|
3719
3734
|
</fo:block>
|
|
3720
3735
|
</xsl:template>
|
|
3721
3736
|
|
|
3722
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:ul" priority="4">
|
|
3737
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:ul" priority="4"> -->
|
|
3738
|
+
<xsl:template match="bipm:indexsect//bipm:ul" priority="4">
|
|
3723
3739
|
<xsl:apply-templates/>
|
|
3724
3740
|
</xsl:template>
|
|
3725
3741
|
|
|
3726
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:li" priority="4">
|
|
3742
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:li" priority="4"> -->
|
|
3743
|
+
<xsl:template match="bipm:indexsect//bipm:li" priority="4">
|
|
3727
3744
|
<xsl:variable name="level" select="count(ancestor::bipm:ul)"/>
|
|
3728
3745
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
|
3729
3746
|
<xsl:apply-templates/>
|
|
@@ -114,7 +114,8 @@
|
|
|
114
114
|
|
|
115
115
|
<!-- add id to xref and split xref with @to into two xref -->
|
|
116
116
|
<xsl:variable name="current_document_index_id">
|
|
117
|
-
<xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/>
|
|
117
|
+
<!-- <xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/> -->
|
|
118
|
+
<xsl:apply-templates select=".//bipm:indexsect" mode="index_add_id"/>
|
|
118
119
|
</xsl:variable>
|
|
119
120
|
|
|
120
121
|
<xsl:variable name="current_document_index">
|
|
@@ -145,7 +146,8 @@
|
|
|
145
146
|
</xsl:variable>
|
|
146
147
|
|
|
147
148
|
<xsl:variable name="current_document_index_id">
|
|
148
|
-
<xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/>
|
|
149
|
+
<!-- <xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/> -->
|
|
150
|
+
<xsl:apply-templates select=".//bipm:indexsect" mode="index_add_id"/>
|
|
149
151
|
</xsl:variable>
|
|
150
152
|
|
|
151
153
|
<xsl:variable name="current_document_index">
|
|
@@ -200,7 +202,8 @@
|
|
|
200
202
|
<xsl:apply-templates select="/*/bipm:bibliography/bipm:references[not(@normative='true')]" mode="contents"/>
|
|
201
203
|
|
|
202
204
|
<!-- Index -->
|
|
203
|
-
<xsl:apply-templates select="//bipm:clause[@type = 'index']" mode="contents"/>
|
|
205
|
+
<!-- <xsl:apply-templates select="//bipm:clause[@type = 'index']" mode="contents"/> -->
|
|
206
|
+
<xsl:apply-templates select="//bipm:indexsect" mode="contents"/>
|
|
204
207
|
|
|
205
208
|
</contents>
|
|
206
209
|
</xsl:template>
|
|
@@ -836,7 +839,8 @@
|
|
|
836
839
|
</xsl:choose>
|
|
837
840
|
</xsl:template>
|
|
838
841
|
|
|
839
|
-
<xsl:template match="bipm:clause[@type = 'index']" mode="flatxml"/>
|
|
842
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']" mode="flatxml"/> -->
|
|
843
|
+
<xsl:template match="bipm:indexsect" mode="flatxml"/>
|
|
840
844
|
<!-- <xsl:template match="bipm:clause[@type = 'index']" mode="flatxml">
|
|
841
845
|
<xsl:copy>
|
|
842
846
|
<xsl:apply-templates select="@*" mode="flatxml_index"/>
|
|
@@ -1089,7 +1093,8 @@
|
|
|
1089
1093
|
<xsl:apply-templates select="bipm:bibliography/bipm:references[not(@normative='true')]" mode="sections"/>
|
|
1090
1094
|
|
|
1091
1095
|
<!-- Index -->
|
|
1092
|
-
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index"/>
|
|
1096
|
+
<!-- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index" /> -->
|
|
1097
|
+
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index"/>
|
|
1093
1098
|
|
|
1094
1099
|
<!-- End Document Pages -->
|
|
1095
1100
|
|
|
@@ -1253,7 +1258,8 @@
|
|
|
1253
1258
|
<xsl:apply-templates select="bipm:bibliography/bipm:references[not(@normative='true')]" mode="sections"/>
|
|
1254
1259
|
|
|
1255
1260
|
<!-- Index -->
|
|
1256
|
-
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index"/>
|
|
1261
|
+
<!-- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index" /> -->
|
|
1262
|
+
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index"/>
|
|
1257
1263
|
|
|
1258
1264
|
</xsl:otherwise>
|
|
1259
1265
|
</xsl:choose>
|
|
@@ -1920,6 +1926,7 @@
|
|
|
1920
1926
|
<xsl:variable name="type">
|
|
1921
1927
|
<xsl:choose>
|
|
1922
1928
|
<xsl:when test="@type = 'index'">index</xsl:when>
|
|
1929
|
+
<xsl:when test="local-name() = 'indexsect'">index</xsl:when>
|
|
1923
1930
|
<xsl:otherwise><xsl:value-of select="local-name()"/></xsl:otherwise>
|
|
1924
1931
|
</xsl:choose>
|
|
1925
1932
|
</xsl:variable>
|
|
@@ -3545,14 +3552,16 @@
|
|
|
3545
3552
|
</xsl:copy>
|
|
3546
3553
|
</xsl:template>
|
|
3547
3554
|
|
|
3548
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:li" mode="index_update">
|
|
3555
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:li" mode="index_update"> -->
|
|
3556
|
+
<xsl:template match="bipm:indexsect//bipm:li" mode="index_update">
|
|
3549
3557
|
<xsl:copy>
|
|
3550
3558
|
<xsl:apply-templates select="@*" mode="index_update"/>
|
|
3551
3559
|
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
|
3552
3560
|
</xsl:copy>
|
|
3553
3561
|
</xsl:template>
|
|
3554
3562
|
|
|
3555
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:li/node()" mode="process_li_element" priority="2">
|
|
3563
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:li/node()" mode="process_li_element" priority="2"> -->
|
|
3564
|
+
<xsl:template match="bipm:indexsect//bipm:li/node()" mode="process_li_element" priority="2">
|
|
3556
3565
|
<xsl:param name="element"/>
|
|
3557
3566
|
<xsl:param name="remove" select="'false'"/>
|
|
3558
3567
|
<xsl:param name="target"/>
|
|
@@ -3644,14 +3653,17 @@
|
|
|
3644
3653
|
<xsl:call-template name="getDocumentId"/>
|
|
3645
3654
|
</xsl:variable>
|
|
3646
3655
|
<xsl:variable name="item_number">
|
|
3647
|
-
<xsl:number count="bipm:li[ancestor::bipm:clause[@type = 'index']]" level="any"/>
|
|
3656
|
+
<!-- <xsl:number count="bipm:li[ancestor::bipm:clause[@type = 'index']]" level="any" /> -->
|
|
3657
|
+
<xsl:number count="bipm:li[ancestor::bipm:indexsect]" level="any"/>
|
|
3648
3658
|
</xsl:variable>
|
|
3649
3659
|
<xsl:variable name="xref_number"><xsl:number count="bipm:xref"/></xsl:variable>
|
|
3650
3660
|
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
|
3651
3661
|
</xsl:template>
|
|
3652
3662
|
|
|
3653
|
-
<xsl:template match="bipm:clause[@type = 'index']"/>
|
|
3654
|
-
<xsl:template match="bipm:clause[@type = 'index']" mode="index">
|
|
3663
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']" /> -->
|
|
3664
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']" mode="index"> -->
|
|
3665
|
+
<xsl:template match="bipm:indexsect"/>
|
|
3666
|
+
<xsl:template match="bipm:indexsect" mode="index">
|
|
3655
3667
|
|
|
3656
3668
|
<fo:page-sequence master-reference="index" force-page-count="no-force">
|
|
3657
3669
|
<xsl:variable name="header-title">
|
|
@@ -3696,14 +3708,16 @@
|
|
|
3696
3708
|
</fo:page-sequence>
|
|
3697
3709
|
</xsl:template>
|
|
3698
3710
|
|
|
3699
|
-
<xsl:template match="bipm:clause[@type = 'index']/bipm:title" priority="4">
|
|
3711
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']/bipm:title" priority="4"> -->
|
|
3712
|
+
<xsl:template match="bipm:indexsect/bipm:title" priority="4">
|
|
3700
3713
|
<fo:block font-size="16pt" font-weight="bold" margin-bottom="84pt" margin-left="-18mm">
|
|
3701
3714
|
<!-- Index -->
|
|
3702
3715
|
<xsl:apply-templates/>
|
|
3703
3716
|
</fo:block>
|
|
3704
3717
|
</xsl:template>
|
|
3705
3718
|
|
|
3706
|
-
<xsl:template match="bipm:clause[@type = 'index']/bipm:clause" priority="4">
|
|
3719
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']/bipm:clause" priority="4"> -->
|
|
3720
|
+
<xsl:template match="bipm:indexsect/bipm:clause" priority="4">
|
|
3707
3721
|
<xsl:apply-templates/>
|
|
3708
3722
|
<fo:block>
|
|
3709
3723
|
<xsl:if test="following-sibling::bipm:clause">
|
|
@@ -3712,18 +3726,21 @@
|
|
|
3712
3726
|
</fo:block>
|
|
3713
3727
|
</xsl:template>
|
|
3714
3728
|
|
|
3715
|
-
<xsl:template match="bipm:clause[@type = 'index']/bipm:clause/bipm:title" priority="4">
|
|
3729
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']/bipm:clause/bipm:title" priority="4"> -->
|
|
3730
|
+
<xsl:template match="bipm:indexsect/bipm:clause/bipm:title" priority="4">
|
|
3716
3731
|
<!-- Letter A, B, C, ... -->
|
|
3717
3732
|
<fo:block font-size="10pt" font-weight="bold" margin-bottom="3pt" keep-with-next="always">
|
|
3718
3733
|
<xsl:apply-templates/>
|
|
3719
3734
|
</fo:block>
|
|
3720
3735
|
</xsl:template>
|
|
3721
3736
|
|
|
3722
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:ul" priority="4">
|
|
3737
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:ul" priority="4"> -->
|
|
3738
|
+
<xsl:template match="bipm:indexsect//bipm:ul" priority="4">
|
|
3723
3739
|
<xsl:apply-templates/>
|
|
3724
3740
|
</xsl:template>
|
|
3725
3741
|
|
|
3726
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:li" priority="4">
|
|
3742
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:li" priority="4"> -->
|
|
3743
|
+
<xsl:template match="bipm:indexsect//bipm:li" priority="4">
|
|
3727
3744
|
<xsl:variable name="level" select="count(ancestor::bipm:ul)"/>
|
|
3728
3745
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
|
3729
3746
|
<xsl:apply-templates/>
|
|
@@ -114,7 +114,8 @@
|
|
|
114
114
|
|
|
115
115
|
<!-- add id to xref and split xref with @to into two xref -->
|
|
116
116
|
<xsl:variable name="current_document_index_id">
|
|
117
|
-
<xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/>
|
|
117
|
+
<!-- <xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/> -->
|
|
118
|
+
<xsl:apply-templates select=".//bipm:indexsect" mode="index_add_id"/>
|
|
118
119
|
</xsl:variable>
|
|
119
120
|
|
|
120
121
|
<xsl:variable name="current_document_index">
|
|
@@ -145,7 +146,8 @@
|
|
|
145
146
|
</xsl:variable>
|
|
146
147
|
|
|
147
148
|
<xsl:variable name="current_document_index_id">
|
|
148
|
-
<xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/>
|
|
149
|
+
<!-- <xsl:apply-templates select=".//bipm:clause[@type = 'index']" mode="index_add_id"/> -->
|
|
150
|
+
<xsl:apply-templates select=".//bipm:indexsect" mode="index_add_id"/>
|
|
149
151
|
</xsl:variable>
|
|
150
152
|
|
|
151
153
|
<xsl:variable name="current_document_index">
|
|
@@ -200,7 +202,8 @@
|
|
|
200
202
|
<xsl:apply-templates select="/*/bipm:bibliography/bipm:references[not(@normative='true')]" mode="contents"/>
|
|
201
203
|
|
|
202
204
|
<!-- Index -->
|
|
203
|
-
<xsl:apply-templates select="//bipm:clause[@type = 'index']" mode="contents"/>
|
|
205
|
+
<!-- <xsl:apply-templates select="//bipm:clause[@type = 'index']" mode="contents"/> -->
|
|
206
|
+
<xsl:apply-templates select="//bipm:indexsect" mode="contents"/>
|
|
204
207
|
|
|
205
208
|
</contents>
|
|
206
209
|
</xsl:template>
|
|
@@ -836,7 +839,8 @@
|
|
|
836
839
|
</xsl:choose>
|
|
837
840
|
</xsl:template>
|
|
838
841
|
|
|
839
|
-
<xsl:template match="bipm:clause[@type = 'index']" mode="flatxml"/>
|
|
842
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']" mode="flatxml"/> -->
|
|
843
|
+
<xsl:template match="bipm:indexsect" mode="flatxml"/>
|
|
840
844
|
<!-- <xsl:template match="bipm:clause[@type = 'index']" mode="flatxml">
|
|
841
845
|
<xsl:copy>
|
|
842
846
|
<xsl:apply-templates select="@*" mode="flatxml_index"/>
|
|
@@ -1089,7 +1093,8 @@
|
|
|
1089
1093
|
<xsl:apply-templates select="bipm:bibliography/bipm:references[not(@normative='true')]" mode="sections"/>
|
|
1090
1094
|
|
|
1091
1095
|
<!-- Index -->
|
|
1092
|
-
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index"/>
|
|
1096
|
+
<!-- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index" /> -->
|
|
1097
|
+
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index"/>
|
|
1093
1098
|
|
|
1094
1099
|
<!-- End Document Pages -->
|
|
1095
1100
|
|
|
@@ -1253,7 +1258,8 @@
|
|
|
1253
1258
|
<xsl:apply-templates select="bipm:bibliography/bipm:references[not(@normative='true')]" mode="sections"/>
|
|
1254
1259
|
|
|
1255
1260
|
<!-- Index -->
|
|
1256
|
-
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index"/>
|
|
1261
|
+
<!-- <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:clause[@type = 'index']" mode="index" /> -->
|
|
1262
|
+
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index"/>
|
|
1257
1263
|
|
|
1258
1264
|
</xsl:otherwise>
|
|
1259
1265
|
</xsl:choose>
|
|
@@ -1920,6 +1926,7 @@
|
|
|
1920
1926
|
<xsl:variable name="type">
|
|
1921
1927
|
<xsl:choose>
|
|
1922
1928
|
<xsl:when test="@type = 'index'">index</xsl:when>
|
|
1929
|
+
<xsl:when test="local-name() = 'indexsect'">index</xsl:when>
|
|
1923
1930
|
<xsl:otherwise><xsl:value-of select="local-name()"/></xsl:otherwise>
|
|
1924
1931
|
</xsl:choose>
|
|
1925
1932
|
</xsl:variable>
|
|
@@ -3545,14 +3552,16 @@
|
|
|
3545
3552
|
</xsl:copy>
|
|
3546
3553
|
</xsl:template>
|
|
3547
3554
|
|
|
3548
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:li" mode="index_update">
|
|
3555
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:li" mode="index_update"> -->
|
|
3556
|
+
<xsl:template match="bipm:indexsect//bipm:li" mode="index_update">
|
|
3549
3557
|
<xsl:copy>
|
|
3550
3558
|
<xsl:apply-templates select="@*" mode="index_update"/>
|
|
3551
3559
|
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
|
3552
3560
|
</xsl:copy>
|
|
3553
3561
|
</xsl:template>
|
|
3554
3562
|
|
|
3555
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:li/node()" mode="process_li_element" priority="2">
|
|
3563
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:li/node()" mode="process_li_element" priority="2"> -->
|
|
3564
|
+
<xsl:template match="bipm:indexsect//bipm:li/node()" mode="process_li_element" priority="2">
|
|
3556
3565
|
<xsl:param name="element"/>
|
|
3557
3566
|
<xsl:param name="remove" select="'false'"/>
|
|
3558
3567
|
<xsl:param name="target"/>
|
|
@@ -3644,14 +3653,17 @@
|
|
|
3644
3653
|
<xsl:call-template name="getDocumentId"/>
|
|
3645
3654
|
</xsl:variable>
|
|
3646
3655
|
<xsl:variable name="item_number">
|
|
3647
|
-
<xsl:number count="bipm:li[ancestor::bipm:clause[@type = 'index']]" level="any"/>
|
|
3656
|
+
<!-- <xsl:number count="bipm:li[ancestor::bipm:clause[@type = 'index']]" level="any" /> -->
|
|
3657
|
+
<xsl:number count="bipm:li[ancestor::bipm:indexsect]" level="any"/>
|
|
3648
3658
|
</xsl:variable>
|
|
3649
3659
|
<xsl:variable name="xref_number"><xsl:number count="bipm:xref"/></xsl:variable>
|
|
3650
3660
|
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
|
3651
3661
|
</xsl:template>
|
|
3652
3662
|
|
|
3653
|
-
<xsl:template match="bipm:clause[@type = 'index']"/>
|
|
3654
|
-
<xsl:template match="bipm:clause[@type = 'index']" mode="index">
|
|
3663
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']" /> -->
|
|
3664
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']" mode="index"> -->
|
|
3665
|
+
<xsl:template match="bipm:indexsect"/>
|
|
3666
|
+
<xsl:template match="bipm:indexsect" mode="index">
|
|
3655
3667
|
|
|
3656
3668
|
<fo:page-sequence master-reference="index" force-page-count="no-force">
|
|
3657
3669
|
<xsl:variable name="header-title">
|
|
@@ -3696,14 +3708,16 @@
|
|
|
3696
3708
|
</fo:page-sequence>
|
|
3697
3709
|
</xsl:template>
|
|
3698
3710
|
|
|
3699
|
-
<xsl:template match="bipm:clause[@type = 'index']/bipm:title" priority="4">
|
|
3711
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']/bipm:title" priority="4"> -->
|
|
3712
|
+
<xsl:template match="bipm:indexsect/bipm:title" priority="4">
|
|
3700
3713
|
<fo:block font-size="16pt" font-weight="bold" margin-bottom="84pt" margin-left="-18mm">
|
|
3701
3714
|
<!-- Index -->
|
|
3702
3715
|
<xsl:apply-templates/>
|
|
3703
3716
|
</fo:block>
|
|
3704
3717
|
</xsl:template>
|
|
3705
3718
|
|
|
3706
|
-
<xsl:template match="bipm:clause[@type = 'index']/bipm:clause" priority="4">
|
|
3719
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']/bipm:clause" priority="4"> -->
|
|
3720
|
+
<xsl:template match="bipm:indexsect/bipm:clause" priority="4">
|
|
3707
3721
|
<xsl:apply-templates/>
|
|
3708
3722
|
<fo:block>
|
|
3709
3723
|
<xsl:if test="following-sibling::bipm:clause">
|
|
@@ -3712,18 +3726,21 @@
|
|
|
3712
3726
|
</fo:block>
|
|
3713
3727
|
</xsl:template>
|
|
3714
3728
|
|
|
3715
|
-
<xsl:template match="bipm:clause[@type = 'index']/bipm:clause/bipm:title" priority="4">
|
|
3729
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']/bipm:clause/bipm:title" priority="4"> -->
|
|
3730
|
+
<xsl:template match="bipm:indexsect/bipm:clause/bipm:title" priority="4">
|
|
3716
3731
|
<!-- Letter A, B, C, ... -->
|
|
3717
3732
|
<fo:block font-size="10pt" font-weight="bold" margin-bottom="3pt" keep-with-next="always">
|
|
3718
3733
|
<xsl:apply-templates/>
|
|
3719
3734
|
</fo:block>
|
|
3720
3735
|
</xsl:template>
|
|
3721
3736
|
|
|
3722
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:ul" priority="4">
|
|
3737
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:ul" priority="4"> -->
|
|
3738
|
+
<xsl:template match="bipm:indexsect//bipm:ul" priority="4">
|
|
3723
3739
|
<xsl:apply-templates/>
|
|
3724
3740
|
</xsl:template>
|
|
3725
3741
|
|
|
3726
|
-
<xsl:template match="bipm:clause[@type = 'index']//bipm:li" priority="4">
|
|
3742
|
+
<!-- <xsl:template match="bipm:clause[@type = 'index']//bipm:li" priority="4"> -->
|
|
3743
|
+
<xsl:template match="bipm:indexsect//bipm:li" priority="4">
|
|
3727
3744
|
<xsl:variable name="level" select="count(ancestor::bipm:ul)"/>
|
|
3728
3745
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
|
3729
3746
|
<xsl:apply-templates/>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
<div class="document-type-band" id="{{ doctype | downcase | replace: ' ', '-' }}-band">
|
|
6
|
-
|
|
6
|
+
<p class="document-type">{{org_abbrev}} {{ doctype_display }}</p>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
9
|
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
|
|
83
83
|
<div class="WordSection11">
|
|
84
84
|
<div class="coverpage-stage-block" >
|
|
85
|
-
<span class="coverpage-stage" id="{{ doctype | replace: ' ', '-' | downcase }}">
|
|
85
|
+
<span class="coverpage-stage" id="{{ doctype | replace: ' ', '-' | downcase }}">{{org_abbrev}} {{ doctype_display }}</span>
|
|
86
86
|
</div>
|
|
87
87
|
|
|
88
88
|
<div class="coverpage-stage-block" >
|
data/lib/isodoc/bipm/index.rb
CHANGED
|
@@ -9,8 +9,12 @@ module IsoDoc
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def index(docxml)
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
unless docxml.at(ns("//index"))
|
|
13
|
+
docxml.xpath(ns("//indexsect")).each { |i| i.remove }
|
|
14
|
+
return
|
|
15
|
+
end
|
|
16
|
+
i = docxml.at(ns("//indexsect")) ||
|
|
17
|
+
docxml.root.add_child("<indexsect #{add_id}><title>#{@i18n.index}</title></indexsect>").first
|
|
14
18
|
index = sort_indexterms(docxml.xpath(ns("//index")), docxml.xpath(ns("//index-xref[@also = 'false']")),
|
|
15
19
|
docxml.xpath(ns("//index-xref[@also = 'true']")))
|
|
16
20
|
index1(docxml, i, index)
|
|
@@ -18,7 +22,7 @@ module IsoDoc
|
|
|
18
22
|
|
|
19
23
|
def index1(docxml, i, index)
|
|
20
24
|
index.keys.sort.each do |k|
|
|
21
|
-
c = i.
|
|
25
|
+
c = i.add_child "<clause #{add_id}><title>#{k}</title><ul></ul></clause>"
|
|
22
26
|
words = index[k].keys.each_with_object({}) { |w, v| v[sortable(w).downcase] = w }
|
|
23
27
|
words.keys.localize(@lang.to_sym).sort.to_a.each do |w|
|
|
24
28
|
c.first.at(ns("./ul")).add_child index_entries(words, index[k], w)
|
|
@@ -1137,6 +1137,7 @@
|
|
|
1137
1137
|
<!-- skip 0 section without subsections -->
|
|
1138
1138
|
<xsl:when test="@level = 2"><xsl:value-of select="$margin-left * 1.6"/>mm</xsl:when>
|
|
1139
1139
|
<xsl:when test="@level >= 3"><xsl:value-of select="$margin-left * 1.8"/>mm</xsl:when>
|
|
1140
|
+
<xsl:when test="@level = 1 and @type = 'annex' and @section != ''"><xsl:value-of select="$margin-left + string-length(@section) * 1.7"/>mm</xsl:when>
|
|
1140
1141
|
<xsl:when test="@section != ''"><xsl:value-of select="$margin-left"/>mm</xsl:when>
|
|
1141
1142
|
<xsl:otherwise>0mm</xsl:otherwise>
|
|
1142
1143
|
</xsl:choose>
|
data/lib/isodoc/bipm/metadata.rb
CHANGED
|
@@ -59,6 +59,8 @@ module IsoDoc
|
|
|
59
59
|
dn = isoxml.at(ns("//bibdata/ext/structuredidentifier/part"))
|
|
60
60
|
dn and set(:partid, @i18n.l10n("#{label1} #{dn&.text}"))
|
|
61
61
|
dn and set(:partid_alt, @i18n.l10n("#{label2} #{dn&.text}"))
|
|
62
|
+
set(:org_abbrev,
|
|
63
|
+
isoxml.at(ns("//bibdata/ext/editorialgroup/committee[@acronym = 'JCGM']")) ? "JCGM" : "BIPM")
|
|
62
64
|
end
|
|
63
65
|
|
|
64
66
|
def extract_person_names_affiliations(authors)
|
data/lib/isodoc/bipm/xref.rb
CHANGED
|
@@ -9,19 +9,30 @@ module IsoDoc
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def clause_names(docxml, sect_num)
|
|
12
|
+
if docxml&.at(ns("//bibdata/ext/editorialgroup/committee/@acronym"))&.value == "JCGM"
|
|
13
|
+
clause_names_jcgm(docxml, sect_num)
|
|
14
|
+
else
|
|
15
|
+
clause_names_bipm(docxml, sect_num)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def clause_names_jcgm(docxml, sect_num)
|
|
20
|
+
docxml.xpath(ns("//clause[parent::sections][not(@type = 'scope')][not(descendant::terms)]")).
|
|
21
|
+
each_with_index do |c, i|
|
|
22
|
+
section_names(c, sect_num, 1)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def clause_names_bipm(docxml, sect_num)
|
|
12
27
|
n = Counter.new
|
|
13
28
|
docxml.xpath(ns("//sections/clause[not(@unnumbered = 'true')] | "\
|
|
14
29
|
"//sections/terms[not(@unnumbered = 'true')] | "\
|
|
15
30
|
"//sections/definitions[not(@unnumbered = 'true')]")).
|
|
16
|
-
each
|
|
17
|
-
section_names(c, n, 1)
|
|
18
|
-
end
|
|
31
|
+
each { |c| section_names(c, n, 1) }
|
|
19
32
|
docxml.xpath(ns("//sections/clause[@unnumbered = 'true'] | "\
|
|
20
33
|
"//sections/terms[@unnumbered = 'true'] | "\
|
|
21
34
|
"//sections/definitions[@unnumbered = 'true']")).
|
|
22
|
-
each
|
|
23
|
-
unnumbered_section_names(c, 1)
|
|
24
|
-
end
|
|
35
|
+
each { |c| unnumbered_section_names(c, 1) }
|
|
25
36
|
end
|
|
26
37
|
|
|
27
38
|
NUMBERED_SUBCLAUSES = "./clause[not(@unnumbered = 'true')] | "\
|
|
@@ -39,9 +50,8 @@ module IsoDoc
|
|
|
39
50
|
def section_names(clause, num, lvl)
|
|
40
51
|
return num if clause.nil?
|
|
41
52
|
num.increment(clause)
|
|
42
|
-
@anchors[clause["id"]] =
|
|
43
|
-
|
|
44
|
-
level: lvl, type: "clause" }
|
|
53
|
+
@anchors[clause["id"]] = { label: num.print, xref: l10n("#{@labels["clause"]} #{num.print}"),
|
|
54
|
+
level: lvl, type: "clause" }
|
|
45
55
|
i = Counter.new
|
|
46
56
|
clause.xpath(ns(NUMBERED_SUBCLAUSES)).each do |c|
|
|
47
57
|
i.increment(c)
|
|
@@ -56,8 +66,7 @@ module IsoDoc
|
|
|
56
66
|
def unnumbered_section_names(clause, lvl)
|
|
57
67
|
return if clause.nil?
|
|
58
68
|
lbl = clause&.at(ns("./title"))&.text || "[#{clause["id"]}]"
|
|
59
|
-
@anchors[clause["id"]] =
|
|
60
|
-
{ label: lbl, xref: l10n(%{"#{lbl}"}), level: lvl, type: "clause" }
|
|
69
|
+
@anchors[clause["id"]] = { label: lbl, xref: l10n(%{"#{lbl}"}), level: lvl, type: "clause" }
|
|
61
70
|
clause.xpath(ns(SUBCLAUSES)).each_with_index do |c, i|
|
|
62
71
|
unnumbered_section_names1(c, lvl + 1)
|
|
63
72
|
end
|
|
@@ -90,16 +99,14 @@ module IsoDoc
|
|
|
90
99
|
super
|
|
91
100
|
@annexlbl = docxml.at(ns("//bibdata/ext/structuredidentifier/appendix")) ?
|
|
92
101
|
@labels["appendix"] : @labels["annex"]
|
|
93
|
-
docxml.xpath(ns("//annex[not(@unnumbered = 'true')]")).
|
|
94
|
-
|
|
95
|
-
docxml.xpath(ns("//
|
|
96
|
-
each { |c| unnumbered_annex_names(c) }
|
|
102
|
+
docxml.xpath(ns("//annex[not(@unnumbered = 'true')]")).each_with_index { |c, i| annex_names(c, (i+1).to_s) }
|
|
103
|
+
docxml.xpath(ns("//annex[@unnumbered = 'true']")).each { |c| unnumbered_annex_names(c) }
|
|
104
|
+
docxml.xpath(ns("//indexsect")).each { |b| preface_names(b) }
|
|
97
105
|
end
|
|
98
106
|
|
|
99
107
|
def annex_names(clause, num)
|
|
100
|
-
@anchors[clause["id"]] =
|
|
101
|
-
|
|
102
|
-
xref: l10n("#{@annexlbl} #{num}"), level: 1 }
|
|
108
|
+
@anchors[clause["id"]] = { label: annex_name_lbl(clause, num), type: "clause", value: num.to_s,
|
|
109
|
+
xref: l10n("#{@annexlbl} #{num}"), level: 1 }
|
|
103
110
|
if a = single_annex_special_section(clause)
|
|
104
111
|
annex_names1(a, "#{num}", 1)
|
|
105
112
|
else
|
|
@@ -108,50 +115,38 @@ module IsoDoc
|
|
|
108
115
|
i.increment(c)
|
|
109
116
|
annex_names1(c, "#{num}.#{i.print}", 2)
|
|
110
117
|
end
|
|
111
|
-
clause.xpath(ns(UNNUMBERED_SUBCLAUSES)).each
|
|
112
|
-
unnumbered_annex_names1(c, 2)
|
|
113
|
-
end
|
|
118
|
+
clause.xpath(ns(UNNUMBERED_SUBCLAUSES)).each { |c| unnumbered_annex_names1(c, 2) }
|
|
114
119
|
end
|
|
115
120
|
hierarchical_asset_names(clause, num)
|
|
116
121
|
end
|
|
117
122
|
|
|
118
123
|
def unnumbered_annex_names(clause)
|
|
119
124
|
lbl = clause&.at(ns("./title"))&.text || "[#{clause["id"]}]"
|
|
120
|
-
@anchors[clause["id"]] =
|
|
121
|
-
{ label: lbl, type: "clause", value: "",
|
|
122
|
-
xref: l10n(%{"#{lbl}"}), level: 1 }
|
|
125
|
+
@anchors[clause["id"]] = { label: lbl, type: "clause", value: "", xref: l10n(%{"#{lbl}"}), level: 1 }
|
|
123
126
|
if a = single_annex_special_section(clause)
|
|
124
127
|
annex_names1(a, "#{num}", 1)
|
|
125
128
|
else
|
|
126
|
-
clause.xpath(ns(SUBCLAUSES)).each
|
|
127
|
-
unnumbered_annex_names1(c, 2)
|
|
128
|
-
end
|
|
129
|
+
clause.xpath(ns(SUBCLAUSES)).each { |c| unnumbered_annex_names1(c, 2) }
|
|
129
130
|
end
|
|
130
131
|
hierarchical_asset_names(clause, lbl)
|
|
131
132
|
end
|
|
132
133
|
|
|
133
134
|
def annex_names1(clause, num, level)
|
|
134
|
-
@anchors[clause["id"]] =
|
|
135
|
-
|
|
136
|
-
level: level, type: "clause" }
|
|
135
|
+
@anchors[clause["id"]] = { label: num, xref: l10n("#{@annexlbl} #{num}"),
|
|
136
|
+
level: level, type: "clause" }
|
|
137
137
|
i = Counter.new
|
|
138
138
|
clause.xpath(ns(NUMBERED_SUBCLAUSES)).each do |c|
|
|
139
139
|
i.increment(c)
|
|
140
140
|
annex_names1(c, "#{num}.#{i.print}", level + 1)
|
|
141
141
|
end
|
|
142
|
-
clause.xpath(ns(UNNUMBERED_SUBCLAUSES)).each
|
|
143
|
-
unnumbered_annex_names1(c, level + 1)
|
|
144
|
-
end
|
|
142
|
+
clause.xpath(ns(UNNUMBERED_SUBCLAUSES)).each { |c| unnumbered_annex_names1(c, level + 1) }
|
|
145
143
|
end
|
|
146
144
|
|
|
147
145
|
def unnumbered_annex_names1(clause, level)
|
|
148
146
|
lbl = clause&.at(ns("./title"))&.text || "[#{clause["id"]}]"
|
|
149
|
-
@anchors[clause["id"]] =
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
clause.xpath(ns(SUBCLAUSES)).each do |c|
|
|
153
|
-
unnumbered_annex_names1(c, level + 1)
|
|
154
|
-
end
|
|
147
|
+
@anchors[clause["id"]] = { label: lbl, xref: l10n(%{"#{lbl}"}),
|
|
148
|
+
level: level, type: "clause" }
|
|
149
|
+
clause.xpath(ns(SUBCLAUSES)).each { |c| unnumbered_annex_names1(c, level + 1) }
|
|
155
150
|
end
|
|
156
151
|
|
|
157
152
|
def annex_name_lbl(clause, num)
|
data/metanorma.yml
CHANGED
|
@@ -5,6 +5,7 @@ organization_name_long:
|
|
|
5
5
|
en: Bureau International des Poids et Mesures
|
|
6
6
|
document_namespace: https://www.metanorma.org/ns/bipm
|
|
7
7
|
xml_root_tag: 'bipm-standard'
|
|
8
|
+
docid_template: "{{ org_abbrev }} {{ docnumeric }}"
|
|
8
9
|
html_bodyfont: Times New Roman
|
|
9
10
|
html_headerfont: Times New Roman
|
|
10
11
|
html_normalfontsize: "15px"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-bipm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-02-
|
|
11
|
+
date: 2021-02-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|