metanorma-un 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/un/un.plenary-attachment.xsl +59 -10
- data/lib/isodoc/un/un.plenary.xsl +59 -10
- data/lib/isodoc/un/un.recommendation.xsl +59 -10
- data/lib/metanorma/un/basicdoc.rng +3 -0
- data/lib/metanorma/un/isodoc.rng +4 -1
- data/lib/metanorma/un/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: 6ca1718fe6e550e1d258909aa0fd41cd2504819961992616742a291f59b6b26f
|
4
|
+
data.tar.gz: 3115ad4a86646bac1ebed1fa17dc9e52c97da57ae8da1a5b22310ca26be77580
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 793116ea6802000c243ebed98df18b9ba2b8fa20bdf012e76986d80fd8974974d635a42f59aa86ac6f457107c882d26b4f0746b15a40ee57b983e0cd7d5ea576
|
7
|
+
data.tar.gz: 214a04cacddd622d3e636b4b1f681a120d19c2392ad44912b4753926cfed243bda2ac294d73e0d9b92d9046b00cf399f34c27f29c5151c64ee684fd12eda53f1
|
@@ -2471,7 +2471,9 @@
|
|
2471
2471
|
</xsl:template> <!-- license-statement/p -->
|
2472
2472
|
|
2473
2473
|
<xsl:template match="*[local-name()='legal-statement']">
|
2474
|
+
<xsl:param name="isLegacy">false</xsl:param>
|
2474
2475
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
2476
|
+
|
2475
2477
|
<xsl:apply-templates/>
|
2476
2478
|
</fo:block>
|
2477
2479
|
</xsl:template> <!-- legal-statement -->
|
@@ -4740,13 +4742,14 @@
|
|
4740
4742
|
<!-- ================= -->
|
4741
4743
|
<!-- Added,deleted text -->
|
4742
4744
|
<!-- ================= -->
|
4743
|
-
<xsl:template match="*[local-name()='add']" name="tag_add">
|
4745
|
+
<xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
|
4744
4746
|
<xsl:param name="skip">true</xsl:param>
|
4745
4747
|
<xsl:param name="block">false</xsl:param>
|
4746
4748
|
<xsl:param name="type"/>
|
4747
4749
|
<xsl:param name="text-align"/>
|
4748
4750
|
<xsl:choose>
|
4749
|
-
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start
|
4751
|
+
<xsl:when test="starts-with(., $ace_tag) or local-name() = 'change-open-tag' or local-name() = 'change-close-tag'"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
|
4752
|
+
<change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
|
4750
4753
|
<xsl:choose>
|
4751
4754
|
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab']) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
|
4752
4755
|
<xsl:otherwise>
|
@@ -4754,12 +4757,32 @@
|
|
4754
4757
|
<xsl:call-template name="insertTag">
|
4755
4758
|
<xsl:with-param name="type">
|
4756
4759
|
<xsl:choose>
|
4760
|
+
<xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
|
4761
|
+
<xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
|
4757
4762
|
<xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
|
4758
4763
|
<xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
|
4759
4764
|
</xsl:choose>
|
4760
4765
|
</xsl:with-param>
|
4761
|
-
<xsl:with-param name="kind"
|
4762
|
-
|
4766
|
+
<xsl:with-param name="kind">
|
4767
|
+
<xsl:choose>
|
4768
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
4769
|
+
<xsl:value-of select="text()"/>
|
4770
|
+
</xsl:when>
|
4771
|
+
<xsl:otherwise>
|
4772
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
4773
|
+
</xsl:otherwise>
|
4774
|
+
</xsl:choose>
|
4775
|
+
</xsl:with-param>
|
4776
|
+
<xsl:with-param name="value">
|
4777
|
+
<xsl:choose>
|
4778
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
4779
|
+
<xsl:value-of select="*[local-name() = 'sub']"/>
|
4780
|
+
</xsl:when>
|
4781
|
+
<xsl:otherwise>
|
4782
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
4783
|
+
</xsl:otherwise>
|
4784
|
+
</xsl:choose>
|
4785
|
+
</xsl:with-param>
|
4763
4786
|
</xsl:call-template>
|
4764
4787
|
</xsl:variable>
|
4765
4788
|
<xsl:choose>
|
@@ -6976,11 +6999,17 @@
|
|
6976
6999
|
</xsl:when>
|
6977
7000
|
<xsl:otherwise>
|
6978
7001
|
|
7002
|
+
<xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
|
7003
|
+
<xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
|
7004
|
+
|
6979
7005
|
<xsl:variable name="element">
|
6980
7006
|
<xsl:choose>
|
6981
7007
|
<xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
|
6982
7008
|
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
6983
7009
|
</xsl:when>
|
7010
|
+
<xsl:when test="not(ancestor::*[local-name() = 'figure'])">
|
7011
|
+
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
7012
|
+
</xsl:when>
|
6984
7013
|
<xsl:otherwise>
|
6985
7014
|
<fo:block xsl:use-attribute-sets="image-style">
|
6986
7015
|
<xsl:if test="ancestor::*[local-name() = 'dt']">
|
@@ -6996,10 +7025,24 @@
|
|
6996
7025
|
<xsl:copy-of select="@*"/>
|
6997
7026
|
<!-- <fo:block xsl:use-attribute-sets="image-style"> -->
|
6998
7027
|
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
6999
|
-
|
7000
|
-
|
7001
|
-
|
7002
|
-
|
7028
|
+
|
7029
|
+
<xsl:choose>
|
7030
|
+
<xsl:when test="$image_class = 'corrigenda-tag'">
|
7031
|
+
<xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
|
7032
|
+
<xsl:attribute name="baseline-shift">-10%</xsl:attribute>
|
7033
|
+
<xsl:if test="$ancestor_table_cell = 'true'">
|
7034
|
+
<xsl:attribute name="baseline-shift">-25%</xsl:attribute>
|
7035
|
+
</xsl:if>
|
7036
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
7037
|
+
</xsl:when>
|
7038
|
+
<xsl:otherwise>
|
7039
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
7040
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
7041
|
+
</xsl:if>
|
7042
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
7043
|
+
</xsl:otherwise>
|
7044
|
+
</xsl:choose>
|
7045
|
+
|
7003
7046
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
7004
7047
|
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
7005
7048
|
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
@@ -9207,13 +9250,19 @@
|
|
9207
9250
|
<fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9208
9251
|
</xsl:when>
|
9209
9252
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
9210
|
-
<xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9253
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9254
|
+
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9255
|
+
</xsl:when>
|
9256
|
+
<xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
9211
9257
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9212
9258
|
</xsl:when>
|
9213
9259
|
</xsl:choose>
|
9214
9260
|
|
9215
9261
|
</xsl:template>
|
9216
9262
|
|
9263
|
+
<!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
|
9264
|
+
<xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
|
9265
|
+
|
9217
9266
|
<xsl:template match="*[local-name() = 'name']/text()">
|
9218
9267
|
<!-- 0xA0 to space replacement -->
|
9219
9268
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
@@ -10803,7 +10852,7 @@
|
|
10803
10852
|
|
10804
10853
|
<xsl:template name="printEdition">
|
10805
10854
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
10806
|
-
|
10855
|
+
|
10807
10856
|
<xsl:choose>
|
10808
10857
|
<xsl:when test="$edition_i18n != ''">
|
10809
10858
|
<!-- Example: <edition language="fr">deuxième édition</edition> -->
|
@@ -2471,7 +2471,9 @@
|
|
2471
2471
|
</xsl:template> <!-- license-statement/p -->
|
2472
2472
|
|
2473
2473
|
<xsl:template match="*[local-name()='legal-statement']">
|
2474
|
+
<xsl:param name="isLegacy">false</xsl:param>
|
2474
2475
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
2476
|
+
|
2475
2477
|
<xsl:apply-templates/>
|
2476
2478
|
</fo:block>
|
2477
2479
|
</xsl:template> <!-- legal-statement -->
|
@@ -4740,13 +4742,14 @@
|
|
4740
4742
|
<!-- ================= -->
|
4741
4743
|
<!-- Added,deleted text -->
|
4742
4744
|
<!-- ================= -->
|
4743
|
-
<xsl:template match="*[local-name()='add']" name="tag_add">
|
4745
|
+
<xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
|
4744
4746
|
<xsl:param name="skip">true</xsl:param>
|
4745
4747
|
<xsl:param name="block">false</xsl:param>
|
4746
4748
|
<xsl:param name="type"/>
|
4747
4749
|
<xsl:param name="text-align"/>
|
4748
4750
|
<xsl:choose>
|
4749
|
-
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start
|
4751
|
+
<xsl:when test="starts-with(., $ace_tag) or local-name() = 'change-open-tag' or local-name() = 'change-close-tag'"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
|
4752
|
+
<change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
|
4750
4753
|
<xsl:choose>
|
4751
4754
|
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab']) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
|
4752
4755
|
<xsl:otherwise>
|
@@ -4754,12 +4757,32 @@
|
|
4754
4757
|
<xsl:call-template name="insertTag">
|
4755
4758
|
<xsl:with-param name="type">
|
4756
4759
|
<xsl:choose>
|
4760
|
+
<xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
|
4761
|
+
<xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
|
4757
4762
|
<xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
|
4758
4763
|
<xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
|
4759
4764
|
</xsl:choose>
|
4760
4765
|
</xsl:with-param>
|
4761
|
-
<xsl:with-param name="kind"
|
4762
|
-
|
4766
|
+
<xsl:with-param name="kind">
|
4767
|
+
<xsl:choose>
|
4768
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
4769
|
+
<xsl:value-of select="text()"/>
|
4770
|
+
</xsl:when>
|
4771
|
+
<xsl:otherwise>
|
4772
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
4773
|
+
</xsl:otherwise>
|
4774
|
+
</xsl:choose>
|
4775
|
+
</xsl:with-param>
|
4776
|
+
<xsl:with-param name="value">
|
4777
|
+
<xsl:choose>
|
4778
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
4779
|
+
<xsl:value-of select="*[local-name() = 'sub']"/>
|
4780
|
+
</xsl:when>
|
4781
|
+
<xsl:otherwise>
|
4782
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
4783
|
+
</xsl:otherwise>
|
4784
|
+
</xsl:choose>
|
4785
|
+
</xsl:with-param>
|
4763
4786
|
</xsl:call-template>
|
4764
4787
|
</xsl:variable>
|
4765
4788
|
<xsl:choose>
|
@@ -6976,11 +6999,17 @@
|
|
6976
6999
|
</xsl:when>
|
6977
7000
|
<xsl:otherwise>
|
6978
7001
|
|
7002
|
+
<xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
|
7003
|
+
<xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
|
7004
|
+
|
6979
7005
|
<xsl:variable name="element">
|
6980
7006
|
<xsl:choose>
|
6981
7007
|
<xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
|
6982
7008
|
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
6983
7009
|
</xsl:when>
|
7010
|
+
<xsl:when test="not(ancestor::*[local-name() = 'figure'])">
|
7011
|
+
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
7012
|
+
</xsl:when>
|
6984
7013
|
<xsl:otherwise>
|
6985
7014
|
<fo:block xsl:use-attribute-sets="image-style">
|
6986
7015
|
<xsl:if test="ancestor::*[local-name() = 'dt']">
|
@@ -6996,10 +7025,24 @@
|
|
6996
7025
|
<xsl:copy-of select="@*"/>
|
6997
7026
|
<!-- <fo:block xsl:use-attribute-sets="image-style"> -->
|
6998
7027
|
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
6999
|
-
|
7000
|
-
|
7001
|
-
|
7002
|
-
|
7028
|
+
|
7029
|
+
<xsl:choose>
|
7030
|
+
<xsl:when test="$image_class = 'corrigenda-tag'">
|
7031
|
+
<xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
|
7032
|
+
<xsl:attribute name="baseline-shift">-10%</xsl:attribute>
|
7033
|
+
<xsl:if test="$ancestor_table_cell = 'true'">
|
7034
|
+
<xsl:attribute name="baseline-shift">-25%</xsl:attribute>
|
7035
|
+
</xsl:if>
|
7036
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
7037
|
+
</xsl:when>
|
7038
|
+
<xsl:otherwise>
|
7039
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
7040
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
7041
|
+
</xsl:if>
|
7042
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
7043
|
+
</xsl:otherwise>
|
7044
|
+
</xsl:choose>
|
7045
|
+
|
7003
7046
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
7004
7047
|
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
7005
7048
|
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
@@ -9207,13 +9250,19 @@
|
|
9207
9250
|
<fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9208
9251
|
</xsl:when>
|
9209
9252
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
9210
|
-
<xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9253
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9254
|
+
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9255
|
+
</xsl:when>
|
9256
|
+
<xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
9211
9257
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9212
9258
|
</xsl:when>
|
9213
9259
|
</xsl:choose>
|
9214
9260
|
|
9215
9261
|
</xsl:template>
|
9216
9262
|
|
9263
|
+
<!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
|
9264
|
+
<xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
|
9265
|
+
|
9217
9266
|
<xsl:template match="*[local-name() = 'name']/text()">
|
9218
9267
|
<!-- 0xA0 to space replacement -->
|
9219
9268
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
@@ -10803,7 +10852,7 @@
|
|
10803
10852
|
|
10804
10853
|
<xsl:template name="printEdition">
|
10805
10854
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
10806
|
-
|
10855
|
+
|
10807
10856
|
<xsl:choose>
|
10808
10857
|
<xsl:when test="$edition_i18n != ''">
|
10809
10858
|
<!-- Example: <edition language="fr">deuxième édition</edition> -->
|
@@ -2602,7 +2602,9 @@
|
|
2602
2602
|
</xsl:template> <!-- license-statement/p -->
|
2603
2603
|
|
2604
2604
|
<xsl:template match="*[local-name()='legal-statement']">
|
2605
|
+
<xsl:param name="isLegacy">false</xsl:param>
|
2605
2606
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
2607
|
+
|
2606
2608
|
<xsl:apply-templates/>
|
2607
2609
|
</fo:block>
|
2608
2610
|
</xsl:template> <!-- legal-statement -->
|
@@ -4867,13 +4869,14 @@
|
|
4867
4869
|
<!-- ================= -->
|
4868
4870
|
<!-- Added,deleted text -->
|
4869
4871
|
<!-- ================= -->
|
4870
|
-
<xsl:template match="*[local-name()='add']" name="tag_add">
|
4872
|
+
<xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
|
4871
4873
|
<xsl:param name="skip">true</xsl:param>
|
4872
4874
|
<xsl:param name="block">false</xsl:param>
|
4873
4875
|
<xsl:param name="type"/>
|
4874
4876
|
<xsl:param name="text-align"/>
|
4875
4877
|
<xsl:choose>
|
4876
|
-
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start
|
4878
|
+
<xsl:when test="starts-with(., $ace_tag) or local-name() = 'change-open-tag' or local-name() = 'change-close-tag'"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
|
4879
|
+
<change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
|
4877
4880
|
<xsl:choose>
|
4878
4881
|
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab']) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
|
4879
4882
|
<xsl:otherwise>
|
@@ -4881,12 +4884,32 @@
|
|
4881
4884
|
<xsl:call-template name="insertTag">
|
4882
4885
|
<xsl:with-param name="type">
|
4883
4886
|
<xsl:choose>
|
4887
|
+
<xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
|
4888
|
+
<xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
|
4884
4889
|
<xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
|
4885
4890
|
<xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
|
4886
4891
|
</xsl:choose>
|
4887
4892
|
</xsl:with-param>
|
4888
|
-
<xsl:with-param name="kind"
|
4889
|
-
|
4893
|
+
<xsl:with-param name="kind">
|
4894
|
+
<xsl:choose>
|
4895
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
4896
|
+
<xsl:value-of select="text()"/>
|
4897
|
+
</xsl:when>
|
4898
|
+
<xsl:otherwise>
|
4899
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
4900
|
+
</xsl:otherwise>
|
4901
|
+
</xsl:choose>
|
4902
|
+
</xsl:with-param>
|
4903
|
+
<xsl:with-param name="value">
|
4904
|
+
<xsl:choose>
|
4905
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
4906
|
+
<xsl:value-of select="*[local-name() = 'sub']"/>
|
4907
|
+
</xsl:when>
|
4908
|
+
<xsl:otherwise>
|
4909
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
4910
|
+
</xsl:otherwise>
|
4911
|
+
</xsl:choose>
|
4912
|
+
</xsl:with-param>
|
4890
4913
|
</xsl:call-template>
|
4891
4914
|
</xsl:variable>
|
4892
4915
|
<xsl:choose>
|
@@ -7103,11 +7126,17 @@
|
|
7103
7126
|
</xsl:when>
|
7104
7127
|
<xsl:otherwise>
|
7105
7128
|
|
7129
|
+
<xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
|
7130
|
+
<xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
|
7131
|
+
|
7106
7132
|
<xsl:variable name="element">
|
7107
7133
|
<xsl:choose>
|
7108
7134
|
<xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
|
7109
7135
|
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
7110
7136
|
</xsl:when>
|
7137
|
+
<xsl:when test="not(ancestor::*[local-name() = 'figure'])">
|
7138
|
+
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
7139
|
+
</xsl:when>
|
7111
7140
|
<xsl:otherwise>
|
7112
7141
|
<fo:block xsl:use-attribute-sets="image-style">
|
7113
7142
|
<xsl:if test="ancestor::*[local-name() = 'dt']">
|
@@ -7123,10 +7152,24 @@
|
|
7123
7152
|
<xsl:copy-of select="@*"/>
|
7124
7153
|
<!-- <fo:block xsl:use-attribute-sets="image-style"> -->
|
7125
7154
|
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
7126
|
-
|
7127
|
-
|
7128
|
-
|
7129
|
-
|
7155
|
+
|
7156
|
+
<xsl:choose>
|
7157
|
+
<xsl:when test="$image_class = 'corrigenda-tag'">
|
7158
|
+
<xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
|
7159
|
+
<xsl:attribute name="baseline-shift">-10%</xsl:attribute>
|
7160
|
+
<xsl:if test="$ancestor_table_cell = 'true'">
|
7161
|
+
<xsl:attribute name="baseline-shift">-25%</xsl:attribute>
|
7162
|
+
</xsl:if>
|
7163
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
7164
|
+
</xsl:when>
|
7165
|
+
<xsl:otherwise>
|
7166
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
7167
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
7168
|
+
</xsl:if>
|
7169
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
7170
|
+
</xsl:otherwise>
|
7171
|
+
</xsl:choose>
|
7172
|
+
|
7130
7173
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
7131
7174
|
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
7132
7175
|
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
@@ -9334,13 +9377,19 @@
|
|
9334
9377
|
<fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9335
9378
|
</xsl:when>
|
9336
9379
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
9337
|
-
<xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9380
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9381
|
+
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9382
|
+
</xsl:when>
|
9383
|
+
<xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
9338
9384
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9339
9385
|
</xsl:when>
|
9340
9386
|
</xsl:choose>
|
9341
9387
|
|
9342
9388
|
</xsl:template>
|
9343
9389
|
|
9390
|
+
<!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
|
9391
|
+
<xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
|
9392
|
+
|
9344
9393
|
<xsl:template match="*[local-name() = 'name']/text()">
|
9345
9394
|
<!-- 0xA0 to space replacement -->
|
9346
9395
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
@@ -10931,7 +10980,7 @@
|
|
10931
10980
|
|
10932
10981
|
<xsl:template name="printEdition">
|
10933
10982
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
10934
|
-
|
10983
|
+
|
10935
10984
|
<xsl:choose>
|
10936
10985
|
<xsl:when test="$edition_i18n != ''">
|
10937
10986
|
<!-- Example: <edition language="fr">deuxième édition</edition> -->
|
data/lib/metanorma/un/isodoc.rng
CHANGED
@@ -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.
|
20
|
+
<!-- VERSION v1.3.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">
|
@@ -146,6 +146,9 @@
|
|
146
146
|
<data type="boolean"/>
|
147
147
|
</attribute>
|
148
148
|
</optional>
|
149
|
+
<optional>
|
150
|
+
<attribute name="style"/>
|
151
|
+
</optional>
|
149
152
|
<oneOrMore>
|
150
153
|
<ref name="PureTextElement"/>
|
151
154
|
</oneOrMore>
|
data/lib/metanorma/un/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-un
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iso-639
|