metanorma-iec 2.1.9 → 2.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28668ccee2ac29c220a4f6e970299bd8f37e106d1d953e4b0c25eeae65f75571
4
- data.tar.gz: 1c004518604d4ee42e649094c964fd2b29fb42d20cc6eb76e22ed7ad32347f78
3
+ metadata.gz: dd45c2f09ec1fbd9292c94f870d5f27d746068ef4902bca46238d47a0cc87102
4
+ data.tar.gz: 5fab262807572cb0c78bbe9971c64aa0a8fb433c2602d875f4909a2e1b907e77
5
5
  SHA512:
6
- metadata.gz: aff04a6fc9c4fa01f55229716d1e33881c086c027af463e5fe97415cd376e7e511f8a7d84f3b942c512f4a1779427611ac6c82290d56376ea36e048c6afd4b55
7
- data.tar.gz: 7f659e59700d2e17040f4a92a1a8c1e9df1c64bb5601b5724f50d8e00e3b8ac477039a8adf4c956840c66dac906667d111bdb391f47f87c2f6abf9fcad92ef78
6
+ metadata.gz: 9b579f4ca8d94f8318a10a904df88f3362cf39bd0bdefabc0f312d945cacf09cdf102cb164b1858a74979ef894ada5263e413e55f7f570f12d10e0d541d0c38b
7
+ data.tar.gz: bbec252c541537536a161c9025386c5cd2a10426709b48660179713228e031041932a4f090ddb5641f71ef2c818456b5eb2be8c98dea88c98b9df34b483ae759
@@ -0,0 +1,31 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ # source: https://github.com/marketplace/actions/merge-pull-requests#usage
4
+ name: automerge
5
+ on:
6
+ pull_request:
7
+ types:
8
+ - labeled
9
+ - unlabeled
10
+ - synchronize
11
+ - opened
12
+ - edited
13
+ - ready_for_review
14
+ - reopened
15
+ - unlocked
16
+ pull_request_review:
17
+ types:
18
+ - submitted
19
+ check_suite:
20
+ types:
21
+ - completed
22
+ status: {}
23
+ jobs:
24
+ automerge:
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - id: automerge
28
+ name: automerge
29
+ uses: "pascalgn/automerge-action@v0.15.3"
30
+ env:
31
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
@@ -509,7 +509,7 @@ p.TermNum {
509
509
  padding-top: 0;
510
510
  width: 100%; } }
511
511
 
