metanorma-bipm 2.1.9 → 2.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/automerge.yml +31 -0
- data/lib/isodoc/bipm/bipm.brochure.xsl +75 -42
- data/lib/isodoc/bipm/bipm.guide.xsl +75 -42
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +75 -42
- data/lib/isodoc/bipm/bipm.rapport.xsl +75 -42
- data/lib/isodoc/bipm/html/htmlstyle.css +1 -1
- data/lib/isodoc/bipm/i18n-en.yaml +4 -0
- data/lib/isodoc/bipm/i18n-fr.yaml +5 -1
- data/lib/isodoc/bipm/jcgm.standard.xsl +16 -4
- data/lib/isodoc/bipm/presentation_xml_convert.rb +45 -7
- data/lib/metanorma/bipm/basicdoc.rng +0 -27
- data/lib/metanorma/bipm/biblio-standoc.rng +164 -0
- data/lib/metanorma/bipm/biblio.rng +45 -18
- data/lib/metanorma/bipm/bipm.rng +1 -130
- data/lib/metanorma/bipm/isodoc.rng +31 -194
- data/lib/metanorma/bipm/relaton-bipm.rng +138 -0
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: deb15c0d884da169c86a1bc0f84306a50058f5f58efab8e9a2ff4dddbf5ddb85
|
4
|
+
data.tar.gz: b938f5f8bf762bef096481a495ac313cbb6266114560e0c3204a5d9f2f90beb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc2984c3c54e5c1acc31a127120ba972dc844de5b3a3b189f13f0847a690ccd2a24241363695d4f9ad3ccc27b776c72a5d632281af8103f980e737b3f18b59e5
|
7
|
+
data.tar.gz: b7f2f9a00f0bff7fe711db8d0616bf30ff67131684ba4fe3098d0aac078ba0ba41fcce0f30d2a05da817044c8a977ad63320aa77a225e6c656d20782dfe6d8a7
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
|
+
# source: https://github.com/marketplace/actions/merge-pull-requests#usage
|
4
|
+
name: automerge
|
5
|
+
on:
|
6
|
+
pull_request:
|
7
|
+
types:
|
8
|
+
- labeled
|
9
|
+
- unlabeled
|
10
|
+
- synchronize
|
11
|
+
- opened
|
12
|
+
- edited
|
13
|
+
- ready_for_review
|
14
|
+
- reopened
|
15
|
+
- unlocked
|
16
|
+
pull_request_review:
|
17
|
+
types:
|
18
|
+
- submitted
|
19
|
+
check_suite:
|
20
|
+
types:
|
21
|
+
- completed
|
22
|
+
status: {}
|
23
|
+
jobs:
|
24
|
+
automerge:
|
25
|
+
runs-on: ubuntu-latest
|
26
|
+
steps:
|
27
|
+
- id: automerge
|
28
|
+
name: automerge
|
29
|
+
uses: "pascalgn/automerge-action@v0.15.3"
|
30
|
+
env:
|
31
|
+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
@@ -1193,10 +1193,10 @@
|
|
1193
1193
|
|
1194
1194
|
</fo:block>
|
1195
1195
|
|
1196
|
-
<xsl:variable name="part_num" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:part)"/>
|
1197
|
-
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part']">
|
1196
|
+
<!-- <xsl:variable name="part_num" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:part)"/> -->
|
1197
|
+
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part-with-numbering']">
|
1198
1198
|
<fo:block role="H2">
|
1199
|
-
<xsl:if test="$part_num != ''">
|
1199
|
+
<!-- <xsl:if test="$part_num != ''">
|
1200
1200
|
<xsl:call-template name="getLocalizedString">
|
1201
1201
|
<xsl:with-param name="key">Part.sg</xsl:with-param>
|
1202
1202
|
<xsl:with-param name="lang" select="$curr_lang"/>
|
@@ -1204,18 +1204,18 @@
|
|
1204
1204
|
<xsl:text> </xsl:text>
|
1205
1205
|
<xsl:value-of select="$part_num"/>
|
1206
1206
|
</xsl:if>
|
1207
|
-
<xsl:text>: </xsl:text>
|
1208
|
-
<xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part']" mode="title"/>
|
1207
|
+
<xsl:text>: </xsl:text> -->
|
1208
|
+
<xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part-with-numbering']" mode="title"/>
|
1209
1209
|
</fo:block>
|
1210
1210
|
</xsl:if>
|
1211
|
-
<xsl:variable name="subpart_num" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:subpart)"/>
|
1212
|
-
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'subpart']">
|
1211
|
+
<!-- <xsl:variable name="subpart_num" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:subpart)"/> -->
|
1212
|
+
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'subpart-with-numbering']">
|
1213
1213
|
<fo:block role="H3">
|
1214
|
-
<xsl:if test="$subpart_num != ''">
|
1214
|
+
<!-- <xsl:if test="$subpart_num != ''">
|
1215
1215
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-subpart[@lang=$curr_lang]),'#',$subpart_num)"/>
|
1216
1216
|
</xsl:if>
|
1217
|
-
<xsl:text>: </xsl:text>
|
1218
|
-
<xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'subpart']" mode="title"/>
|
1217
|
+
<xsl:text>: </xsl:text> -->
|
1218
|
+
<xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'subpart-with-numbering']" mode="title"/>
|
1219
1219
|
</fo:block>
|
1220
1220
|
</xsl:if>
|
1221
1221
|
|
@@ -2927,16 +2927,18 @@
|
|
2927
2927
|
<xsl:template match="bipm:note[not(ancestor::bipm:preface)]/bipm:name" priority="2">
|
2928
2928
|
<xsl:choose>
|
2929
2929
|
<xsl:when test="not(../preceding-sibling::bipm:note) and not((../following-sibling::bipm:note))">
|
2930
|
-
<xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
|
2930
|
+
<!-- <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
|
2931
2931
|
<xsl:choose>
|
2932
2932
|
<xsl:when test="$curr_lang = 'fr'">
|
2933
2933
|
<xsl:choose>
|
2934
|
-
<xsl:when test="ancestor::bipm:li">Remarque
|
2935
|
-
<xsl:otherwise>Note
|
2934
|
+
<xsl:when test="ancestor::bipm:li">Remarque : </xsl:when>
|
2935
|
+
<xsl:otherwise>Note : </xsl:otherwise>
|
2936
2936
|
</xsl:choose>
|
2937
2937
|
</xsl:when>
|
2938
2938
|
<xsl:otherwise>Note: </xsl:otherwise>
|
2939
|
-
</xsl:choose>
|
2939
|
+
</xsl:choose> -->
|
2940
|
+
<xsl:apply-templates/>
|
2941
|
+
<xsl:text> </xsl:text>
|
2940
2942
|
</xsl:when>
|
2941
2943
|
<xsl:when test="ancestor::bipm:table and count(ancestor::bipm:table//bipm:note) > 0">
|
2942
2944
|
<xsl:variable name="table_id" select="ancestor::bipm:table/@id"/>
|
@@ -2968,6 +2970,10 @@
|
|
2968
2970
|
</xsl:choose>
|
2969
2971
|
</xsl:template>
|
2970
2972
|
|
2973
|
+
<xsl:template match="*[local-name() = 'name']/text()" priority="2">
|
2974
|
+
<xsl:value-of select="."/>
|
2975
|
+
</xsl:template>
|
2976
|
+
|
2971
2977
|
<xsl:template match="*[local-name() = 'sup_fn']">
|
2972
2978
|
<fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super">
|
2973
2979
|
<xsl:apply-templates/>
|
@@ -4330,8 +4336,8 @@
|
|
4330
4336
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4331
4337
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
4332
4338
|
<xsl:attribute name="margin-top">24pt</xsl:attribute>
|
4333
|
-
<xsl:attribute name="margin-left">25mm</xsl:attribute>
|
4334
|
-
<xsl:attribute name="text-indent">-25mm</xsl:attribute>
|
4339
|
+
<!-- <xsl:attribute name="margin-left">25mm</xsl:attribute>
|
4340
|
+
<xsl:attribute name="text-indent">-25mm</xsl:attribute> -->
|
4335
4341
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
4336
4342
|
|
4337
4343
|
</xsl:attribute-set> <!-- table-name-style -->
|
@@ -5605,25 +5611,38 @@
|
|
5605
5611
|
<xsl:param name="continued"/>
|
5606
5612
|
<xsl:if test="normalize-space() != ''">
|
5607
5613
|
|
5608
|
-
<fo:block xsl:use-attribute-sets="table-name-style">
|
5609
|
-
|
5610
|
-
<xsl:if test="not(*[local-name()='tab'])"> <!-- table without number -->
|
5611
|
-
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
5612
|
-
</xsl:if>
|
5613
|
-
<xsl:if test="not(../preceding-sibling::*) and ancestor::node()[@orientation]">
|
5614
|
-
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
5615
|
-
</xsl:if>
|
5614
|
+
<fo:list-block xsl:use-attribute-sets="table-name-style">
|
5616
5615
|
|
5617
|
-
<xsl:
|
5618
|
-
<xsl:
|
5616
|
+
<xsl:if test="not(*[local-name()='tab'])"> <!-- table without number -->
|
5617
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
5618
|
+
</xsl:if>
|
5619
|
+
<xsl:if test="not(../preceding-sibling::*) and ancestor::node()[@orientation]">
|
5620
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
5621
|
+
</xsl:if>
|
5619
5622
|
|
5620
|
-
|
5621
|
-
<xsl:otherwise>
|
5622
|
-
<xsl:apply-templates/>
|
5623
|
-
</xsl:otherwise>
|
5624
|
-
</xsl:choose>
|
5623
|
+
<xsl:attribute name="provisional-distance-between-starts">25mm</xsl:attribute>
|
5625
5624
|
|
5626
|
-
|
5625
|
+
<fo:list-item>
|
5626
|
+
<fo:list-item-label end-indent="label-end()">
|
5627
|
+
<fo:block>
|
5628
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
5629
|
+
</fo:block>
|
5630
|
+
</fo:list-item-label>
|
5631
|
+
<fo:list-item-body start-indent="body-start()">
|
5632
|
+
<fo:block>
|
5633
|
+
<xsl:choose>
|
5634
|
+
<xsl:when test="./*[local-name() = 'tab']">
|
5635
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
5636
|
+
</xsl:when>
|
5637
|
+
<xsl:otherwise>
|
5638
|
+
<xsl:apply-templates/>
|
5639
|
+
</xsl:otherwise>
|
5640
|
+
</xsl:choose>
|
5641
|
+
</fo:block>
|
5642
|
+
</fo:list-item-body>
|
5643
|
+
</fo:list-item>
|
5644
|
+
</fo:list-block>
|
5645
|
+
<!-- bipm -->
|
5627
5646
|
|
5628
5647
|
</xsl:if>
|
5629
5648
|
</xsl:template> <!-- table/name -->
|
@@ -7323,8 +7342,17 @@
|
|
7323
7342
|
</fo:inline>
|
7324
7343
|
</xsl:template> <!-- tt -->
|
7325
7344
|
|
7345
|
+
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
7326
7346
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
7327
|
-
<xsl:
|
7347
|
+
<xsl:choose>
|
7348
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
|
7349
|
+
<!-- url -->
|
7350
|
+
<xsl:call-template name="add-zero-spaces-link-java"/>
|
7351
|
+
</xsl:when>
|
7352
|
+
<xsl:otherwise>
|
7353
|
+
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
7354
|
+
</xsl:otherwise>
|
7355
|
+
</xsl:choose>
|
7328
7356
|
</xsl:template>
|
7329
7357
|
|
7330
7358
|
<xsl:template match="*[local-name()='underline']">
|
@@ -7680,8 +7708,11 @@
|
|
7680
7708
|
|
7681
7709
|
<xsl:template name="add-zero-spaces-link-java">
|
7682
7710
|
<xsl:param name="text" select="."/>
|
7711
|
+
|
7712
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
|
7713
|
+
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
7683
7714
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
7684
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
7715
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1')"/>
|
7685
7716
|
</xsl:template>
|
7686
7717
|
|
7687
7718
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -8714,11 +8745,12 @@
|
|
8714
8745
|
</xsl:when>
|
8715
8746
|
<xsl:otherwise>
|
8716
8747
|
|
8717
|
-
<xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
|
8748
|
+
<!-- <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
|
8718
8749
|
<xsl:choose>
|
8719
|
-
<xsl:when test="$curr_lang = 'fr'"><xsl:text
|
8750
|
+
<xsl:when test="$curr_lang = 'fr'"><xsl:text> : </xsl:text></xsl:when>
|
8720
8751
|
<xsl:otherwise><xsl:text>: </xsl:text></xsl:otherwise>
|
8721
|
-
</xsl:choose>
|
8752
|
+
</xsl:choose> -->
|
8753
|
+
<xsl:text> </xsl:text>
|
8722
8754
|
|
8723
8755
|
</xsl:otherwise>
|
8724
8756
|
</xsl:choose>
|
@@ -8738,11 +8770,12 @@
|
|
8738
8770
|
</xsl:when>
|
8739
8771
|
<xsl:otherwise>
|
8740
8772
|
|
8741
|
-
<xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
|
8773
|
+
<!-- <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
|
8742
8774
|
<xsl:choose>
|
8743
|
-
<xsl:when test="$curr_lang = 'fr'"><xsl:text
|
8775
|
+
<xsl:when test="$curr_lang = 'fr'"><xsl:text> : </xsl:text></xsl:when>
|
8744
8776
|
<xsl:otherwise><xsl:text>: </xsl:text></xsl:otherwise>
|
8745
|
-
</xsl:choose>
|
8777
|
+
</xsl:choose> -->
|
8778
|
+
<xsl:text> </xsl:text>
|
8746
8779
|
|
8747
8780
|
</xsl:otherwise>
|
8748
8781
|
</xsl:choose>
|
@@ -10707,7 +10740,7 @@
|
|
10707
10740
|
<!-- ====== -->
|
10708
10741
|
<!-- eref -->
|
10709
10742
|
<!-- ====== -->
|
10710
|
-
<xsl:template match="*[local-name() = 'eref']">
|
10743
|
+
<xsl:template match="*[local-name() = 'eref']" name="eref">
|
10711
10744
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
10712
10745
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
|
10713
10746
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
|
@@ -12181,7 +12214,7 @@
|
|
12181
12214
|
|
12182
12215
|
<xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
|
12183
12216
|
|
12184
|
-
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or
|
12217
|
+
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
12185
12218
|
|
12186
12219
|
<!-- enclose standard's number into tag 'keep-together_within-line' -->
|
12187
12220
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
@@ -1193,10 +1193,10 @@
|
|
1193
1193
|
|
1194
1194
|
</fo:block>
|
1195
1195
|
|
1196
|
-
<xsl:variable name="part_num" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:part)"/>
|
1197
|
-
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part']">
|
1196
|
+
<!-- <xsl:variable name="part_num" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:part)"/> -->
|
1197
|
+
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part-with-numbering']">
|
1198
1198
|
<fo:block role="H2">
|
1199
|
-
<xsl:if test="$part_num != ''">
|
1199
|
+
<!-- <xsl:if test="$part_num != ''">
|
1200
1200
|
<xsl:call-template name="getLocalizedString">
|
1201
1201
|
<xsl:with-param name="key">Part.sg</xsl:with-param>
|
1202
1202
|
<xsl:with-param name="lang" select="$curr_lang"/>
|
@@ -1204,18 +1204,18 @@
|
|
1204
1204
|
<xsl:text> </xsl:text>
|
1205
1205
|
<xsl:value-of select="$part_num"/>
|
1206
1206
|
</xsl:if>
|
1207
|
-
<xsl:text>: </xsl:text>
|
1208
|
-
<xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part']" mode="title"/>
|
1207
|
+
<xsl:text>: </xsl:text> -->
|
1208
|
+
<xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part-with-numbering']" mode="title"/>
|
1209
1209
|
</fo:block>
|
1210
1210
|
</xsl:if>
|
1211
|
-
<xsl:variable name="subpart_num" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:subpart)"/>
|
1212
|
-
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'subpart']">
|
1211
|
+
<!-- <xsl:variable name="subpart_num" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:subpart)"/> -->
|
1212
|
+
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'subpart-with-numbering']">
|
1213
1213
|
<fo:block role="H3">
|
1214
|
-
<xsl:if test="$subpart_num != ''">
|
1214
|
+
<!-- <xsl:if test="$subpart_num != ''">
|
1215
1215
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-subpart[@lang=$curr_lang]),'#',$subpart_num)"/>
|
1216
1216
|
</xsl:if>
|
1217
|
-
<xsl:text>: </xsl:text>
|
1218
|
-
<xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'subpart']" mode="title"/>
|
1217
|
+
<xsl:text>: </xsl:text> -->
|
1218
|
+
<xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'subpart-with-numbering']" mode="title"/>
|
1219
1219
|
</fo:block>
|
1220
1220
|
</xsl:if>
|
1221
1221
|
|
@@ -2927,16 +2927,18 @@
|
|
2927
2927
|
<xsl:template match="bipm:note[not(ancestor::bipm:preface)]/bipm:name" priority="2">
|
2928
2928
|
<xsl:choose>
|
2929
2929
|
<xsl:when test="not(../preceding-sibling::bipm:note) and not((../following-sibling::bipm:note))">
|
2930
|
-
<xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
|
2930
|
+
<!-- <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
|
2931
2931
|
<xsl:choose>
|
2932
2932
|
<xsl:when test="$curr_lang = 'fr'">
|
2933
2933
|
<xsl:choose>
|
2934
|
-
<xsl:when test="ancestor::bipm:li">Remarque
|
2935
|
-
<xsl:otherwise>Note
|
2934
|
+
<xsl:when test="ancestor::bipm:li">Remarque : </xsl:when>
|
2935
|
+
<xsl:otherwise>Note : </xsl:otherwise>
|
2936
2936
|
</xsl:choose>
|
2937
2937
|
</xsl:when>
|
2938
2938
|
<xsl:otherwise>Note: </xsl:otherwise>
|
2939
|
-
</xsl:choose>
|
2939
|
+
</xsl:choose> -->
|
2940
|
+
<xsl:apply-templates/>
|
2941
|
+
<xsl:text> </xsl:text>
|
2940
2942
|
</xsl:when>
|
2941
2943
|
<xsl:when test="ancestor::bipm:table and count(ancestor::bipm:table//bipm:note) > 0">
|
2942
2944
|
<xsl:variable name="table_id" select="ancestor::bipm:table/@id"/>
|
@@ -2968,6 +2970,10 @@
|
|
2968
2970
|
</xsl:choose>
|
2969
2971
|
</xsl:template>
|
2970
2972
|
|
2973
|
+
<xsl:template match="*[local-name() = 'name']/text()" priority="2">
|
2974
|
+
<xsl:value-of select="."/>
|
2975
|
+
</xsl:template>
|
2976
|
+
|
2971
2977
|
<xsl:template match="*[local-name() = 'sup_fn']">
|
2972
2978
|
<fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super">
|
2973
2979
|
<xsl:apply-templates/>
|
@@ -4330,8 +4336,8 @@
|
|
4330
4336
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4331
4337
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
4332
4338
|
<xsl:attribute name="margin-top">24pt</xsl:attribute>
|
4333
|
-
<xsl:attribute name="margin-left">25mm</xsl:attribute>
|
4334
|
-
<xsl:attribute name="text-indent">-25mm</xsl:attribute>
|
4339
|
+
<!-- <xsl:attribute name="margin-left">25mm</xsl:attribute>
|
4340
|
+
<xsl:attribute name="text-indent">-25mm</xsl:attribute> -->
|
4335
4341
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
4336
4342
|
|
4337
4343
|
</xsl:attribute-set> <!-- table-name-style -->
|
@@ -5605,25 +5611,38 @@
|
|
5605
5611
|
<xsl:param name="continued"/>
|
5606
5612
|
<xsl:if test="normalize-space() != ''">
|
5607
5613
|
|
5608
|
-
<fo:block xsl:use-attribute-sets="table-name-style">
|
5609
|
-
|
5610
|
-
<xsl:if test="not(*[local-name()='tab'])"> <!-- table without number -->
|
5611
|
-
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
5612
|
-
</xsl:if>
|
5613
|
-
<xsl:if test="not(../preceding-sibling::*) and ancestor::node()[@orientation]">
|
5614
|
-
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
5615
|
-
</xsl:if>
|
5614
|
+
<fo:list-block xsl:use-attribute-sets="table-name-style">
|
5616
5615
|
|
5617
|
-
<xsl:
|
5618
|
-
<xsl:
|
5616
|
+
<xsl:if test="not(*[local-name()='tab'])"> <!-- table without number -->
|
5617
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
5618
|
+
</xsl:if>
|
5619
|
+
<xsl:if test="not(../preceding-sibling::*) and ancestor::node()[@orientation]">
|
5620
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
5621
|
+
</xsl:if>
|
5619
5622
|
|
5620
|
-
|
5621
|
-
<xsl:otherwise>
|
5622
|
-
<xsl:apply-templates/>
|
5623
|
-
</xsl:otherwise>
|
5624
|
-
</xsl:choose>
|
5623
|
+
<xsl:attribute name="provisional-distance-between-starts">25mm</xsl:attribute>
|
5625
5624
|
|
5626
|
-
|
5625
|
+
<fo:list-item>
|
5626
|
+
<fo:list-item-label end-indent="label-end()">
|
5627
|
+
<fo:block>
|
5628
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
5629
|
+
</fo:block>
|
5630
|
+
</fo:list-item-label>
|
5631
|
+
<fo:list-item-body start-indent="body-start()">
|
5632
|
+
<fo:block>
|
5633
|
+
<xsl:choose>
|
5634
|
+
<xsl:when test="./*[local-name() = 'tab']">
|
5635
|
+
<xsl:apply-templates select="./*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
5636
|
+
</xsl:when>
|
5637
|
+
<xsl:otherwise>
|
5638
|
+
<xsl:apply-templates/>
|
5639
|
+
</xsl:otherwise>
|
5640
|
+
</xsl:choose>
|
5641
|
+
</fo:block>
|
5642
|
+
</fo:list-item-body>
|
5643
|
+
</fo:list-item>
|
5644
|
+
</fo:list-block>
|
5645
|
+
<!-- bipm -->
|
5627
5646
|
|
5628
5647
|
</xsl:if>
|
5629
5648
|
</xsl:template> <!-- table/name -->
|
@@ -7323,8 +7342,17 @@
|
|
7323
7342
|
</fo:inline>
|
7324
7343
|
</xsl:template> <!-- tt -->
|
7325
7344
|
|
7345
|
+
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
7326
7346
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
7327
|
-
<xsl:
|
7347
|
+
<xsl:choose>
|
7348
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
|
7349
|
+
<!-- url -->
|
7350
|
+
<xsl:call-template name="add-zero-spaces-link-java"/>
|
7351
|
+
</xsl:when>
|
7352
|
+
<xsl:otherwise>
|
7353
|
+
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
7354
|
+
</xsl:otherwise>
|
7355
|
+
</xsl:choose>
|
7328
7356
|
</xsl:template>
|
7329
7357
|
|
7330
7358
|
<xsl:template match="*[local-name()='underline']">
|
@@ -7680,8 +7708,11 @@
|
|
7680
7708
|
|
7681
7709
|
<xsl:template name="add-zero-spaces-link-java">
|
7682
7710
|
<xsl:param name="text" select="."/>
|
7711
|
+
|
7712
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
|
7713
|
+
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
7683
7714
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
7684
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
7715
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1')"/>
|
7685
7716
|
</xsl:template>
|
7686
7717
|
|
7687
7718
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -8714,11 +8745,12 @@
|
|
8714
8745
|
</xsl:when>
|
8715
8746
|
<xsl:otherwise>
|
8716
8747
|
|
8717
|
-
<xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
|
8748
|
+
<!-- <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
|
8718
8749
|
<xsl:choose>
|
8719
|
-
<xsl:when test="$curr_lang = 'fr'"><xsl:text
|
8750
|
+
<xsl:when test="$curr_lang = 'fr'"><xsl:text> : </xsl:text></xsl:when>
|
8720
8751
|
<xsl:otherwise><xsl:text>: </xsl:text></xsl:otherwise>
|
8721
|
-
</xsl:choose>
|
8752
|
+
</xsl:choose> -->
|
8753
|
+
<xsl:text> </xsl:text>
|
8722
8754
|
|
8723
8755
|
</xsl:otherwise>
|
8724
8756
|
</xsl:choose>
|
@@ -8738,11 +8770,12 @@
|
|
8738
8770
|
</xsl:when>
|
8739
8771
|
<xsl:otherwise>
|
8740
8772
|
|
8741
|
-
<xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
|
8773
|
+
<!-- <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
|
8742
8774
|
<xsl:choose>
|
8743
|
-
<xsl:when test="$curr_lang = 'fr'"><xsl:text
|
8775
|
+
<xsl:when test="$curr_lang = 'fr'"><xsl:text> : </xsl:text></xsl:when>
|
8744
8776
|
<xsl:otherwise><xsl:text>: </xsl:text></xsl:otherwise>
|
8745
|
-
</xsl:choose>
|
8777
|
+
</xsl:choose> -->
|
8778
|
+
<xsl:text> </xsl:text>
|
8746
8779
|
|
8747
8780
|
</xsl:otherwise>
|
8748
8781
|
</xsl:choose>
|
@@ -10707,7 +10740,7 @@
|
|
10707
10740
|
<!-- ====== -->
|
10708
10741
|
<!-- eref -->
|
10709
10742
|
<!-- ====== -->
|
10710
|
-
<xsl:template match="*[local-name() = 'eref']">
|
10743
|
+
<xsl:template match="*[local-name() = 'eref']" name="eref">
|
10711
10744
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
10712
10745
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
|
10713
10746
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
|
@@ -12181,7 +12214,7 @@
|
|
12181
12214
|
|
12182
12215
|
<xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
|
12183
12216
|
|
12184
|
-
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or
|
12217
|
+
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
12185
12218
|
|
12186
12219
|
<!-- enclose standard's number into tag 'keep-together_within-line' -->
|
12187
12220
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|