metanorma-iec 2.1.6 → 2.1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +1 -1
- data/.github/workflows/release.yml +24 -0
- data/lib/isodoc/iec/html/html_iec_titlepage.html +2 -2
- data/lib/isodoc/iec/iec.international-standard.xsl +117 -154
- data/lib/metanorma/iec/biblio.rng +8 -5
- data/lib/metanorma/iec/version.rb +1 -1
- data/lib/metanorma-iec.rb +2 -1
- data/metanorma-iec.gemspec +1 -1
- data/spec/isodoc/iev_spec.rb +2 -2
- data/spec/isodoc/ref_spec.rb +117 -116
- data/spec/metanorma/base_spec.rb +0 -10
- data/spec/metanorma/iev_spec.rb +9 -5
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8212307690191af07b587646aa7c8cc8ba091c1a55d1908bd3851a2b46fc1e7f
|
4
|
+
data.tar.gz: 94239654f8b267dfd12bc8198235f3c3fe89698ddc9a25cef206893a16bad5ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce12487a121517043948f01ad664187803d575d01dfa8450c523f7f50958473e15ee80f623bf9b6c45cf5156421fdfa50af641e8588968ea1c07a5d5b57f033e
|
7
|
+
data.tar.gz: 7f776f92f93ba2a48007ee558f4dd534212c32f443e9bfd6ec6294cfbd27d5b31f1729e3656256509c89b7504b9097df18e88d39dac1e1fecf3df7937bf98302
|
data/.github/workflows/rake.yml
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
|
+
name: release
|
4
|
+
|
5
|
+
on:
|
6
|
+
workflow_dispatch:
|
7
|
+
inputs:
|
8
|
+
next_version:
|
9
|
+
description: |
|
10
|
+
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
11
|
+
required: true
|
12
|
+
default: 'skip'
|
13
|
+
push:
|
14
|
+
tags: [ v* ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
release:
|
18
|
+
uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
|
19
|
+
with:
|
20
|
+
next_version: ${{ github.event.inputs.next_version }}
|
21
|
+
secrets:
|
22
|
+
rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
|
23
|
+
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
24
|
+
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<p class="coverpage_techcommittee"><a
|
19
19
|
name="CVP_Secretariat_Loca">Secretariat</a>: {{ secretariat }}</p>
|
20
20
|
|
21
|
-
<div class="doctitle-en"><div><span class="title">{{ doctitleintro }}{% if doctitleintro and doctitlemain %}
|
21
|
+
<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>
|
22
22
|
{% if doctitlepart %}
|
23
23
|
</div><div class="doctitle-part">
|
24
24
|
{% if doctitlepartlabel %}<span class="partlabel">{{ doctitlepartlabel }}: </span>{% endif %}
|
@@ -26,7 +26,7 @@ name="CVP_Secretariat_Loca">Secretariat</a>: {{ secretariat }}</p>
|
|
26
26
|
{% endif %}
|
27
27
|
</div></div>
|
28
28
|
|
29
|
-
<div class="doctitle-fr"><div><span class="title">{{ docsubtitleintro }}{% if docsubtitleintro and docsubtitlemain %}
|
29
|
+
<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>
|
30
30
|
{% if docsubtitlepart %}
|
31
31
|
</div><div>
|
32
32
|
{% if docsubtitlepartlabel %}<span class="partlabel">{{ docsubtitlepartlabel }}: </span>{% endif %}
|
@@ -1944,8 +1944,18 @@
|
|
1944
1944
|
|
1945
1945
|
<xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
|
1946
1946
|
|
1947
|
+
<xsl:variable name="isApplyAutolayoutAlgorithm_">
|
1948
|
+
true
|
1949
|
+
</xsl:variable>
|
1950
|
+
<xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
|
1951
|
+
|
1947
1952
|
<xsl:variable name="isGenerateTableIF_">
|
1948
|
-
|
1953
|
+
<xsl:choose>
|
1954
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
|
1955
|
+
<xsl:value-of select="normalize-space($table_if) = 'true'"/>
|
1956
|
+
</xsl:when>
|
1957
|
+
<xsl:otherwise>false</xsl:otherwise>
|
1958
|
+
</xsl:choose>
|
1949
1959
|
</xsl:variable>
|
1950
1960
|
<xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
|
1951
1961
|
|
@@ -2364,6 +2374,9 @@
|
|
2364
2374
|
<xsl:attribute-set name="import-style">
|
2365
2375
|
</xsl:attribute-set>
|
2366
2376
|
|
2377
|
+
<xsl:attribute-set name="component-style">
|
2378
|
+
</xsl:attribute-set>
|
2379
|
+
|
2367
2380
|
<xsl:attribute-set name="recommendation-style">
|
2368
2381
|
|
2369
2382
|
</xsl:attribute-set>
|
@@ -2580,9 +2593,7 @@
|
|
2580
2593
|
</xsl:attribute-set>
|
2581
2594
|
|
2582
2595
|
<xsl:attribute-set name="dt-block-style">
|
2583
|
-
<xsl:attribute name="margin-top">
|
2584
|
-
|
2585
|
-
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
2596
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
2586
2597
|
|
2587
2598
|
</xsl:attribute-set>
|
2588
2599
|
|
@@ -3565,6 +3576,7 @@
|
|
3565
3576
|
|
3566
3577
|
<xsl:variable name="margin-side">
|
3567
3578
|
<xsl:choose>
|
3579
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
|
3568
3580
|
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
3569
3581
|
<xsl:otherwise>0</xsl:otherwise>
|
3570
3582
|
</xsl:choose>
|
@@ -3637,6 +3649,7 @@
|
|
3637
3649
|
</td>
|
3638
3650
|
</tr>
|
3639
3651
|
-->
|
3652
|
+
<!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
|
3640
3653
|
<xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
|
3641
3654
|
|
3642
3655
|
</xsl:when>
|
@@ -3771,12 +3784,17 @@
|
|
3771
3784
|
<xsl:template name="calculate-column-widths">
|
3772
3785
|
<xsl:param name="table"/>
|
3773
3786
|
<xsl:param name="cols-count"/>
|
3774
|
-
|
3787
|
+
<xsl:choose>
|
3788
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
|
3789
|
+
<xsl:call-template name="get-calculated-column-widths-autolayout-algorithm"/>
|
3790
|
+
</xsl:when>
|
3791
|
+
<xsl:otherwise>
|
3775
3792
|
<xsl:call-template name="calculate-column-widths-proportional">
|
3776
3793
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3777
3794
|
<xsl:with-param name="table" select="$table"/>
|
3778
3795
|
</xsl:call-template>
|
3779
|
-
|
3796
|
+
</xsl:otherwise>
|
3797
|
+
</xsl:choose>
|
3780
3798
|
</xsl:template>
|
3781
3799
|
|
3782
3800
|
<!-- ================================================== -->
|
@@ -3954,6 +3972,7 @@
|
|
3954
3972
|
<!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
|
3955
3973
|
<!-- ================================================== -->
|
3956
3974
|
|
3975
|
+
<!-- INPUT: table with columns widths, generated by table_if.xsl -->
|
3957
3976
|
<xsl:template name="calculate-column-widths-autolayout-algorithm">
|
3958
3977
|
<xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
|
3959
3978
|
|
@@ -3965,67 +3984,6 @@
|
|
3965
3984
|
|
3966
3985
|
<!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
|
3967
3986
|
|
3968
|
-
<!-- get current table id -->
|
3969
|
-
<xsl:variable name="table_id" select="@id"/>
|
3970
|
-
<!-- find table by id in the file 'table_widths' -->
|
3971
|
-
<!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
|
3972
|
-
<xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
|
3973
|
-
|
3974
|
-
<!-- table='<xsl:copy-of select="$table"/>' -->
|
3975
|
-
<!-- table_id='<xsl:value-of select="$table_id"/>\ -->
|
3976
|
-
<!-- table-if='<xsl:copy-of select="$table-if"/>' -->
|
3977
|
-
<!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
|
3978
|
-
|
3979
|
-
<xsl:variable name="table_with_cell_widths_">
|
3980
|
-
<xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
|
3981
|
-
</xsl:variable>
|
3982
|
-
<xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
|
3983
|
-
|
3984
|
-
<!-- <xsl:if test="$table_if_debug = 'true'">
|
3985
|
-
<xsl:copy-of select="$table_with_cell_widths"/>
|
3986
|
-
</xsl:if> -->
|
3987
|
-
|
3988
|
-
<!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
|
3989
|
-
|
3990
|
-
<xsl:variable name="column_widths_">
|
3991
|
-
<!-- iteration of columns -->
|
3992
|
-
<xsl:for-each select="$table_with_cell_widths//tr[1]/td">
|
3993
|
-
<xsl:variable name="pos" select="position()"/>
|
3994
|
-
<column>
|
3995
|
-
<xsl:attribute name="width_max">
|
3996
|
-
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
|
3997
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
3998
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
3999
|
-
</xsl:for-each>
|
4000
|
-
</xsl:attribute>
|
4001
|
-
<xsl:attribute name="width_min">
|
4002
|
-
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
|
4003
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
4004
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
4005
|
-
</xsl:for-each>
|
4006
|
-
</xsl:attribute>
|
4007
|
-
</column>
|
4008
|
-
</xsl:for-each>
|
4009
|
-
</xsl:variable>
|
4010
|
-
<xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
|
4011
|
-
|
4012
|
-
<!-- <column_widths>
|
4013
|
-
<xsl:copy-of select="$column_widths"/>
|
4014
|
-
</column_widths> -->
|
4015
|
-
|
4016
|
-
<!-- These in turn, are used to find the minimum and maximum width for the table. -->
|
4017
|
-
<xsl:variable name="table_widths_">
|
4018
|
-
<table>
|
4019
|
-
<xsl:attribute name="width_max">
|
4020
|
-
<xsl:value-of select="sum($column_widths/column/@width_max)"/>
|
4021
|
-
</xsl:attribute>
|
4022
|
-
<xsl:attribute name="width_min">
|
4023
|
-
<xsl:value-of select="sum($column_widths/column/@width_min)"/>
|
4024
|
-
</xsl:attribute>
|
4025
|
-
</table>
|
4026
|
-
</xsl:variable>
|
4027
|
-
<xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
|
4028
|
-
|
4029
3987
|
<xsl:variable name="page_width">
|
4030
3988
|
<xsl:choose>
|
4031
3989
|
<xsl:when test="$parent_table_page-width != ''">
|
@@ -4038,16 +3996,13 @@
|
|
4038
3996
|
</xsl:variable>
|
4039
3997
|
|
4040
3998
|
<xsl:if test="$table_if_debug = 'true'">
|
4041
|
-
<
|
4042
|
-
<xsl:copy-of select="$table_widths"/>
|
4043
|
-
</table_width>
|
4044
|
-
<debug>$page_width=<xsl:value-of select="$page_width"/></debug>
|
3999
|
+
<page_width><xsl:value-of select="$page_width"/></page_width>
|
4045
4000
|
</xsl:if>
|
4046
4001
|
|
4047
4002
|
<!-- There are three cases: -->
|
4048
4003
|
<xsl:choose>
|
4049
4004
|
<!-- 1. The minimum table width is equal to or wider than the available space -->
|
4050
|
-
<xsl:when test="
|
4005
|
+
<xsl:when test="@width_min >= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
|
4051
4006
|
<!-- call old algorithm -->
|
4052
4007
|
<case1/>
|
4053
4008
|
<!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
|
@@ -4057,10 +4012,10 @@
|
|
4057
4012
|
</xsl:call-template> -->
|
4058
4013
|
</xsl:when>
|
4059
4014
|
<!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
|
4060
|
-
<xsl:when test="
|
4015
|
+
<xsl:when test="@width_max <= $page_width">
|
4061
4016
|
<case2/>
|
4062
4017
|
<autolayout/>
|
4063
|
-
<xsl:for-each select="
|
4018
|
+
<xsl:for-each select="column/@width_max">
|
4064
4019
|
<column divider="100"><xsl:value-of select="."/></column>
|
4065
4020
|
</xsl:for-each>
|
4066
4021
|
</xsl:when>
|
@@ -4070,19 +4025,19 @@
|
|
4070
4025
|
For each column, let d be the difference between maximum and minimum width of that column.
|
4071
4026
|
Now set the column's width to the minimum width plus d times W over D.
|
4072
4027
|
This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
|
4073
|
-
<xsl:when test="(
|
4028
|
+
<xsl:when test="(@width_max > $page_width and @width_min < $page_width) or (@width_min >= $page_width)">
|
4074
4029
|
<!-- difference between the available space and the minimum table width -->
|
4075
|
-
<xsl:variable name="W" select="$page_width -
|
4030
|
+
<xsl:variable name="W" select="$page_width - @width_min"/>
|
4076
4031
|
<W><xsl:value-of select="$W"/></W>
|
4077
4032
|
<!-- difference between maximum and minimum width of the table -->
|
4078
|
-
<xsl:variable name="D" select="
|
4033
|
+
<xsl:variable name="D" select="@width_max - @width_min"/>
|
4079
4034
|
<D><xsl:value-of select="$D"/></D>
|
4080
4035
|
<case3/>
|
4081
4036
|
<autolayout/>
|
4082
|
-
<xsl:if test="
|
4037
|
+
<xsl:if test="@width_min >= $page_width">
|
4083
4038
|
<split_keep-within-line>true</split_keep-within-line>
|
4084
4039
|
</xsl:if>
|
4085
|
-
<xsl:for-each select="
|
4040
|
+
<xsl:for-each select="column">
|
4086
4041
|
<!-- difference between maximum and minimum width of that column. -->
|
4087
4042
|
<xsl:variable name="d" select="@width_max - @width_min"/>
|
4088
4043
|
<d><xsl:value-of select="$d"/></d>
|
@@ -4108,23 +4063,39 @@
|
|
4108
4063
|
|
4109
4064
|
<parent_element><xsl:value-of select="local-name(..)"/></parent_element>
|
4110
4065
|
|
4066
|
+
<ancestor_tree>
|
4067
|
+
<xsl:for-each select="ancestor::*">
|
4068
|
+
<ancestor><xsl:value-of select="local-name()"/></ancestor>
|
4069
|
+
</xsl:for-each>
|
4070
|
+
</ancestor_tree>
|
4071
|
+
|
4111
4072
|
<xsl:variable name="parent_table_page-width_">
|
4112
4073
|
<xsl:if test="$parent_table_id != ''">
|
4113
4074
|
<!-- determine column number in the parent table -->
|
4114
4075
|
<xsl:variable name="parent_table_column_number">
|
4115
4076
|
<xsl:choose>
|
4116
|
-
<xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
|
4077
|
+
<!-- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when> -->
|
4078
|
+
<xsl:when test="(ancestor::*[local-name() = 'dd' or local-name() = 'table' or local-name() = 'dl'])[last()][local-name() = 'dd' or local-name() = 'dl']">2</xsl:when>
|
4117
4079
|
<xsl:otherwise> <!-- parent is table -->
|
4118
4080
|
<xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
|
4119
4081
|
</xsl:otherwise>
|
4120
4082
|
</xsl:choose>
|
4121
4083
|
</xsl:variable>
|
4122
4084
|
<!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
|
4123
|
-
|
4085
|
+
|
4086
|
+
<xsl:variable name="parent_table_column_" select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
|
4087
|
+
<xsl:variable name="parent_table_column" select="xalan:nodeset($parent_table_column_)"/>
|
4088
|
+
<!-- <xsl:variable name="divider">
|
4089
|
+
<xsl:value-of select="$parent_table_column/@divider"/>
|
4090
|
+
<xsl:if test="not($parent_table_column/@divider)">1</xsl:if>
|
4091
|
+
</xsl:variable> -->
|
4092
|
+
<xsl:value-of select="$parent_table_column/text()"/> <!-- * 10 -->
|
4124
4093
|
</xsl:if>
|
4125
4094
|
</xsl:variable>
|
4126
4095
|
<xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
|
4127
4096
|
|
4097
|
+
<parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
|
4098
|
+
|
4128
4099
|
<!-- get current table id -->
|
4129
4100
|
<xsl:variable name="table_id" select="@id"/>
|
4130
4101
|
|
@@ -4145,50 +4116,6 @@
|
|
4145
4116
|
|
4146
4117
|
</xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
|
4147
4118
|
|
4148
|
-
<!-- ============================= -->
|
4149
|
-
<!-- mode: determine_cell_widths-if -->
|
4150
|
-
<!-- ============================= -->
|
4151
|
-
<xsl:template match="@*|node()" mode="determine_cell_widths-if">
|
4152
|
-
<xsl:copy>
|
4153
|
-
<xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
|
4154
|
-
</xsl:copy>
|
4155
|
-
</xsl:template>
|
4156
|
-
|
4157
|
-
<xsl:template match="td | th" mode="determine_cell_widths-if">
|
4158
|
-
<xsl:copy>
|
4159
|
-
<xsl:copy-of select="@*"/>
|
4160
|
-
|
4161
|
-
<!-- The maximum width is given by the widest line. -->
|
4162
|
-
<xsl:attribute name="width_max">
|
4163
|
-
<xsl:for-each select="p_len">
|
4164
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
4165
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
4166
|
-
</xsl:for-each>
|
4167
|
-
</xsl:attribute>
|
4168
|
-
|
4169
|
-
<!-- The minimum width is given by the widest text element (word, image, etc.) -->
|
4170
|
-
<xsl:variable name="width_min">
|
4171
|
-
<xsl:for-each select="word_len">
|
4172
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
4173
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
4174
|
-
</xsl:for-each>
|
4175
|
-
</xsl:variable>
|
4176
|
-
<xsl:attribute name="width_min">
|
4177
|
-
<xsl:value-of select="$width_min"/>
|
4178
|
-
</xsl:attribute>
|
4179
|
-
|
4180
|
-
<xsl:if test="$width_min = 0">
|
4181
|
-
<xsl:attribute name="width_min">1</xsl:attribute>
|
4182
|
-
</xsl:if>
|
4183
|
-
|
4184
|
-
<xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
|
4185
|
-
|
4186
|
-
</xsl:copy>
|
4187
|
-
</xsl:template>
|
4188
|
-
<!-- ============================= -->
|
4189
|
-
<!-- END mode: determine_cell_widths-if -->
|
4190
|
-
<!-- ============================= -->
|
4191
|
-
|
4192
4119
|
<!-- ================================================== -->
|
4193
4120
|
<!-- Calculate column's width based on HTML4 algorithm -->
|
4194
4121
|
<!-- ================================================== -->
|
@@ -4389,6 +4316,7 @@
|
|
4389
4316
|
<xsl:when test="$table_or_dl = 'table'">
|
4390
4317
|
<xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
|
4391
4318
|
<fo:table-row number-columns-spanned="{$col_count}">
|
4319
|
+
<xsl:copy-of select="../@font-weight"/>
|
4392
4320
|
<!-- <test_table><xsl:copy-of select="."/></test_table> -->
|
4393
4321
|
<xsl:call-template name="td"/>
|
4394
4322
|
</fo:table-row>
|
@@ -4544,7 +4472,7 @@
|
|
4544
4472
|
|
4545
4473
|
<xsl:apply-templates/>
|
4546
4474
|
|
4547
|
-
<xsl:if test="$isGenerateTableIF = 'true'"
|
4475
|
+
<xsl:if test="$isGenerateTableIF = 'true'"> <fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
|
4548
4476
|
|
4549
4477
|
</fo:block>
|
4550
4478
|
</fo:table-cell>
|
@@ -4875,6 +4803,7 @@
|
|
4875
4803
|
<xsl:template match="*[local-name()='dl']">
|
4876
4804
|
<xsl:variable name="isAdded" select="@added"/>
|
4877
4805
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
4806
|
+
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
4878
4807
|
<fo:block-container>
|
4879
4808
|
|
4880
4809
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -5423,21 +5352,16 @@
|
|
5423
5352
|
<!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
|
5424
5353
|
<xsl:template match="*[local-name()='dt']" mode="dl_if">
|
5425
5354
|
<xsl:param name="id"/>
|
5426
|
-
<xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
|
5427
5355
|
<tr>
|
5428
5356
|
<td>
|
5429
5357
|
<xsl:copy-of select="node()"/>
|
5430
5358
|
</td>
|
5431
5359
|
<td>
|
5432
|
-
|
5433
|
-
|
5434
|
-
|
5435
|
-
<!-- get paragraphs from nested 'dl' -->
|
5436
|
-
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
5437
|
-
|
5360
|
+
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
|
5361
|
+
<!-- get paragraphs from nested 'dl' -->
|
5362
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
5438
5363
|
</td>
|
5439
5364
|
</tr>
|
5440
|
-
|
5441
5365
|
</xsl:template>
|
5442
5366
|
<xsl:template match="*[local-name()='dd']" mode="dl_if"/>
|
5443
5367
|
|
@@ -6090,6 +6014,9 @@
|
|
6090
6014
|
<xsl:variable name="td">
|
6091
6015
|
<xsl:element name="td">
|
6092
6016
|
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
|
6017
|
+
<xsl:if test="local-name()='th'">
|
6018
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
6019
|
+
</xsl:if>
|
6093
6020
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
6094
6021
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
6095
6022
|
</xsl:element>
|
@@ -6102,6 +6029,9 @@
|
|
6102
6029
|
<xsl:otherwise>
|
6103
6030
|
<xsl:element name="td">
|
6104
6031
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
6032
|
+
<xsl:if test="local-name()='th'">
|
6033
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
6034
|
+
</xsl:if>
|
6105
6035
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
6106
6036
|
</xsl:element>
|
6107
6037
|
</xsl:otherwise>
|
@@ -6231,8 +6161,14 @@
|
|
6231
6161
|
<xsl:copy-of select="@*"/>
|
6232
6162
|
<xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
|
6233
6163
|
<xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
|
6164
|
+
<xsl:variable name="divide">
|
6165
|
+
<xsl:choose>
|
6166
|
+
<xsl:when test="@divide"><xsl:value-of select="@divide"/></xsl:when>
|
6167
|
+
<xsl:otherwise>1</xsl:otherwise>
|
6168
|
+
</xsl:choose>
|
6169
|
+
</xsl:variable>
|
6234
6170
|
<xsl:attribute name="id">
|
6235
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
|
6171
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
|
6236
6172
|
</xsl:attribute>
|
6237
6173
|
|
6238
6174
|
<xsl:for-each select="*[local-name() = 'p']">
|
@@ -6240,10 +6176,12 @@
|
|
6240
6176
|
<xsl:copy-of select="@*"/>
|
6241
6177
|
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
|
6242
6178
|
<xsl:attribute name="id">
|
6243
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
|
6179
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
|
6244
6180
|
</xsl:attribute>
|
6245
6181
|
|
6246
|
-
<xsl:copy-of select="node()"/>
|
6182
|
+
<!-- <xsl:copy-of select="node()" /> -->
|
6183
|
+
<xsl:apply-templates mode="simple-table-noid"/>
|
6184
|
+
|
6247
6185
|
</xsl:copy>
|
6248
6186
|
</xsl:for-each>
|
6249
6187
|
|
@@ -6272,7 +6210,7 @@
|
|
6272
6210
|
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
|
6273
6211
|
<xsl:copy>
|
6274
6212
|
<xsl:attribute name="id">
|
6275
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
|
6213
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
|
6276
6214
|
</xsl:attribute>
|
6277
6215
|
<xsl:copy-of select="node()"/>
|
6278
6216
|
</xsl:copy>
|
@@ -6281,6 +6219,24 @@
|
|
6281
6219
|
</xsl:copy>
|
6282
6220
|
|
6283
6221
|
</xsl:template>
|
6222
|
+
|
6223
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p']//*" mode="simple-table-noid">
|
6224
|
+
<xsl:copy>
|
6225
|
+
<xsl:choose>
|
6226
|
+
<xsl:when test="$isGenerateTableIF = 'true'">
|
6227
|
+
<xsl:copy-of select="@*[local-name() != 'id']"/> <!-- to prevent repeat id in colspan/rowspan cells -->
|
6228
|
+
<!-- <xsl:if test="local-name() = 'dl' or local-name() = 'table'">
|
6229
|
+
<xsl:copy-of select="@id"/>
|
6230
|
+
</xsl:if> -->
|
6231
|
+
</xsl:when>
|
6232
|
+
<xsl:otherwise>
|
6233
|
+
<xsl:copy-of select="@*"/>
|
6234
|
+
</xsl:otherwise>
|
6235
|
+
</xsl:choose>
|
6236
|
+
<xsl:apply-templates select="node()" mode="simple-table-noid"/>
|
6237
|
+
</xsl:copy>
|
6238
|
+
</xsl:template>
|
6239
|
+
|
6284
6240
|
<!-- End mode: simple-table-id -->
|
6285
6241
|
<!-- ===================== -->
|
6286
6242
|
<!-- ===================== -->
|
@@ -6290,7 +6246,7 @@
|
|
6290
6246
|
<!-- =============================== -->
|
6291
6247
|
<xsl:template match="@*|node()" mode="td_text_with_formatting">
|
6292
6248
|
<xsl:copy>
|
6293
|
-
|
6249
|
+
<xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
|
6294
6250
|
</xsl:copy>
|
6295
6251
|
</xsl:template>
|
6296
6252
|
|
@@ -6404,6 +6360,10 @@
|
|
6404
6360
|
|
6405
6361
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
6406
6362
|
|
6363
|
+
<xsl:if test="$isGenerateTableIF = 'true' and ancestor::*[local-name() = 'td' or local-name() = 'th' or local-name() = 'dl'] and not(following-sibling::node()[not(self::comment())][normalize-space() != ''])"> <!-- math in table cell, and math is last element -->
|
6364
|
+
<!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
|
6365
|
+
</xsl:if>
|
6366
|
+
|
6407
6367
|
<xsl:call-template name="setTrackChangesStyles">
|
6408
6368
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
6409
6369
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
@@ -8297,41 +8257,47 @@
|
|
8297
8257
|
</fo:block>
|
8298
8258
|
</xsl:template>
|
8299
8259
|
|
8300
|
-
<xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
8260
|
+
<xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit'] | *[local-name() = 'div'][@type = 'requirement-inherit'] | *[local-name() = 'div'][@type = 'recommendation-inherit'] | *[local-name() = 'div'][@type = 'permission-inherit']">
|
8301
8261
|
<fo:block xsl:use-attribute-sets="inherit-style">
|
8302
8262
|
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
8303
8263
|
</fo:block>
|
8304
8264
|
</xsl:template>
|
8305
8265
|
|
8306
|
-
<xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
8266
|
+
<xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description'] | *[local-name() = 'div'][@type = 'requirement-description'] | *[local-name() = 'div'][@type = 'recommendation-description'] | *[local-name() = 'div'][@type = 'permission-description']">
|
8307
8267
|
<fo:block xsl:use-attribute-sets="description-style">
|
8308
8268
|
<xsl:apply-templates/>
|
8309
8269
|
</fo:block>
|
8310
8270
|
</xsl:template>
|
8311
8271
|
|
8312
|
-
<xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
8272
|
+
<xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification'] | *[local-name() = 'div'][@type = 'requirement-specification'] | *[local-name() = 'div'][@type = 'recommendation-specification'] | *[local-name() = 'div'][@type = 'permission-specification']">
|
8313
8273
|
<fo:block xsl:use-attribute-sets="specification-style">
|
8314
8274
|
<xsl:apply-templates/>
|
8315
8275
|
</fo:block>
|
8316
8276
|
</xsl:template>
|
8317
8277
|
|
8318
|
-
<xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
8278
|
+
<xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target'] | *[local-name() = 'div'][@type = 'requirement-measurement-target'] | *[local-name() = 'div'][@type = 'recommendation-measurement-target'] | *[local-name() = 'div'][@type = 'permission-measurement-target']">
|
8319
8279
|
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
8320
8280
|
<xsl:apply-templates/>
|
8321
8281
|
</fo:block>
|
8322
8282
|
</xsl:template>
|
8323
8283
|
|
8324
|
-
<xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
8284
|
+
<xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification'] | *[local-name() = 'div'][@type = 'requirement-verification'] | *[local-name() = 'div'][@type = 'recommendation-verification'] | *[local-name() = 'div'][@type = 'permission-verification']">
|
8325
8285
|
<fo:block xsl:use-attribute-sets="verification-style">
|
8326
8286
|
<xsl:apply-templates/>
|
8327
8287
|
</fo:block>
|
8328
8288
|
</xsl:template>
|
8329
8289
|
|
8330
|
-
<xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
8290
|
+
<xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import'] | *[local-name() = 'div'][@type = 'requirement-import'] | *[local-name() = 'div'][@type = 'recommendation-import'] | *[local-name() = 'div'][@type = 'permission-import']">
|
8331
8291
|
<fo:block xsl:use-attribute-sets="import-style">
|
8332
8292
|
<xsl:apply-templates/>
|
8333
8293
|
</fo:block>
|
8334
8294
|
</xsl:template>
|
8295
|
+
|
8296
|
+
<xsl:template match="*[local-name() = 'div'][starts-with(@type, 'requirement-component')] | *[local-name() = 'div'][starts-with(@type, 'recommendation-component')] | *[local-name() = 'div'][starts-with(@type, 'permission-component')]">
|
8297
|
+
<fo:block xsl:use-attribute-sets="component-style">
|
8298
|
+
<xsl:apply-templates/>
|
8299
|
+
</fo:block>
|
8300
|
+
</xsl:template>
|
8335
8301
|
<!-- ========== -->
|
8336
8302
|
<!-- END -->
|
8337
8303
|
<!-- ========== -->
|
@@ -8387,15 +8353,12 @@
|
|
8387
8353
|
|
8388
8354
|
<xsl:template match="*[local-name()='tr']" mode="requirement">
|
8389
8355
|
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
8390
|
-
|
8391
|
-
|
8392
|
-
|
8393
|
-
|
8394
|
-
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
8395
|
-
</xsl:if>
|
8396
|
-
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
8397
|
-
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
8356
|
+
|
8357
|
+
<xsl:if test="parent::*[local-name()='thead'] or starts-with(*[local-name()='td' or local-name()='th'][1], 'Requirement ') or starts-with(*[local-name()='td' or local-name()='th'][1], 'Recommendation ')">
|
8358
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
8359
|
+
|
8398
8360
|
</xsl:if>
|
8361
|
+
|
8399
8362
|
<xsl:apply-templates mode="requirement"/>
|
8400
8363
|
</fo:table-row>
|
8401
8364
|
</xsl:template>
|
@@ -9922,7 +9885,7 @@
|
|
9922
9885
|
</tbody>
|
9923
9886
|
</xsl:variable>
|
9924
9887
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
9925
|
-
<xsl:call-template name="calculate-column-widths">
|
9888
|
+
<xsl:call-template name="calculate-column-widths-proportional">
|
9926
9889
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
9927
9890
|
<xsl:with-param name="table" select="$toc_table_simple"/>
|
9928
9891
|
</xsl:call-template>
|
@@ -225,9 +225,9 @@
|
|
225
225
|
<zeroOrMore>
|
226
226
|
<ref name="forename"/>
|
227
227
|
</zeroOrMore>
|
228
|
-
<
|
229
|
-
<ref name="
|
230
|
-
</
|
228
|
+
<optional>
|
229
|
+
<ref name="formatted-initials"/>
|
230
|
+
</optional>
|
231
231
|
<ref name="surname"/>
|
232
232
|
<zeroOrMore>
|
233
233
|
<ref name="addition"/>
|
@@ -247,8 +247,8 @@
|
|
247
247
|
<ref name="LocalizedString"/>
|
248
248
|
</element>
|
249
249
|
</define>
|
250
|
-
<define name="
|
251
|
-
<element name="
|
250
|
+
<define name="formatted-initials">
|
251
|
+
<element name="formatted-initials">
|
252
252
|
<ref name="LocalizedString"/>
|
253
253
|
</element>
|
254
254
|
</define>
|
@@ -264,6 +264,9 @@
|
|
264
264
|
</define>
|
265
265
|
<define name="forename">
|
266
266
|
<element name="forename">
|
267
|
+
<optional>
|
268
|
+
<attribute name="initial"/>
|
269
|
+
</optional>
|
267
270
|
<ref name="LocalizedString"/>
|
268
271
|
</element>
|
269
272
|
</define>
|
data/lib/metanorma-iec.rb
CHANGED
@@ -7,8 +7,9 @@ require "isodoc/iec/pdf_convert"
|
|
7
7
|
require "isodoc/iec/presentation_xml_convert"
|
8
8
|
require "isodoc/iec/metadata"
|
9
9
|
require "isodoc/iec/xref"
|
10
|
+
require "metanorma"
|
10
11
|
|
11
|
-
if defined? Metanorma
|
12
|
+
if defined? Metanorma::Registry
|
12
13
|
require_relative "metanorma/iec"
|
13
14
|
Metanorma::Registry.instance.register(Metanorma::Iec::Processor)
|
14
15
|
end
|
data/metanorma-iec.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
28
28
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
29
29
|
|
30
|
-
spec.add_dependency "metanorma-iso", "~> 2.1.
|
30
|
+
spec.add_dependency "metanorma-iso", "~> 2.1.8"
|
31
31
|
spec.add_dependency "ruby-jing"
|
32
32
|
|
33
33
|
spec.add_development_dependency "debug"
|
data/spec/isodoc/iev_spec.rb
CHANGED
@@ -203,7 +203,7 @@ RSpec.describe IsoDoc do
|
|
203
203
|
<p id='_'>There are no normative references in this document.</p>
|
204
204
|
<bibitem id='A'>
|
205
205
|
<formattedref format='application/x-isodoc+xml'>
|
206
|
-
<em>TITLE</em>
|
206
|
+
<em>TITLE</em> [B]
|
207
207
|
</formattedref>
|
208
208
|
<docidentifier>B</docidentifier>
|
209
209
|
</bibitem>
|
@@ -213,7 +213,7 @@ RSpec.describe IsoDoc do
|
|
213
213
|
<p id='_'>There are no normative references in this document.</p>
|
214
214
|
<bibitem id='A'>
|
215
215
|
<formattedref format='application/x-isodoc+xml'>
|
216
|
-
<em>TITLE</em>
|
216
|
+
<em>TITLE</em> [B]
|
217
217
|
</formattedref>
|
218
218
|
<docidentifier type='metanorma-ordinal'>[1]</docidentifier>
|
219
219
|
<docidentifier>B</docidentifier>
|
data/spec/isodoc/ref_spec.rb
CHANGED
@@ -113,7 +113,7 @@ RSpec.describe IsoDoc::Iec do
|
|
113
113
|
<title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
|
114
114
|
<docidentifier type="IETF">RFC 10</docidentifier>
|
115
115
|
</bibitem>
|
116
|
-
<bibitem id="ref12">
|
116
|
+
<bibitem id="ref12" type="standard">
|
117
117
|
<formattedref format="application/x-isodoc+xml">CitationWorks. 2019. <em>How to cite a reference</em>.</formattedref>
|
118
118
|
<docidentifier type="metanorma">[Citn]</docidentifier>
|
119
119
|
<docidentifier type="IETF">RFC 20</docidentifier>
|
@@ -137,7 +137,7 @@ RSpec.describe IsoDoc::Iec do
|
|
137
137
|
<eref bibitemid="ISSN">[2]</eref>
|
138
138
|
<eref bibitemid="ISO16634">ISO 16634:--</eref>
|
139
139
|
<eref bibitemid="ref1">ICC 167</eref>
|
140
|
-
<eref bibitemid="ref10">[
|
140
|
+
<eref bibitemid="ref10">[4]</eref>
|
141
141
|
<eref bibitemid="ref12">Citn</eref>
|
142
142
|
<eref bibitemid="zip_ffs">[5]</eref>
|
143
143
|
</p>
|
@@ -159,7 +159,7 @@ RSpec.describe IsoDoc::Iec do
|
|
159
159
|
<docidentifier type="ISO">ISO 20483:2013-2014</docidentifier>
|
160
160
|
</bibitem>
|
161
161
|
<bibitem id="ref1">
|
162
|
-
<formattedref format="application/x-isodoc+xml"><smallcap>Standard No I.C.C 167</smallcap>. <em>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</em> (see <link target="http://www.icc.or.at"/>)</formattedref>
|
162
|
+
<formattedref format="application/x-isodoc+xml"><smallcap>Standard No I.C.C 167</smallcap>. <em>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</em> (see <link target="http://www.icc.or.at"/>) [ICC 167]</formattedref>
|
163
163
|
<docidentifier type="ICC">ICC 167</docidentifier>
|
164
164
|
</bibitem>
|
165
165
|
<note><name>NOTE</name><p>This is an annotation of ISO 20483:2013-2014</p></note>
|
@@ -167,14 +167,14 @@ RSpec.describe IsoDoc::Iec do
|
|
167
167
|
</references><references id="_bibliography" obligation="informative" normative="false" displayorder="3">
|
168
168
|
<title depth="1">Bibliography</title>
|
169
169
|
<bibitem id="ISBN" type="book">
|
170
|
-
<formattedref><em>Chemicals for analytical laboratory use</em>. ISBN.</formattedref>
|
170
|
+
<formattedref><em>Chemicals for analytical laboratory use</em>. n.p.: n.d. ISBN.</formattedref>
|
171
|
+
<docidentifier type="metanorma-ordinal">[1]</docidentifier>
|
171
172
|
<docidentifier type="ISBN">ISBN</docidentifier>
|
172
|
-
<docidentifier type="metanorma">[1]</docidentifier>
|
173
173
|
</bibitem>
|
174
174
|
<bibitem id="ISSN" type="journal">
|
175
|
-
<formattedref><em>Instruments for analytical laboratory use</em>. ISSN.</formattedref>
|
175
|
+
<formattedref><em>Instruments for analytical laboratory use</em>. n.d. ISSN.</formattedref>
|
176
|
+
<docidentifier type="metanorma-ordinal">[2]</docidentifier>
|
176
177
|
<docidentifier type="ISSN">ISSN</docidentifier>
|
177
|
-
<docidentifier type="metanorma">[2]</docidentifier>
|
178
178
|
</bibitem>
|
179
179
|
<note><name>NOTE</name><p>This is an annotation of document ISSN.</p></note>
|
180
180
|
<note><name>NOTE</name><p>This is another annotation of document ISSN.</p></note>
|
@@ -185,14 +185,14 @@ RSpec.describe IsoDoc::Iec do
|
|
185
185
|
</bibitem>
|
186
186
|
<bibitem id="ref10">
|
187
187
|
<formattedref format="application/x-isodoc+xml"><smallcap>Standard No I.C.C 167</smallcap>. <em>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</em> (see <link target="http://www.icc.or.at"/>)</formattedref>
|
188
|
-
<docidentifier type="metanorma">[
|
188
|
+
<docidentifier type="metanorma-ordinal">[4]</docidentifier>
|
189
189
|
</bibitem>
|
190
190
|
<bibitem id="ref11">
|
191
|
-
<formattedref><em>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</em
|
192
|
-
<docidentifier type='metanorma-ordinal'>[
|
191
|
+
<formattedref><em><span class='stddocTitle'>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</span></em></formattedref>
|
192
|
+
<docidentifier type='metanorma-ordinal'>[5]</docidentifier>
|
193
193
|
<docidentifier type="IETF">IETF RFC 10</docidentifier>
|
194
194
|
</bibitem>
|
195
|
-
<bibitem id="ref12">
|
195
|
+
<bibitem id="ref12" type="standard">
|
196
196
|
<formattedref format="application/x-isodoc+xml">CitationWorks. 2019. <em>How to cite a reference</em>.</formattedref>
|
197
197
|
<docidentifier type="metanorma">[Citn]</docidentifier>
|
198
198
|
<docidentifier type="IETF">IETF RFC 20</docidentifier>
|
@@ -203,7 +203,7 @@ RSpec.describe IsoDoc::Iec do
|
|
203
203
|
OUTPUT
|
204
204
|
|
205
205
|
html = <<~OUTPUT
|
206
|
-
|
206
|
+
#{HTML_HDR}
|
207
207
|
<div>
|
208
208
|
<h1 class='ForewordTitle'>FOREWORD</h1>
|
209
209
|
<div class='boilerplate_legal'/>
|
@@ -213,115 +213,116 @@ RSpec.describe IsoDoc::Iec do
|
|
213
213
|
<a href='#ISSN'>[2]</a>
|
214
214
|
<a href='#ISO16634'>ISO 16634:--</a>
|
215
215
|
<a href='#ref1'>ICC 167</a>
|
216
|
-
<a href='#ref10'>[
|
216
|
+
<a href='#ref10'>[4]</a>
|
217
217
|
<a href='#ref12'>Citn</a>
|
218
218
|
<a href='#zip_ffs'>[5]</a>
|
219
219
|
</p>
|
220
220
|
</div>
|
221
221
|
#{IEC_TITLE1}
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
222
|
+
<div>
|
223
|
+
<h1>1  Normative References</h1>
|
224
|
+
<p>
|
225
|
+
The following documents are referred to in the text in such a way that
|
226
|
+
some or all of their content constitutes requirements of this
|
227
|
+
document. For dated references, only the edition cited applies. For
|
228
|
+
undated references, the latest edition of the referenced document
|
229
|
+
(including any amendments) applies.
|
230
|
+
</p>
|
231
|
+
<p id='ISO712' class='NormRef'>
|
232
|
+
[110], ISO 712,
|
233
|
+
<i>Cereals and cereal products</i>
|
234
|
+
</p>
|
235
|
+
<p id='ISO16634' class='NormRef'>
|
236
|
+
ISO 16634:-- (all parts)
|
237
|
+
<a class='FootnoteRef' href='#fn:1'>
|
238
|
+
<sup>1</sup>
|
239
|
+
</a>
|
240
|
+
,
|
241
|
+
<i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i>
|
242
|
+
</p>
|
243
|
+
<p id='ISO20483' class='NormRef'>
|
244
|
+
ISO 20483:2013-2014,
|
245
|
+
<i>Cereals and pulses</i>
|
246
|
+
</p>
|
247
|
+
<p id='ref1' class='NormRef'>
|
248
|
+
ICC 167,
|
249
|
+
<span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
|
250
|
+
.
|
251
|
+
<i>
|
252
|
+
Determination of the protein content in cereal and cereal products
|
253
|
+
for food and animal feeding stuffs according to the Dumas combustion
|
254
|
+
method
|
255
|
+
</i>
|
256
|
+
(see
|
257
|
+
<a href='http://www.icc.or.at'>http://www.icc.or.at</a>
|
258
|
+
) [ICC 167]
|
259
|
+
</p>
|
260
|
+
<div class='Note'>
|
261
|
+
<p>
|
262
|
+
<span class='note_label'>NOTE</span>
|
263
|
+
  This is an annotation of ISO 20483:2013-2014
|
264
|
+
</p>
|
265
|
+
</div>
|
266
|
+
<p id='zip_ffs' class='NormRef'>[5] Title 5</p>
|
267
|
+
</div>
|
268
|
+
<br/>
|
269
|
+
<div>
|
270
|
+
<h1 class='Section3'>Bibliography</h1>
|
271
|
+
<p id='ISBN' class='Biblio'>
|
272
|
+
[1] 
|
273
|
+
<i>Chemicals for analytical laboratory use</i>
|
274
|
+
. n.p.: n.d. ISBN.
|
275
|
+
</p>
|
276
|
+
<p id='ISSN' class='Biblio'>
|
277
|
+
[2] 
|
278
|
+
<i>Instruments for analytical laboratory use</i>
|
279
|
+
. n.d. ISSN.
|
280
|
+
</p>
|
281
|
+
<div class='Note'>
|
282
|
+
<p>
|
283
|
+
<span class='note_label'>NOTE</span>
|
284
|
+
  This is an annotation of document ISSN.
|
285
|
+
</p>
|
286
|
+
</div>
|
287
|
+
<div class='Note'>
|
288
|
+
<p>
|
289
|
+
<span class='note_label'>NOTE</span>
|
290
|
+
  This is another annotation of document ISSN.
|
291
|
+
</p>
|
292
|
+
</div>
|
293
|
+
<p id='ISO3696' class='Biblio'>
|
294
|
+
[3]  ISO 3696,
|
295
|
+
<i>Water for analytical laboratory use</i>
|
296
|
+
</p>
|
297
|
+
<p id='ref10' class='Biblio'>
|
298
|
+
[4] 
|
299
|
+
<span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
|
300
|
+
.
|
301
|
+
<i>
|
302
|
+
Determination of the protein content in cereal and cereal products
|
303
|
+
for food and animal feeding stuffs according to the Dumas combustion
|
304
|
+
method
|
305
|
+
</i>
|
306
|
+
(see
|
307
|
+
<a href='http://www.icc.or.at'>http://www.icc.or.at</a>
|
308
|
+
)
|
309
|
+
</p>
|
310
|
+
<p id='ref11' class='Biblio'>
|
311
|
+
[5]  IETF RFC 10,
|
312
|
+
<i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>
|
313
|
+
</p>
|
314
|
+
<p id='ref12' class='Biblio'>
|
315
|
+
Citn  IETF RFC 20, CitationWorks. 2019.
|
316
|
+
<i>How to cite a reference</i>
|
317
|
+
.
|
318
|
+
</p>
|
319
|
+
</div>
|
320
|
+
<aside id='fn:1' class='footnote'>
|
321
|
+
<p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
|
322
|
+
</aside>
|
323
|
+
</div>
|
324
|
+
</body>
|
325
|
+
</html>
|
325
326
|
OUTPUT
|
326
327
|
expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
|
327
328
|
.convert("test", input, true).sub(
|
data/spec/metanorma/base_spec.rb
CHANGED
@@ -89,7 +89,6 @@ RSpec.describe Metanorma::Iec do
|
|
89
89
|
:title-intro-fr: Introduction Française
|
90
90
|
:title-main-fr: Titre Principal
|
91
91
|
:title-part-fr: Part du Titre
|
92
|
-
:library-ics: 1,2,3
|
93
92
|
:accessibility-color-inside: true
|
94
93
|
:price-code: XC
|
95
94
|
:cen-processing: true
|
@@ -176,15 +175,6 @@ RSpec.describe Metanorma::Iec do
|
|
176
175
|
<workgroup number='31' type='C1'>WG1</workgroup>
|
177
176
|
<secretariat>SECRETARIAT</secretariat>
|
178
177
|
</editorialgroup>
|
179
|
-
<ics>
|
180
|
-
<code>1</code>
|
181
|
-
</ics>
|
182
|
-
<ics>
|
183
|
-
<code>2</code>
|
184
|
-
</ics>
|
185
|
-
<ics>
|
186
|
-
<code>3</code>
|
187
|
-
</ics>
|
188
178
|
<structuredidentifier>
|
189
179
|
<project-number part='1'>IEC 1000</project-number>
|
190
180
|
</structuredidentifier>
|
data/spec/metanorma/iev_spec.rb
CHANGED
@@ -156,15 +156,19 @@ RSpec.describe Metanorma::Iec do
|
|
156
156
|
</bibdata>
|
157
157
|
#{@boilerplate}
|
158
158
|
<sections>
|
159
|
-
<
|
159
|
+
<terms id='_' obligation='normative'>
|
160
160
|
<title>Terms and definitions</title>
|
161
|
-
<
|
162
|
-
|
161
|
+
<term id='term-General'>
|
162
|
+
<preferred>
|
163
|
+
<expression>
|
164
|
+
<name>General</name>
|
165
|
+
</expression>
|
166
|
+
</preferred>
|
163
167
|
<term id='term-Term-1'>
|
164
168
|
<preferred><expression><name>Term 1</name></expression></preferred>
|
165
169
|
</term>
|
166
|
-
</
|
167
|
-
</
|
170
|
+
</term>
|
171
|
+
</terms>
|
168
172
|
</sections>
|
169
173
|
</iec-standard>
|
170
174
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-iso
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.1.
|
19
|
+
version: 2.1.8
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.1.
|
26
|
+
version: 2.1.8
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ruby-jing
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,6 +203,7 @@ extensions: []
|
|
203
203
|
extra_rdoc_files: []
|
204
204
|
files:
|
205
205
|
- ".github/workflows/rake.yml"
|
206
|
+
- ".github/workflows/release.yml"
|
206
207
|
- ".gitignore"
|
207
208
|
- ".hound.yml"
|
208
209
|
- ".rubocop.yml"
|
@@ -283,7 +284,7 @@ homepage: https://github.com/metanorma/metanorma-iec
|
|
283
284
|
licenses:
|
284
285
|
- BSD-2-Clause
|
285
286
|
metadata: {}
|
286
|
-
post_install_message:
|
287
|
+
post_install_message:
|
287
288
|
rdoc_options: []
|
288
289
|
require_paths:
|
289
290
|
- lib
|
@@ -298,8 +299,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
298
299
|
- !ruby/object:Gem::Version
|
299
300
|
version: '0'
|
300
301
|
requirements: []
|
301
|
-
rubygems_version: 3.
|
302
|
-
signing_key:
|
302
|
+
rubygems_version: 3.1.6
|
303
|
+
signing_key:
|
303
304
|
specification_version: 4
|
304
305
|
summary: metanorma-iec lets you write IEC standards in AsciiDoc.
|
305
306
|
test_files: []
|