metanorma-iec 2.5.5 → 2.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0def60c7fba66d712bd162183c4085c2ecda4ef3cf89b45f0c5bf45f7c591136
4
- data.tar.gz: 4f00862617ced725fd8a597a1defa7ef46e894b2cd451551ce61bd897efb1cba
3
+ metadata.gz: 2943a0d27f9b2a3dfc6f3075e9f09a5e98e2e3bff208fedecf134a79d8e62d77
4
+ data.tar.gz: c4d3c17e2d976295a1c43a099db21131d7234c08365145dc653e2d9483a8cee5
5
5
  SHA512:
6
- metadata.gz: 430e64c30a07c13fc4d66afa564a036013568928ad7e83a29d8c60802bfc0ad665bc3a4d9345ab1481d731da89a25f7993be87da1c99cfcf6a7609cf98b9fbd7
7
- data.tar.gz: d60935042f7e8d05196696dedea20260c3ec807994cca127a12e26c1662402aedf90b31755ee22b21624d2782ff1271450fc4397292fbb1984778a2a334322e3
6
+ metadata.gz: fdf68ccbd39985b4d01465b82e03a4c3e877ed2287f7b918e4003216d8985f65a0ac1225a453de0b9c28e99e129a4dbb5366c5c2c07d4e639556e6e324fcc440
7
+ data.tar.gz: 2bad112331aabedd8c60fce2052dd73edcacb707d1c84778d41ba1a735930a825795d77a4aaca9f6721ed8d7723659de3160bae06af4efb9084079f628b2b870
@@ -8,28 +8,27 @@ module IsoDoc
8
8
  # processed in foreword instead
9
9
  end
10
10
 
11
- def foreword(sect, out)
12
- out.div **attr_code(id: sect ? sect["id"] : "") do |s|
13
- s.h1(class: "ForewordTitle") { |h1| h1 << @i18n.foreword }
14
- sect&.elements&.each { |e| parse(e, s) unless e.name == "title" }
11
+ def foreword(clause, out)
12
+ out.div **attr_code(id: clause["id"]) do |s|
13
+ clause_name(nil, clause.at(ns("./title")), s,
14
+ { class: "ForewordTitle" })
15
+ clause.elements.each { |e| parse(e, s) unless e.name == "title" }
15
16
  end
16
17
  end
17
18
 
18
19
  def bibliography(node, out)
19
- return super unless @is_iev
20
+ @is_iev or return super
20
21
  end
21
22
 
22
23
  def biblio_list(elem, div, biblio)
23
- return super unless @is_iev
24
-
24
+ @is_iev or return super
25
25
  elem.children.each do |b|
26
26
  parse(b, div) unless %w(title bibitem).include? b.name
27
27
  end
28
28
  end
29
29
 
30
30
  def terms_parse(node, out)
31
- return super unless @is_iev
32
-
31
+ @is_iev or return super
33
32
  page_break(out)
34
33
  out.div **attr_code(id: node["id"]) do |div|
35
34
  depth = clause_title_depth(node, nil)
@@ -44,10 +43,6 @@ module IsoDoc
44
43
  end
45
44
  end
46
45
 
47
- def set_termdomain(termdomain)
48
- return super unless @is_iev
49
- end
50
-
51
46
  def para_class(node)
52
47
  case node["class"]
53
48
  when "zzSTDTitle1", "zzSTDTitle2" then "zzSTDTitle1"
@@ -5658,10 +5658,14 @@
5658
5658
  <xsl:variable name="fn_styles">
5659
5659
  <xsl:choose>
5660
5660
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
5661
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
5661
+ <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
5662
+
5663
+ </fn_styles>
5662
5664
  </xsl:when>
5663
5665
  <xsl:otherwise>
5664
- <fn_styles xsl:use-attribute-sets="fn-num-style"/>
5666
+ <fn_styles xsl:use-attribute-sets="fn-num-style">
5667
+
5668
+ </fn_styles>
5665
5669
  </xsl:otherwise>
5666
5670
  </xsl:choose>
5667
5671
  </xsl:variable>
@@ -5800,6 +5804,11 @@
5800
5804
 
5801
5805
  <xsl:value-of select="@reference"/>
5802
5806
 
5807
+ <!-- commented https://github.com/metanorma/isodoc/issues/614 -->
5808
+ <!-- <xsl:if test="$namespace = 'itu'">
5809
+ <xsl:text>)</xsl:text>
5810
+ </xsl:if> -->
5811
+
5803
5812
  </fo:inline>
5804
5813
  <fo:inline xsl:use-attribute-sets="table-fn-body-style">
5805
5814
  <xsl:copy-of select="./node()"/>
@@ -5809,7 +5818,7 @@
5809
5818
 
5810
5819
  </xsl:if>
5811
5820
  </xsl:for-each>
5812
- </xsl:template>
5821
+ </xsl:template> <!-- table_fn_display -->
5813
5822
 
5814
5823
  <xsl:template name="create_fn">
5815
5824
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -5837,8 +5846,10 @@
5837
5846
  <!-- EMD table's footnotes rendering -->
5838
5847
  <!-- ============================ -->
5839
5848
 
5849
+ <!-- ============================ -->
5840
5850
  <!-- figure's footnotes rendering -->
