metanorma-iso 2.4.4 → 2.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/iso.amendment.xsl +23 -9
- data/lib/isodoc/iso/iso.international-standard.xsl +23 -9
- data/lib/isodoc/iso/presentation_xml_convert.rb +3 -3
- data/lib/isodoc/iso/presentation_xref.rb +0 -1
- data/lib/metanorma/iso/isodoc.rng +18 -0
- data/lib/metanorma/iso/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: 40db1f61265620f3837c8a58cae1a09c775299577c7bf1f0f1b411f907278b17
|
4
|
+
data.tar.gz: 81419fb035a102145e0b534cc51691f8438a9aae66c5902bace828af0502ba9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9189ed4bb35861bf6b3abe11358e50231bb7ec88282988cb14665648ad32e647753f74cf62489e6dc03e00c80753b241eaf5e9730926ac9b5906d06e6a5493d
|
7
|
+
data.tar.gz: 0adb0f893c42c6bbc19630079fff2a680b4429fc6bfd93d25a48bdc431f4fbb171fbc06c5cc6b35f8770950f5524cf6bb4ad898cc298774252ad5b82e8c13b87
|
@@ -284,6 +284,10 @@
|
|
284
284
|
<xsl:with-param name="root-style" select="$root-style"/>
|
285
285
|
</xsl:call-template>
|
286
286
|
|
287
|
+
<xsl:if test="/iso:iso-standard/iso:metanorma-extension/iso:presentation-metadata/iso:linenumbers = 'true'">
|
288
|
+
<xsl:processing-instruction name="add_line_numbers">true</xsl:processing-instruction>
|
289
|
+
</xsl:if>
|
290
|
+
|
287
291
|
<fo:layout-master-set>
|
288
292
|
|
289
293
|
<!-- cover page -->
|
@@ -4290,7 +4294,7 @@
|
|
4290
4294
|
</xsl:attribute>
|
4291
4295
|
</xsl:for-each>
|
4292
4296
|
|
4293
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
4297
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
4294
4298
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
4295
4299
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
4296
4300
|
</xsl:if>
|
@@ -4334,7 +4338,7 @@
|
|
4334
4338
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
4335
4339
|
</xsl:when>
|
4336
4340
|
<xsl:otherwise>
|
4337
|
-
<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 -->
|
4341
|
+
<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 -->
|
4338
4342
|
</xsl:otherwise>
|
4339
4343
|
</xsl:choose>
|
4340
4344
|
|
@@ -4881,7 +4885,7 @@
|
|
4881
4885
|
<xsl:param name="colwidths"/>
|
4882
4886
|
<xsl:param name="colgroup"/>
|
4883
4887
|
|
4884
|
-
<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']"/>
|
4888
|
+
<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']"/>
|
4885
4889
|
|
4886
4890
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
4887
4891
|
|
@@ -4954,6 +4958,7 @@
|
|
4954
4958
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
4955
4959
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
4956
4960
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
4961
|
+
<xsl:apply-templates select="../*[local-name()='example']"/>
|
4957
4962
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
4958
4963
|
|
4959
4964
|
<xsl:variable name="isDisplayRowSeparator">
|
@@ -4962,7 +4967,7 @@
|
|
4962
4967
|
|
4963
4968
|
<!-- horizontal row separator -->
|
4964
4969
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
4965
|
-
<xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
|
4970
|
+
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
4966
4971
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
4967
4972
|
|
4968
4973
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -5267,13 +5272,13 @@
|
|
5267
5272
|
</fo:table-cell>
|
5268
5273
|
</xsl:template> <!-- td -->
|
5269
5274
|
|
5270
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
|
5275
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
5271
5276
|
|
5272
5277
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
5273
5278
|
|
5274
5279
|
<xsl:call-template name="refine_table-note-style"/>
|
5275
5280
|
|
5276
|
-
<!-- Table's note name (NOTE, for example) -->
|
5281
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
5277
5282
|
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
5278
5283
|
|
5279
5284
|
<xsl:call-template name="refine_table-note-name-style"/>
|
@@ -5287,7 +5292,7 @@
|
|
5287
5292
|
|
5288
5293
|
</xsl:template> <!-- table/note -->
|
5289
5294
|
|
5290
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
|
5295
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
5291
5296
|
<xsl:apply-templates/>
|
5292
5297
|
</xsl:template>
|
5293
5298
|
|
@@ -10317,6 +10322,12 @@
|
|
10317
10322
|
|
10318
10323
|
</xsl:template>
|
10319
10324
|
|
10325
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
10326
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
10327
|
+
<xsl:apply-templates/>
|
10328
|
+
</fo:inline>
|
10329
|
+
</xsl:template>
|
10330
|
+
|
10320
10331
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
10321
10332
|
<xsl:param name="fo_element">block</xsl:param>
|
10322
10333
|
|
@@ -10891,6 +10902,9 @@
|
|
10891
10902
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
10892
10903
|
</xsl:choose>
|
10893
10904
|
</xsl:when>
|
10905
|
+
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
10906
|
+
<xsl:value-of select="@label"/>
|
10907
|
+
</xsl:when>
|
10894
10908
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
10895
10909
|
|
10896
10910
|
<!-- Example: for BSI <?list-start 2?> -->
|
@@ -10948,10 +10962,10 @@
|
|
10948
10962
|
<xsl:when test="$type = 'arabic'">
|
10949
10963
|
1)
|
10950
10964
|
</xsl:when>
|
10951
|
-
<xsl:when test="$type = 'alphabet'">
|
10965
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
10952
10966
|
a)
|
10953
10967
|
</xsl:when>
|
10954
|
-
<xsl:when test="$type = 'alphabet_upper'">
|
10968
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
10955
10969
|
A.
|
10956
10970
|
</xsl:when>
|
10957
10971
|
<xsl:when test="$type = 'roman'">
|
@@ -284,6 +284,10 @@
|
|
284
284
|
<xsl:with-param name="root-style" select="$root-style"/>
|
285
285
|
</xsl:call-template>
|
286
286
|
|
287
|
+
<xsl:if test="/iso:iso-standard/iso:metanorma-extension/iso:presentation-metadata/iso:linenumbers = 'true'">
|
288
|
+
<xsl:processing-instruction name="add_line_numbers">true</xsl:processing-instruction>
|
289
|
+
</xsl:if>
|
290
|
+
|
287
291
|
<fo:layout-master-set>
|
288
292
|
|
289
293
|
<!-- cover page -->
|
@@ -4290,7 +4294,7 @@
|
|
4290
4294
|
</xsl:attribute>
|
4291
4295
|
</xsl:for-each>
|
4292
4296
|
|
4293
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
4297
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
4294
4298
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
4295
4299
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
4296
4300
|
</xsl:if>
|
@@ -4334,7 +4338,7 @@
|
|
4334
4338
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
4335
4339
|
</xsl:when>
|
4336
4340
|
<xsl:otherwise>
|
4337
|
-
<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 -->
|
4341
|
+
<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 -->
|
4338
4342
|
</xsl:otherwise>
|
4339
4343
|
</xsl:choose>
|
4340
4344
|
|
@@ -4881,7 +4885,7 @@
|
|
4881
4885
|
<xsl:param name="colwidths"/>
|
4882
4886
|
<xsl:param name="colgroup"/>
|
4883
4887
|
|
4884
|
-
<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']"/>
|
4888
|
+
<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']"/>
|
4885
4889
|
|
4886
4890
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
4887
4891
|
|
@@ -4954,6 +4958,7 @@
|
|
4954
4958
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
4955
4959
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
4956
4960
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
4961
|
+
<xsl:apply-templates select="../*[local-name()='example']"/>
|
4957
4962
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
4958
4963
|
|
4959
4964
|
<xsl:variable name="isDisplayRowSeparator">
|
@@ -4962,7 +4967,7 @@
|
|
4962
4967
|
|
4963
4968
|
<!-- horizontal row separator -->
|
4964
4969
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
4965
|
-
<xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
|
4970
|
+
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
4966
4971
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
4967
4972
|
|
4968
4973
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -5267,13 +5272,13 @@
|
|
5267
5272
|
</fo:table-cell>
|
5268
5273
|
</xsl:template> <!-- td -->
|
5269
5274
|
|
5270
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
|
5275
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
5271
5276
|
|
5272
5277
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
5273
5278
|
|
5274
5279
|
<xsl:call-template name="refine_table-note-style"/>
|
5275
5280
|
|
5276
|
-
<!-- Table's note name (NOTE, for example) -->
|
5281
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
5277
5282
|
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
5278
5283
|
|
5279
5284
|
<xsl:call-template name="refine_table-note-name-style"/>
|
@@ -5287,7 +5292,7 @@
|
|
5287
5292
|
|
5288
5293
|
</xsl:template> <!-- table/note -->
|
5289
5294
|
|
5290
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
|
5295
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
5291
5296
|
<xsl:apply-templates/>
|
5292
5297
|
</xsl:template>
|
5293
5298
|
|
@@ -10317,6 +10322,12 @@
|
|
10317
10322
|
|
10318
10323
|
</xsl:template>
|
10319
10324
|
|
10325
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
10326
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
10327
|
+
<xsl:apply-templates/>
|
10328
|
+
</fo:inline>
|
10329
|
+
</xsl:template>
|
10330
|
+
|
10320
10331
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
10321
10332
|
<xsl:param name="fo_element">block</xsl:param>
|
10322
10333
|
|
@@ -10891,6 +10902,9 @@
|
|
10891
10902
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
10892
10903
|
</xsl:choose>
|
10893
10904
|
</xsl:when>
|
10905
|
+
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
10906
|
+
<xsl:value-of select="@label"/>
|
10907
|
+
</xsl:when>
|
10894
10908
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
10895
10909
|
|
10896
10910
|
<!-- Example: for BSI <?list-start 2?> -->
|
@@ -10948,10 +10962,10 @@
|
|
10948
10962
|
<xsl:when test="$type = 'arabic'">
|
10949
10963
|
1)
|
10950
10964
|
</xsl:when>
|
10951
|
-
<xsl:when test="$type = 'alphabet'">
|
10965
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
10952
10966
|
a)
|
10953
10967
|
</xsl:when>
|
10954
|
-
<xsl:when test="$type = 'alphabet_upper'">
|
10968
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
10955
10969
|
A.
|
10956
10970
|
</xsl:when>
|
10957
10971
|
<xsl:when test="$type = 'roman'">
|
@@ -105,9 +105,9 @@ module IsoDoc
|
|
105
105
|
def admonition1(elem)
|
106
106
|
super
|
107
107
|
n = elem.at(ns("./name")) or return
|
108
|
-
p = n.next_element
|
109
|
-
|
110
|
-
|
108
|
+
if (p = n.next_element) && p&.name == "p"
|
109
|
+
p.children.first.previous = admonition_name(to_xml(n.remove.children))
|
110
|
+
end
|
111
111
|
end
|
112
112
|
|
113
113
|
def admonition_name(xml)
|
@@ -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-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
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-standoc
|