metanorma-iec 2.5.11 → 2.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/iec/base_convert.rb +5 -0
- data/lib/isodoc/iec/iec.international-standard.xsl +181 -15
- data/lib/isodoc/iec/presentation_terms.rb +77 -12
- data/lib/isodoc/iec/xref.rb +4 -1
- data/lib/metanorma/iec/biblio.rng +5 -3
- data/lib/metanorma/iec/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: 174d9b24fd1740aa2006ccb5a6d4e21327861144d384acb36859fc77c605ddf0
|
4
|
+
data.tar.gz: 3900a7bbd7ca898fff45000ca982210610b7be1b184f152473813cb47bb3f6ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c7eaacda10072f8e2d7f475b3dd4043203f9a5a887456dea43c5bc30d51bc0ebe02923920d5859f2a06f459180e1cfd15ec08bcafd2a815f79c28ff61f873e0
|
7
|
+
data.tar.gz: d859b68533f12275400818438a56221931a9b351a8ac1854a422ceb7b26cf0359b9b3ff21d6a59def3928eb4df5a89adf814d6486558a403f4161d1a4ff6c8d2
|
@@ -3403,6 +3403,9 @@
|
|
3403
3403
|
|
3404
3404
|
</xsl:attribute-set>
|
3405
3405
|
|
3406
|
+
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
3407
|
+
</xsl:attribute-set>
|
3408
|
+
|
3406
3409
|
<xsl:attribute-set name="definition-style">
|
3407
3410
|
|
3408
3411
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -5732,7 +5735,9 @@
|
|
5732
5735
|
<xsl:with-param name="element">
|
5733
5736
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
|
5734
5737
|
<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
|
5738
|
+
|
5735
5739
|
<xsl:copy-of select="$current_fn_number_text"/>
|
5740
|
+
|
5736
5741
|
</fo:inline>
|
5737
5742
|
</fo:basic-link>
|
5738
5743
|
</xsl:with-param>
|
@@ -5751,8 +5756,7 @@
|
|
5751
5756
|
|
5752
5757
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
5753
5758
|
|
5754
|
-
<
|
5755
|
-
|
5759
|
+
<xsl:variable name="fn_block">
|
5756
5760
|
<xsl:call-template name="refine_fn-body-style"/>
|
5757
5761
|
|
5758
5762
|
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
|
@@ -5760,9 +5764,15 @@
|
|
5760
5764
|
<xsl:call-template name="refine_fn-body-num-style"/>
|
5761
5765
|
|
5762
5766
|
<xsl:value-of select="$current_fn_number_text"/>
|
5767
|
+
|
5763
5768
|
</fo:inline>
|
5764
5769
|
<xsl:apply-templates/>
|
5765
|
-
</
|
5770
|
+
</xsl:variable>
|
5771
|
+
|
5772
|
+
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
5773
|
+
<xsl:copy-of select="$fn_block"/>
|
5774
|
+
</fo:block>
|
5775
|
+
|
5766
5776
|
</fo:block-container>
|
5767
5777
|
</fo:footnote-body>
|
5768
5778
|
</fo:footnote>
|
@@ -7616,9 +7626,14 @@
|
|
7616
7626
|
|
7617
7627
|
<xsl:variable name="simple-table">
|
7618
7628
|
|
7629
|
+
<xsl:variable name="table_without_semantic_elements">
|
7630
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
7631
|
+
</xsl:variable>
|
7632
|
+
|
7619
7633
|
<!-- Step 0. replace <br/> to <p>...</p> -->
|
7620
7634
|
<xsl:variable name="table_without_br">
|
7621
|
-
<xsl:apply-templates mode="table-without-br"/>
|
7635
|
+
<!-- <xsl:apply-templates mode="table-without-br"/> -->
|
7636
|
+
<xsl:apply-templates select="xalan:nodeset($table_without_semantic_elements)" mode="table-without-br"/>
|
7622
7637
|
</xsl:variable>
|
7623
7638
|
|
7624
7639
|
<!-- Step 1. colspan processing -->
|
@@ -11904,14 +11919,17 @@
|
|
11904
11919
|
</fo:block>
|
11905
11920
|
</xsl:template>
|
11906
11921
|
|
11907
|
-
<xsl:template match="*[local-name() = 'domain']">
|
11922
|
+
<!-- <xsl:template match="*[local-name() = 'domain']"> -->
|
11908
11923
|
<!-- https://github.com/metanorma/isodoc/issues/607
|
11909
11924
|
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
11910
11925
|
<xsl:text> </xsl:text> -->
|
11911
|
-
<xsl:if test="not(@hidden = 'true')">
|
11926
|
+
<!-- <xsl:if test="not(@hidden = 'true')">
|
11912
11927
|
<xsl:apply-templates/>
|
11913
11928
|
</xsl:if>
|
11914
|
-
</xsl:template>
|
11929
|
+
</xsl:template> -->
|
11930
|
+
|
11931
|
+
<!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
|
11932
|
+
<xsl:template match="*[local-name() = 'domain']"/>
|
11915
11933
|
|
11916
11934
|
<xsl:template match="*[local-name() = 'admitted']">
|
11917
11935
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
@@ -11926,9 +11944,11 @@
|
|
11926
11944
|
</xsl:template>
|
11927
11945
|
|
11928
11946
|
<xsl:template name="setStyle_preferred">
|
11929
|
-
|
11930
|
-
|
11931
|
-
|
11947
|
+
|
11948
|
+
<xsl:if test="*[local-name() = 'strong']">
|
11949
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
11950
|
+
</xsl:if>
|
11951
|
+
|
11932
11952
|
</xsl:template>
|
11933
11953
|
|
11934
11954
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
@@ -11938,6 +11958,17 @@
|
|
11938
11958
|
</xsl:template>
|
11939
11959
|
<!-- End Preferred, admitted, deprecated -->
|
11940
11960
|
|
11961
|
+
<xsl:template match="*[local-name() = 'fmt-related']">
|
11962
|
+
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
11963
|
+
<xsl:apply-templates/>
|
11964
|
+
</fo:block>
|
11965
|
+
</xsl:template>
|
11966
|
+
<xsl:template match="*[local-name() = 'fmt-related']/*[local-name() = 'p']" priority="4">
|
11967
|
+
<fo:block>
|
11968
|
+
<xsl:apply-templates/>
|
11969
|
+
</fo:block>
|
11970
|
+
</xsl:template>
|
11971
|
+
|
11941
11972
|
<!-- ========== -->
|
11942
11973
|
<!-- definition -->
|
11943
11974
|
<!-- ========== -->
|
@@ -12848,6 +12879,7 @@
|
|
12848
12879
|
|
12849
12880
|
<!-- Normative references -->
|
12850
12881
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
12882
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
12851
12883
|
|
12852
12884
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
12853
12885
|
|
@@ -13564,7 +13596,8 @@
|
|
13564
13596
|
<!-- add @id - first element with @id plus '_element_name' -->
|
13565
13597
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
13566
13598
|
<xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
|
13567
|
-
<xsl:
|
13599
|
+
<xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
|
13600
|
+
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
13568
13601
|
</xsl:if>
|
13569
13602
|
</xsl:template>
|
13570
13603
|
|
@@ -13621,6 +13654,31 @@
|
|
13621
13654
|
<xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_pres"/>
|
13622
13655
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
13623
13656
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_pres"/>
|
13657
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
|
13658
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_step1"/>
|
13659
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_pres"/> -->
|
13660
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_pres"/>
|
13661
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
|
13662
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_step1"/>
|
13663
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_pres"/> -->
|
13664
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_pres"/>
|
13665
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_step1"/> -->
|
13666
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_step1"/>
|
13667
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_step1"/>
|
13668
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_pres"/> -->
|
13669
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_pres"/>
|
13670
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_pres"/>
|
13671
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_step1"/> -->
|
13672
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_step1"/>
|
13673
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_pres"/> -->
|
13674
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_pres"/>
|
13675
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_step1"/> -->
|
13676
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_step1"/>
|
13677
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_pres"/> -->
|
13678
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_pres"/>
|
13679
|
+
|
13680
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
|
13681
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_pres"/>
|
13624
13682
|
|
13625
13683
|
<xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_step1">
|
13626
13684
|
<xsl:copy>
|
@@ -13653,13 +13711,115 @@
|
|
13653
13711
|
|
13654
13712
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
13655
13713
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
13656
|
-
<xsl:
|
13714
|
+
<xsl:choose>
|
13715
|
+
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
|
13716
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13717
|
+
</xsl:when>
|
13718
|
+
<xsl:otherwise>
|
13719
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
13720
|
+
<xsl:copy-of select="@*"/>
|
13721
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13722
|
+
</xsl:element>
|
13723
|
+
</xsl:otherwise>
|
13724
|
+
</xsl:choose>
|
13725
|
+
</xsl:template>
|
13726
|
+
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
|
13727
|
+
<xsl:choose>
|
13728
|
+
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
|
13729
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13730
|
+
</xsl:when>
|
13731
|
+
<xsl:otherwise>
|
13732
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
13733
|
+
<xsl:copy-of select="@*"/>
|
13734
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13735
|
+
</xsl:element>
|
13736
|
+
</xsl:otherwise>
|
13737
|
+
</xsl:choose>
|
13738
|
+
</xsl:template>
|
13739
|
+
|
13740
|
+
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
13741
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
13742
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13743
|
+
</xsl:template>
|
13744
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_step1">
|
13745
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
13657
13746
|
<xsl:copy-of select="@*"/>
|
13658
13747
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13659
13748
|
</xsl:element>
|
13660
13749
|
</xsl:template>
|
13661
|
-
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
|
13662
|
-
<xsl:
|
13750
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_pres">
|
13751
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13752
|
+
</xsl:template>
|
13753
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_pres">
|
13754
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
13755
|
+
<xsl:copy-of select="@*"/>
|
13756
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13757
|
+
</xsl:element>
|
13758
|
+
</xsl:template>
|
13759
|
+
|
13760
|
+
<xsl:template match="*[local-name() = 'fmt-admitted']"/>
|
13761
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_step1">
|
13762
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13763
|
+
</xsl:template>
|
13764
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_step1">
|
13765
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
13766
|
+
<xsl:copy-of select="@*"/>
|
13767
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13768
|
+
</xsl:element>
|
13769
|
+
</xsl:template>
|
13770
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_pres">
|
13771
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13772
|
+
</xsl:template>
|
13773
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_pres">
|
13774
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
13775
|
+
<xsl:copy-of select="@*"/>
|
13776
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13777
|
+
</xsl:element>
|
13778
|
+
</xsl:template>
|
13779
|
+
|
13780
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates']"/>
|
13781
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_step1">
|
13782
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13783
|
+
</xsl:template>
|
13784
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_step1">
|
13785
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
13786
|
+
<xsl:copy-of select="@*"/>
|
13787
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13788
|
+
</xsl:element>
|
13789
|
+
</xsl:template>
|
13790
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_pres">
|
13791
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13792
|
+
</xsl:template>
|
13793
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_pres">
|
13794
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
13795
|
+
<xsl:copy-of select="@*"/>
|
13796
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13797
|
+
</xsl:element>
|
13798
|
+
</xsl:template>
|
13799
|
+
|
13800
|
+
<xsl:template match="*[local-name() = 'fmt-definition']"/>
|
13801
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_step1">
|
13802
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
13803
|
+
<xsl:copy-of select="@*"/>
|
13804
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13805
|
+
</xsl:element>
|
13806
|
+
</xsl:template>
|
13807
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_pres">
|
13808
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
13809
|
+
<xsl:copy-of select="@*"/>
|
13810
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13811
|
+
</xsl:element>
|
13812
|
+
</xsl:template>
|
13813
|
+
|
13814
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']"/>
|
13815
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_step1">
|
13816
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
13817
|
+
<xsl:copy-of select="@*"/>
|
13818
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13819
|
+
</xsl:element>
|
13820
|
+
</xsl:template>
|
13821
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_pres">
|
13822
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
13663
13823
|
<xsl:copy-of select="@*"/>
|
13664
13824
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13665
13825
|
</xsl:element>
|
@@ -13672,6 +13832,9 @@
|
|
13672
13832
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13673
13833
|
</xsl:template>
|
13674
13834
|
|
13835
|
+
<xsl:template match="*[local-name() = 'semx']">
|
13836
|
+
<xsl:apply-templates/>
|
13837
|
+
</xsl:template>
|
13675
13838
|
<xsl:template match="*[local-name() = 'semx']" mode="update_xml_step1">
|
13676
13839
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13677
13840
|
</xsl:template>
|
@@ -14803,7 +14966,7 @@
|
|
14803
14966
|
</xsl:template>
|
14804
14967
|
|
14805
14968
|
<xsl:template name="namespaceCheck">
|
14806
|
-
<xsl:variable name="documentNS" select="namespace-uri(/*)
|
14969
|
+
<xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
|
14807
14970
|
<xsl:variable name="XSLNS">
|
14808
14971
|
|
14809
14972
|
<xsl:value-of select="document('')//*/namespace::iec"/>
|
@@ -14893,6 +15056,9 @@
|
|
14893
15056
|
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
|
14894
15057
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14895
15058
|
</xsl:when>
|
15059
|
+
<xsl:when test="string-length($bibdata_updated) != ''">
|
15060
|
+
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
15061
|
+
</xsl:when>
|
14896
15062
|
<xsl:when test="$formatted = 'true'">
|
14897
15063
|
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14898
15064
|
</xsl:when>
|
@@ -39,13 +39,14 @@ module IsoDoc
|
|
39
39
|
def terms(docxml)
|
40
40
|
otherlang_designations(docxml)
|
41
41
|
super
|
42
|
+
remove_otherlang_designations(docxml)
|
42
43
|
merge_fr_into_en_term(docxml)
|
43
44
|
end
|
44
45
|
|
45
|
-
def termdomain(elem)
|
46
|
+
def termdomain(elem, fmt_defn)
|
46
47
|
if @is_iev
|
47
|
-
d = elem.at(ns("./domain")) or return
|
48
|
-
d["hidden"] = true
|
48
|
+
#d = elem.at(ns("./domain")) or return
|
49
|
+
#d["hidden"] = true
|
49
50
|
else super
|
50
51
|
end
|
51
52
|
end
|
@@ -55,17 +56,21 @@ module IsoDoc
|
|
55
56
|
docxml.xpath(ns("//term[@language = 'en'][@tag]")).each do |en|
|
56
57
|
fr = docxml.at(ns("//term[@language = 'fr'][@tag = '#{en['tag']}']"))
|
57
58
|
merge_fr_into_en_term1(en, fr) if fr
|
58
|
-
en.xpath(ns("./fmt-name | ./fmt-xref-label")).each(&:remove)
|
59
|
-
term1(en)
|
60
59
|
end
|
60
|
+
# renumber
|
61
61
|
@xrefs.parse_inclusions(clauses: true).parse docxml
|
62
|
-
|
63
|
-
|
62
|
+
docxml.xpath(ns("//term/fmt-name | //term/fmt-xref-label")).each(&:remove)
|
63
|
+
term(docxml)
|
64
64
|
end
|
65
65
|
|
66
66
|
def merge_fr_into_en_term1(en_term, fr_term)
|
67
67
|
dl = en_term&.at(ns("./dl[@type = 'other-lang']"))&.remove
|
68
|
-
en_term << fr_term.remove.children
|
68
|
+
#en_term << fr_term.remove.children
|
69
|
+
dup = semx_fmt_dup(fr_term)
|
70
|
+
dup.xpath(ns("./fmt-name | ./fmt-xref-label")).each(&:remove)
|
71
|
+
en_term << dup
|
72
|
+
fr_term.xpath(ns(".//fmt-name | .//fmt-xref-label | .//fmt-preferred | .//fmt-admitted | .//fmt-deprecates | .//fmt-definition | .//fmt-related | .//fmt-termsource")).each(&:remove)
|
73
|
+
fr_term["unnumbered"] = "true"
|
69
74
|
en_term << dl if dl
|
70
75
|
en_term["language"] = "en,fr"
|
71
76
|
en_term.delete("tag")
|
@@ -78,6 +83,14 @@ module IsoDoc
|
|
78
83
|
end
|
79
84
|
end
|
80
85
|
|
86
|
+
def remove_otherlang_designations(docxml)
|
87
|
+
@is_iev or return
|
88
|
+
docxml.xpath(ns("//term")).each do |t|
|
89
|
+
remove_otherlang_designations1(t, t["language"]&.split(",") || %w(en fr))
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# KILL
|
81
94
|
def extract_otherlang_designations(term, lgs)
|
82
95
|
term.xpath(ns(".//preferred/expression[@language]"))
|
83
96
|
.each_with_object([]) do |d, m|
|
@@ -85,12 +98,26 @@ module IsoDoc
|
|
85
98
|
d.delete("language")
|
86
99
|
lgs.include?(lg) and next
|
87
100
|
p = d.parent
|
88
|
-
designation_annotate(p,
|
101
|
+
designation_annotate(p, p.at(ns("./name")))
|
89
102
|
m << { lang: lg, script: Metanorma::Utils.default_script(lg),
|
90
103
|
designation: to_xml(l10n_recursive(p.remove, lg)).strip }
|
91
104
|
end
|
92
105
|
end
|
93
106
|
|
107
|
+
def extract_otherlang_designations(term, lgs)
|
108
|
+
term.xpath(ns(".//preferred/expression[@language]"))
|
109
|
+
.each_with_object([]) do |d, m|
|
110
|
+
lg = d["language"]
|
111
|
+
lgs.include?(lg) and next
|
112
|
+
p = semx_fmt_dup(d.parent)
|
113
|
+
e = p.at(ns("./expression"))
|
114
|
+
e.delete("language")
|
115
|
+
designation_annotate(p, p.at(ns(".//name")), d.parent)
|
116
|
+
m << { lang: lg, script: Metanorma::Utils.default_script(lg),
|
117
|
+
designation: to_xml(l10n_recursive(p, lg)).strip }
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
94
121
|
def l10n_recursive(xml, lang)
|
95
122
|
script = Metanorma::Utils.default_script(lang)
|
96
123
|
c = HTMLEntities.new
|
@@ -125,18 +152,36 @@ module IsoDoc
|
|
125
152
|
term << "<dl type='other-lang'>#{prefs.join}</dl>"
|
126
153
|
end
|
127
154
|
|
155
|
+
def remove_otherlang_designations1(term, lgs)
|
156
|
+
term.xpath(ns(".//fmt-preferred/p/semx[@element = 'preferred']")).each do |s|
|
157
|
+
p = semx_orig(s, term)
|
158
|
+
lg = p.at(ns("./expression/@language"))&.text or next
|
159
|
+
lgs.include?(lg) and next
|
160
|
+
s.parent.remove
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
128
164
|
def related(docxml)
|
129
|
-
docxml.xpath(ns("//term[related]")).each { |f| move_related(f) }
|
165
|
+
#docxml.xpath(ns("//term[related]")).each { |f| move_related(f) }
|
130
166
|
super
|
167
|
+
docxml.xpath(ns("//term[related]")).each { |f| move_related(f) }
|
131
168
|
end
|
132
169
|
|
133
|
-
|
170
|
+
# KILL
|
171
|
+
def move_related(term)
|
134
172
|
defn = term.at(ns("./definition")) or return
|
135
173
|
term.xpath(ns("./related")).reverse_each do |r|
|
136
174
|
defn.next = r.remove
|
137
175
|
end
|
138
176
|
end
|
139
177
|
|
178
|
+
def move_related(term)
|
179
|
+
defn = term.at(ns("./fmt-definition")) or return
|
180
|
+
rel = term.at(ns("./fmt-related")) or return
|
181
|
+
defn << rel.children
|
182
|
+
end
|
183
|
+
|
184
|
+
# KILL
|
140
185
|
def related1(node)
|
141
186
|
lg = node.at("./ancestor::xmlns:term/@language")&.text
|
142
187
|
@i18n = @i18n_lg[lg] if lg && @i18n_lg[lg]
|
@@ -148,6 +193,16 @@ module IsoDoc
|
|
148
193
|
@i18n = @i18n_lg["default"]
|
149
194
|
end
|
150
195
|
|
196
|
+
def related1(node)
|
197
|
+
lg = node.at("./ancestor::xmlns:term/@language")&.text
|
198
|
+
@i18n = @i18n_lg[lg] if lg && @i18n_lg[lg]
|
199
|
+
p, ref, orig = related1_prep(node)
|
200
|
+
label = @i18n.relatedterms[orig["type"]].upcase
|
201
|
+
node.children =(l10n("<p>#{label}: " \
|
202
|
+
"#{to_xml(p)} (#{Common::to_xml(ref)})</p>"))
|
203
|
+
@i18n = @i18n_lg["default"]
|
204
|
+
end
|
205
|
+
|
151
206
|
def termsource_modification(node)
|
152
207
|
lg = node&.at("./ancestor::xmlns:term/@language")&.text
|
153
208
|
@i18n = @i18n_lg[lg] if lg && @i18n_lg[lg]
|
@@ -155,7 +210,8 @@ module IsoDoc
|
|
155
210
|
@i18n = @i18n_lg["default"]
|
156
211
|
end
|
157
212
|
|
158
|
-
|
213
|
+
# KILL
|
214
|
+
def termsource1xx(node)
|
159
215
|
lg = node&.at("./ancestor::xmlns:term/@language")&.text
|
160
216
|
@i18n = @i18n_lg[lg] if lg && @i18n_lg[lg]
|
161
217
|
if @is_iev then termsource1_iev(node)
|
@@ -164,6 +220,7 @@ module IsoDoc
|
|
164
220
|
@i18n = @i18n_lg["default"]
|
165
221
|
end
|
166
222
|
|
223
|
+
# KILL
|
167
224
|
def termsource1_iev(elem)
|
168
225
|
while elem&.next_element&.name == "termsource"
|
169
226
|
elem << "; #{to_xml(elem.next_element.remove.children)}"
|
@@ -171,6 +228,14 @@ module IsoDoc
|
|
171
228
|
elem.children = l10n("#{@i18n.source}: #{to_xml(elem.children).strip}")
|
172
229
|
end
|
173
230
|
|
231
|
+
def termsource_label(elem, sources)
|
232
|
+
@is_iev or return super
|
233
|
+
lg = elem&.at("./ancestor::xmlns:term/@language")&.text
|
234
|
+
@i18n = @i18n_lg[lg] if lg && @i18n_lg[lg]
|
235
|
+
elem.replace(l10n("#{@i18n.source}: #{sources}"))
|
236
|
+
@i18n = @i18n_lg["default"]
|
237
|
+
end
|
238
|
+
|
174
239
|
def termexample(docxml)
|
175
240
|
docxml.xpath(ns("//termexample")).each do |f|
|
176
241
|
termexample1(f)
|
data/lib/isodoc/iec/xref.rb
CHANGED
@@ -32,10 +32,13 @@ module IsoDoc
|
|
32
32
|
#xref: l10n("#{@labels['section_iev']} #{num}"),
|
33
33
|
xref: labelled_autonum(@labels['section_iev'], num),
|
34
34
|
level: 2, type: "clause", elem: @labels["section_iev"] }
|
35
|
-
|
35
|
+
j = 0
|
36
|
+
t.xpath(ns("./term")).each do |c|
|
37
|
+
c["unnumbered"] == "true" and next
|
36
38
|
num2 = semx(c, "%02d" % [j + 1])
|
37
39
|
#section_names1(c, "#{num}#{delim_wrap("-")}#{num2}", 3)
|
38
40
|
section_names1(c, num, num2, 3)
|
41
|
+
j += 1
|
39
42
|
end
|
40
43
|
end
|
41
44
|
end
|
@@ -947,6 +947,8 @@ May be electronic (e.g. Twitter direct message, email) or voice (e.g. a remark m
|
|
947
947
|
typically cited as "personal communication")</a:documentation>
|
948
948
|
<value>conversation</value>
|
949
949
|
<a:documentation>An exchange of messages between two or more persons. May be electronic (e.g. web chat) or voice (e.g. phone call)</a:documentation>
|
950
|
+
<value>collection</value>
|
951
|
+
<a:documentation>A compound resource consisting of other resources, which are themselves presupposed to have their type specified..</a:documentation>
|
950
952
|
<value>misc</value>
|
951
953
|
<a:documentation>Bibliographic type not adequately described in the foregoing</a:documentation>
|
952
954
|
</choice>
|
@@ -1277,17 +1279,17 @@ for which this claim of validity is made, if applicable</a:documentation>
|
|
1277
1279
|
</define>
|
1278
1280
|
<define name="validityBegins">
|
1279
1281
|
<element name="validityBegins">
|
1280
|
-
<ref name="
|
1282
|
+
<ref name="ISO8601Date"/>
|
1281
1283
|
</element>
|
1282
1284
|
</define>
|
1283
1285
|
<define name="validityEnds">
|
1284
1286
|
<element name="validityEnds">
|
1285
|
-
<ref name="
|
1287
|
+
<ref name="ISO8601Date"/>
|
1286
1288
|
</element>
|
1287
1289
|
</define>
|
1288
1290
|
<define name="validityRevision">
|
1289
1291
|
<element name="revision">
|
1290
|
-
<ref name="
|
1292
|
+
<ref name="ISO8601Date"/>
|
1291
1293
|
</element>
|
1292
1294
|
</define>
|
1293
1295
|
<define name="TypedTitleString">
|
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.
|
4
|
+
version: 2.5.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-iso
|