5841
- <xsl:template name="fn_display_figure">
5851
+ <!-- ============================ -->
5852
+ <xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
5842
5853
 
5843
5854
  <!-- current figure id -->
5844
5855
  <xsl:variable name="figure_id_">
@@ -5951,9 +5962,30 @@
5951
5962
 
5952
5963
  </fo:block>
5953
5964
  </xsl:if>
5954
-
5955
5965
  </xsl:template> <!-- fn_display_figure -->
5956
5966
 
5967
+ <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
5968
+ <!-- figure's footnote label -->
5969
+ <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
5970
+ <xsl:variable name="key_iso">
5971
+ true
5972
+ </xsl:variable>
5973
+ <xsl:if test="normalize-space($key_iso) = 'true'">
5974
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
5975
+
5976
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
5977
+
5978
+ </xsl:if>
5979
+ <fo:inline xsl:use-attribute-sets="figure-fn-number-style"> <!-- id="{@id}" -->
5980
+ <!-- <xsl:value-of select="@reference"/> -->
5981
+ <xsl:apply-templates/>
5982
+ </fo:inline>
5983
+ </xsl:template>
5984
+
5985
+ <!-- ============================ -->
5986
+ <!-- END: figure's footnotes rendering -->
5987
+ <!-- ============================ -->
5988
+
5957
5989
  <!-- fn reference in the text rendering (for instance, 'some text 1) some text' ) -->
5958
5990
  <xsl:template match="*[local-name()='fn']">
5959
5991
  <fo:inline xsl:use-attribute-sets="fn-reference-style">
@@ -5969,6 +6001,10 @@
5969
6001
 
5970
6002
  <xsl:value-of select="@reference"/>
5971
6003
 
6004
+ <!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
6005
+ <!-- <xsl:if test="$namespace = 'jis'">
6006
+ <fo:inline font-weight="normal">)</fo:inline>
6007
+ </xsl:if> -->
5972
6008
  </fo:basic-link>
5973
6009
  </fo:inline>
5974
6010
  </xsl:template>
@@ -6100,17 +6136,22 @@
6100
6136
  </fo:block>
6101
6137
  </xsl:when> <!-- END: a few components -->
6102
6138
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
6103
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
6139
+ <!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
6140
+ <xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
6104
6141
 
6105
- <xsl:call-template name="refine_figure_key_style"/>
6142
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
6106
6143
 
6107
- <xsl:variable name="title-key">
6108
- <xsl:call-template name="getLocalizedString">
6109
- <xsl:with-param name="key">key</xsl:with-param>
6110
- </xsl:call-template>
6111
- </xsl:variable>
6112
- <xsl:value-of select="$title-key"/>
6113
- </fo:block>
6144
+ <xsl:call-template name="refine_figure_key_style"/>
6145
+
6146
+ <xsl:variable name="title-key">
6147
+ <xsl:call-template name="getLocalizedString">
6148
+ <xsl:with-param name="key">key</xsl:with-param>
6149
+ </xsl:call-template>
6150
+ </xsl:variable>
6151
+ <xsl:value-of select="$title-key"/>
6152
+ </fo:block>
6153
+
6154
+ </xsl:if>
6114
6155
  </xsl:when> <!-- END: definition list in a figure -->
6115
6156
  </xsl:choose>
6116
6157
 
@@ -6298,6 +6339,14 @@
6298
6339
 
6299
6340
  </xsl:template> <!-- END: dl -->
6300
6341
 
6342
+ <!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
6343
+ <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
6344
+ <fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
6345
+ <xsl:call-template name="refine_figure_key_style"/>
6346
+ <xsl:apply-templates/>
6347
+ </fo:block>
6348
+ </xsl:template>
6349
+
6301
6350
  <xsl:template name="refine_dl_formula_where_style">
6302
6351
 
6303
6352
  <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
@@ -8406,6 +8455,39 @@
8406
8455
  </xsl:copy>
8407
8456
  </xsl:template>
8408
8457
 
8458
+ <xsl:template match="@*|node()" mode="mathml_linebreak">
8459
+ <xsl:copy>
8460
+ <xsl:apply-templates select="@*|node()" mode="mathml_linebreak"/>
8461
+ </xsl:copy>
8462
+ </xsl:template>
8463
+
8464
+ <!-- split math into two math -->
8465
+ <xsl:template match="mathml:mo[@linebreak] | mathml:mspace[@linebreak]" mode="mathml_linebreak">
8466
+ <xsl:variable name="math_elements_tree_">
8467
+ <xsl:for-each select="ancestor::*[ancestor-or-self::mathml:math]">
8468
+ <element pos="{position()}">
8469
+ <xsl:copy-of select="@*[local-name() != 'id']"/>
8470
+ <xsl:value-of select="name()"/>
8471
+ </element>
8472
+ </xsl:for-each>
8473
+ </xsl:variable>
8474
+
8475
+ <xsl:variable name="math_elements_tree" select="xalan:nodeset($math_elements_tree_)"/>
8476
+
8477
+ <xsl:call-template name="insertClosingElements">
8478
+ <xsl:with-param name="tree" select="$math_elements_tree"/>
8479
+ </xsl:call-template>
8480
+
8481
+ <xsl:element name="br" namespace="{$namespace_full}"/>
8482
+
8483
+ <xsl:call-template name="insertOpeningElements">
8484
+ <xsl:with-param name="tree" select="$math_elements_tree"/>
8485
+ <xsl:with-param name="xmlns">http://www.w3.org/1998/Math/MathML</xsl:with-param>
8486
+ <xsl:with-param name="add_continue">false</xsl:with-param>
8487
+ </xsl:call-template>
8488
+
8489
+ </xsl:template>
8490
+
8409
8491
  <!-- Examples:
