metanorma-iso 2.8.8 → 2.8.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/html/word_iso_intro-dis.html +4 -2
- data/lib/isodoc/iso/html/word_iso_intro.html +4 -1
- data/lib/isodoc/iso/iso.amendment.xsl +53 -30
- data/lib/isodoc/iso/iso.international-standard.xsl +53 -30
- data/lib/isodoc/iso/word_cleanup.rb +33 -17
- data/lib/isodoc/iso/xref_section.rb +4 -4
- data/lib/metanorma/iso/boilerplate-fr.adoc +4 -0
- data/lib/metanorma/iso/boilerplate-ru.adoc +3 -0
- data/lib/metanorma/iso/boilerplate.adoc +4 -0
- data/lib/metanorma/iso/front.rb +4 -0
- data/lib/metanorma/iso/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cddf2aa3ff6244b6b2c71735ff0d0fadf3c09781f175a911acdd329fb0a1d8a4
|
4
|
+
data.tar.gz: c8349e9a17b898ec039710f1db1129f771e138fd3f2d1aabd10831fb37a88c31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 044e820c2a45d6e90e0d56edbf546ee3edf9413ae4430abbcd142f56d0b4b1e0f08245b3873565aa4700b9d18f12259f4583208483cbf0377e9d3a94b0724f19
|
7
|
+
data.tar.gz: f14bfec47073d66be2b55a84c19be102c24797c4bbbc878bc41253d99f2f6bc6be9cd39a50f47ec341c5232f29f370dc158655974710feab7e1032de2139da34
|
@@ -1,7 +1,9 @@
|
|
1
1
|
{% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
|
2
2
|
{% else %}
|
3
3
|
|
4
|
-
<div id="boilerplate-copyright-destination"
|
5
|
-
|
4
|
+
<div id="boilerplate-copyright-destination">
|
5
|
+
<div id="boilerplate-copyright-default-destination"/>
|
6
|
+
<div id="boilerplate-copyright-append-destination"/>
|
7
|
+
</div>
|
6
8
|
|
7
9
|
{% endif %}
|
@@ -1,8 +1,11 @@
|
|
1
|
+
<div id="boilerplate-copyright-destination">
|
1
2
|
<div style='mso-element:para-border-div;border:solid windowtext 1.0pt;
|
2
3
|
border-bottom-alt:solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:
|
3
4
|
solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt;padding:1.0pt 4.0pt 0cm 4.0pt;
|
4
5
|
margin-left:5.1pt;margin-right:5.1pt'>
|
5
|
-
<div id="boilerplate-copyright-destination"/>
|
6
|
+
<div id="boilerplate-copyright-default-destination"/>
|
7
|
+
</div>
|
8
|
+
<div id="boilerplate-copyright-append-destination"/>
|
6
9
|
</div>
|
7
10
|
|
8
11
|
{% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
|
@@ -9207,10 +9207,14 @@
|
|
9207
9207
|
<xsl:variable name="fn_styles">
|
9208
9208
|
<xsl:choose>
|
9209
9209
|
<xsl:when test="ancestor::*[local-name() = 'bibitem']">
|
9210
|
-
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"
|
9210
|
+
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
9211
|
+
|
9212
|
+
</fn_styles>
|
9211
9213
|
</xsl:when>
|
9212
9214
|
<xsl:otherwise>
|
9213
|
-
<fn_styles xsl:use-attribute-sets="fn-num-style"
|
9215
|
+
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
9216
|
+
|
9217
|
+
</fn_styles>
|
9214
9218
|
</xsl:otherwise>
|
9215
9219
|
</xsl:choose>
|
9216
9220
|
</xsl:variable>
|
@@ -12185,6 +12189,7 @@
|
|
12185
12189
|
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
12186
12190
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
12187
12191
|
</xsl:if>
|
12192
|
+
|
12188
12193
|
<xsl:if test="parent::*[local-name() = 'add']">
|
12189
12194
|
<xsl:call-template name="append_add-style"/>
|
12190
12195
|
</xsl:if>
|
@@ -12295,44 +12300,44 @@
|
|
12295
12300
|
|
12296
12301
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
12297
12302
|
|
12298
|
-
|
12303
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
12299
12304
|
|
12300
|
-
|
12305
|
+
<xsl:call-template name="setBlockSpanAll"/>
|
12301
12306
|
|
12302
|
-
|
12307
|
+
<xsl:call-template name="refine_note-style"/>
|
12303
12308
|
|
12304
|
-
|
12309
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
12305
12310
|
|
12306
|
-
|
12311
|
+
<fo:block>
|
12307
12312
|
|
12308
|
-
|
12313
|
+
<xsl:call-template name="refine_note_block_style"/>
|
12309
12314
|
|
12310
|
-
|
12315
|
+
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
12311
12316
|
|
12312
|
-
|
12317
|
+
<xsl:call-template name="refine_note-name-style"/>
|
12313
12318
|
|
12314
|
-
|
12315
|
-
|
12316
|
-
|
12317
|
-
|
12318
|
-
|
12319
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
12320
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
12321
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
12322
|
+
<xsl:call-template name="append_add-style"/>
|
12323
|
+
</xsl:if>
|
12319
12324
|
|
12320
|
-
|
12321
|
-
|
12322
|
-
|
12323
|
-
|
12324
|
-
|
12325
|
-
|
12325
|
+
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
12326
|
+
<xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
12327
|
+
<xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
12328
|
+
<xsl:with-param name="skip">false</xsl:with-param>
|
12329
|
+
</xsl:apply-templates>
|
12330
|
+
</xsl:if>
|
12326
12331
|
|
12327
|
-
|
12332
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
12328
12333
|
|
12329
|
-
|
12334
|
+
</fo:inline>
|
12330
12335
|
|
12331
|
-
|
12332
|
-
|
12336
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
12337
|
+
</fo:block>
|
12333
12338
|
|
12334
|
-
|
12335
|
-
|
12339
|
+
</fo:block-container>
|
12340
|
+
</fo:block-container>
|
12336
12341
|
|
12337
12342
|
</xsl:template>
|
12338
12343
|
|
@@ -14770,6 +14775,7 @@
|
|
14770
14775
|
</xsl:when>
|
14771
14776
|
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
14772
14777
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
14778
|
+
|
14773
14779
|
<xsl:apply-templates/>
|
14774
14780
|
</fo:block>
|
14775
14781
|
</xsl:when>
|
@@ -14785,6 +14791,7 @@
|
|
14785
14791
|
|
14786
14792
|
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
14787
14793
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
14794
|
+
|
14788
14795
|
<xsl:apply-templates/>
|
14789
14796
|
</fo:inline>
|
14790
14797
|
</xsl:template>
|
@@ -15166,12 +15173,14 @@
|
|
15166
15173
|
|
15167
15174
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
15168
15175
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
15176
|
+
|
15169
15177
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
15170
15178
|
</fo:block>
|
15171
15179
|
</xsl:if>
|
15172
15180
|
|
15173
15181
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
15174
15182
|
<xsl:call-template name="setStyle_preferred"/>
|
15183
|
+
|
15175
15184
|
<xsl:apply-templates/>
|
15176
15185
|
</fo:block>
|
15177
15186
|
</fo:block>
|
@@ -18312,9 +18321,10 @@
|
|
18312
18321
|
<xsl:template name="insertBackgroundPageImage">
|
18313
18322
|
<xsl:param name="number">1</xsl:param>
|
18314
18323
|
<xsl:param name="name">coverpage-image</xsl:param>
|
18324
|
+
<xsl:param name="suffix"/>
|
18315
18325
|
<xsl:variable name="num" select="number($number)"/>
|
18316
18326
|
<!-- background image -->
|
18317
|
-
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="
|
18327
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
18318
18328
|
<fo:block>
|
18319
18329
|
<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]">
|
18320
18330
|
<xsl:choose>
|
@@ -18380,16 +18390,29 @@
|
|
18380
18390
|
|
18381
18391
|
<!-- END: insert cover page image -->
|
18382
18392
|
|
18393
|
+
<xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
|
18383
18394
|
<xsl:template name="insertVerticalChar">
|
18384
18395
|
<xsl:param name="str"/>
|
18396
|
+
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
18397
|
+
<xsl:param name="reference-orientation">90</xsl:param>
|
18385
18398
|
<xsl:if test="string-length($str) > 0">
|
18386
|
-
<fo:inline-container
|
18399
|
+
<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">
|
18400
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
18401
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
18402
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
18403
|
+
</xsl:if>
|
18404
|
+
<xsl:variable name="char" select="substring($str,1,1)"/>
|
18405
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
|
18406
|
+
<xsl:attribute name="reference-orientation">0</xsl:attribute>
|
18407
|
+
</xsl:if>
|
18387
18408
|
<fo:block-container width="1em">
|
18388
|
-
<fo:block line-height="1em"><xsl:value-of select="
|
18409
|
+
<fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
|
18389
18410
|
</fo:block-container>
|
18390
18411
|
</fo:inline-container>
|
18391
18412
|
<xsl:call-template name="insertVerticalChar">
|
18392
18413
|
<xsl:with-param name="str" select="substring($str, 2)"/>
|
18414
|
+
<xsl:with-param name="writing-mode" select="$writing-mode"/>
|
18415
|
+
<xsl:with-param name="reference-orientation" select="$reference-orientation"/>
|
18393
18416
|
</xsl:call-template>
|
18394
18417
|
</xsl:if>
|
18395
18418
|
</xsl:template>
|
@@ -9207,10 +9207,14 @@
|
|
9207
9207
|
<xsl:variable name="fn_styles">
|
9208
9208
|
<xsl:choose>
|
9209
9209
|
<xsl:when test="ancestor::*[local-name() = 'bibitem']">
|
9210
|
-
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"
|
9210
|
+
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
9211
|
+
|
9212
|
+
</fn_styles>
|
9211
9213
|
</xsl:when>
|
9212
9214
|
<xsl:otherwise>
|
9213
|
-
<fn_styles xsl:use-attribute-sets="fn-num-style"
|
9215
|
+
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
9216
|
+
|
9217
|
+
</fn_styles>
|
9214
9218
|
</xsl:otherwise>
|
9215
9219
|
</xsl:choose>
|
9216
9220
|
</xsl:variable>
|
@@ -12185,6 +12189,7 @@
|
|
12185
12189
|
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
12186
12190
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
12187
12191
|
</xsl:if>
|
12192
|
+
|
12188
12193
|
<xsl:if test="parent::*[local-name() = 'add']">
|
12189
12194
|
<xsl:call-template name="append_add-style"/>
|
12190
12195
|
</xsl:if>
|
@@ -12295,44 +12300,44 @@
|
|
12295
12300
|
|
12296
12301
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
12297
12302
|
|
12298
|
-
|
12303
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
12299
12304
|
|
12300
|
-
|
12305
|
+
<xsl:call-template name="setBlockSpanAll"/>
|
12301
12306
|
|
12302
|
-
|
12307
|
+
<xsl:call-template name="refine_note-style"/>
|
12303
12308
|
|
12304
|
-
|
12309
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
12305
12310
|
|
12306
|
-
|
12311
|
+
<fo:block>
|
12307
12312
|
|
12308
|
-
|
12313
|
+
<xsl:call-template name="refine_note_block_style"/>
|
12309
12314
|
|
12310
|
-
|
12315
|
+
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
12311
12316
|
|
12312
|
-
|
12317
|
+
<xsl:call-template name="refine_note-name-style"/>
|
12313
12318
|
|
12314
|
-
|
12315
|
-
|
12316
|
-
|
12317
|
-
|
12318
|
-
|
12319
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
12320
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
12321
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
12322
|
+
<xsl:call-template name="append_add-style"/>
|
12323
|
+
</xsl:if>
|
12319
12324
|
|
12320
|
-
|
12321
|
-
|
12322
|
-
|
12323
|
-
|
12324
|
-
|
12325
|
-
|
12325
|
+
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
12326
|
+
<xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
12327
|
+
<xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
12328
|
+
<xsl:with-param name="skip">false</xsl:with-param>
|
12329
|
+
</xsl:apply-templates>
|
12330
|
+
</xsl:if>
|
12326
12331
|
|
12327
|
-
|
12332
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
12328
12333
|
|
12329
|
-
|
12334
|
+
</fo:inline>
|
12330
12335
|
|
12331
|
-
|
12332
|
-
|
12336
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
12337
|
+
</fo:block>
|
12333
12338
|
|
12334
|
-
|
12335
|
-
|
12339
|
+
</fo:block-container>
|
12340
|
+
</fo:block-container>
|
12336
12341
|
|
12337
12342
|
</xsl:template>
|
12338
12343
|
|
@@ -14770,6 +14775,7 @@
|
|
14770
14775
|
</xsl:when>
|
14771
14776
|
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
14772
14777
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
14778
|
+
|
14773
14779
|
<xsl:apply-templates/>
|
14774
14780
|
</fo:block>
|
14775
14781
|
</xsl:when>
|
@@ -14785,6 +14791,7 @@
|
|
14785
14791
|
|
14786
14792
|
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
14787
14793
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
14794
|
+
|
14788
14795
|
<xsl:apply-templates/>
|
14789
14796
|
</fo:inline>
|
14790
14797
|
</xsl:template>
|
@@ -15166,12 +15173,14 @@
|
|
15166
15173
|
|
15167
15174
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
15168
15175
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
15176
|
+
|
15169
15177
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
15170
15178
|
</fo:block>
|
15171
15179
|
</xsl:if>
|
15172
15180
|
|
15173
15181
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
15174
15182
|
<xsl:call-template name="setStyle_preferred"/>
|
15183
|
+
|
15175
15184
|
<xsl:apply-templates/>
|
15176
15185
|
</fo:block>
|
15177
15186
|
</fo:block>
|
@@ -18312,9 +18321,10 @@
|
|
18312
18321
|
<xsl:template name="insertBackgroundPageImage">
|
18313
18322
|
<xsl:param name="number">1</xsl:param>
|
18314
18323
|
<xsl:param name="name">coverpage-image</xsl:param>
|
18324
|
+
<xsl:param name="suffix"/>
|
18315
18325
|
<xsl:variable name="num" select="number($number)"/>
|
18316
18326
|
<!-- background image -->
|
18317
|
-
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="
|
18327
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
18318
18328
|
<fo:block>
|
18319
18329
|
<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]">
|
18320
18330
|
<xsl:choose>
|
@@ -18380,16 +18390,29 @@
|
|
18380
18390
|
|
18381
18391
|
<!-- END: insert cover page image -->
|
18382
18392
|
|
18393
|
+
<xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
|
18383
18394
|
<xsl:template name="insertVerticalChar">
|
18384
18395
|
<xsl:param name="str"/>
|
18396
|
+
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
18397
|
+
<xsl:param name="reference-orientation">90</xsl:param>
|
18385
18398
|
<xsl:if test="string-length($str) > 0">
|
18386
|
-
<fo:inline-container
|
18399
|
+
<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">
|
18400
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
18401
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
18402
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
18403
|
+
</xsl:if>
|
18404
|
+
<xsl:variable name="char" select="substring($str,1,1)"/>
|
18405
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
|
18406
|
+
<xsl:attribute name="reference-orientation">0</xsl:attribute>
|
18407
|
+
</xsl:if>
|
18387
18408
|
<fo:block-container width="1em">
|
18388
|
-
<fo:block line-height="1em"><xsl:value-of select="
|
18409
|
+
<fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
|
18389
18410
|
</fo:block-container>
|
18390
18411
|
</fo:inline-container>
|
18391
18412
|
<xsl:call-template name="insertVerticalChar">
|
18392
18413
|
<xsl:with-param name="str" select="substring($str, 2)"/>
|
18414
|
+
<xsl:with-param name="writing-mode" select="$writing-mode"/>
|
18415
|
+
<xsl:with-param name="reference-orientation" select="$reference-orientation"/>
|
18393
18416
|
</xsl:call-template>
|
18394
18417
|
</xsl:if>
|
18395
18418
|
</xsl:template>
|
@@ -110,26 +110,44 @@ module IsoDoc
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def authority_cleanup(docxml)
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
auth
|
120
|
-
|
121
|
-
|
122
|
-
|
113
|
+
authority_license_cleanup(docxml)
|
114
|
+
authority_copyright_cleanup(docxml)
|
115
|
+
coverpage_note_cleanup(docxml)
|
116
|
+
end
|
117
|
+
|
118
|
+
def authority_copyright_cleanup(docxml)
|
119
|
+
auth = docxml.at("//div[@class = 'boilerplate-copyright']") or return
|
120
|
+
authority_copyright_style(auth)
|
121
|
+
authority_copyright_populate(docxml, auth)
|
122
|
+
end
|
123
|
+
|
124
|
+
def authority_copyright_style(auth)
|
125
|
+
auth.xpath(".//p[not(@class)]").each { |p| p["class"] = "zzCopyright" }
|
126
|
+
auth.xpath(".//p[@id = 'boilerplate-message']").each do |p|
|
123
127
|
p["class"] = "zzCopyright1"
|
124
128
|
end
|
125
|
-
auth
|
129
|
+
auth.xpath(".//p[@id = 'boilerplate-address']").each do |p|
|
126
130
|
p["class"] = "zzAddress"
|
127
131
|
end
|
128
|
-
auth
|
132
|
+
auth.xpath(".//p[@id = 'boilerplate-place']").each do |p|
|
129
133
|
p["class"] = "zzCopyright1"
|
130
134
|
end
|
131
|
-
|
132
|
-
|
135
|
+
end
|
136
|
+
|
137
|
+
def authority_copyright_populate(doc, auth)
|
138
|
+
i = doc.at("//div[@id = 'boilerplate-copyright-default-destination']")
|
139
|
+
j = doc.at("//div[@id = 'boilerplate-copyright-append-destination']")
|
140
|
+
default = auth.at(".//div[@id = 'boilerplate-copyright-default']")
|
141
|
+
default and i and i.children = default.remove
|
142
|
+
j and j.children = auth.remove
|
143
|
+
end
|
144
|
+
|
145
|
+
def authority_license_cleanup(docxml)
|
146
|
+
dest = docxml.at("//div[@id = 'boilerplate-license-destination']") or
|
147
|
+
return
|
148
|
+
auth = docxml.at("//div[@class = 'boilerplate-license']") or return
|
149
|
+
auth.xpath(".//p[not(@class)]").each { |p| p["class"] = "zzWarning" }
|
150
|
+
dest.children = auth.remove
|
133
151
|
end
|
134
152
|
|
135
153
|
def word_cleanup(docxml)
|
@@ -142,9 +160,7 @@ module IsoDoc
|
|
142
160
|
# supply missing annex title
|
143
161
|
def make_WordToC(docxml, level)
|
144
162
|
toc = ""
|
145
|
-
|
146
|
-
toc = to_xml(source.children)
|
147
|
-
end
|
163
|
+
s = docxml.at("//div[@class = 'TOC']") and toc = to_xml(s.children)
|
148
164
|
xpath = (1..level).each.map { |i| "//h#{i}" }.join (" | ")
|
149
165
|
docxml.xpath(xpath).each do |h|
|
150
166
|
x = ""
|
@@ -7,7 +7,7 @@ module IsoDoc
|
|
7
7
|
clause.at(ns("./clause")) and
|
8
8
|
@anchors[clause["id"]] = { label: nil, level: 1, type: "clause",
|
9
9
|
xref: clause.at(ns("./title"))&.text }
|
10
|
-
i = Counter.new(0, prefix: "0
|
10
|
+
i = Counter.new(0, prefix: "0")
|
11
11
|
clause.xpath(ns("./clause")).each do |c|
|
12
12
|
section_names1(c, i.increment(c).print, 2)
|
13
13
|
end
|
@@ -26,7 +26,7 @@ module IsoDoc
|
|
26
26
|
anchor_struct(i.print, nil, @labels["appendix"],
|
27
27
|
"clause").merge(level: 2, subtype: "annex",
|
28
28
|
container: clause["id"])
|
29
|
-
j = Counter.new(0, prefix:
|
29
|
+
j = Counter.new(0, prefix: i.print)
|
30
30
|
c.xpath(ns("./clause | ./references")).each do |c1|
|
31
31
|
lbl = "#{@labels['appendix']} #{j.increment(c1).print}"
|
32
32
|
appendix_names1(c1, l10n(lbl), 3, clause["id"])
|
@@ -62,7 +62,7 @@ module IsoDoc
|
|
62
62
|
|
63
63
|
def annex_names1(clause, num, level)
|
64
64
|
annex_name_anchors1(clause, num, level)
|
65
|
-
i = Counter.new(0, prefix:
|
65
|
+
i = Counter.new(0, prefix: num)
|
66
66
|
clause.xpath(ns("./clause | ./references")).each do |c|
|
67
67
|
annex_names1(c, i.increment(c).print, level + 1)
|
68
68
|
end
|
@@ -71,7 +71,7 @@ module IsoDoc
|
|
71
71
|
def appendix_names1(clause, num, level, container)
|
72
72
|
@anchors[clause["id"]] = { label: num, xref: num, level: level,
|
73
73
|
container: container }
|
74
|
-
i = Counter.new(0, prefix:
|
74
|
+
i = Counter.new(0, prefix: num)
|
75
75
|
clause.xpath(ns("./clause | ./references")).each do |c|
|
76
76
|
appendix_names1(c, i.increment(c).print, level + 1, container)
|
77
77
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
== copyright-statement
|
2
2
|
{% if document_scheme == "1951" %}
|
3
3
|
|
4
|
+
[[boilerplate-copyright-default]]
|
4
5
|
=== REPRODUCTION INTERDITE
|
5
6
|
|
6
7
|
[[boilerplate-message]]
|
@@ -20,6 +21,7 @@ nationales de normalisation.
|
|
20
21
|
|
21
22
|
{% elsif document_scheme == "1972" or document_scheme == "1987" %}
|
22
23
|
|
24
|
+
[[boilerplate-copyright-default]]
|
23
25
|
=== {blank}
|
24
26
|
|
25
27
|
[[boilerplate-year]]
|
@@ -31,6 +33,7 @@ Publié en Suisse
|
|
31
33
|
|
32
34
|
{% elsif document_scheme == "1989" %}
|
33
35
|
|
36
|
+
[[boilerplate-copyright-default]]
|
34
37
|
=== {blank}
|
35
38
|
|
36
39
|
[[boilerplate-year]]
|
@@ -53,6 +56,7 @@ Imprimé en Suisse
|
|
53
56
|
|
54
57
|
|
55
58
|
{% else %}
|
59
|
+
[[boilerplate-copyright-default]]
|
56
60
|
=== {% if stage_int >= 40 %}DOCUMENT PROTÉGÉ PAR COPYRIGHT{%else%}{blank}{%endif%}
|
57
61
|
|
58
62
|
[[boilerplate-year]]
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
{% if document_scheme == "1972" or document_scheme == "1987" %}
|
4
4
|
|
5
|
+
[[boilerplate-copyright-default]]
|
5
6
|
=== {blank}
|
6
7
|
|
7
8
|
[[boilerplate-year]]
|
@@ -12,6 +13,7 @@
|
|
12
13
|
|
13
14
|
{% elsif document_scheme == "1989" %}
|
14
15
|
|
16
|
+
[[boilerplate-copyright-default]]
|
15
17
|
=== {blank}
|
16
18
|
|
17
19
|
[[boilerplate-year]]
|
@@ -34,6 +36,7 @@ X.400          c=ch; a=400net;
|
|
34
36
|
|
35
37
|
{% else %}
|
36
38
|
|
39
|
+
[[boilerplate-copyright-default]]
|
37
40
|
=== {% if stage_int >= 40 %}ДОКУМЕНТ, ОХРАНЯЕМЫЙ АВТОРСКИМ ПРАВОМ{% else %}{blank}{% endif %}
|
38
41
|
|
39
42
|
[[boilerplate-year]]
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
{% if document_scheme == "1951" %}
|
4
4
|
|
5
|
+
[[boilerplate-copyright-default]]
|
5
6
|
=== COPYRIGHT RESERVED
|
6
7
|
|
7
8
|
[[boilerplate-message]]
|
@@ -20,6 +21,7 @@ Also issued in French and Russian. Copies to be obtained through the national st
|
|
20
21
|
|
21
22
|
{% elsif document_scheme == "1972" or document_scheme == "1987" %}
|
22
23
|
|
24
|
+
[[boilerplate-copyright-default]]
|
23
25
|
=== {blank}
|
24
26
|
|
25
27
|
[[boilerplate-year]]
|
@@ -31,6 +33,7 @@ Printed in Switzerland
|
|
31
33
|
|
32
34
|
{% elsif document_scheme == "1989" %}
|
33
35
|
|
36
|
+
[[boilerplate-copyright-default]]
|
34
37
|
=== {blank}
|
35
38
|
|
36
39
|
[[boilerplate-year]]
|
@@ -53,6 +56,7 @@ Printed in Switzerland
|
|
53
56
|
|
54
57
|
{% else %}
|
55
58
|
|
59
|
+
[[boilerplate-copyright-default]]
|
56
60
|
=== {% if stage_int >= 40 %}COPYRIGHT PROTECTED DOCUMENT{% else %}{blank}{% endif %}
|
57
61
|
|
58
62
|
[[boilerplate-year]]
|
data/lib/metanorma/iso/front.rb
CHANGED
@@ -12,6 +12,10 @@ module Metanorma
|
|
12
12
|
class Converter < Standoc::Converter
|
13
13
|
def metadata_ext(node, xml)
|
14
14
|
super
|
15
|
+
metadata_ext_iso(node, xml)
|
16
|
+
end
|
17
|
+
|
18
|
+
def metadata_ext_iso(node, xml)
|
15
19
|
structured_id(node, xml)
|
16
20
|
metadata_stage(node, xml)
|
17
21
|
@amd && a = node.attr("updates-document-type") and
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.8.
|
4
|
+
version: 2.8.9
|
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-
|
11
|
+
date: 2024-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|