512
- div.figure > img {
512
+ div.figure > img, div.figure > svg {
513
513
  margin-left: auto;
514
514
  margin-right: auto;
515
515
  display: block;
@@ -281,7 +281,7 @@ nav {
281
281
  }
282
282
  }
283
283
 
284
- div.figure > img {
284
+ div.figure > img, div.figure > svg {
285
285
  margin-left: auto;
286
286
  margin-right: auto;
287
287
  display: block;
@@ -5439,8 +5439,17 @@
5439
5439
  </fo:inline>
5440
5440
  </xsl:template> <!-- tt -->
5441
5441
 
5442
+ <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
5442
5443
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
5443
- <xsl:call-template name="add_spaces_to_sourcecode"/>
5444
+ <xsl:choose>
5445
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
5446
+ <!-- url -->
5447
+ <xsl:call-template name="add-zero-spaces-link-java"/>
5448
+ </xsl:when>
5449
+ <xsl:otherwise>
5450
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
5451
+ </xsl:otherwise>
5452
+ </xsl:choose>
5444
5453
  </xsl:template>
5445
5454
 
5446
5455
  <xsl:template match="*[local-name()='underline']">
@@ -5796,8 +5805,11 @@
5796
5805
 
5797
5806
  <xsl:template name="add-zero-spaces-link-java">
5798
5807
  <xsl:param name="text" select="."/>
5808
+
5809
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
5810
+ <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
5799
5811
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
5800
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
5812
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
5801
5813
  </xsl:template>
5802
5814
 
5803
5815
  <!-- add zero space after dash character (for table's entries) -->
@@ -8771,7 +8783,7 @@
8771
8783
  <!-- ====== -->
8772
8784
  <!-- eref -->
8773
8785
  <!-- ====== -->
8774
- <xsl:template match="*[local-name() = 'eref']">
8786
+ <xsl:template match="*[local-name() = 'eref']" name="eref">
8775
8787
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
8776
8788
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
8777
8789
  <xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
@@ -10243,7 +10255,7 @@
10243
10255
 
10244
10256
  <xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
10245
10257
 
10246
- <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'])]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
10258
+ <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
10247
10259
 
10248
10260
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
10249
10261
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
@@ -203,7 +203,7 @@ module IsoDoc
203
203
 
204
204
  def termsource1_iev(elem)
205
205
  while elem&.next_element&.name == "termsource"
206
- elem << l10n("; #{elem.next_element.remove.children.to_xml}")
206
+ elem << "; #{elem.next_element.remove.children.to_xml}"
207
207
  end
208
208
  elem.children = l10n("#{@i18n.source}: #{elem.children.to_xml.strip}")
209
209
  end
@@ -1,10 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <include href="biblio.rng">
4
- <start>
5
- <ref name="document"/>
6
- </start>
7
- </include>
8
3
  <define name="document">
9
4
  <element name="document">
10
5
  <optional>
@@ -1125,26 +1120,4 @@
1125
1120
  </zeroOrMore>
1126
1121
  </element>
1127
1122
  </define>
1128
- <define name="ext">
1129
- <element name="ext">
1130
- <ref name="BibDataExtensionType"/>
1131
- </element>
1132
- </define>
1133
- <define name="BibDataExtensionType">
1134
- <ref name="doctype"/>
1135
- </define>
1136
- <define name="doctype">
1137
- <element name="doctype">
1138
- <ref name="DocumentType"/>
1139
- </element>
1140
- </define>
1141
- <define name="DocumentType">
1142
- <value>document</value>
1143
- </define>
1144
- <define name="BibData">
1145
- <ref name="BibliographicItem"/>
1146
- <optional>
1147
- <ref name="ext"/>
1148
- </optional>
1149
- </define>
1150
1123
  </grammar>
@@ -0,0 +1,164 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0">
3
+ <!--
4
+ Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
5
+ of relaton
6
+
7
+ Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
8
+ (SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
9
+ -->
10
+ <include href="biblio.rng">
11
+ <define name="BibData">
12
+ <ref name="BibliographicItem"/>
13
+ <optional>
14
+ <ref name="ext"/>
15
+ </optional>
16
+ </define>
17
+ </include>
18
+ <define name="ext">
19
+ <element name="ext">
20
+ <ref name="BibDataExtensionType"/>
21
+ </element>
22
+ </define>
23
+ <define name="BibDataExtensionType">
24
+ <optional>
25
+ <attribute name="schema-version"/>
26
+ </optional>
27
+ <ref name="doctype"/>
28
+ <optional>
29
+ <ref name="docsubtype"/>
30
+ </optional>
31
+ <optional>
32
+ <ref name="editorialgroup"/>
33
+ </optional>
34
+ <zeroOrMore>
35
+ <ref name="ics"/>
36
+ </zeroOrMore>
37
+ <zeroOrMore>
38
+ <ref name="structuredidentifier"/>
39
+ </zeroOrMore>
40
+ </define>
41
+ <define name="doctype">
42
+ <element name="doctype">
43
+ <optional>
44
+ <attribute name="abbreviation"/>
45
+ </optional>
46
+ <ref name="DocumentType"/>
47
+ </element>
48
+ </define>
49
+ <define name="DocumentType">
50
+ <value>document</value>
51
+ </define>
52
+ <define name="docsubtype">
53
+ <element name="subdoctype">
54
+ <ref name="DocumentSubtype"/>
55
+ </element>
56
+ </define>
57
+ <define name="DocumentSubtype">
58
+ <text/>
59
+ </define>
60
+ <define name="editorialgroup">
61
+ <element name="editorialgroup">
62
+ <oneOrMore>
63
+ <ref name="technical-committee"/>
64
+ </oneOrMore>
65
+ </element>
66
+ </define>
67
+ <define name="technical-committee">
68
+ <element name="technical-committee">
69
+ <ref name="IsoWorkgroup"/>
70
+ </element>
71
+ </define>
72
+ <define name="IsoWorkgroup">
73
+ <optional>
74
+ <attribute name="number"/>
75
+ </optional>
76
+ <optional>
77
+ <attribute name="type"/>
78
+ </optional>
79
+ <optional>
80
+ <attribute name="identifier"/>
81
+ </optional>
82
+ <optional>
83
+ <attribute name="prefix"/>
84
+ </optional>
85
+ <text/>
86
+ </define>
87
+ <define name="ics">
88
+ <element name="ics">
89
+ <element name="code">
90
+ <text/>
91
+ </element>
92
+ <optional>
93
+ <element name="text">
94
+ <text/>
95
+ </element>
96
+ </optional>
97
+ </element>
98
+ </define>
99
+ <define name="structuredidentifier">
100
+ <element name="structuredidentifier">
101
+ <optional>
102
+ <attribute name="type"/>
103
+ </optional>
104
+ <oneOrMore>
105
+ <element name="agency">
106
+ <text/>
107
+ </element>
108
+ </oneOrMore>
109
+ <optional>
110
+ <element name="class">
111
+ <text/>
112
+ </element>
113
+ </optional>
114
+ <element name="docnumber">
115
+ <text/>
116
+ </element>
117
+ <optional>
118
+ <element name="partnumber">
119
+ <text/>
120
+ </element>
121
+ </optional>
122
+ <optional>
123
+ <element name="edition">
124
+ <text/>
125
+ </element>
126
+ </optional>
127
+ <optional>
128
+ <element name="version">
129
+ <text/>
130
+ </element>
131
+ </optional>
132
+ <optional>
133
+ <element name="supplementtype">
134
+ <text/>
135
+ </element>
136
+ </optional>
137
+ <optional>
138
+ <element name="supplementnumber">
139
+ <text/>
140
+ </element>
141
+ </optional>
142
+ <optional>
143
+ <element name="amendment">
144
+ <text/>
145
+ </element>
146
+ </optional>
147
+ <optional>
148
+ <element name="corrigendum">
149
+ <text/>
150
+ </element>
151
+ </optional>
152
+ <optional>
153
+ <element name="language">
154
+ <text/>
155
+ </element>
156
+ </optional>
157
+ <optional>
158
+ <element name="year">
159
+ <text/>
160
+ </element>
161
+ </optional>
162
+ </element>
163
+ </define>
164
+ </grammar>
@@ -33,9 +33,10 @@
33
33
  <param name="pattern">([\+\-]?\d{4})((-?)((0[1-9]|1[0-2])((-?)([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6]))))?</param>
34
34
  </data>
35
35
  </define>
36
- <start>
37
- <ref name="bibitem"/>
38
- </start>
36
+ <!-- start = bibitem -->
37
+ <define name="BibData">
38
+ <ref name="BibliographicItem"/>
39
+ </define>
39
40
  <define name="status">
40
41
  <element name="status">
41
42
  <ref name="stage"/>
@@ -170,27 +171,25 @@
170
171
  </define>
171
172
  <define name="contributor">
172
173
  <element name="contributor">
173
- <zeroOrMore>
174
+ <oneOrMore>
174
175
  <ref name="role"/>
175
- </zeroOrMore>
176
+ </oneOrMore>
176
177
  <ref name="ContributorInfo"/>
177
178
  </element>
178
179
  </define>
179
180
  <define name="role">
180
181
  <element name="role">
181
- <optional>
182
- <attribute name="type">
183
- <choice>
184
- <value>author</value>
185
- <value>performer</value>
186
- <value>publisher</value>
187
- <value>editor</value>
188
- <value>adapter</value>
189
- <value>translator</value>
190
- <value>distributor</value>
191
- </choice>
192
- </attribute>
193
- </optional>
182
+ <attribute name="type">
183
+ <choice>
184
+ <value>author</value>
185
+ <value>performer</value>
186
+ <value>publisher</value>
187
+ <value>editor</value>
188
+ <value>adapter</value>
189
+ <value>translator</value>
190
+ <value>distributor</value>
191
+ </choice>
192
+ </attribute>
194
193
  <zeroOrMore>
195
194
  <ref name="roledescription"/>
196
195
  </zeroOrMore>
@@ -512,6 +511,17 @@
512
511
  </define>
513
512
  <define name="localityStack">
514
513
  <element name="localityStack">
514
+ <optional>
515
+ <attribute name="connective">
516
+ <choice>
517
+ <value>and</value>
518
+ <value>or</value>
519
+ <value>from</value>
520
+ <value>to</value>
521
+ <value/>
522
+ </choice>
523
+ </attribute>
524
+ </optional>
515
525
  <zeroOrMore>
516
526
  <ref name="locality"/>
517
527
  </zeroOrMore>
@@ -524,6 +534,17 @@
524
534
  </define>
525
535
  <define name="sourceLocalityStack">
526
536
  <element name="sourceLocalityStack">
537
+ <optional>
538
+ <attribute name="connective">
539
+ <choice>
540
+ <value>and</value>
541
+ <value>or</value>
542
+ <value>from</value>
543
+ <value>to</value>
544
+ <value/>
545
+ </choice>
546
+ </attribute>
547
+ </optional>
527
548
  <zeroOrMore>
528
549
  <ref name="sourceLocality"/>
529
550
  </zeroOrMore>
@@ -626,6 +647,9 @@
626
647
  <ref name="BibItemType"/>
627
648
  </attribute>
628
649
  </optional>
650
+ <optional>
651
+ <attribute name="schema-version"/>
652
+ </optional>
629
653
  <optional>
630
654
  <ref name="fetched"/>
631
655
  </optional>
@@ -720,6 +744,9 @@
720
744
  <ref name="BibItemType"/>
721
745
  </attribute>
722
746
  </optional>
747
+ <optional>
748
+ <attribute name="schema-version"/>
749
+ </optional>
723
750
  <optional>
724
751
  <ref name="fetched"/>
725
752
  </optional>
@@ -1,63 +1,11 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar ns="https://www.metanorma.org/ns/iec" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
3
  <!-- default namespace = "https://www.metanorma.com/ns/iec" -->
4
+ <include href="relaton-iec.rng"/>
4
5
  <include href="isostandard.rng">
5
6
  <start>
6
7
  <ref name="iec-standard"/>
7
8
  </start>
8
- <define name="DocumentType">
9
- <choice>
10
- <value>international-standard</value>
11
- <value>technical-specification</value>
12
- <value>technical-report</value>
13
- <value>publicly-available-specification</value>
14
- <value>international-workshop-agreement</value>
15
- <value>guide</value>
16
- <value>industry-technical-agreement</value>
17
- <value>system-reference-delivrabble</value>
18
- </choice>
19
- </define>
20
- <define name="BibDataExtensionType">
21
- <ref name="doctype"/>
22
- <optional>
23
- <ref name="docsubtype"/>
24
- </optional>
25
- <optional>
26
- <ref name="horizontal"/>
27
- </optional>
28
- <optional>
29
- <ref name="function"/>
30
- </optional>
31
- <ref name="editorialgroup"/>
32
- <zeroOrMore>
33
- <ref name="ics"/>
34
- </zeroOrMore>
35
- <ref name="structuredidentifier"/>
36
- <optional>
37
- <ref name="stagename"/>
38
- </optional>
39
- <optional>
40
- <ref name="updates_document_type"/>
41
- </optional>
42
- <optional>
43
- <ref name="accessibility-color-inside"/>
44
- </optional>
45
- <optional>
46
- <ref name="price-code"/>
47
- </optional>
48
- <optional>
49
- <ref name="cen-processing"/>
50
- </optional>
51
- <optional>
52
- <ref name="secretary"/>
53
- </optional>
54
- <optional>
55
- <ref name="interest-to-committees"/>
56
- </optional>
57
- <optional>
58
- <ref name="tc-sc-officers-note"/>
59
- </optional>
60
- </define>
61
9
  <define name="term">
62
10
  <element name="term">
63
11
  <optional>
@@ -108,48 +56,6 @@
108
56
  </define>
109
57
  </include>
110
58
  <!-- end overrides -->
111
- <define name="function">
112
- <element name="function">
113
- <choice>
114
- <value>emc</value>
115
- <value>safety</value>
116
- <value>environment</value>
117
- <value>quality-assurance</value>
118
- </choice>
119
- </element>
120
- </define>
121
- <define name="accessibility-color-inside">
122
- <element name="accessibility-color-inside">
123
- <data type="boolean"/>
124
- </element>
125
- </define>
126
- <define name="price-code">
127
- <element name="price-code">
128
- <text/>
129
- </element>
130
- </define>
131
- <define name="cen-processing">
132
- <element name="cen-processing">
133
- <data type="boolean"/>
134
- </element>
135
- </define>
136
- <define name="secretary">
137
- <element name="secretary">
138
- <text/>
139
- </element>
140
- </define>
141
- <define name="interest-to-committees">
142
- <element name="interest-to-committees">
143
- <text/>
144
- </element>
145
- </define>
146
- <define name="tc-sc-officers-note">
147
- <element name="tc-sc-officers-note">
148
- <zeroOrMore>
149
- <ref name="BasicBlock"/>
150
- </zeroOrMore>
151
- </element>
152
- </define>
153
59
  <!--
154
60
  We display the Normative References between scope and terms; but to keep the
155
61
  grammar simple, we keep the references together
@@ -186,9 +92,4 @@
186
92
  </zeroOrMore>
187
93
  </element>
188
94
  </define>
189
- <define name="updates_document_type">
190
- <element name="updates-document-type">
191
- <ref name="DocumentType"/>
192
- </element>
193
- </define>
194
95
  </grammar>