8410
8492
  <stem type="AsciiMath">x = 1</stem>
8411
8493
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -8607,6 +8689,7 @@
8607
8689
  <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
8608
8690
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8609
8691
  </xsl:if>
8692
+
8610
8693
  <xsl:if test="parent::*[local-name() = 'add']">
8611
8694
  <xsl:call-template name="append_add-style"/>
8612
8695
  </xsl:if>
@@ -8656,9 +8739,11 @@
8656
8739
  </xsl:template>
8657
8740
 
8658
8741
  <xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"> <!-- show in 'stem' template -->
8742
+ <!-- https://github.com/metanorma/isodoc/issues/607
8659
8743
  <xsl:if test="normalize-space() != ''">
8660
- <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
8661
- </xsl:if>
8744
+ <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
8745
+ </xsl:if> -->
8746
+ <xsl:apply-templates/>
8662
8747
  </xsl:template>
8663
8748
 
8664
8749
  <!-- stem inside formula with name (with formula's number) -->
@@ -8715,44 +8800,44 @@
8715
8800
 
8716
8801
  <xsl:template match="*[local-name() = 'note']" name="note">
8717
8802
 
8718
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8803
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8719
8804
 
8720
- <xsl:call-template name="setBlockSpanAll"/>
8805
+ <xsl:call-template name="setBlockSpanAll"/>
8721
8806
 
8722
- <xsl:call-template name="refine_note-style"/>
8807
+ <xsl:call-template name="refine_note-style"/>
8723
8808
 
8724
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8809
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8725
8810
 
8726
- <fo:block>
8811
+ <fo:block>
8727
8812
 
8728
- <xsl:call-template name="refine_note_block_style"/>
8813
+ <xsl:call-template name="refine_note_block_style"/>
8729
8814
 
8730
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8815
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8731
8816
 
8732
- <xsl:call-template name="refine_note-name-style"/>
8817
+ <xsl:call-template name="refine_note-name-style"/>
8733
8818
 
8734
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8735
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8736
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8737
- <xsl:call-template name="append_add-style"/>
8738
- </xsl:if>
8819
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8820
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8821
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8822
+ <xsl:call-template name="append_add-style"/>
8823
+ </xsl:if>
8739
8824
 
8740
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8741
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8742
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8743
- <xsl:with-param name="skip">false</xsl:with-param>
8744
- </xsl:apply-templates>
8745
- </xsl:if>
8825
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8826
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8827
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8828
+ <xsl:with-param name="skip">false</xsl:with-param>
8829
+ </xsl:apply-templates>
8830
+ </xsl:if>
8746
8831
 
8747
- <xsl:apply-templates select="*[local-name() = 'name']"/>
8832
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8748
8833
 
8749
- </fo:inline>
8834
+ </fo:inline>
8750
8835
 
8751
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8752
- </fo:block>
8836
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8837
+ </fo:block>
8753
8838
 
8754
- </fo:block-container>
8755
- </fo:block-container>
8839
+ </fo:block-container>
8840
+ </fo:block-container>
8756
8841
 
8757
8842
  </xsl:template>
8758
8843
 
@@ -8814,6 +8899,17 @@
8814
8899
  </xsl:when>
8815
8900
  <xsl:otherwise>
8816
8901
 
8902
+ <!-- https://github.com/metanorma/isodoc/issues/607 -->
8903
+ <!-- <xsl:if test="$namespace = 'ieee'">
8904
+ <xsl:text>—</xsl:text> em dash &#x2014;
8905
+ </xsl:if> -->
8906
+ <!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
8907
+ <xsl:text>:</xsl:text>
8908
+ </xsl:if> -->
8909
+
8910
+ <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
8911
+ <xsl:text> – </xsl:text> en dash &#x2013;
8912
+ </xsl:if> -->
8817
8913
  </xsl:otherwise>
8818
8914
  </xsl:choose>
8819
8915
  </xsl:variable>
@@ -8832,8 +8928,16 @@
8832
8928
  </xsl:when>
8833
8929
  <xsl:otherwise>
8834
8930
 
8931
+ <!-- https://github.com/metanorma/isodoc/issues/607 -->
8932
+ <!-- <xsl:if test="$namespace = 'ieee'">
8933
+ <xsl:text>—</xsl:text> em dash &#x2014;
8934
+ </xsl:if> -->
8935
+ <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' or $namespace = 'rsd' or $namespace = 'jcgm'">
8835
8936
  <xsl:text>:</xsl:text>
8836
-
8937
+ </xsl:if> -->
8938
+ <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'unece-rec' or $namespace = 'unece'">
8939
+ <xsl:text> – </xsl:text> en dash &#x2013;
8940
+ </xsl:if> -->
8837
8941
  </xsl:otherwise>
8838
8942
  </xsl:choose>
8839
8943
  </xsl:variable>
@@ -11014,7 +11118,7 @@
11014
11118
  <xsl:if test="normalize-space() != ''">
11015
11119
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
11016
11120
  <xsl:call-template name="refine_termexample-name-style"/>
11017
- <xsl:apply-templates/>
11121
+ <xsl:apply-templates/> <!-- commented $namespace = 'ieee', https://github.com/metanorma/isodoc/issues/614-->
11018
11122
  </fo:inline>
11019
11123
  </xsl:if>
11020
11124
  </xsl:template>
@@ -11175,13 +11279,14 @@
11175
11279
  </xsl:when>
11176
11280
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
11177
11281
  <fo:block xsl:use-attribute-sets="example-name-style">
11282
+
11178
11283
  <xsl:apply-templates/>
11179
11284
  </fo:block>
11180
11285
  </xsl:when>
11181
11286
  <xsl:otherwise>
11182
11287
  <fo:inline xsl:use-attribute-sets="example-name-style">
11183
11288
  <xsl:call-template name="refine_example-name-style"/>
11184
- <xsl:apply-templates/>
11289
+ <xsl:apply-templates/> <!-- $namespace = 'ieee', see https://github.com/metanorma/isodoc/issues/614 -->
11185
11290
  </fo:inline>
11186
11291
  </xsl:otherwise>
11187
11292
  </xsl:choose>
@@ -11190,6 +11295,7 @@
11190
11295
 
11191
11296
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
11192
11297
  <fo:inline xsl:use-attribute-sets="example-name-style">
11298
+
11193
11299
  <xsl:apply-templates/>
11194
11300
  </fo:inline>
11195
11301
  </xsl:template>
@@ -11362,15 +11468,17 @@
11362
11468
 
11363
11469
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11364
11470
  <fo:block role="BlockQuote">
11365
- <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
11471
+ <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source') and not(local-name() = 'attribution')]"/> <!-- process all nested nodes, except author and source -->
11366
11472
  </fo:block>
11367
11473
  </fo:block-container>
11368
11474
  </fo:block-container>
11369
- <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
11475
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source'] or *[local-name() = 'attribution']">
11370
11476
  <fo:block xsl:use-attribute-sets="quote-source-style">
11371
11477
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
11372
11478
  <xsl:apply-templates select="*[local-name() = 'author']"/>
11373
11479
  <xsl:apply-templates select="*[local-name() = 'source']"/>
11480
+ <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
11481
+ <xsl:apply-templates select="*[local-name() = 'attribution']/*[local-name() = 'p']/node()"/>
11374
11482
  </fo:block>
11375
11483
  </xsl:if>
11376
11484
 
@@ -11392,9 +11500,13 @@
11392
11500
  </xsl:template>
11393
11501
 
11394
11502
  <xsl:template match="*[local-name() = 'author']">
11395
- <xsl:text>— </xsl:text>
11503
+ <xsl:if test="local-name(..) = 'quote'"> <!-- for old Presentation XML, https://github.com/metanorma/isodoc/issues/607 -->
11504
+ <xsl:text>— </xsl:text>
11505
+ </xsl:if>
11396
11506
  <xsl:apply-templates/>
11397
11507
  </xsl:template>
11508
+
11509
+ <xsl:template match="*[local-name() = 'quote']//*[local-name() = 'referenceFrom']"/>
11398
11510
  <!-- ====== -->
11399
11511
  <!-- ====== -->
11400
11512
 
@@ -11564,20 +11676,26 @@
11564
11676
 
11565
11677
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
11566
11678
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
11679
+
11567
11680
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
11568
11681
  </fo:block>
11569
11682
  </xsl:if>
11570
11683
 
11571
11684
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
11572
11685
  <xsl:call-template name="setStyle_preferred"/>
11686
+
11573
11687
  <xsl:apply-templates/>
11574
11688
  </fo:block>
11575
11689
  </fo:block>
11576
11690
  </xsl:template>
11577
11691
 
11578
11692
  <xsl:template match="*[local-name() = 'domain']">
11693
+ <!-- https://github.com/metanorma/isodoc/issues/607
11579
11694
  <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
11580
- <xsl:text> </xsl:text>
11695
+ <xsl:text> </xsl:text> -->
11696
+ <xsl:if test="not(@hidden = 'true')">
11697
+ <xsl:apply-templates/>
11698
+ </xsl:if>
11581
11699
  </xsl:template>
11582
11700
 
11583
11701
  <xsl:template match="*[local-name() = 'admitted']">
@@ -11625,6 +11743,29 @@
11625
11743
  <!-- END definition -->
11626
11744
  <!-- ========== -->
11627
11745
 
11746
+ <xsl:variable name="reviews_">
11747
+ <xsl:for-each select="//*[local-name() = 'review'][@from]">
11748
+ <xsl:copy>
11749
+ <xsl:copy-of select="@from"/>
11750
+ <xsl:copy-of select="@id"/>
11751
+ </xsl:copy>
11752
+ </xsl:for-each>
11753
+ </xsl:variable>
11754
+ <xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
11755
+
11756
+ <xsl:template name="addReviewHelper">
11757
+ <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
11758
+ <xsl:variable name="curr_id" select="@id"/>
11759
+ <xsl:variable name="review_id" select="normalize-space($reviews//*[local-name() = 'review'][@from = $curr_id]/@id)"/>
11760
+ <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
11761
+ <fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
11762
+ </xsl:if>
11763
+ <!-- <fo:block>
11764
+ <curr_id><xsl:value-of select="$curr_id"/></curr_id>
11765
+ <xsl:copy-of select="$reviews"/>
11766
+ </fo:block> -->
11767
+ </xsl:template>
11768
+
11628
11769
  <!-- main sections -->
11629
11770
  <xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
11630
11771
 
@@ -11633,6 +11774,8 @@
11633
11774
 
11634
11775
  <xsl:call-template name="sections_element_style"/>
11635
11776
 
11777
+ <xsl:call-template name="addReviewHelper"/>
11778
+
11636
11779
  <xsl:apply-templates/>
11637
11780
  </fo:block>
11638
11781
 
@@ -11668,6 +11811,7 @@
11668
11811
 
11669
11812
  <fo:block>
11670
11813
  <xsl:call-template name="setId"/>
11814
+ <xsl:call-template name="addReviewHelper"/>
11671
11815
  <xsl:apply-templates/>
11672
11816
  </fo:block>
11673
11817
  </xsl:template>
@@ -11704,6 +11848,8 @@
11704
11848
 
11705
11849
  <xsl:call-template name="refine_clause_style"/>
11706
11850
 
11851
+ <xsl:call-template name="addReviewHelper"/>
11852
+
11707
11853
  <xsl:apply-templates/>
11708
11854
  </fo:block>
11709
11855
  </xsl:template>
@@ -11756,6 +11902,23 @@
11756
11902
 
11757
11903
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
11758
11904
 
11905
+ <xsl:if test="1 = 1">
11906
+ <xsl:choose>
11907
+ <!-- if there isn't the attribute '@from', then -->
11908
+ <xsl:when test="$id_from = ''">
11909
+ <fo:block id="{@id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
11910
+ </xsl:when>
11911
+ <!-- if there isn't element with id 'from', then create 'bookmark' here -->
11912
+ <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
11913
+ <fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
11914
+ </xsl:when>
11915
+ <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
11916
+ <fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
11917
+ </xsl:when>
11918
+ </xsl:choose>
11919
+ </xsl:if>
11920
+
11921
+ <xsl:if test="1 = 2">
11759
11922
  <xsl:choose>
11760
11923
  <!-- if there isn't the attribute '@from', then -->
11761
11924
  <xsl:when test="$id_from = ''">
@@ -11769,6 +11932,7 @@
11769
11932
  <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
11770
11933
  </xsl:when>
11771
11934
  </xsl:choose>
11935
+ </xsl:if>
11772
11936
 
11773
11937
  </xsl:template>
11774
11938
 
@@ -13138,7 +13302,7 @@
13138
13302
  <!-- remove preprocess-xslt -->
13139
13303
  <xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
13140
13304
 
13141
- <xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image'] | *[local-name() = 'sourcecode'] | *[local-name() = 'bibdata'] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
13305
+ <xsl:template match="*[local-name() = 'stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])] | *[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
13142
13306
  <xsl:copy-of select="."/>
13143
13307
  </xsl:template>
13144
13308
 
@@ -13204,6 +13368,22 @@
13204
13368
  </xsl:choose>
13205
13369
  </xsl:template>
13206
13370
 
13371
+ <xsl:variable name="regex_passthrough">.*\bpdf\b.*</xsl:variable>
13372
+ <xsl:template match="*[local-name() = 'passthrough']" mode="update_xml_step1">
13373
+ <!-- <xsl:if test="contains(@formats, ' pdf ')"> -->
13374
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@formats), $regex_passthrough)) = 'true'">
13375
+ <xsl:apply-templates mode="update_xml_step1"/>
13376
+ </xsl:if>
13377
+ </xsl:template>
13378
+
13379
+ <!-- split math by element with @linebreak into maths -->
13380
+ <xsl:template match="mathml:math[.//mathml:mo[@linebreak] or .//mathml:mspace[@linebreak]]" mode="update_xml_step1">
13381
+ <xsl:variable name="maths">
13382
+ <xsl:apply-templates select="." mode="mathml_linebreak"/>
13383
+ </xsl:variable>
13384
+ <xsl:copy-of select="$maths"/>
13385
+ </xsl:template>
13386
+
13207
13387
  <!-- =========================================================================== -->
