metanorma-bipm 2.2.10 → 2.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/bipm.brochure.xsl +30 -12
- data/lib/isodoc/bipm/bipm.guide.xsl +30 -12
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +30 -12
- data/lib/isodoc/bipm/bipm.rapport.xsl +30 -12
- data/lib/isodoc/bipm/i18n-en.yaml +3 -1
- data/lib/isodoc/bipm/i18n-fr.yaml +3 -1
- data/lib/isodoc/bipm/jcgm.standard.xsl +30 -12
- data/lib/isodoc/bipm/presentation_xml_convert.rb +48 -30
- data/lib/metanorma/bipm/isodoc.rng +18 -0
- data/lib/metanorma/bipm/version.rb +1 -1
- 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: 52a00b68699debff9fdcdcbbfe6cc386cff44e9fa12eaa6eaaf62cb5c006bf39
|
4
|
+
data.tar.gz: b6b4f3a66bf327e22ad374b8f74cd8795cfc47ab0b1a32f91e97e3e2a5fffa49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 292d01a8cf41c886c0cf3ce3e3710cf7322e65fcd08d0e89b5245bf2c7b86d4f44de3480472e24eddca739c071e4b84817699bb0277c2bb29ce738801d0cccbc
|
7
|
+
data.tar.gz: e19758b39759f6869d604aa1ee73363d6c03f22beb796e87602bab021b0975a3073d4a9e12c9155b6375b1de11cf2b28910e74c48a99217ede6df24866cc2834
|
@@ -5829,7 +5829,7 @@
|
|
5829
5829
|
</xsl:attribute>
|
5830
5830
|
</xsl:for-each>
|
5831
5831
|
|
5832
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
5832
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
5833
5833
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
5834
5834
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
5835
5835
|
</xsl:if>
|
@@ -5873,7 +5873,7 @@
|
|
5873
5873
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
5874
5874
|
</xsl:when>
|
5875
5875
|
<xsl:otherwise>
|
5876
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
5876
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
5877
5877
|
</xsl:otherwise>
|
5878
5878
|
</xsl:choose>
|
5879
5879
|
|
@@ -6404,7 +6404,7 @@
|
|
6404
6404
|
<xsl:param name="colwidths"/>
|
6405
6405
|
<xsl:param name="colgroup"/>
|
6406
6406
|
|
6407
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
6407
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
6408
6408
|
|
6409
6409
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
6410
6410
|
|
@@ -6487,6 +6487,7 @@
|
|
6487
6487
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
6488
6488
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
6489
6489
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
6490
|
+
<xsl:apply-templates select="../*[local-name()='example']"/>
|
6490
6491
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
6491
6492
|
|
6492
6493
|
<xsl:variable name="isDisplayRowSeparator">
|
@@ -6495,7 +6496,7 @@
|
|
6495
6496
|
|
6496
6497
|
<!-- horizontal row separator -->
|
6497
6498
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
6498
|
-
<xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
|
6499
|
+
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
6499
6500
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
6500
6501
|
|
6501
6502
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -6772,13 +6773,13 @@
|
|
6772
6773
|
</fo:table-cell>
|
6773
6774
|
</xsl:template> <!-- td -->
|
6774
6775
|
|
6775
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
|
6776
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
6776
6777
|
|
6777
6778
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
6778
6779
|
|
6779
6780
|
<xsl:call-template name="refine_table-note-style"/>
|
6780
6781
|
|
6781
|
-
<!-- Table's note name (NOTE, for example) -->
|
6782
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
6782
6783
|
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
6783
6784
|
|
6784
6785
|
<xsl:call-template name="refine_table-note-name-style"/>
|
@@ -6796,7 +6797,7 @@
|
|
6796
6797
|
|
6797
6798
|
</xsl:template> <!-- table/note -->
|
6798
6799
|
|
6799
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
|
6800
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
6800
6801
|
<xsl:apply-templates/>
|
6801
6802
|
</xsl:template>
|
6802
6803
|
|
@@ -7871,10 +7872,15 @@
|
|
7871
7872
|
<!-- ========================= -->
|
7872
7873
|
<xsl:template match="*[local-name()='em']">
|
7873
7874
|
<fo:inline font-style="italic">
|
7875
|
+
<xsl:call-template name="refine_italic_style"/>
|
7874
7876
|
<xsl:apply-templates/>
|
7875
7877
|
</fo:inline>
|
7876
7878
|
</xsl:template>
|
7877
7879
|
|
7880
|
+
<xsl:template name="refine_italic_style">
|
7881
|
+
|
7882
|
+
</xsl:template>
|
7883
|
+
|
7878
7884
|
<xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
7879
7885
|
<xsl:param name="split_keep-within-line"/>
|
7880
7886
|
<fo:inline font-weight="bold">
|
@@ -8357,7 +8363,10 @@
|
|
8357
8363
|
</xsl:choose>
|
8358
8364
|
</xsl:variable>
|
8359
8365
|
|
8360
|
-
|
8366
|
+
<!-- replace sequence #x200B and space TO space -->
|
8367
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
|
8368
|
+
|
8369
|
+
<xsl:value-of select="$text10"/>
|
8361
8370
|
</xsl:template>
|
8362
8371
|
|
8363
8372
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -9478,7 +9487,7 @@
|
|
9478
9487
|
<xsl:call-template name="insert_basic_link">
|
9479
9488
|
<xsl:with-param name="element">
|
9480
9489
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
9481
|
-
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://'))">
|
9490
|
+
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
9482
9491
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
9483
9492
|
</xsl:if>
|
9484
9493
|
<xsl:if test="parent::*[local-name() = 'add']">
|
@@ -11799,6 +11808,12 @@
|
|
11799
11808
|
|
11800
11809
|
</xsl:template>
|
11801
11810
|
|
11811
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
11812
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
11813
|
+
<xsl:apply-templates/>
|
11814
|
+
</fo:inline>
|
11815
|
+
</xsl:template>
|
11816
|
+
|
11802
11817
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
11803
11818
|
<xsl:param name="fo_element">block</xsl:param>
|
11804
11819
|
|
@@ -12376,6 +12391,9 @@
|
|
12376
12391
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
12377
12392
|
</xsl:choose>
|
12378
12393
|
</xsl:when>
|
12394
|
+
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
12395
|
+
<xsl:value-of select="@label"/>
|
12396
|
+
</xsl:when>
|
12379
12397
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
12380
12398
|
|
12381
12399
|
<!-- Example: for BSI <?list-start 2?> -->
|
@@ -12433,10 +12451,10 @@
|
|
12433
12451
|
<xsl:when test="$type = 'arabic'">
|
12434
12452
|
1.
|
12435
12453
|
</xsl:when>
|
12436
|
-
<xsl:when test="$type = 'alphabet'">
|
12454
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
12437
12455
|
a)
|
12438
12456
|
</xsl:when>
|
12439
|
-
<xsl:when test="$type = 'alphabet_upper'">
|
12457
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
12440
12458
|
A.
|
12441
12459
|
</xsl:when>
|
12442
12460
|
<xsl:when test="$type = 'roman'">
|
@@ -12578,7 +12596,7 @@
|
|
12578
12596
|
<xsl:call-template name="append_add-style"/>
|
12579
12597
|
</xsl:if>
|
12580
12598
|
|
12581
|
-
|
12599
|
+
<xsl:call-template name="getListItemFormat"/>
|
12582
12600
|
|
12583
12601
|
</fo:block>
|
12584
12602
|
</fo:list-item-label>
|
@@ -5829,7 +5829,7 @@
|
|
5829
5829
|
</xsl:attribute>
|
5830
5830
|
</xsl:for-each>
|
5831
5831
|
|
5832
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
5832
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
5833
5833
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
5834
5834
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
5835
5835
|
</xsl:if>
|
@@ -5873,7 +5873,7 @@
|
|
5873
5873
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
5874
5874
|
</xsl:when>
|
5875
5875
|
<xsl:otherwise>
|
5876
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
5876
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
5877
5877
|
</xsl:otherwise>
|
5878
5878
|
</xsl:choose>
|
5879
5879
|
|
@@ -6404,7 +6404,7 @@
|
|
6404
6404
|
<xsl:param name="colwidths"/>
|
6405
6405
|
<xsl:param name="colgroup"/>
|
6406
6406
|
|
6407
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
6407
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
6408
6408
|
|
6409
6409
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
6410
6410
|
|
@@ -6487,6 +6487,7 @@
|
|
6487
6487
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
6488
6488
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
6489
6489
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
6490
|
+
<xsl:apply-templates select="../*[local-name()='example']"/>
|
6490
6491
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
6491
6492
|
|
6492
6493
|
<xsl:variable name="isDisplayRowSeparator">
|
@@ -6495,7 +6496,7 @@
|
|
6495
6496
|
|
6496
6497
|
<!-- horizontal row separator -->
|
6497
6498
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
6498
|
-
<xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
|
6499
|
+
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
6499
6500
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
6500
6501
|
|
6501
6502
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -6772,13 +6773,13 @@
|
|
6772
6773
|
</fo:table-cell>
|
6773
6774
|
</xsl:template> <!-- td -->
|
6774
6775
|
|
6775
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
|
6776
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
6776
6777
|
|
6777
6778
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
6778
6779
|
|
6779
6780
|
<xsl:call-template name="refine_table-note-style"/>
|
6780
6781
|
|
6781
|
-
<!-- Table's note name (NOTE, for example) -->
|
6782
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
6782
6783
|
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
6783
6784
|
|
6784
6785
|
<xsl:call-template name="refine_table-note-name-style"/>
|
@@ -6796,7 +6797,7 @@
|
|
6796
6797
|
|
6797
6798
|
</xsl:template> <!-- table/note -->
|
6798
6799
|
|
6799
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
|
6800
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
6800
6801
|
<xsl:apply-templates/>
|
6801
6802
|
</xsl:template>
|
6802
6803
|
|
@@ -7871,10 +7872,15 @@
|
|
7871
7872
|
<!-- ========================= -->
|
7872
7873
|
<xsl:template match="*[local-name()='em']">
|
7873
7874
|
<fo:inline font-style="italic">
|
7875
|
+
<xsl:call-template name="refine_italic_style"/>
|
7874
7876
|
<xsl:apply-templates/>
|
7875
7877
|
</fo:inline>
|
7876
7878
|
</xsl:template>
|
7877
7879
|
|
7880
|
+
<xsl:template name="refine_italic_style">
|
7881
|
+
|
7882
|
+
</xsl:template>
|
7883
|
+
|
7878
7884
|
<xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
7879
7885
|
<xsl:param name="split_keep-within-line"/>
|
7880
7886
|
<fo:inline font-weight="bold">
|
@@ -8357,7 +8363,10 @@
|
|
8357
8363
|
</xsl:choose>
|
8358
8364
|
</xsl:variable>
|
8359
8365
|
|
8360
|
-
|
8366
|
+
<!-- replace sequence #x200B and space TO space -->
|
8367
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
|
8368
|
+
|
8369
|
+
<xsl:value-of select="$text10"/>
|
8361
8370
|
</xsl:template>
|
8362
8371
|
|
8363
8372
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -9478,7 +9487,7 @@
|
|
9478
9487
|
<xsl:call-template name="insert_basic_link">
|
9479
9488
|
<xsl:with-param name="element">
|
9480
9489
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
9481
|
-
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://'))">
|
9490
|
+
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
9482
9491
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
9483
9492
|
</xsl:if>
|
9484
9493
|
<xsl:if test="parent::*[local-name() = 'add']">
|
@@ -11799,6 +11808,12 @@
|
|
11799
11808
|
|
11800
11809
|
</xsl:template>
|
11801
11810
|
|
11811
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
11812
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
11813
|
+
<xsl:apply-templates/>
|
11814
|
+
</fo:inline>
|
11815
|
+
</xsl:template>
|
11816
|
+
|
11802
11817
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
11803
11818
|
<xsl:param name="fo_element">block</xsl:param>
|
11804
11819
|
|
@@ -12376,6 +12391,9 @@
|
|
12376
12391
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
12377
12392
|
</xsl:choose>
|
12378
12393
|
</xsl:when>
|
12394
|
+
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
12395
|
+
<xsl:value-of select="@label"/>
|
12396
|
+
</xsl:when>
|
12379
12397
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
12380
12398
|
|
12381
12399
|
<!-- Example: for BSI <?list-start 2?> -->
|
@@ -12433,10 +12451,10 @@
|
|
12433
12451
|
<xsl:when test="$type = 'arabic'">
|
12434
12452
|
1.
|
12435
12453
|
</xsl:when>
|
12436
|
-
<xsl:when test="$type = 'alphabet'">
|
12454
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
12437
12455
|
a)
|
12438
12456
|
</xsl:when>
|
12439
|
-
<xsl:when test="$type = 'alphabet_upper'">
|
12457
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
12440
12458
|
A.
|
12441
12459
|
</xsl:when>
|
12442
12460
|
<xsl:when test="$type = 'roman'">
|
@@ -12578,7 +12596,7 @@
|
|
12578
12596
|
<xsl:call-template name="append_add-style"/>
|
12579
12597
|
</xsl:if>
|
12580
12598
|
|
12581
|
-
|
12599
|
+
<xsl:call-template name="getListItemFormat"/>
|
12582
12600
|
|
12583
12601
|
</fo:block>
|
12584
12602
|
</fo:list-item-label>
|
@@ -5829,7 +5829,7 @@
|
|
5829
5829
|
</xsl:attribute>
|
5830
5830
|
</xsl:for-each>
|
5831
5831
|
|
5832
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
5832
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
5833
5833
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
5834
5834
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
5835
5835
|
</xsl:if>
|
@@ -5873,7 +5873,7 @@
|
|
5873
5873
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
5874
5874
|
</xsl:when>
|
5875
5875
|
<xsl:otherwise>
|
5876
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
5876
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
5877
5877
|
</xsl:otherwise>
|
5878
5878
|
</xsl:choose>
|
5879
5879
|
|
@@ -6404,7 +6404,7 @@
|
|
6404
6404
|
<xsl:param name="colwidths"/>
|
6405
6405
|
<xsl:param name="colgroup"/>
|
6406
6406
|
|
6407
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
6407
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
6408
6408
|
|
6409
6409
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
6410
6410
|
|
@@ -6487,6 +6487,7 @@
|
|
6487
6487
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
6488
6488
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
6489
6489
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
6490
|
+
<xsl:apply-templates select="../*[local-name()='example']"/>
|
6490
6491
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
6491
6492
|
|
6492
6493
|
<xsl:variable name="isDisplayRowSeparator">
|
@@ -6495,7 +6496,7 @@
|
|
6495
6496
|
|
6496
6497
|
<!-- horizontal row separator -->
|
6497
6498
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
6498
|
-
<xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
|
6499
|
+
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
6499
6500
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
6500
6501
|
|
6501
6502
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -6772,13 +6773,13 @@
|
|
6772
6773
|
</fo:table-cell>
|
6773
6774
|
</xsl:template> <!-- td -->
|
6774
6775
|
|
6775
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
|
6776
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
6776
6777
|
|
6777
6778
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
6778
6779
|
|
6779
6780
|
<xsl:call-template name="refine_table-note-style"/>
|
6780
6781
|
|
6781
|
-
<!-- Table's note name (NOTE, for example) -->
|
6782
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
6782
6783
|
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
6783
6784
|
|
6784
6785
|
<xsl:call-template name="refine_table-note-name-style"/>
|
@@ -6796,7 +6797,7 @@
|
|
6796
6797
|
|
6797
6798
|
</xsl:template> <!-- table/note -->
|
6798
6799
|
|
6799
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
|
6800
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
6800
6801
|
<xsl:apply-templates/>
|
6801
6802
|
</xsl:template>
|
6802
6803
|
|
@@ -7871,10 +7872,15 @@
|
|
7871
7872
|
<!-- ========================= -->
|
7872
7873
|
<xsl:template match="*[local-name()='em']">
|
7873
7874
|
<fo:inline font-style="italic">
|
7875
|
+
<xsl:call-template name="refine_italic_style"/>
|
7874
7876
|
<xsl:apply-templates/>
|
7875
7877
|
</fo:inline>
|
7876
7878
|
</xsl:template>
|
7877
7879
|
|
7880
|
+
<xsl:template name="refine_italic_style">
|
7881
|
+
|
7882
|
+
</xsl:template>
|
7883
|
+
|
7878
7884
|
<xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
7879
7885
|
<xsl:param name="split_keep-within-line"/>
|
7880
7886
|
<fo:inline font-weight="bold">
|
@@ -8357,7 +8363,10 @@
|
|
8357
8363
|
</xsl:choose>
|
8358
8364
|
</xsl:variable>
|
8359
8365
|
|
8360
|
-
|
8366
|
+
<!-- replace sequence #x200B and space TO space -->
|
8367
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
|
8368
|
+
|
8369
|
+
<xsl:value-of select="$text10"/>
|
8361
8370
|
</xsl:template>
|
8362
8371
|
|
8363
8372
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -9478,7 +9487,7 @@
|
|
9478
9487
|
<xsl:call-template name="insert_basic_link">
|
9479
9488
|
<xsl:with-param name="element">
|
9480
9489
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
9481
|
-
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://'))">
|
9490
|
+
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
9482
9491
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
9483
9492
|
</xsl:if>
|
9484
9493
|
<xsl:if test="parent::*[local-name() = 'add']">
|
@@ -11799,6 +11808,12 @@
|
|
11799
11808
|
|
11800
11809
|
</xsl:template>
|
11801
11810
|
|
11811
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
11812
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
11813
|
+
<xsl:apply-templates/>
|
11814
|
+
</fo:inline>
|
11815
|
+
</xsl:template>
|
11816
|
+
|
11802
11817
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
11803
11818
|
<xsl:param name="fo_element">block</xsl:param>
|
11804
11819
|
|
@@ -12376,6 +12391,9 @@
|
|
12376
12391
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
12377
12392
|
</xsl:choose>
|
12378
12393
|
</xsl:when>
|
12394
|
+
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
12395
|
+
<xsl:value-of select="@label"/>
|
12396
|
+
</xsl:when>
|
12379
12397
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
12380
12398
|
|
12381
12399
|
<!-- Example: for BSI <?list-start 2?> -->
|
@@ -12433,10 +12451,10 @@
|
|
12433
12451
|
<xsl:when test="$type = 'arabic'">
|
12434
12452
|
1.
|
12435
12453
|
</xsl:when>
|
12436
|
-
<xsl:when test="$type = 'alphabet'">
|
12454
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
12437
12455
|
a)
|
12438
12456
|
</xsl:when>
|
12439
|
-
<xsl:when test="$type = 'alphabet_upper'">
|
12457
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
12440
12458
|
A.
|
12441
12459
|
</xsl:when>
|
12442
12460
|
<xsl:when test="$type = 'roman'">
|
@@ -12578,7 +12596,7 @@
|
|
12578
12596
|
<xsl:call-template name="append_add-style"/>
|
12579
12597
|
</xsl:if>
|
12580
12598
|
|
12581
|
-
|
12599
|
+
<xsl:call-template name="getListItemFormat"/>
|
12582
12600
|
|
12583
12601
|
</fo:block>
|
12584
12602
|
</fo:list-item-label>
|
@@ -5829,7 +5829,7 @@
|
|
5829
5829
|
</xsl:attribute>
|
5830
5830
|
</xsl:for-each>
|
5831
5831
|
|
5832
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
5832
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
5833
5833
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
5834
5834
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
5835
5835
|
</xsl:if>
|
@@ -5873,7 +5873,7 @@
|
|
5873
5873
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
5874
5874
|
</xsl:when>
|
5875
5875
|
<xsl:otherwise>
|
5876
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
5876
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
5877
5877
|
</xsl:otherwise>
|
5878
5878
|
</xsl:choose>
|
5879
5879
|
|
@@ -6404,7 +6404,7 @@
|
|
6404
6404
|
<xsl:param name="colwidths"/>
|
6405
6405
|
<xsl:param name="colgroup"/>
|
6406
6406
|
|
6407
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
6407
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
6408
6408
|
|
6409
6409
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
6410
6410
|
|
@@ -6487,6 +6487,7 @@
|
|
6487
6487
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
6488
6488
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
6489
6489
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
6490
|
+
<xsl:apply-templates select="../*[local-name()='example']"/>
|
6490
6491
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
6491
6492
|
|
6492
6493
|
<xsl:variable name="isDisplayRowSeparator">
|
@@ -6495,7 +6496,7 @@
|
|
6495
6496
|
|
6496
6497
|
<!-- horizontal row separator -->
|
6497
6498
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
6498
|
-
<xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
|
6499
|
+
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
6499
6500
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
6500
6501
|
|
6501
6502
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -6772,13 +6773,13 @@
|
|
6772
6773
|
</fo:table-cell>
|
6773
6774
|
</xsl:template> <!-- td -->
|
6774
6775
|
|
6775
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
|
6776
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
6776
6777
|
|
6777
6778
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
6778
6779
|
|
6779
6780
|
<xsl:call-template name="refine_table-note-style"/>
|
6780
6781
|
|
6781
|
-
<!-- Table's note name (NOTE, for example) -->
|
6782
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
6782
6783
|
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
6783
6784
|
|
6784
6785
|
<xsl:call-template name="refine_table-note-name-style"/>
|
@@ -6796,7 +6797,7 @@
|
|
6796
6797
|
|
6797
6798
|
</xsl:template> <!-- table/note -->
|
6798
6799
|
|
6799
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
|
6800
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
6800
6801
|
<xsl:apply-templates/>
|
6801
6802
|
</xsl:template>
|
6802
6803
|
|
@@ -7871,10 +7872,15 @@
|
|
7871
7872
|
<!-- ========================= -->
|
7872
7873
|
<xsl:template match="*[local-name()='em']">
|
7873
7874
|
<fo:inline font-style="italic">
|
7875
|
+
<xsl:call-template name="refine_italic_style"/>
|
7874
7876
|
<xsl:apply-templates/>
|
7875
7877
|
</fo:inline>
|
7876
7878
|
</xsl:template>
|
7877
7879
|
|
7880
|
+
<xsl:template name="refine_italic_style">
|
7881
|
+
|
7882
|
+
</xsl:template>
|
7883
|
+
|
7878
7884
|
<xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
7879
7885
|
<xsl:param name="split_keep-within-line"/>
|
7880
7886
|
<fo:inline font-weight="bold">
|
@@ -8357,7 +8363,10 @@
|
|
8357
8363
|
</xsl:choose>
|
8358
8364
|
</xsl:variable>
|
8359
8365
|
|
8360
|
-
|
8366
|
+
<!-- replace sequence #x200B and space TO space -->
|
8367
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
|
8368
|
+
|
8369
|
+
<xsl:value-of select="$text10"/>
|
8361
8370
|
</xsl:template>
|
8362
8371
|
|
8363
8372
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -9478,7 +9487,7 @@
|
|
9478
9487
|
<xsl:call-template name="insert_basic_link">
|
9479
9488
|
<xsl:with-param name="element">
|
9480
9489
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
9481
|
-
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://'))">
|
9490
|
+
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
9482
9491
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
9483
9492
|
</xsl:if>
|
9484
9493
|
<xsl:if test="parent::*[local-name() = 'add']">
|
@@ -11799,6 +11808,12 @@
|
|
11799
11808
|
|
11800
11809
|
</xsl:template>
|
11801
11810
|
|
11811
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
11812
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
11813
|
+
<xsl:apply-templates/>
|
11814
|
+
</fo:inline>
|
11815
|
+
</xsl:template>
|
11816
|
+
|
11802
11817
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
11803
11818
|
<xsl:param name="fo_element">block</xsl:param>
|
11804
11819
|
|
@@ -12376,6 +12391,9 @@
|
|
12376
12391
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
12377
12392
|
</xsl:choose>
|
12378
12393
|
</xsl:when>
|
12394
|
+
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
12395
|
+
<xsl:value-of select="@label"/>
|
12396
|
+
</xsl:when>
|
12379
12397
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
12380
12398
|
|
12381
12399
|
<!-- Example: for BSI <?list-start 2?> -->
|
@@ -12433,10 +12451,10 @@
|
|
12433
12451
|
<xsl:when test="$type = 'arabic'">
|
12434
12452
|
1.
|
12435
12453
|
</xsl:when>
|
12436
|
-
<xsl:when test="$type = 'alphabet'">
|
12454
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
12437
12455
|
a)
|
12438
12456
|
</xsl:when>
|
12439
|
-
<xsl:when test="$type = 'alphabet_upper'">
|
12457
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
12440
12458
|
A.
|
12441
12459
|
</xsl:when>
|
12442
12460
|
<xsl:when test="$type = 'roman'">
|
@@ -12578,7 +12596,7 @@
|
|
12578
12596
|
<xsl:call-template name="append_add-style"/>
|
12579
12597
|
</xsl:if>
|
12580
12598
|
|
12581
|
-
|
12599
|
+
<xsl:call-template name="getListItemFormat"/>
|
12582
12600
|
|
12583
12601
|
</fo:block>
|
12584
12602
|
</fo:list-item-label>
|
@@ -18,7 +18,9 @@ norm_with_refs_pref:
|
|
18
18
|
document (including any amendments) applies.
|
19
19
|
all_rights_reserved: All rights reserved
|
20
20
|
table_of_contents: Contents
|
21
|
-
source:
|
21
|
+
source: ""
|
22
|
+
adapted_from: "Adapted from: "
|
23
|
+
modified_from: "Modified from: "
|
22
24
|
note: "Note:"
|
23
25
|
prefacenote: "NOTE:"
|
24
26
|
listnote: "Note:"
|
@@ -41,7 +41,9 @@ norm_with_refs_pref:
|
|
41
41
|
Les documents suivants cités dans le texte sont indispensables pour l'application de ce document. Pour les références datées, seule l’édition citée s’applique. Pour les références non datées, la dernière édition du document de référence s’applique (y compris les éventuels amendements).
|
42
42
|
all_rights_reserved: Tous droits réservés
|
43
43
|
table_of_contents: Table des matières
|
44
|
-
source:
|
44
|
+
source: ""
|
45
|
+
adapted_from: "Adapté de: "
|
46
|
+
modified_from: "Modifié de: "
|
45
47
|
note: "Note:"
|
46
48
|
prefacenote: "NOTE:"
|
47
49
|
listnote: "Remarque:"
|
@@ -3639,7 +3639,7 @@
|
|
3639
3639
|
</xsl:attribute>
|
3640
3640
|
</xsl:for-each>
|
3641
3641
|
|
3642
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3642
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3643
3643
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3644
3644
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
3645
3645
|
</xsl:if>
|
@@ -3683,7 +3683,7 @@
|
|
3683
3683
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
3684
3684
|
</xsl:when>
|
3685
3685
|
<xsl:otherwise>
|
3686
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
3686
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
3687
3687
|
</xsl:otherwise>
|
3688
3688
|
</xsl:choose>
|
3689
3689
|
|
@@ -4216,7 +4216,7 @@
|
|
4216
4216
|
<xsl:param name="colwidths"/>
|
4217
4217
|
<xsl:param name="colgroup"/>
|
4218
4218
|
|
4219
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
4219
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
4220
4220
|
|
4221
4221
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
4222
4222
|
|
@@ -4289,6 +4289,7 @@
|
|
4289
4289
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
4290
4290
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
4291
4291
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
4292
|
+
<xsl:apply-templates select="../*[local-name()='example']"/>
|
4292
4293
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
4293
4294
|
|
4294
4295
|
<xsl:variable name="isDisplayRowSeparator">
|
@@ -4297,7 +4298,7 @@
|
|
4297
4298
|
|
4298
4299
|
<!-- horizontal row separator -->
|
4299
4300
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
4300
|
-
<xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
|
4301
|
+
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
4301
4302
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
4302
4303
|
|
4303
4304
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -4599,13 +4600,13 @@
|
|
4599
4600
|
</fo:table-cell>
|
4600
4601
|
</xsl:template> <!-- td -->
|
4601
4602
|
|
4602
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
|
4603
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
4603
4604
|
|
4604
4605
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
4605
4606
|
|
4606
4607
|
<xsl:call-template name="refine_table-note-style"/>
|
4607
4608
|
|
4608
|
-
<!-- Table's note name (NOTE, for example) -->
|
4609
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
4609
4610
|
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
4610
4611
|
|
4611
4612
|
<xsl:call-template name="refine_table-note-name-style"/>
|
@@ -4619,7 +4620,7 @@
|
|
4619
4620
|
|
4620
4621
|
</xsl:template> <!-- table/note -->
|
4621
4622
|
|
4622
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
|
4623
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
4623
4624
|
<xsl:apply-templates/>
|
4624
4625
|
</xsl:template>
|
4625
4626
|
|
@@ -5699,10 +5700,15 @@
|
|
5699
5700
|
<!-- ========================= -->
|
5700
5701
|
<xsl:template match="*[local-name()='em']">
|
5701
5702
|
<fo:inline font-style="italic">
|
5703
|
+
<xsl:call-template name="refine_italic_style"/>
|
5702
5704
|
<xsl:apply-templates/>
|
5703
5705
|
</fo:inline>
|
5704
5706
|
</xsl:template>
|
5705
5707
|
|
5708
|
+
<xsl:template name="refine_italic_style">
|
5709
|
+
|
5710
|
+
</xsl:template>
|
5711
|
+
|
5706
5712
|
<xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
5707
5713
|
<xsl:param name="split_keep-within-line"/>
|
5708
5714
|
<fo:inline font-weight="bold">
|
@@ -6188,7 +6194,10 @@
|
|
6188
6194
|
</xsl:choose>
|
6189
6195
|
</xsl:variable>
|
6190
6196
|
|
6191
|
-
|
6197
|
+
<!-- replace sequence #x200B and space TO space -->
|
6198
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
|
6199
|
+
|
6200
|
+
<xsl:value-of select="$text10"/>
|
6192
6201
|
</xsl:template>
|
6193
6202
|
|
6194
6203
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -7284,7 +7293,7 @@
|
|
7284
7293
|
<xsl:call-template name="insert_basic_link">
|
7285
7294
|
<xsl:with-param name="element">
|
7286
7295
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
7287
|
-
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://'))">
|
7296
|
+
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
7288
7297
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
7289
7298
|
</xsl:if>
|
7290
7299
|
<xsl:if test="parent::*[local-name() = 'add']">
|
@@ -9569,6 +9578,12 @@
|
|
9569
9578
|
|
9570
9579
|
</xsl:template>
|
9571
9580
|
|
9581
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
9582
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
9583
|
+
<xsl:apply-templates/>
|
9584
|
+
</fo:inline>
|
9585
|
+
</xsl:template>
|
9586
|
+
|
9572
9587
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
9573
9588
|
<xsl:param name="fo_element">block</xsl:param>
|
9574
9589
|
|
@@ -10153,6 +10168,9 @@
|
|
10153
10168
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
10154
10169
|
</xsl:choose>
|
10155
10170
|
</xsl:when>
|
10171
|
+
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
10172
|
+
<xsl:value-of select="@label"/>
|
10173
|
+
</xsl:when>
|
10156
10174
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
10157
10175
|
|
10158
10176
|
<!-- Example: for BSI <?list-start 2?> -->
|
@@ -10210,10 +10228,10 @@
|
|
10210
10228
|
<xsl:when test="$type = 'arabic'">
|
10211
10229
|
1.
|
10212
10230
|
</xsl:when>
|
10213
|
-
<xsl:when test="$type = 'alphabet'">
|
10231
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
10214
10232
|
a)
|
10215
10233
|
</xsl:when>
|
10216
|
-
<xsl:when test="$type = 'alphabet_upper'">
|
10234
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
10217
10235
|
A.
|
10218
10236
|
</xsl:when>
|
10219
10237
|
<xsl:when test="$type = 'roman'">
|
@@ -10353,7 +10371,7 @@
|
|
10353
10371
|
<xsl:call-template name="append_add-style"/>
|
10354
10372
|
</xsl:if>
|
10355
10373
|
|
10356
|
-
|
10374
|
+
<xsl:call-template name="getListItemFormat"/>
|
10357
10375
|
|
10358
10376
|
</fo:block>
|
10359
10377
|
</fo:list-item-label>
|
@@ -25,8 +25,7 @@ module IsoDoc
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def table1(elem)
|
28
|
-
|
29
|
-
|
28
|
+
labelled_ancestor(elem) || elem["unnumbered"] and return
|
30
29
|
n = @xrefs.anchor(elem["id"], :label, false)
|
31
30
|
prefix_name(elem, ".<tab/>",
|
32
31
|
l10n("#{@i18n.table.capitalize} #{n}"), "name")
|
@@ -41,9 +40,8 @@ module IsoDoc
|
|
41
40
|
end
|
42
41
|
|
43
42
|
def annex1(elem)
|
44
|
-
return super
|
45
|
-
|
46
|
-
|
43
|
+
@jcgm and return super
|
44
|
+
elem["unnumbered"] == "true" and return
|
47
45
|
lbl = @xrefs.anchor(elem["id"], :label)
|
48
46
|
t = elem.at(ns("./title")) and
|
49
47
|
t.children = "<strong>#{to_xml(t.children)}</strong>"
|
@@ -60,18 +58,15 @@ module IsoDoc
|
|
60
58
|
end
|
61
59
|
|
62
60
|
def clause1(elem)
|
63
|
-
elem.at(
|
61
|
+
elem.at("./ancestor::*[@unnumbered = 'true']") and
|
64
62
|
elem["unnumbered"] = "true"
|
65
|
-
|
66
63
|
super
|
67
64
|
end
|
68
65
|
|
69
66
|
def prefix_name(node, delim, number, elem)
|
70
|
-
|
71
|
-
|
67
|
+
number.nil? || number.empty? and return
|
72
68
|
unless name = node.at(ns("./#{elem}[not(@type = 'quoted')]"))
|
73
|
-
|
74
|
-
|
69
|
+
node.at(ns("./#{elem}[@type = 'quoted']")) and return
|
75
70
|
(node.children.empty? and node.add_child("<#{elem}></#{elem}>")) or
|
76
71
|
node.children.first.previous = "<#{elem}></#{elem}>"
|
77
72
|
name = node.children.first
|
@@ -118,14 +113,12 @@ module IsoDoc
|
|
118
113
|
end
|
119
114
|
|
120
115
|
def bibdata_titles(bibdata)
|
121
|
-
|
122
|
-
|
123
|
-
|
116
|
+
app = bibdata.at(ns("//bibdata/ext/" \
|
117
|
+
"structuredidentifier/part")) or return
|
124
118
|
bibdata.xpath(ns("//bibdata/title[@type = 'part']")).each do |t|
|
125
119
|
t.previous = t.dup
|
126
120
|
t["type"] = "part-with-numbering"
|
127
|
-
part = t["language"] == "en" ? "Part" : "Partie"
|
128
|
-
# not looking up in YAML
|
121
|
+
part = t["language"] == "en" ? "Part" : "Partie" # not looking up in YAML
|
129
122
|
t.children = l10n("#{part} #{app.text}: #{to_xml(t.children)}",
|
130
123
|
t["language"])
|
131
124
|
end
|
@@ -147,8 +140,7 @@ module IsoDoc
|
|
147
140
|
end
|
148
141
|
|
149
142
|
def jcgm_eref(docxml, xpath)
|
150
|
-
|
151
|
-
|
143
|
+
@jcgm or return
|
152
144
|
docxml.xpath(ns(xpath)).each { |x| extract_brackets(x) }
|
153
145
|
# merge adjacent text nodes
|
154
146
|
docxml.root.replace(Nokogiri::XML(docxml.root.to_xml).root)
|
@@ -164,7 +156,6 @@ module IsoDoc
|
|
164
156
|
start = node.at("./text()[1]")
|
165
157
|
finish = node.at("./text()[last()]")
|
166
158
|
(/^\[/.match?(start.text) && /\]$/.match?(finish.text)) or return
|
167
|
-
|
168
159
|
start.replace(start.text[1..-1])
|
169
160
|
node.previous = "["
|
170
161
|
finish = node.at("./text()[last()]")
|
@@ -181,8 +172,7 @@ module IsoDoc
|
|
181
172
|
|
182
173
|
# notes and remarques (list notes) are not numbered
|
183
174
|
def note1(elem)
|
184
|
-
|
185
|
-
|
175
|
+
elem.parent.name == "bibitem" || elem["notag"] == "true" and return
|
186
176
|
lbl = l10n(note_label(elem))
|
187
177
|
prefix_name(elem, "", lbl, "name")
|
188
178
|
end
|
@@ -191,29 +181,57 @@ module IsoDoc
|
|
191
181
|
if elem.ancestors("preface").empty?
|
192
182
|
if elem.ancestors("ul, ol, dl").empty?
|
193
183
|
@i18n.note
|
194
|
-
else
|
195
|
-
|
196
|
-
end
|
197
|
-
else
|
198
|
-
@i18n.prefacenote
|
184
|
+
else @i18n.listnote end
|
185
|
+
else @i18n.prefacenote
|
199
186
|
end
|
200
187
|
end
|
201
188
|
|
202
189
|
def termsource1(elem)
|
190
|
+
# elem["status"] == "modified" and return super
|
203
191
|
while elem&.next_element&.name == "termsource"
|
204
192
|
elem << "; #{to_xml(elem.next_element.remove.children)}"
|
205
193
|
end
|
206
|
-
elem.children = l10n("[#{
|
194
|
+
elem.children = l10n("[#{termsource_adapt(elem['status'])}" \
|
195
|
+
"#{to_xml(elem.children).strip}]")
|
196
|
+
end
|
197
|
+
|
198
|
+
def termsource_adapt(status)
|
199
|
+
case status
|
200
|
+
when "adapted" then @i18n.adapted_from
|
201
|
+
when "modified" then @i18n.modified_from
|
202
|
+
else ""
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
def termsource(docxml)
|
207
|
+
termsource_insert_empty_modification(docxml)
|
208
|
+
super
|
209
|
+
end
|
210
|
+
|
211
|
+
def termsource_insert_empty_modification(docxml)
|
212
|
+
docxml.xpath("//xmlns:termsource[@status = 'modified']" \
|
213
|
+
"[not(xmlns:modification)]").each do |f|
|
214
|
+
f << "<modification/>"
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
def termsource_modification(elem)
|
219
|
+
if elem["status"] == "modified"
|
220
|
+
origin = elem.at(ns("./origin"))
|
221
|
+
# s = termsource_status(elem["status"]) and origin.next = l10n(", #{s}")
|
222
|
+
end
|
223
|
+
termsource_add_modification_text(elem.at(ns("./modification")))
|
207
224
|
end
|
208
225
|
|
209
|
-
def norm_ref_entry_code(_ordinal, identifiers, _ids, _standard, datefn,
|
226
|
+
def norm_ref_entry_code(_ordinal, identifiers, _ids, _standard, datefn,
|
227
|
+
_bib)
|
210
228
|
ret = (identifiers[0] || identifiers[1])
|
211
229
|
ret += " #{identifiers[1]}" if identifiers[0] && identifiers[1]
|
212
230
|
"#{ret}#{datefn} "
|
213
231
|
end
|
214
232
|
|
215
|
-
def biblio_ref_entry_code(ordinal, ids, _id,
|
216
|
-
#standard and id = nil
|
233
|
+
def biblio_ref_entry_code(ordinal, ids, _id, _standard, datefn, _bib)
|
234
|
+
# standard and id = nil
|
217
235
|
ret = (ids[:ordinal] || ids[:metanorma] || "[#{ordinal}]")
|
218
236
|
if ids[:sdo]
|
219
237
|
ret = prefix_bracketed_ref(ret)
|
@@ -1012,6 +1012,7 @@
|
|
1012
1012
|
<ref name="del"/>
|
1013
1013
|
<ref name="span"/>
|
1014
1014
|
<ref name="erefstack"/>
|
1015
|
+
<ref name="date_inline"/>
|
1015
1016
|
</choice>
|
1016
1017
|
</define>
|
1017
1018
|
<define name="add">
|
@@ -1053,6 +1054,23 @@
|
|
1053
1054
|
</oneOrMore>
|
1054
1055
|
</element>
|
1055
1056
|
</define>
|
1057
|
+
<define name="date_inline">
|
1058
|
+
<element name="date">
|
1059
|
+
<attribute name="value"/>
|
1060
|
+
<optional>
|
1061
|
+
<attribute name="format"/>
|
1062
|
+
</optional>
|
1063
|
+
<optional>
|
1064
|
+
<attribute name="language"/>
|
1065
|
+
</optional>
|
1066
|
+
<optional>
|
1067
|
+
<attribute name="script"/>
|
1068
|
+
</optional>
|
1069
|
+
<optional>
|
1070
|
+
<attribute name="locale"/>
|
1071
|
+
</optional>
|
1072
|
+
</element>
|
1073
|
+
</define>
|
1056
1074
|
<define name="concept">
|
1057
1075
|
<element name="concept">
|
1058
1076
|
<optional>
|
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: 2.2.
|
4
|
+
version: 2.2.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05
|
11
|
+
date: 2023-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|