metanorma-iso 3.0.7 → 3.0.8
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/iso/html/html_iso_titlepage.html +8 -2
- data/lib/isodoc/iso/html/isodoc.css +1 -0
- data/lib/isodoc/iso/html/isodoc.scss +1 -0
- data/lib/isodoc/iso/html/style-human.css +0 -2
- data/lib/isodoc/iso/html/style-iso.css +0 -2
- data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +2 -2
- data/lib/isodoc/iso/html/word_iso_titlepage-prf.html +2 -2
- data/lib/isodoc/iso/html/word_iso_titlepage.html +8 -2
- data/lib/isodoc/iso/iso.amendment.xsl +48 -15
- data/lib/isodoc/iso/iso.international-standard.xsl +48 -15
- data/lib/isodoc/iso/metadata.rb +16 -19
- data/lib/isodoc/iso/presentation_section.rb +5 -2
- data/lib/metanorma/iso/front.rb +34 -13
- data/lib/metanorma/iso/isodoc.rng +14 -1
- data/lib/metanorma/iso/validate.rb +5 -20
- data/lib/metanorma/iso/validate_section.rb +6 -6
- data/lib/metanorma/iso/validate_style.rb +2 -2
- 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: 996d73648eec987f61a80725d6af5bc2320c6b896c976dd9730c4c6fb992193a
|
4
|
+
data.tar.gz: 8f9b233c72f5fac3d7b97b7bf9276036d2c63f83201f586479dbac90074fe403
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a95a4a1e04e16920f58c899dcaedf8acd7f99a1d39797017e4daeea29dad3c38e97866fc7dd46d79cb404f630404429492bd4d5b72d1a8e7ce787dcb1e6856ae
|
7
|
+
data.tar.gz: 26553c23aa8ec45a4b9cc15f390b76e00d7b9e4b8a085cada4f2020757396a9535dab428c634348ae6dfb41d0f1bca0b3b1fd581dd5a0d77d76b0089063120ed
|
@@ -30,12 +30,15 @@
|
|
30
30
|
name="CVP_Secretariat_Loca">{{ labels["secretariat"] }}</a>: {{ secretariat }}</p>
|
31
31
|
{% endif %}
|
32
32
|
|
33
|
-
<div class="doctitle-en"><div><span class="title">{{ doctitleintro }}{% if doctitleintro and doctitlemain %} — {% endif %}</span><span class="subtitle">{{ doctitlemain }}{% if doctitlemain and doctitlepart %} —{% endif %}</span>
|
33
|
+
<div class="doctitle-en"><div><span class="title">{{ doctitleintro }}{% if doctitleintro and doctitlemain %} — {% endif %}</span><span class="subtitle">{{ doctitlemain }}{% if doctitlemain and (doctitlepart or doctitlecomplementary) %} —{% endif %}</span>
|
34
34
|
{% if doctitlepart %}
|
35
35
|
</div><div class="doctitle-part">
|
36
36
|
{% if doctitlepartlabel %}<span class="partlabel">{{ doctitlepartlabel }}: </span>{% endif %}
|
37
37
|
<span class="part">{{ doctitlepart }}</span>
|
38
38
|
{% endif %}
|
39
|
+
{% if doctitlecomplementary %}
|
40
|
+
<span class="part">{{ doctitlecomplementary }}</span>
|
41
|
+
{% endif %}
|
39
42
|
</div>
|
40
43
|
{% if doctitleamdlabel %}
|
41
44
|
<div class="doctitle-part">{{ doctitleamdlabel }}{% if doctitleamd %}: {{ doctitleamd }}{% endif %}</div>
|
@@ -48,12 +51,15 @@
|
|
48
51
|
{% endif %}
|
49
52
|
</div>
|
50
53
|
|
51
|
-
<div class="doctitle-fr"><div><span class="title">{{ docsubtitleintro }}{% if docsubtitleintro and docsubtitlemain %} — {% endif %}</span><span class="subtitle">{{ docsubtitlemain }}{% if docsubtitlemain and docsubtitlepart %} —{% endif %}</span>
|
54
|
+
<div class="doctitle-fr"><div><span class="title">{{ docsubtitleintro }}{% if docsubtitleintro and docsubtitlemain %} — {% endif %}</span><span class="subtitle">{{ docsubtitlemain }}{% if docsubtitlemain and (docsubtitlepart or docsubtitlecomplementary) %} —{% endif %}</span>
|
52
55
|
{% if docsubtitlepart %}
|
53
56
|
</div><div>
|
54
57
|
{% if docsubtitlepartlabel %}<span class="partlabel">{{ docsubtitlepartlabel }}: </span>{% endif %}
|
55
58
|
<span class="part">{{ docsubtitlepart }}</span>
|
56
59
|
{% endif %}
|
60
|
+
{% if docsubtitlecomplementary %}
|
61
|
+
<span class="part">{{ docsubtitlecomplementary }}</span>
|
62
|
+
{% endif %}
|
57
63
|
</div>
|
58
64
|
{% if docsubtitleamdlabel %}
|
59
65
|
<div>{{ docsubtitleamdlabel }}{% if docsubtitleamd %}: {{ docsubtitleamd }}{% endif %}</div>
|
@@ -44,7 +44,7 @@
|
|
44
44
|
{% endif %}
|
45
45
|
|
46
46
|
<p class="zzCover">
|
47
|
-
<span lang="EN-GB"><b>{{ doctitleintro }}{% if doctitleintro and doctitlemain %} — {% endif %}{{ doctitlemain }}{% if doctitlemain and doctitlepart %} — {% endif %}{% if doctitlepart %}{% if doctitlepartlabel %}{{ doctitlepartlabel }}: {% endif %}{{ doctitlepart }}{% endif %}</b></span></p>
|
47
|
+
<span lang="EN-GB"><b>{{ doctitleintro }}{% if doctitleintro and doctitlemain %} — {% endif %}{{ doctitlemain }}{% if doctitlemain and (doctitlepart or doctitlecomplementary) %} — {% endif %}{% if doctitlecomplementary %}{{ doctitlecomplementary }}{% endif %}{% if doctitlepart %}{% if doctitlepartlabel %}{{ doctitlepartlabel }}: {% endif %}{{ doctitlepart }}{% endif %}</b></span></p>
|
48
48
|
|
49
49
|
{% if doctitleamdlabel %}
|
50
50
|
<p class="zzCover"><b>{{ doctitleamdlabel }}{% if doctitleamd %}: {{ doctitleamd }}{% endif %}</b></p>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
<p class="zzCover"><b>{{ doctitlecorrlabel }}</b></p>
|
57
57
|
{% endif %}
|
58
58
|
|
59
|
-
<p class="zzCover" style='font-weight:normal;'><i>{{ docsubtitleintro }}{% if docsubtitleintro and docsubtitlemain %} — {% endif %}{{ docsubtitlemain }}{% if docsubtitlemain and docsubtitlepart %} — {% endif %}{% if docsubtitlepart %}{% if docsubtitlepartlabel %}{{ docsubtitlepartlabel }}: {% endif %}{{ docsubtitlepart }}{% endif %}</i></p>
|
59
|
+
<p class="zzCover" style='font-weight:normal;'><i>{{ docsubtitleintro }}{% if docsubtitleintro and docsubtitlemain %} — {% endif %}{{ docsubtitlemain }}{% if docsubtitlemain and (docsubtitlepart or docsubtitlecomplementary) %} — {% endif %}{% if docsubtitlecomplementary %}{{ docsubtitlecomplementary }}{% endif %}{% if docsubtitlepart %}{% if docsubtitlepartlabel %}{{ docsubtitlepartlabel }}: {% endif %}{{ docsubtitlepart }}{% endif %}</i></p>
|
60
60
|
{% if docsubtitleamdlabel %}
|
61
61
|
<p class="zzCover" style='font-weight:normal;'><i>{{ docsubtitleamdlabel }}{% if docsubtitleamd %}: {{ docsubtitleamd }}{% endif %}</i></p>
|
62
62
|
{% endif %}
|
@@ -38,7 +38,7 @@
|
|
38
38
|
{% endif %}
|
39
39
|
|
40
40
|
<p class="zzCover">
|
41
|
-
<span lang="EN-GB"><b>{{ doctitleintro }}{% if doctitleintro and doctitlemain %} — {% endif %}{{ doctitlemain }}{% if doctitlemain and doctitlepart %} — {% endif %}{% if doctitlepart %}{% if doctitlepartlabel %}{{ doctitlepartlabel }}: {% endif %}{{ doctitlepart }}</span>{% endif %}</b>
|
41
|
+
<span lang="EN-GB"><b>{{ doctitleintro }}{% if doctitleintro and doctitlemain %} — {% endif %}{{ doctitlemain }}{% if doctitlemain and (doctitlepart or doctitlecomplementary) %} — {% endif %}{% if doctitlecomplementary %}{{ doctitlecomplementary }}{% endif %}{% if doctitlepart %}{% if doctitlepartlabel %}{{ doctitlepartlabel }}: {% endif %}{{ doctitlepart }}</span>{% endif %}</b>
|
42
42
|
</p>
|
43
43
|
{% if doctitleamdlabel %}
|
44
44
|
<p class="zzCover"><b>{{ doctitleamdlabel }}{% if doctitleamd %}: {{ doctitleamd }}{% endif %}</b></p>
|
@@ -50,7 +50,7 @@
|
|
50
50
|
<p class="zzCover"><b>{{ doctitlecorrlabel }}</b></p>
|
51
51
|
{% endif %}
|
52
52
|
|
53
|
-
<p class="zzCover" style='font-weight:normal;'><i>{{ docsubtitleintro }}{% if docsubtitleintro and docsubtitlemain %} — {% endif %}{{ docsubtitlemain }}{% if docsubtitlemain and docsubtitlepart %} — {% endif %}{% if docsubtitlepart %}{% if docsubtitlepartlabel %}{{ docsubtitlepartlabel }}: {% endif %}{{ docsubtitlepart }}{% endif %}</i>
|
53
|
+
<p class="zzCover" style='font-weight:normal;'><i>{{ docsubtitleintro }}{% if docsubtitleintro and docsubtitlemain %} — {% endif %}{{ docsubtitlemain }}{% if docsubtitlemain and (docsubtitlepart or docsubtitlecomplementary) %} — {% endif %}{% if docsubtitlecomplementary %}{{ docsubtitlecomplementary }}{% endif %}{% if docsubtitlepart %}{% if docsubtitlepartlabel %}{{ docsubtitlepartlabel }}: {% endif %}{{ docsubtitlepart }}{% endif %}</i>
|
54
54
|
</p>
|
55
55
|
{% if docsubtitleamdlabel %}
|
56
56
|
<p class="zzCover" style='font-weight:normal;'><i>{{ docsubtitleamdlabel }}{% if docsubtitleamd %}: {{ docsubtitleamd }}{% endif %}</i></p>
|
@@ -46,7 +46,10 @@ style='mso-no-proof:yes'>{{ editorialgroup }}</span></p>
|
|
46
46
|
{% endif %}
|
47
47
|
|
48
48
|
<p class="MsoNormal" align="left" style='text-align:left;line-height:18.0pt;margin-top:100.0pt;margin-bottom:0.0pt;font-size:16.0pt'>
|
49
|
-
<span class="title"><b>{{ doctitleintro }}{% if doctitleintro and doctitlemain %} — {% endif %}</b></span><b><span class="subtitle">{{ doctitlemain }}{% if doctitlemain and doctitlepart %} —{% endif %}</b></span>
|
49
|
+
<span class="title"><b>{{ doctitleintro }}{% if doctitleintro and doctitlemain %} — {% endif %}</b></span><b><span class="subtitle">{{ doctitlemain }}{% if doctitlemain and (doctitlepart or doctitlecomplementary) %} —{% endif %}</b></span>
|
50
|
+
{% if doctitlecomplementary %}
|
51
|
+
<span class="part"><b>{{ doctitlecomplementary }}</b></span>
|
52
|
+
{% endif %}
|
50
53
|
{% if doctitlepart %}
|
51
54
|
{% if doctitlepartlabel %}<span class="partlabel">{{ doctitlepartlabel }}: </span><br/>{% endif %}
|
52
55
|
<span class="part"><b>{{ doctitlepart }}</b></span>
|
@@ -66,10 +69,13 @@ style='mso-no-proof:yes'>{{ editorialgroup }}</span></p>
|
|
66
69
|
{% else %}
|
67
70
|
<br/>
|
68
71
|
<p class="MsoNormal" align="left" style='text-align:left;line-height:18.0pt;margin-bottom:0.0pt;font-size:16.0pt'>
|
69
|
-
<span class="title">{{ docsubtitleintro }}{% if docsubtitleintro and docsubtitlemain %} — {% endif %}</span><span class="subtitle">{{ docsubtitlemain }}{% if docsubtitlemain and docsubtitlepart %} —{% endif %}</span>
|
72
|
+
<span class="title">{{ docsubtitleintro }}{% if docsubtitleintro and docsubtitlemain %} — {% endif %}</span><span class="subtitle">{{ docsubtitlemain }}{% if docsubtitlemain and (docsubtitlepart or docsubtitlecomplementary) %} —{% endif %}</span>
|
70
73
|
{% if docsubtitlepart %}
|
71
74
|
{% if docsubtitlepartlabel %}<span class="partlabel">{{ docsubtitlepartlabel }}: </span><br/>{% endif %}
|
72
75
|
<span class="part">{{ docsubtitlepart }}</span>
|
76
|
+
{% endif %}
|
77
|
+
{% if docsubtitlecomplementary %}
|
78
|
+
<span class="part">{{ docsubtitlecomplementary }}</span>
|
73
79
|
{% endif %}
|
74
80
|
</p>
|
75
81
|
{% if docsubtitleamdlabel %}
|
@@ -153,6 +153,8 @@
|
|
153
153
|
|
154
154
|
<xsl:variable name="doctype_uppercased" select="java:toUpperCase(java:java.lang.String.new($doctype_localized))"/>
|
155
155
|
|
156
|
+
<xsl:variable name="doctype_customized" select="normalize-space(/iso:metanorma/iso:metanorma-extension/iso:presentation-metadata/iso:doctype-customized)"/>
|
157
|
+
|
156
158
|
<xsl:variable name="stage" select="number(/iso:metanorma/iso:bibdata/iso:status/iso:stage)"/>
|
157
159
|
<xsl:variable name="substage" select="number(/iso:metanorma/iso:bibdata/iso:status/iso:substage)"/>
|
158
160
|
<xsl:variable name="stagename" select="normalize-space(/iso:metanorma/iso:bibdata/iso:ext/iso:stagename)"/>
|
@@ -413,6 +415,13 @@
|
|
413
415
|
<xsl:variable name="layoutVersion" select="normalize-space($layoutVersion_)"/>
|
414
416
|
<xsl:variable name="cover_page_border">0.5pt solid black</xsl:variable>
|
415
417
|
<xsl:variable name="color_red">rgb(237, 28, 36)</xsl:variable>
|
418
|
+
<xsl:variable name="color_secondary_value" select="normalize-space(/iso:metanorma/iso:metanorma-extension/iso:presentation-metadata/iso:color-secondary)"/>
|
419
|
+
<xsl:variable name="color_secondary">
|
420
|
+
<xsl:choose>
|
421
|
+
<xsl:when test="$color_secondary_value != ''"><xsl:value-of select="$color_secondary_value"/></xsl:when>
|
422
|
+
<xsl:otherwise><xsl:value-of select="$color_red"/></xsl:otherwise>
|
423
|
+
</xsl:choose>
|
424
|
+
</xsl:variable>
|
416
425
|
|
417
426
|
<xsl:variable name="XML" select="/"/>
|
418
427
|
|
@@ -1585,6 +1594,7 @@
|
|
1585
1594
|
|
1586
1595
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
1587
1596
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
1597
|
+
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-complementary']"/>
|
1588
1598
|
<fo:block font-size="11pt" text-transform="uppercase" margin-top="2mm">
|
1589
1599
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']/node()"/>
|
1590
1600
|
</fo:block>
|
@@ -1744,7 +1754,7 @@
|
|
1744
1754
|
|
1745
1755
|
<fo:block margin-top="6mm" font-weight="bold">
|
1746
1756
|
<xsl:call-template name="printEdition"/>
|
1747
|
-
<xsl:
|
1757
|
+
<xsl:value-of select="$nonbreak_space_em_dash_space"/>
|
1748
1758
|
<xsl:value-of select="/iso:metanorma/iso:bibdata/iso:version/iso:revision-date"/>
|
1749
1759
|
</fo:block>
|
1750
1760
|
|
@@ -1874,6 +1884,7 @@
|
|
1874
1884
|
</xsl:variable>
|
1875
1885
|
|
1876
1886
|
<xsl:choose>
|
1887
|
+
<xsl:when test="$doctype_customized != ''"><xsl:value-of select="$doctype_customized"/></xsl:when>
|
1877
1888
|
<xsl:when test="$stage-abbreviation = 'DIS'"> <!-- or $stage-abbreviation = 'DAMD' or $stage-abbreviation = 'DAM' -->
|
1878
1889
|
<xsl:choose>
|
1879
1890
|
<xsl:when test="normalize-space($stagename_localized_coverpage) != ''">
|
@@ -1930,7 +1941,7 @@
|
|
1930
1941
|
<fo:table-cell number-columns-spanned="2" display-align="after" padding-left="6mm">
|
1931
1942
|
<fo:block font-size="19pt" font-weight="bold" line-height="1">
|
1932
1943
|
<xsl:if test="$stage >=60 and $substage != 0">
|
1933
|
-
<xsl:attribute name="color"><xsl:value-of select="$
|
1944
|
+
<xsl:attribute name="color"><xsl:value-of select="$color_secondary"/></xsl:attribute>
|
1934
1945
|
</xsl:if>
|
1935
1946
|
<xsl:choose>
|
1936
1947
|
<xsl:when test="contains($docidentifierISO, ' ')">
|
@@ -3009,6 +3020,7 @@
|
|
3009
3020
|
<xsl:template name="insertTitlesLangMain">
|
3010
3021
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
3011
3022
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
3023
|
+
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-complementary']"/>
|
3012
3024
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
|
3013
3025
|
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
3014
3026
|
</xsl:apply-templates>
|
@@ -3021,6 +3033,7 @@
|
|
3021
3033
|
<xsl:param name="lang_other"/>
|
3022
3034
|
<xsl:apply-templates select="$XML/iso:metanorma/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
|
3023
3035
|
<xsl:apply-templates select="$XML/iso:metanorma/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
|
3036
|
+
<xsl:apply-templates select="$XML/iso:metanorma/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-complementary']"/>
|
3024
3037
|
<xsl:apply-templates select="$XML/iso:metanorma/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
|
3025
3038
|
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
3026
3039
|
</xsl:apply-templates>
|
@@ -3463,10 +3476,10 @@
|
|
3463
3476
|
<xsl:choose>
|
3464
3477
|
<xsl:when test="$layoutVersion = '1951'">
|
3465
3478
|
<fo:block text-transform="uppercase"><xsl:apply-templates/></fo:block>
|
3466
|
-
|
3479
|
+
</xsl:when>
|
3467
3480
|
<xsl:otherwise>
|
3468
3481
|
<xsl:apply-templates/>
|
3469
|
-
<xsl:
|
3482
|
+
<xsl:value-of select="$nonbreak_space_em_dash_space"/>
|
3470
3483
|
</xsl:otherwise>
|
3471
3484
|
</xsl:choose>
|
3472
3485
|
</xsl:template>
|
@@ -3494,6 +3507,12 @@
|
|
3494
3507
|
</xsl:choose>
|
3495
3508
|
</xsl:template>
|
3496
3509
|
|
3510
|
+
<xsl:template match="iso:bibdata/iso:title[@type = 'title-complementary']">
|
3511
|
+
<xsl:param name="body">false</xsl:param>
|
3512
|
+
<xsl:value-of select="$nonbreak_space_em_dash_space"/>
|
3513
|
+
<xsl:apply-templates/>
|
3514
|
+
</xsl:template>
|
3515
|
+
|
3497
3516
|
<xsl:template match="iso:bibdata/iso:title[@type = 'title-part']">
|
3498
3517
|
<xsl:param name="curr_lang" select="$lang"/>
|
3499
3518
|
<xsl:param name="isMainLang">false</xsl:param>
|
@@ -3502,7 +3521,7 @@
|
|
3502
3521
|
<!-- <xsl:text> — </xsl:text> -->
|
3503
3522
|
<xsl:choose>
|
3504
3523
|
<xsl:when test="$layoutVersion = '1951'"/>
|
3505
|
-
<xsl:otherwise><xsl:
|
3524
|
+
<xsl:otherwise><xsl:value-of select="$nonbreak_space_em_dash_space"/></xsl:otherwise>
|
3506
3525
|
</xsl:choose>
|
3507
3526
|
<xsl:variable name="part-word">
|
3508
3527
|
<xsl:choose>
|
@@ -3556,7 +3575,7 @@
|
|
3556
3575
|
<xsl:otherwise> <!-- $part = '' -->
|
3557
3576
|
<xsl:choose>
|
3558
3577
|
<xsl:when test="$layoutVersion = '1951'"/>
|
3559
|
-
<xsl:otherwise><xsl:
|
3578
|
+
<xsl:otherwise><xsl:value-of select="$nonbreak_space_em_dash_space"/></xsl:otherwise>
|
3560
3579
|
</xsl:choose>
|
3561
3580
|
</xsl:otherwise>
|
3562
3581
|
</xsl:choose>
|
@@ -3625,6 +3644,7 @@
|
|
3625
3644
|
<xsl:when test="$revision_date_num >= 19680101">
|
3626
3645
|
<fo:block font-weight="normal"><xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/></fo:block>
|
3627
3646
|
<fo:block space-before="24pt"><xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/></fo:block>
|
3647
|
+
<fo:block space-before="24pt"><xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-complementary']"/></fo:block>
|
3628
3648
|
</xsl:when>
|
3629
3649
|
<xsl:otherwise>
|
3630
3650
|
|
@@ -3632,6 +3652,7 @@
|
|
3632
3652
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']">
|
3633
3653
|
<xsl:with-param name="body">true</xsl:with-param>
|
3634
3654
|
</xsl:apply-templates>
|
3655
|
+
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-complementary']"/>
|
3635
3656
|
<fo:block font-size="11pt" text-transform="uppercase" margin-top="2mm">
|
3636
3657
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']/node()"/>
|
3637
3658
|
</fo:block>
|
@@ -3923,9 +3944,9 @@
|
|
3923
3944
|
<fo:block>
|
3924
3945
|
<xsl:if test="following-sibling::iso:p">
|
3925
3946
|
<xsl:attribute name="margin-bottom">3pt</xsl:attribute>
|
3926
|
-
<xsl:attribute name="margin-left">0.5mm</xsl:attribute>
|
3927
|
-
<xsl:attribute name="margin-right">0.5mm</xsl:attribute>
|
3928
3947
|
</xsl:if>
|
3948
|
+
<xsl:attribute name="margin-left">0.5mm</xsl:attribute>
|
3949
|
+
<xsl:attribute name="margin-right">0.5mm</xsl:attribute>
|
3929
3950
|
<xsl:if test="contains(@id, 'address') or contains(normalize-space(), 'Tel:') or contains(normalize-space(), 'Phone:')">
|
3930
3951
|
<xsl:attribute name="margin-left">4.5mm</xsl:attribute>
|
3931
3952
|
</xsl:if>
|
@@ -4915,6 +4936,7 @@
|
|
4915
4936
|
<fo:table-cell>
|
4916
4937
|
<fo:block>
|
4917
4938
|
<xsl:choose>
|
4939
|
+
<xsl:when test="$doctype_customized != ''"><xsl:value-of select="$doctype_customized"/></xsl:when>
|
4918
4940
|
<xsl:when test="$layoutVersion = '2024'">
|
4919
4941
|
<xsl:choose>
|
4920
4942
|
<xsl:when test="$doctype = 'committee-document'"><xsl:value-of select="$doctype_localized"/></xsl:when>
|
@@ -5480,13 +5502,23 @@
|
|
5480
5502
|
<fo:block margin-top="18pt" margin-bottom="-1mm" line-height="1.1"><xsl:value-of select="$copyrightTextLastPage2024"/></fo:block>
|
5481
5503
|
</fo:block>
|
5482
5504
|
</fo:table-cell>
|
5483
|
-
<fo:table-cell number-columns-spanned="2"
|
5484
|
-
<
|
5485
|
-
<xsl:
|
5486
|
-
<
|
5487
|
-
|
5488
|
-
|
5489
|
-
|
5505
|
+
<fo:table-cell number-columns-spanned="2" display-align="after">
|
5506
|
+
<xsl:choose>
|
5507
|
+
<xsl:when test="/iso:metanorma/iso:boilerplate/iso:feedback-statement">
|
5508
|
+
<fo:block font-size="16pt" margin-bottom="1mm" margin-right="1.5mm">
|
5509
|
+
<xsl:apply-templates select="/iso:metanorma/iso:boilerplate/iso:feedback-statement"/>
|
5510
|
+
</fo:block>
|
5511
|
+
</xsl:when>
|
5512
|
+
<xsl:otherwise>
|
5513
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
5514
|
+
<fo:block font-size="16pt" font-weight="bold" margin-bottom="1mm" margin-right="1.5mm">
|
5515
|
+
<xsl:if test="$stage >=60 and $substage != 0">
|
5516
|
+
<xsl:attribute name="color"><xsl:value-of select="$color_red"/></xsl:attribute>
|
5517
|
+
</xsl:if>
|
5518
|
+
<xsl:text>iso.org</xsl:text>
|
5519
|
+
</fo:block>
|
5520
|
+
</xsl:otherwise>
|
5521
|
+
</xsl:choose>
|
5490
5522
|
</fo:table-cell>
|
5491
5523
|
</fo:table-row>
|
5492
5524
|
</fo:table-body>
|
@@ -6000,6 +6032,7 @@
|
|
6000
6032
|
<xsl:variable name="hair_space"> </xsl:variable>
|
6001
6033
|
<xsl:variable name="en_dash">–</xsl:variable>
|
6002
6034
|
<xsl:variable name="em_dash">—</xsl:variable>
|
6035
|
+
<xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
|
6003
6036
|
<xsl:variable name="cr"> </xsl:variable>
|
6004
6037
|
<xsl:variable name="lf">
|
6005
6038
|
</xsl:variable>
|
@@ -153,6 +153,8 @@
|
|
153
153
|
|
154
154
|
<xsl:variable name="doctype_uppercased" select="java:toUpperCase(java:java.lang.String.new($doctype_localized))"/>
|
155
155
|
|
156
|
+
<xsl:variable name="doctype_customized" select="normalize-space(/iso:metanorma/iso:metanorma-extension/iso:presentation-metadata/iso:doctype-customized)"/>
|
157
|
+
|
156
158
|
<xsl:variable name="stage" select="number(/iso:metanorma/iso:bibdata/iso:status/iso:stage)"/>
|
157
159
|
<xsl:variable name="substage" select="number(/iso:metanorma/iso:bibdata/iso:status/iso:substage)"/>
|
158
160
|
<xsl:variable name="stagename" select="normalize-space(/iso:metanorma/iso:bibdata/iso:ext/iso:stagename)"/>
|
@@ -413,6 +415,13 @@
|
|
413
415
|
<xsl:variable name="layoutVersion" select="normalize-space($layoutVersion_)"/>
|
414
416
|
<xsl:variable name="cover_page_border">0.5pt solid black</xsl:variable>
|
415
417
|
<xsl:variable name="color_red">rgb(237, 28, 36)</xsl:variable>
|
418
|
+
<xsl:variable name="color_secondary_value" select="normalize-space(/iso:metanorma/iso:metanorma-extension/iso:presentation-metadata/iso:color-secondary)"/>
|
419
|
+
<xsl:variable name="color_secondary">
|
420
|
+
<xsl:choose>
|
421
|
+
<xsl:when test="$color_secondary_value != ''"><xsl:value-of select="$color_secondary_value"/></xsl:when>
|
422
|
+
<xsl:otherwise><xsl:value-of select="$color_red"/></xsl:otherwise>
|
423
|
+
</xsl:choose>
|
424
|
+
</xsl:variable>
|
416
425
|
|
417
426
|
<xsl:variable name="XML" select="/"/>
|
418
427
|
|
@@ -1585,6 +1594,7 @@
|
|
1585
1594
|
|
1586
1595
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
1587
1596
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
1597
|
+
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-complementary']"/>
|
1588
1598
|
<fo:block font-size="11pt" text-transform="uppercase" margin-top="2mm">
|
1589
1599
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']/node()"/>
|
1590
1600
|
</fo:block>
|
@@ -1744,7 +1754,7 @@
|
|
1744
1754
|
|
1745
1755
|
<fo:block margin-top="6mm" font-weight="bold">
|
1746
1756
|
<xsl:call-template name="printEdition"/>
|
1747
|
-
<xsl:
|
1757
|
+
<xsl:value-of select="$nonbreak_space_em_dash_space"/>
|
1748
1758
|
<xsl:value-of select="/iso:metanorma/iso:bibdata/iso:version/iso:revision-date"/>
|
1749
1759
|
</fo:block>
|
1750
1760
|
|
@@ -1874,6 +1884,7 @@
|
|
1874
1884
|
</xsl:variable>
|
1875
1885
|
|
1876
1886
|
<xsl:choose>
|
1887
|
+
<xsl:when test="$doctype_customized != ''"><xsl:value-of select="$doctype_customized"/></xsl:when>
|
1877
1888
|
<xsl:when test="$stage-abbreviation = 'DIS'"> <!-- or $stage-abbreviation = 'DAMD' or $stage-abbreviation = 'DAM' -->
|
1878
1889
|
<xsl:choose>
|
1879
1890
|
<xsl:when test="normalize-space($stagename_localized_coverpage) != ''">
|
@@ -1930,7 +1941,7 @@
|
|
1930
1941
|
<fo:table-cell number-columns-spanned="2" display-align="after" padding-left="6mm">
|
1931
1942
|
<fo:block font-size="19pt" font-weight="bold" line-height="1">
|
1932
1943
|
<xsl:if test="$stage >=60 and $substage != 0">
|
1933
|
-
<xsl:attribute name="color"><xsl:value-of select="$
|
1944
|
+
<xsl:attribute name="color"><xsl:value-of select="$color_secondary"/></xsl:attribute>
|
1934
1945
|
</xsl:if>
|
1935
1946
|
<xsl:choose>
|
1936
1947
|
<xsl:when test="contains($docidentifierISO, ' ')">
|
@@ -3009,6 +3020,7 @@
|
|
3009
3020
|
<xsl:template name="insertTitlesLangMain">
|
3010
3021
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/>
|
3011
3022
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/>
|
3023
|
+
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-complementary']"/>
|
3012
3024
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']">
|
3013
3025
|
<xsl:with-param name="isMainLang">true</xsl:with-param>
|
3014
3026
|
</xsl:apply-templates>
|
@@ -3021,6 +3033,7 @@
|
|
3021
3033
|
<xsl:param name="lang_other"/>
|
3022
3034
|
<xsl:apply-templates select="$XML/iso:metanorma/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-intro']"/>
|
3023
3035
|
<xsl:apply-templates select="$XML/iso:metanorma/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-main']"/>
|
3036
|
+
<xsl:apply-templates select="$XML/iso:metanorma/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-complementary']"/>
|
3024
3037
|
<xsl:apply-templates select="$XML/iso:metanorma/iso:bibdata/iso:title[@language = $lang_other and @type = 'title-part']">
|
3025
3038
|
<xsl:with-param name="curr_lang" select="$lang_other"/>
|
3026
3039
|
</xsl:apply-templates>
|
@@ -3463,10 +3476,10 @@
|
|
3463
3476
|
<xsl:choose>
|
3464
3477
|
<xsl:when test="$layoutVersion = '1951'">
|
3465
3478
|
<fo:block text-transform="uppercase"><xsl:apply-templates/></fo:block>
|
3466
|
-
|
3479
|
+
</xsl:when>
|
3467
3480
|
<xsl:otherwise>
|
3468
3481
|
<xsl:apply-templates/>
|
3469
|
-
<xsl:
|
3482
|
+
<xsl:value-of select="$nonbreak_space_em_dash_space"/>
|
3470
3483
|
</xsl:otherwise>
|
3471
3484
|
</xsl:choose>
|
3472
3485
|
</xsl:template>
|
@@ -3494,6 +3507,12 @@
|
|
3494
3507
|
</xsl:choose>
|
3495
3508
|
</xsl:template>
|
3496
3509
|
|
3510
|
+
<xsl:template match="iso:bibdata/iso:title[@type = 'title-complementary']">
|
3511
|
+
<xsl:param name="body">false</xsl:param>
|
3512
|
+
<xsl:value-of select="$nonbreak_space_em_dash_space"/>
|
3513
|
+
<xsl:apply-templates/>
|
3514
|
+
</xsl:template>
|
3515
|
+
|
3497
3516
|
<xsl:template match="iso:bibdata/iso:title[@type = 'title-part']">
|
3498
3517
|
<xsl:param name="curr_lang" select="$lang"/>
|
3499
3518
|
<xsl:param name="isMainLang">false</xsl:param>
|
@@ -3502,7 +3521,7 @@
|
|
3502
3521
|
<!-- <xsl:text> — </xsl:text> -->
|
3503
3522
|
<xsl:choose>
|
3504
3523
|
<xsl:when test="$layoutVersion = '1951'"/>
|
3505
|
-
<xsl:otherwise><xsl:
|
3524
|
+
<xsl:otherwise><xsl:value-of select="$nonbreak_space_em_dash_space"/></xsl:otherwise>
|
3506
3525
|
</xsl:choose>
|
3507
3526
|
<xsl:variable name="part-word">
|
3508
3527
|
<xsl:choose>
|
@@ -3556,7 +3575,7 @@
|
|
3556
3575
|
<xsl:otherwise> <!-- $part = '' -->
|
3557
3576
|
<xsl:choose>
|
3558
3577
|
<xsl:when test="$layoutVersion = '1951'"/>
|
3559
|
-
<xsl:otherwise><xsl:
|
3578
|
+
<xsl:otherwise><xsl:value-of select="$nonbreak_space_em_dash_space"/></xsl:otherwise>
|
3560
3579
|
</xsl:choose>
|
3561
3580
|
</xsl:otherwise>
|
3562
3581
|
</xsl:choose>
|
@@ -3625,6 +3644,7 @@
|
|
3625
3644
|
<xsl:when test="$revision_date_num >= 19680101">
|
3626
3645
|
<fo:block font-weight="normal"><xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-intro']"/></fo:block>
|
3627
3646
|
<fo:block space-before="24pt"><xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']"/></fo:block>
|
3647
|
+
<fo:block space-before="24pt"><xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-complementary']"/></fo:block>
|
3628
3648
|
</xsl:when>
|
3629
3649
|
<xsl:otherwise>
|
3630
3650
|
|
@@ -3632,6 +3652,7 @@
|
|
3632
3652
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-main']">
|
3633
3653
|
<xsl:with-param name="body">true</xsl:with-param>
|
3634
3654
|
</xsl:apply-templates>
|
3655
|
+
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-complementary']"/>
|
3635
3656
|
<fo:block font-size="11pt" text-transform="uppercase" margin-top="2mm">
|
3636
3657
|
<xsl:apply-templates select="/iso:metanorma/iso:bibdata/iso:title[@language = $lang and @type = 'title-part']/node()"/>
|
3637
3658
|
</fo:block>
|
@@ -3923,9 +3944,9 @@
|
|
3923
3944
|
<fo:block>
|
3924
3945
|
<xsl:if test="following-sibling::iso:p">
|
3925
3946
|
<xsl:attribute name="margin-bottom">3pt</xsl:attribute>
|
3926
|
-
<xsl:attribute name="margin-left">0.5mm</xsl:attribute>
|
3927
|
-
<xsl:attribute name="margin-right">0.5mm</xsl:attribute>
|
3928
3947
|
</xsl:if>
|
3948
|
+
<xsl:attribute name="margin-left">0.5mm</xsl:attribute>
|
3949
|
+
<xsl:attribute name="margin-right">0.5mm</xsl:attribute>
|
3929
3950
|
<xsl:if test="contains(@id, 'address') or contains(normalize-space(), 'Tel:') or contains(normalize-space(), 'Phone:')">
|
3930
3951
|
<xsl:attribute name="margin-left">4.5mm</xsl:attribute>
|
3931
3952
|
</xsl:if>
|
@@ -4915,6 +4936,7 @@
|
|
4915
4936
|
<fo:table-cell>
|
4916
4937
|
<fo:block>
|
4917
4938
|
<xsl:choose>
|
4939
|
+
<xsl:when test="$doctype_customized != ''"><xsl:value-of select="$doctype_customized"/></xsl:when>
|
4918
4940
|
<xsl:when test="$layoutVersion = '2024'">
|
4919
4941
|
<xsl:choose>
|
4920
4942
|
<xsl:when test="$doctype = 'committee-document'"><xsl:value-of select="$doctype_localized"/></xsl:when>
|
@@ -5480,13 +5502,23 @@
|
|
5480
5502
|
<fo:block margin-top="18pt" margin-bottom="-1mm" line-height="1.1"><xsl:value-of select="$copyrightTextLastPage2024"/></fo:block>
|
5481
5503
|
</fo:block>
|
5482
5504
|
</fo:table-cell>
|
5483
|
-
<fo:table-cell number-columns-spanned="2"
|
5484
|
-
<
|
5485
|
-
<xsl:
|
5486
|
-
<
|
5487
|
-
|
5488
|
-
|
5489
|
-
|
5505
|
+
<fo:table-cell number-columns-spanned="2" display-align="after">
|
5506
|
+
<xsl:choose>
|
5507
|
+
<xsl:when test="/iso:metanorma/iso:boilerplate/iso:feedback-statement">
|
5508
|
+
<fo:block font-size="16pt" margin-bottom="1mm" margin-right="1.5mm">
|
5509
|
+
<xsl:apply-templates select="/iso:metanorma/iso:boilerplate/iso:feedback-statement"/>
|
5510
|
+
</fo:block>
|
5511
|
+
</xsl:when>
|
5512
|
+
<xsl:otherwise>
|
5513
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
5514
|
+
<fo:block font-size="16pt" font-weight="bold" margin-bottom="1mm" margin-right="1.5mm">
|
5515
|
+
<xsl:if test="$stage >=60 and $substage != 0">
|
5516
|
+
<xsl:attribute name="color"><xsl:value-of select="$color_red"/></xsl:attribute>
|
5517
|
+
</xsl:if>
|
5518
|
+
<xsl:text>iso.org</xsl:text>
|
5519
|
+
</fo:block>
|
5520
|
+
</xsl:otherwise>
|
5521
|
+
</xsl:choose>
|
5490
5522
|
</fo:table-cell>
|
5491
5523
|
</fo:table-row>
|
5492
5524
|
</fo:table-body>
|
@@ -6000,6 +6032,7 @@
|
|
6000
6032
|
<xsl:variable name="hair_space"> </xsl:variable>
|
6001
6033
|
<xsl:variable name="en_dash">–</xsl:variable>
|
6002
6034
|
<xsl:variable name="em_dash">—</xsl:variable>
|
6035
|
+
<xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
|
6003
6036
|
<xsl:variable name="cr"> </xsl:variable>
|
6004
6037
|
<xsl:variable name="lf">
|
6005
6038
|
</xsl:variable>
|
data/lib/isodoc/iso/metadata.rb
CHANGED
@@ -11,8 +11,7 @@ module IsoDoc
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def status_abbrev(stage, _substage, iter, draft, doctype)
|
14
|
-
return ""
|
15
|
-
|
14
|
+
stage or return ""
|
16
15
|
if %w(technical-report technical-specification).include?(doctype)
|
17
16
|
stage = "DTS" if stage == "DIS"
|
18
17
|
stage = "FDTS" if stage == "FDIS"
|
@@ -103,16 +102,16 @@ module IsoDoc
|
|
103
102
|
end
|
104
103
|
|
105
104
|
def compose_title(tparts, tnums, lang)
|
106
|
-
|
107
|
-
tparts[:main].nil? or
|
108
|
-
main = tparts[:main].children.to_xml
|
105
|
+
t = tparts[:main].nil? ? "" : tparts[:main].children.to_xml
|
109
106
|
tparts[:intro] and
|
110
|
-
|
107
|
+
t = "#{tparts[:intro].children.to_xml} — #{t}"
|
108
|
+
tparts[:complementary] and
|
109
|
+
t = "#{t} — #{tparts[:complementary].children.to_xml}"
|
111
110
|
if tparts[:part]
|
112
111
|
suffix = part_title(tparts[:part], tnums, lang)
|
113
|
-
|
112
|
+
t = "#{t} — #{suffix}"
|
114
113
|
end
|
115
|
-
|
114
|
+
t
|
116
115
|
end
|
117
116
|
|
118
117
|
def title_nums(isoxml)
|
@@ -125,16 +124,10 @@ module IsoDoc
|
|
125
124
|
end
|
126
125
|
|
127
126
|
def title_parts(isoxml, lang)
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
part: isoxml.at(ns("//bibdata/title[@type='title-part' and " \
|
133
|
-
"@language='#{lang}']")),
|
134
|
-
amd: isoxml.at(ns("//bibdata/title[@type='title-amd' and " \
|
135
|
-
"@language='#{lang}']")),
|
136
|
-
add: isoxml.at(ns("//bibdata/title[@type='title-add' and " \
|
137
|
-
"@language='#{lang}']")) }
|
127
|
+
%w(intro main complementary part amd add).each_with_object({}) do |w, m|
|
128
|
+
m[w.to_sym] = isoxml.at(ns("//bibdata/title[@type='title-#{w}' and " \
|
129
|
+
"@language='#{lang}']"))
|
130
|
+
end
|
138
131
|
end
|
139
132
|
|
140
133
|
def title(isoxml, _out)
|
@@ -142,13 +135,15 @@ module IsoDoc
|
|
142
135
|
when "fr", "ru" then @lang
|
143
136
|
else "en"
|
144
137
|
end
|
145
|
-
# intro, main, part, amd = title_parts(isoxml, lang)
|
138
|
+
# intro, main, complementary, part, amd = title_parts(isoxml, lang)
|
146
139
|
tp = title_parts(isoxml, lang)
|
147
140
|
tn = title_nums(isoxml)
|
148
141
|
set(:doctitlemain, tp[:main] ? tp[:main].children.to_xml : "")
|
149
142
|
main = compose_title(tp, tn, lang)
|
150
143
|
set(:doctitle, main)
|
151
144
|
tp[:intro] and set(:doctitleintro, tp[:intro].children.to_xml)
|
145
|
+
tp[:complementary] and
|
146
|
+
set(:doctitlecomplementary, tp[:complementary].children.to_xml)
|
152
147
|
set(:doctitlepartlabel, part_prefix(tn, lang))
|
153
148
|
set(:doctitlepart, tp[:part].children.to_xml) if tp[:part]
|
154
149
|
set(:doctitleamdlabel, amd_prefix(tn, lang)) if tn[:amd]
|
@@ -167,6 +162,8 @@ module IsoDoc
|
|
167
162
|
main = compose_title(tp, tn, lang)
|
168
163
|
set(:docsubtitle, main)
|
169
164
|
tp[:intro] and set(:docsubtitleintro, tp[:intro].children.to_xml)
|
165
|
+
tp[:complementary] and
|
166
|
+
set(:docsubtitlecomplementary, tp[:complementary].children.to_xml)
|
170
167
|
set(:docsubtitlepartlabel, part_prefix(tn, lang))
|
171
168
|
tp[:part] and set(:docsubtitlepart, tp[:part].children.to_xml)
|
172
169
|
set(:docsubtitleamdlabel, amd_prefix(tn, lang)) if tn[:amd]
|
@@ -98,7 +98,8 @@ module IsoDoc
|
|
98
98
|
@meta.get[:doctitleintro] && @meta.get[:doctitlemain] and
|
99
99
|
ret += " — "
|
100
100
|
ret += @meta.get[:doctitlemain]
|
101
|
-
@meta.get[:doctitlemain] &&
|
101
|
+
@meta.get[:doctitlemain] &&
|
102
|
+
(@meta.get[:doctitlepart] || @meta.get[:doctitlecomplementary]) and
|
102
103
|
ret += " — "
|
103
104
|
ret += "</span>#{middle_title_part}"
|
104
105
|
"<p class='zzSTDTitle1'>#{ret}</p>"
|
@@ -106,7 +107,9 @@ module IsoDoc
|
|
106
107
|
|
107
108
|
def middle_title_part
|
108
109
|
ret = ""
|
109
|
-
if a = @meta.get[:
|
110
|
+
if a = @meta.get[:doctitlecomplementary]
|
111
|
+
ret += "<span class='boldtitle'>#{a}</span>"
|
112
|
+
elsif a = @meta.get[:doctitlepart]
|
110
113
|
b = @meta.get[:doctitlepartlabel] and
|
111
114
|
ret += "<span class='nonboldtitle'>#{b}:</span> "
|
112
115
|
ret += "<span class='boldtitle'>#{a}</span>"
|
data/lib/metanorma/iso/front.rb
CHANGED
@@ -71,6 +71,13 @@ module Metanorma
|
|
71
71
|
@log.add("Document Attributes", nil, err)
|
72
72
|
end
|
73
73
|
|
74
|
+
def title_component(node, xml, lang, attr, comp)
|
75
|
+
t = node.attr("title-#{comp[:name]}-#{lang}") or return
|
76
|
+
xml.title(**attr_code(attr.merge(type: "title-#{comp[:abbr]}"))) do |t1|
|
77
|
+
t1 << Metanorma::Utils::asciidoc_sub(t)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
74
81
|
def title_intro(node, xml, lang, at)
|
75
82
|
t = node.attr("title-intro-#{lang}") or return
|
76
83
|
xml.title(**attr_code(at.merge(type: "title-intro"))) do |t1|
|
@@ -106,30 +113,44 @@ module Metanorma
|
|
106
113
|
end
|
107
114
|
|
108
115
|
def title_full(node, xml, lang, at)
|
109
|
-
title = node
|
110
|
-
intro = node.attr("title-intro-#{lang}")
|
111
|
-
part = node.attr("title-part-#{lang}")
|
112
|
-
amd = node.attr("title-amendment-#{lang}")
|
113
|
-
add = node.attr("title-addendum-#{lang}")
|
116
|
+
title, intro, part, amd, add = title_full_prep(node, lang)
|
114
117
|
title = "#{intro} -- #{title}" if intro
|
115
118
|
title = "#{title} -- #{part}" if part
|
116
|
-
title = "#{title} -- #{amd}" if amd
|
117
|
-
title = "#{title} -- #{add}" if
|
119
|
+
title = "#{title} -- #{amd}" if amd
|
120
|
+
title = "#{title} -- #{add}" if add
|
118
121
|
xml.title **attr_code(at.merge(type: "main")) do |t1|
|
119
122
|
t1 << Metanorma::Utils::asciidoc_sub(title)
|
120
123
|
end
|
121
124
|
end
|
122
125
|
|
126
|
+
def title_full_prep(node, lang)
|
127
|
+
title = node.attr("title-main-#{lang}")
|
128
|
+
intro = node.attr("title-intro-#{lang}")
|
129
|
+
part = node.attr("title-part-#{lang}") ||
|
130
|
+
node.attr("title-complementary-#{lang}")
|
131
|
+
@amd and amd = node.attr("title-amendment-#{lang}")
|
132
|
+
node.attr("addendum-number") and
|
133
|
+
add = node.attr("title-addendum-#{lang}")
|
134
|
+
[title, intro, part, amd, add]
|
135
|
+
end
|
136
|
+
|
123
137
|
def title(node, xml)
|
124
138
|
%w(en ru fr).each do |lang|
|
125
139
|
at = { language: lang, format: "text/plain" }
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
140
|
+
title1(node, xml, lang, at)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
def title1(node, xml, lang, at)
|
145
|
+
title_full(node, xml, lang, at)
|
146
|
+
%w(intro main part complementary).each do |w|
|
147
|
+
title_component(node, xml, lang, at, { name: w, abbr: w })
|
132
148
|
end
|
149
|
+
@amd and title_component(node, xml, lang, at,
|
150
|
+
{ name: "amendment", abbr: "amd" })
|
151
|
+
node.attr("addendum-number") and
|
152
|
+
title_component(node, xml, lang, at,
|
153
|
+
{ name: "addendum", abbr: "add" })
|
133
154
|
end
|
134
155
|
|
135
156
|
def relaton_relations
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<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">
|
3
|
-
<!-- VERSION v2.0.
|
3
|
+
<!-- VERSION v2.0.6 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -801,6 +801,12 @@ titlecase, or lowercase</a:documentation>
|
|
801
801
|
<a:documentation>User-supplied anchor of element; replaced by content-based id, with all references to the anchor updated accordingly</a:documentation>
|
802
802
|
</attribute>
|
803
803
|
</optional>
|
804
|
+
<optional>
|
805
|
+
<attribute name="source">
|
806
|
+
<a:documentation>Sourcing of the current element in an external data model</a:documentation>
|
807
|
+
<ref name="IdRefType"/>
|
808
|
+
</attribute>
|
809
|
+
</optional>
|
804
810
|
</define>
|
805
811
|
<define name="OptionalId" combine="interleave">
|
806
812
|
<optional>
|
@@ -808,6 +814,12 @@ titlecase, or lowercase</a:documentation>
|
|
808
814
|
<a:documentation> User-supplied anchor of element; replaced by content-based id, with all references to the anchor updated accordingly</a:documentation>
|
809
815
|
</attribute>
|
810
816
|
</optional>
|
817
|
+
<optional>
|
818
|
+
<attribute name="source">
|
819
|
+
<a:documentation>Sourcing of the current element in an external data model</a:documentation>
|
820
|
+
<ref name="IdRefType"/>
|
821
|
+
</attribute>
|
822
|
+
</optional>
|
811
823
|
</define>
|
812
824
|
<define name="ObligationType">
|
813
825
|
<a:documentation>The force of a clause in a standard document: whether it has normative or informative effect</a:documentation>
|
@@ -954,6 +966,7 @@ titlecase, or lowercase</a:documentation>
|
|
954
966
|
is used in particular to capture mutually agreed definitions of codepoints in Unicode Private Use Area</a:documentation>
|
955
967
|
</attribute>
|
956
968
|
</optional>
|
969
|
+
<ref name="OptionalId"/>
|
957
970
|
<oneOrMore>
|
958
971
|
<ref name="TextElement">
|
959
972
|
<a:documentation>Textual content of span</a:documentation>
|
@@ -25,22 +25,6 @@ module Metanorma
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
# KILL
|
29
|
-
def see_xrefs_validatex(root)
|
30
|
-
@lang == "en" or return
|
31
|
-
root.xpath("//xref").each do |t|
|
32
|
-
preceding = t.at("./preceding-sibling::text()[last()]")
|
33
|
-
!preceding.nil? &&
|
34
|
-
/\b(see| refer to)\p{Zs}*\Z/mi.match(preceding) or next
|
35
|
-
|
36
|
-
(target = root.at("//*[@anchor = '#{t['target']}']")) || next
|
37
|
-
target.at("./ancestor-or-self::*[@obligation = 'normative']") &&
|
38
|
-
!target.at("./ancestor::sections") and
|
39
|
-
@log.add("Style", t,
|
40
|
-
"'see #{t['target']}' is pointing to a normative section")
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
28
|
# ISO/IEC DIR 2, 15.5.3, 20.2
|
45
29
|
# does not deal with preceding text marked up
|
46
30
|
def see_xrefs_validate(root)
|
@@ -122,7 +106,8 @@ module Metanorma
|
|
122
106
|
.xpath("//sections/terms | //sections/clause[.//terms] | " \
|
123
107
|
"//annex[.//terms]").each_with_object({}) do |t, m|
|
124
108
|
t.xpath(".//*/@anchor").each { |a| m[a.text] = true }
|
125
|
-
t.
|
109
|
+
t.xpath(".//*/@id").each { |a| m[a.text] = true }
|
110
|
+
t.name == "terms" and m[t["anchor"] || t["id"]] = true
|
126
111
|
end
|
127
112
|
xmldoc.xpath(".//xref").each do |x|
|
128
113
|
term_xrefs_validate1(x, termids)
|
@@ -130,12 +115,12 @@ module Metanorma
|
|
130
115
|
end
|
131
116
|
|
132
117
|
def term_xrefs_validate1(xref, termids)
|
133
|
-
closest_id = xref.xpath("./ancestor::*[@
|
134
|
-
termids[xref["target"]] && !termids[closest_id["
|
118
|
+
closest_id = xref.xpath("./ancestor::*[@id]")&.last or return
|
119
|
+
termids[xref["target"]] && !termids[closest_id["id"]] and
|
135
120
|
@log.add("Style", xref,
|
136
121
|
"only terms clauses can cross-reference terms clause " \
|
137
122
|
"(#{xref['target']})")
|
138
|
-
!termids[xref["target"]] && termids[closest_id["
|
123
|
+
!termids[xref["target"]] && termids[closest_id["id"]] and
|
139
124
|
@log.add("Style", xref,
|
140
125
|
"non-terms clauses cannot cross-reference terms clause " \
|
141
126
|
"(#{xref['target']})")
|
@@ -118,17 +118,17 @@ module Metanorma
|
|
118
118
|
if elem.nil? || elem.name != "clause"
|
119
119
|
@log.add("Style", elem, "Document must contain at least one clause")
|
120
120
|
end
|
121
|
-
elem&.at("./self::clause")
|
121
|
+
elem&.at("./self::clause") or
|
122
122
|
@log.add("Style", elem, "Document must contain clause after " \
|
123
123
|
"Terms and Definitions")
|
124
|
-
elem&.at("./self::clause[@type = 'scope']")
|
124
|
+
elem&.at("./self::clause[@type = 'scope']") and
|
125
125
|
@log.add("Style", elem,
|
126
|
-
"Scope must occur
|
126
|
+
"Scope must not occur after Terms and Definitions")
|
127
127
|
elem = names.shift
|
128
128
|
while elem&.name == "clause"
|
129
|
-
elem&.at("./self::clause[@type = 'scope']")
|
130
|
-
|
131
|
-
|
129
|
+
elem&.at("./self::clause[@type = 'scope']") and
|
130
|
+
@log.add("Style", elem,
|
131
|
+
"Scope must not occur after Terms and Definitions")
|
132
132
|
elem = names.shift
|
133
133
|
end
|
134
134
|
%w(annex references).include? elem&.name or
|
@@ -8,8 +8,8 @@ module Metanorma
|
|
8
8
|
def extract_text(node)
|
9
9
|
node.nil? and return ""
|
10
10
|
node1 = Nokogiri::XML.fragment(node.to_s)
|
11
|
-
node1.xpath(".//link | .//locality | .//localityStack |
|
12
|
-
.each(&:remove)
|
11
|
+
node1.xpath(".//link | .//locality | .//localityStack | " \
|
12
|
+
".//stem | .//sourcecode").each(&:remove)
|
13
13
|
ret = ""
|
14
14
|
node1.traverse { |x| ret += x.text if x.text? }
|
15
15
|
HTMLEntities.new.decode(ret)
|
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: 3.0.
|
4
|
+
version: 3.0.8
|
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-05-
|
11
|
+
date: 2025-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|