13208
13388
  <!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
13209
13389
  <!-- =========================================================================== -->
@@ -13307,6 +13487,8 @@
13307
13487
 
13308
13488
  <xsl:template name="insertOpeningElements">
13309
13489
  <xsl:param name="tree"/>
13490
+ <xsl:param name="xmlns"/>
13491
+ <xsl:param name="add_continue">true</xsl:param>
13310
13492
  <xsl:for-each select="$tree//element">
13311
13493
  <xsl:text disable-output-escaping="yes">&lt;</xsl:text>
13312
13494
  <xsl:value-of select="."/>
@@ -13317,7 +13499,8 @@
13317
13499
  <xsl:value-of select="."/>
13318
13500
  <xsl:text>"</xsl:text>
13319
13501
  </xsl:for-each>
13320
- <xsl:if test="position() = 1"> continue="true"</xsl:if>
13502
+ <xsl:if test="position() = 1 and $add_continue = 'true'"> continue="true"</xsl:if>
13503
+ <xsl:if test="position() = 1 and $xmlns != ''"> xmlns="<xsl:value-of select="$xmlns"/>"</xsl:if>
13321
13504
  <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
13322
13505
  <xsl:if test="$debug = 'true'">
13323
13506
  <xsl:message>&lt;<xsl:value-of select="."/>&gt;</xsl:message>
@@ -14527,9 +14710,10 @@
14527
14710
  <xsl:template name="insertBackgroundPageImage">
14528
14711
  <xsl:param name="number">1</xsl:param>
14529
14712
  <xsl:param name="name">coverpage-image</xsl:param>
14713
+ <xsl:param name="suffix"/>
14530
14714
  <xsl:variable name="num" select="number($number)"/>
14531
14715
  <!-- background image -->
14532
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage_{$name}_{$number}_{generate-id()}">
14716
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
14533
14717
  <fo:block>
14534
14718
  <xsl:for-each select="/*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
14535
14719
  <xsl:choose>
@@ -14595,16 +14779,29 @@
14595
14779
 
14596
14780
  <!-- END: insert cover page image -->
14597
14781
 
14782
+ <xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
14598
14783
  <xsl:template name="insertVerticalChar">
14599
14784
  <xsl:param name="str"/>
14785
+ <xsl:param name="writing-mode">lr-tb</xsl:param>
14786
+ <xsl:param name="reference-orientation">90</xsl:param>
14600
14787
  <xsl:if test="string-length($str) &gt; 0">
14601
- <fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
14788
+ <fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
14789
+ <xsl:if test="normalize-space($writing-mode) != ''">
14790
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
14791
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
14792
+ </xsl:if>
14793
+ <xsl:variable name="char" select="substring($str,1,1)"/>
14794
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
14795
+ <xsl:attribute name="reference-orientation">0</xsl:attribute>
14796
+ </xsl:if>
14602
14797
  <fo:block-container width="1em">
14603
- <fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
14798
+ <fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
14604
14799
  </fo:block-container>
14605
14800
  </fo:inline-container>
14606
14801
  <xsl:call-template name="insertVerticalChar">
14607
14802
  <xsl:with-param name="str" select="substring($str, 2)"/>
14803
+ <xsl:with-param name="writing-mode" select="$writing-mode"/>
14804
+ <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
14608
14805
  </xsl:call-template>
14609
14806
  </xsl:if>
14610
14807
  </xsl:template>
@@ -11,9 +11,8 @@ module IsoDoc
11
11
  end
12
12
 
13
13
  def xref_init(lang, script, _klass, labels, options)
14
- @xrefs = Xref.new(lang, script,
15
- HtmlConvert.new(language: lang, script: script),
16
- labels, options)
14
+ p = HtmlConvert.new(language: lang, script: script)
15
+ @xrefs = Xref.new(lang, script, p, labels, options)
17
16
  end
18
17
 
19
18
  def i18n_init(lang, script, locale, i18nyaml = nil)
@@ -20,25 +20,25 @@ module IsoDoc
20
20
  set(:revdate, revdate&.text)
21
21
  end
22
22
 
23
- def doctype(isoxml, _out)
23
+ def doctype(xml, _out)
24
24
  super
25
- b = isoxml&.at(ns("//bibdata/ext/doctype#{NOLANG}"))&.text
26
- b1 = isoxml&.at(ns("//bibdata/ext/doctype[@language = 'en']"))&.text || b
25
+ b = xml.at(ns("//bibdata/ext/doctype#{NOLANG}"))&.text
26
+ b1 = xml.at(ns("//bibdata/ext/doctype[@language = 'en']"))&.text || b
27
27
  b1 and set(:doctype_en, status_print(b1))
28
- b1 = isoxml&.at(ns("//bibdata/ext/doctype[@language = 'fr']"))&.text || b
28
+ b1 = xml.at(ns("//bibdata/ext/doctype[@language = 'fr']"))&.text || b
29
29
  b1 and set(:doctype_fr, status_print(b1))
30
- docfunction(isoxml)
31
- dochorizontal(isoxml)
30
+ docfunction(xml)
31
+ dochorizontal(xml)
32
32
  end
33
33
 
34
- def docfunction(isoxml)
35
- b = isoxml&.at(ns("//bibdata/ext/function#{NOLANG}"))&.text || return
34
+ def docfunction(xml)
35
+ b = xml.at(ns("//bibdata/ext/function#{NOLANG}"))&.text || return
36
36
  b and set(:function, status_print(b))
37
- b1 = isoxml&.at(ns("//bibdata/ext/function#{currlang}"))&.text || b
37
+ b1 = xml.at(ns("//bibdata/ext/function#{currlang}"))&.text || b
38
38
  b1 and set(:function_display, status_print(b1))
39
- b1 = isoxml&.at(ns("//bibdata/ext/function[@language = 'en']"))&.text || b
39
+ b1 = xml.at(ns("//bibdata/ext/function[@language = 'en']"))&.text || b
40
40
  b1 and set(:function_en, status_print(b1))
41
- b1 = isoxml&.at(ns("//bibdata/ext/function[@language = 'fr']"))&.text || b
41
+ b1 = xml.at(ns("//bibdata/ext/function[@language = 'fr']"))&.text || b
42
42
  b1 and set(:function_fr, status_print(b1))
43
43
  end
44
44
 
@@ -54,7 +54,7 @@ module IsoDoc
54
54
  end
55
55
 
56
56
  def unpublished(status)
57
- status.to_i > 0 && status.to_i < 60
57
+ status.to_i.positive? && status.to_i < 60
58
58
  end
59
59
  end
60
60
  end
@@ -38,6 +38,14 @@ module IsoDoc
38
38
  merge_fr_into_en_term(docxml)
39
39
  end
40
40
 
41
+ def termdomain(elem)
42
+ if @is_iev
43
+ d = elem.at(ns("./domain")) or return
44
+ d["hidden"] = true
45
+ else super
46
+ end
47
+ end
48
+
41
49
  def merge_fr_into_en_term(docxml)
42
50
  @is_iev or return
43
51
  docxml.xpath(ns("//term[@language = 'en'][@tag]")).each do |en|
@@ -119,13 +127,13 @@ module IsoDoc
119
127
 
120
128
  def move_related(term)
121
129
  defn = term.at(ns("./definition")) or return
122
- term.xpath(ns("./related")).reverse.each do |r|
130
+ term.xpath(ns("./related")).reverse_each do |r|
123
131
  defn.next = r.remove
124
132
  end
125
133
  end
126
134
 
127
135
  def related1(node)
128
- lg = node&.at("./ancestor::xmlns:term/@language")&.text
136
+ lg = node.at("./ancestor::xmlns:term/@language")&.text
129
137
  @i18n = @i18n_lg[lg] if lg && @i18n_lg[lg]
130
138
  p = node.at(ns("./preferred"))
131
139
  ref = node.at(ns("./xref | ./eref | ./termref"))
@@ -171,14 +179,15 @@ module IsoDoc
171
179
  @i18n = @i18n_lg["default"]
172
180
  end
173
181
 
174
- def termnote1(elem)
182
+ def termnote_label(elem)
175
183
  lg = elem&.at("./ancestor::xmlns:term/@language")&.text
176
184
  @i18n = @i18n_lg[lg] if lg && @i18n_lg[lg]
177
185
 
178
186
  val = @xrefs.anchor(elem["id"], :value) || "???"
179
187
  lbl = @i18n.termnote.gsub("%", val)
180
- prefix_name(elem, "", lower2cap(lbl), "name")
188
+ ret = @i18n.l10n "#{lbl}#{termnote_delim(elem)}"
181
189
  @i18n = @i18n_lg["default"]
190
+ ret
182
191
  end
183
192
  end
184
193
  end
@@ -118,7 +118,7 @@ module IsoDoc
118
118
  <p class='zzSTDTitle2'><strong>#{title2}</strong><p>
119
119
  TITLE
120
120
  ret += "<p class='zzSTDTitle1'>&#xa0;</p>"
121
- s.children.first.previous = ret
121
+ s.add_first_child ret
122
122
  end
123
123
 
124
124
  include Init
@@ -218,7 +218,7 @@ module IsoDoc
218
218
  parse(node.at(ns("./stem")), div)
219
219
  if lbl = node&.at(ns("./name"))&.text
220
220
  insert_tab(div, 1)
221
- div << "(#{lbl})"
221
+ div << lbl
222
222
  end
223
223
  end
224
224
  end
@@ -10,7 +10,7 @@ module IsoDoc
10
10
  end
11
11
 
12
12
  def introduction_names(clause)
13
- return super unless @is_iev
13
+ super unless @is_iev
14
14
  end
15
15
 
16
16
  def initial_anchor_names(docxml)
@@ -1783,9 +1783,21 @@ that the `number` given for the series applies to the second iteration of number
1783
1783
  May be used to differentiate rendering of notes in bibliographies</a:documentation>
1784
1784
  </attribute>
1785
1785
  </optional>
1786
- <ref name="LocalizedMarkedUpString">
1786
+ <ref name="LocalizedStringAttributes">
1787
1787
  <a:documentation>The content of the note</a:documentation>
1788
1788
  </ref>
1789
+ <choice>
1790
+ <oneOrMore>
1791
+ <ref name="BasicBlockNoId">
1792
+ <a:documentation>Multiple blocks of content</a:documentation>
1793
+ </ref>
1794
+ </oneOrMore>
1795
+ <oneOrMore>
1796
+ <ref name="TextElement">
1797
+ <a:documentation>Single block of content</a:documentation>
1798
+ </ref>
1799
+ </oneOrMore>
1800
+ </choice>
1789
1801
  </element>
1790
1802
  </define>
1791
1803
  <define name="bibabstract">
@@ -166,7 +166,6 @@ module Metanorma
166
166
  super
167
167
  a = node.attr("accessibility-color-inside") and
168
168
  xml.accessibility_color_inside a
169
- a = node.attr("price-code") and xml.price_code a
170
169
  a = node.attr("cen-processing") and xml.cen_processing a
171
170
  a = node.attr("secretary") and xml.secretary a
172
171
  a = node.attr("interest-to-committees") and xml.interest_to_committees a
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.3.4 -->
20
+ <!-- VERSION v1.4.0 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -326,7 +326,7 @@ normative or informative references, some split references into sections organiz
326
326
  <a:documentation>Content of note</a:documentation>
327
327
  <oneOrMore>
328
328
  <choice>
329
- <ref name="paragraph"/>
329
+ <ref name="paragraph-with-footnote"/>
330
330
  <ref name="ul"/>
331
331
  <ref name="ol"/>
332
332
  <ref name="dl"/>
@@ -412,7 +412,7 @@ normative or informative references, some split references into sections organiz
412
412
  <element name="note">
413
413
  <ref name="OptionalId"/>
414
414
  <oneOrMore>
415
- <ref name="paragraph"/>
415
+ <ref name="paragraph-with-footnote"/>
416
416
  </oneOrMore>
417
417
  </element>
418
418
  </define>
@@ -1977,7 +1977,7 @@ used in document amendments</a:documentation>
1977
1977
  <oneOrMore>
1978
1978
  <choice>
1979
1979
  <a:documentation>Content of the verbal representation of the term</a:documentation>
1980
- <ref name="paragraph"/>
1980
+ <ref name="paragraph-with-footnote"/>
1981
1981
  <ref name="dl"/>
1982
1982
  <ref name="ol"/>
1983
1983
  <ref name="ul"/>
@@ -2015,7 +2015,7 @@ used in document amendments</a:documentation>
2015
2015
  <oneOrMore>
2016
2016
  <choice>
2017
2017
  <a:documentation>Content of the term note</a:documentation>
2018
- <ref name="paragraph"/>
2018
+ <ref name="paragraph-with-footnote"/>
2019
2019
  <ref name="ul"/>
2020
2020
  <ref name="ol"/>
2021
2021
  <ref name="dl"/>
@@ -2037,7 +2037,7 @@ used in document amendments</a:documentation>
2037
2037
  <ref name="dl"/>
2038
2038
  <ref name="quote"/>
2039
2039
  <ref name="sourcecode"/>
2040
- <ref name="paragraph"/>
2040
+ <ref name="paragraph-with-footnote"/>
2041
2041
  <ref name="figure"/>
2042
2042
  </choice>
2043
2043
  </oneOrMore>
@@ -28,10 +28,10 @@
28
28
  <ref name="updates_document_type"/>
29
29
  </optional>
30
30
  <optional>
31
- <ref name="accessibility-color-inside"/>
31
+ <ref name="price-code"/>
32
32
  </optional>
33
33
  <optional>
34
- <ref name="price-code"/>
34
+ <ref name="accessibility-color-inside"/>
35
35
  </optional>
36
36
  <optional>
37
37
  <ref name="cen-processing"/>
@@ -75,36 +75,19 @@
75
75
  </choice>
76
76
  </element>
77
77
  </define>
78
- <define name="organization">
79
- <element name="organization">
80
- <oneOrMore>
81
- <ref name="orgname"/>
82
- </oneOrMore>
83
- <optional>
84
- <ref name="abbreviation"/>
85
- </optional>
86
- <optional>
87
- <ref name="uri"/>
88
- </optional>
89
- <zeroOrMore>
90
- <ref name="org-identifier"/>
91
- </zeroOrMore>
92
- <zeroOrMore>
93
- <ref name="contact"/>
94
- </zeroOrMore>
95
- <optional>
96
- <ref name="technical-committee"/>
97
- </optional>
98
- <optional>
99
- <ref name="subcommittee"/>
100
- </optional>
101
- <optional>
102
- <ref name="workgroup"/>
103
- </optional>
104
- <optional>
105
- <ref name="secretariat"/>
106
- </optional>
107
- </element>
78
+ <define name="OrganizationType" combine="interleave">
79
+ <optional>
80
+ <ref name="technical-committee"/>
81
+ </optional>
82
+ <optional>
83
+ <ref name="subcommittee"/>
84
+ </optional>
85
+ <optional>
86
+ <ref name="workgroup"/>
87
+ </optional>
88
+ <optional>
89
+ <ref name="secretariat"/>
90
+ </optional>
108
91
  </define>
109
92
  <define name="DocumentType">
110
93
  <choice>
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.5.5".freeze
3
+ VERSION = "2.5.7".freeze
4
4
  end
5
5
  end
6
6
 
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.test_files = `git ls-files -- {spec}/*`.split("\n")
31
31
  spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
32
32
 
33
- spec.add_dependency "metanorma-iso", "~> 2.8.0"
33
+ spec.add_dependency "metanorma-iso", "~> 2.9.0"
34
34
  spec.add_dependency "pubid"
35
35
 
36
36
  spec.add_development_dependency "debug"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.5
4
+ version: 2.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-14 00:00:00.000000000 Z
11
+ date: 2024-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.8.0
19
+ version: 2.9.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.8.0
26
+ version: 2.9.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pubid
29
29
  requirement: !ruby/object:Gem::Requirement