metanorma-ieee 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18c5077ed8c2107193a9183fd3b3832276f47fa92f60393df76cee4ac0762ab6
4
- data.tar.gz: 2e048a76e6452e79e94b47ab97911cef4e8ead2fe72b8831f43d0d2727ef3ead
3
+ metadata.gz: 05e99861807be4a3295ae7642f381419eef870dee2dd2b1f8df22391342acb45
4
+ data.tar.gz: d79bf191d766d6a705d612b806e81ddc800d09efe985191258f09b588a916f85
5
5
  SHA512:
6
- metadata.gz: 95929a3a72d3a3645ff048a014c607a03ec3357644c3e2118088ff0bdfa886cc080bd72afda136c50fec7c03a63862b158d1b8f81c885682c90d2a35bd73a4ff
7
- data.tar.gz: 15ddaf907ebfcff60003841ea86aa9c5858010a59e054ace4914ce2d0ffae0591462b5233a91732521380b8ad7df04338636a58e5b768763429b60a7bed7b2b7
6
+ metadata.gz: be97ca0b1c97744f41e69719dc70e430fb67092b6bbc184d7d59292a49b153acbb772db3d35e22b0e359d092fb6c42ff0385aca16ad4ada89966d753113219e0
7
+ data.tar.gz: 6480760c5aab6e43318585c05bfed56ae85e568ac84a50267518e8a40f05a34f9998cddb2cbc8d52dfccfd698d08df835ddfb372870de0d737763f7fd23e2457
@@ -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 }}"
@@ -579,7 +579,7 @@ div.figure {
579
579
  font-weight: 700;
580
580
  font-size: 1em;
581
581
  text-align: center; }
582
- div.figure > img {
582
+ div.figure > img, div.figure > svg {
583
583
  margin-left: auto;
584
584
  margin-right: auto;
585
585
  display: block;
@@ -7249,8 +7249,17 @@
7249
7249
  </fo:inline>
7250
7250
  </xsl:template> <!-- tt -->
7251
7251
 
7252
+ <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
7252
7253
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
7253
- <xsl:call-template name="add_spaces_to_sourcecode"/>
7254
+ <xsl:choose>
7255
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
7256
+ <!-- url -->
7257
+ <xsl:call-template name="add-zero-spaces-link-java"/>
7258
+ </xsl:when>
7259
+ <xsl:otherwise>
7260
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
7261
+ </xsl:otherwise>
7262
+ </xsl:choose>
7254
7263
  </xsl:template>
7255
7264
 
7256
7265
  <xsl:template match="*[local-name()='underline']">
@@ -7606,8 +7615,11 @@
7606
7615
 
7607
7616
  <xsl:template name="add-zero-spaces-link-java">
7608
7617
  <xsl:param name="text" select="."/>
7618
+
7619
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
7620
+ <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
7609
7621
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
7610
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
7622
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
7611
7623
  </xsl:template>
7612
7624
 
7613
7625
  <!-- add zero space after dash character (for table's entries) -->
@@ -12208,7 +12220,7 @@
12208
12220
 
12209
12221
  <xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
12210
12222
 
12211
- <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">
12223
+ <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">
12212
12224
 
12213
12225
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
12214
12226
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
@@ -7249,8 +7249,17 @@
7249
7249
  </fo:inline>
7250
7250
  </xsl:template> <!-- tt -->
7251
7251
 
7252
+ <xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
7252
7253
  <xsl:template match="*[local-name()='tt']/text()" priority="2">
7253
- <xsl:call-template name="add_spaces_to_sourcecode"/>
7254
+ <xsl:choose>
7255
+ <xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
7256
+ <!-- url -->
7257
+ <xsl:call-template name="add-zero-spaces-link-java"/>
7258
+ </xsl:when>
7259
+ <xsl:otherwise>
7260
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
7261
+ </xsl:otherwise>
7262
+ </xsl:choose>
7254
7263
  </xsl:template>
7255
7264
 
7256
7265
  <xsl:template match="*[local-name()='underline']">
@@ -7606,8 +7615,11 @@
7606
7615
 
7607
7616
  <xsl:template name="add-zero-spaces-link-java">
7608
7617
  <xsl:param name="text" select="."/>
7618
+
7619
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
7620
+ <xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
7609
7621
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
7610
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
7622
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1​')"/>
7611
7623
  </xsl:template>
7612
7624
 
7613
7625
  <!-- add zero space after dash character (for table's entries) -->
@@ -12208,7 +12220,7 @@
12208
12220
 
12209
12221
  <xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
12210
12222
 
12211
- <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">
12223
+ <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">
12212
12224
 
12213
12225
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
12214
12226
  <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
@@ -62,7 +62,7 @@ module IsoDoc
62
62
  linkend = linkend.sub(/^Clause /, "")
63
63
  container = @xrefs.anchor(node["target"], :container, false)
64
64
  prefix_container?(container, node) and
65
- linkend = prefix_container(container, linkend, node["target"])
65
+ linkend = prefix_container(container, linkend, node, node["target"])
66
66
  capitalise_xref(node, linkend, anchor_value(node["target"]))
67
67
  end
68
68
 
@@ -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>
@@ -10,6 +10,9 @@ module Metanorma
10
10
  initial_note(xml)
11
11
  word_usage(xml)
12
12
  participants(xml)
13
+ xml.xpath("//dl[not(@id)]").each do |dl|
14
+ dl["id"] = "_#{UUIDTools::UUID.random_create}"
15
+ end
13
16
  end
14
17
 
15
18
  def intro_boilerplate(xml, isodoc)
@@ -53,22 +56,36 @@ module Metanorma
53
56
  end
54
57
 
55
58
  def overview_cleanup(xml)
59
+ overview_once_cleanup(xml)
60
+ overview_children_cleanup(xml)
61
+ end
62
+
63
+ def overview_children_cleanup(xml)
56
64
  %w(scope purpose word-usage).each do |x|
57
65
  (xml.xpath("//clause[@type = '#{x}']") -
58
- xml.xpath("//sections/clause[1][@type = 'overview']"\
66
+ xml.xpath("//sections/clause[@type = 'overview']" \
59
67
  "//clause[@type = '#{x}']"))
60
68
  .each { |c| c.delete("type") }
61
69
  end
62
- (xml.xpath("//clause[@type = 'overview']") -
63
- xml.xpath("//sections/clause[1]"))
64
- .each { |c| c.delete("type") }
70
+ end
71
+
72
+ def overview_once_cleanup(xml)
73
+ found = false
74
+ xml.xpath("//sections//clause[@type = 'overview']").each do |c|
75
+ found and c.delete("type")
76
+ found = true if c.parent.name == "sections"
77
+ end
78
+ xml.xpath("//annex//clause[@type = 'overview'] | " \
79
+ "//preface//clause[@type = 'overview']").each do |c|
80
+ c.delete("type")
81
+ end
65
82
  end
66
83
 
67
84
  def note_cleanup(xmldoc)
68
85
  super
69
- n = xmldoc.at("//preface//note[not(@type = 'boilerplate')]"\
70
- "[not(./ancestor::abstract)] | "\
71
- "//sections//note[not(@type = 'boilerplate')] | "\
86
+ n = xmldoc.at("//preface//note[not(@type = 'boilerplate')]" \
87
+ "[not(./ancestor::abstract)] | " \
88
+ "//sections//note[not(@type = 'boilerplate')] | " \
72
89
  "//annex//note[not(@type = 'boilerplate')]") or
73
90
  return
74
91
  ins = n.at("./p[last()]")
@@ -172,7 +189,7 @@ module Metanorma
172
189
  "<dt>#{k}</dt><dd>#{ret[k]}</dd>"
173
190
  end.join
174
191
  else
175
- list.children = "<dl><dt>name</dt><dd>#{list.children.to_xml}</dd>"\
192
+ list.children = "<dl><dt>name</dt><dd>#{list.children.to_xml}</dd>" \
176
193
  "<dt>role</dt><dd>member</dd></dl>"
177
194
  end
178
195
  end
@@ -199,7 +216,7 @@ module Metanorma
199
216
  u.empty? and m.empty? and return
200
217
  ins = xmldoc.at("//bibdata/title")
201
218
  t = provenance_title1(u, m)
202
- ins.next = "<title type='provenance' language='en' "\
219
+ ins.next = "<title type='provenance' language='en' " \
203
220
  "format='application/xml'>#{t}</title>"
204
221
  end
205
222
 
@@ -20,6 +20,9 @@ module Metanorma
20
20
  @hierarchical_assets = node.attr("hierarchical-object-numbering")
21
21
  end
22
22
 
23
+ PREFACE_CLAUSE_NAMES = %w(abstract foreword introduction
24
+ acknowledgements participants).freeze
25
+
23
26
  def sectiontype_streamline(ret)
24
27
  case ret
25
28
  when "definitions", "definitions, acronyms and abbreviations"
@@ -1,158 +1,16 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar ns="https://www.metanorma.org/ns/ieee" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <grammar ns="https://www.metanorma.org/ns/ieee" xmlns="http://relaxng.org/ns/structure/1.0">
3
3
  <!--
4
4
  Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
5
5
  we cannot have a new default namespace: we will end up with a grammar with two different
6
6
  namespaces, one for isostandard and one for csand additions. And we do not want that.
7
7
  -->
8
+ <include href="relaton-ieee.rng"/>
8
9
  <include href="isodoc.rng">
9
10
  <start>
10
11
  <ref name="ieee-standard"/>
11
12
  </start>
12
- <define name="DocumentType">
13
- <choice>
14
- <value>guide</value>
15
- <value>recommended-practice</value>
16
- <value>standard</value>
17
- <value>whitepaper</value>
18
- <value>redline</value>
19
- <value>other</value>
20
- </choice>
21
- </define>
22
- <define name="stage">
23
- <element name="stage">
24
- <choice>
25
- <value>draft</value>
26
- <value>approved</value>
27
- <value>superseded</value>
28
- <value>withdrawn</value>
29
- </choice>
30
- </element>
31
- </define>
32
- <define name="editorialgroup">
33
- <element name="editorialgroup">
34
- <optional>
35
- <ref name="society"/>
36
- </optional>
37
- <optional>
38
- <ref name="balloting-group"/>
39
- </optional>
40
- <optional>
41
- <ref name="working-group"/>
42
- </optional>
43
- <oneOrMore>
44
- <ref name="committee"/>
45
- </oneOrMore>
46
- </element>
47
- </define>
48
- <define name="DocumentSubtype">
49
- <choice>
50
- <value>amendment</value>
51
- <value>corrigendum</value>
52
- <value>erratum</value>
53
- </choice>
54
- </define>
55
- <define name="BibDataExtensionType">
56
- <optional>
57
- <ref name="doctype"/>
58
- </optional>
59
- <optional>
60
- <ref name="docsubtype"/>
61
- </optional>
62
- <optional>
63
- <ref name="trialuse"/>
64
- </optional>
65
- <optional>
66
- <ref name="editorialgroup"/>
67
- </optional>
68
- <zeroOrMore>
69
- <ref name="ics"/>
70
- </zeroOrMore>
71
- <optional>
72
- <ref name="standard_status"/>
73
- </optional>
74
- <optional>
75
- <ref name="standard_modified"/>
76
- </optional>
77
- <optional>
78
- <ref name="pubstatus"/>
79
- </optional>
80
- <optional>
81
- <ref name="holdstatus"/>
82
- </optional>
83
- </define>
84
13
  </include>
85
- <define name="standard_status">
86
- <element name="standard_status">
87
- <choice>
88
- <value>Inactive</value>
89
- <value>Active</value>
90
- <value>Superseded</value>
91
- </choice>
92
- </element>
93
- </define>
94
- <define name="standard_modified">
95
- <element name="standard_modified">
96
- <choice>
97
- <value>Draft</value>
98
- <value>Withdrawn</value>
99
- <value>Superseded</value>
100
- <value>Approved</value>
101
- <value>Reserved</value>
102
- <value>Redline</value>
103
- </choice>
104
- </element>
105
- </define>
106
- <define name="pubstatus">
107
- <element name="pubstatus">
108
- <choice>
109
- <value>Active</value>
110
- <value>Inactive</value>
111
- </choice>
112
- </element>
113
- </define>
114
- <define name="holdstatus">
115
- <element name="holdstatus">
116
- <choice>
117
- <value>Hold</value>
118
- <value>Publish</value>
119
- </choice>
120
- </element>
121
- </define>
122
- <define name="BibliographicDateType" combine="choice">
123
- <value>feedback-ended</value>
124
- </define>
125
- <define name="trialuse">
126
- <element name="trial-use">
127
- <data type="boolean"/>
128
- </element>
129
- </define>
130
- <define name="balloting-group">
131
- <element name="balloting-group">
132
- <attribute name="type">
133
- <choice>
134
- <value>individual</value>
135
- <value>entity</value>
136
- </choice>
137
- </attribute>
138
- <text/>
139
- </element>
140
- </define>
141
- <define name="working-group">
142
- <element name="working-group">
143
- <text/>
144
- </element>
145
- </define>
146
- <define name="committee">
147
- <element name="committee">
148
- <text/>
149
- </element>
150
- </define>
151
- <define name="society">
152
- <element name="society">
153
- <text/>
154
- </element>
155
- </define>
156
14
  <define name="ieee-standard">
157
15
  <element name="ieee-standard">
158
16
  <attribute name="version"/>
@@ -19,19 +19,7 @@
19
19
  -->
20
20
  <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">
21
21
  <include href="reqt.rng"/>
22
- <!-- include "biblio.rnc" { } -->
23
22
  <include href="basicdoc.rng">
24
- <start>
25
- <ref name="standard-document"/>
26
- </start>
27
- <define name="doctype">
28
- <element name="doctype">
29
- <optional>
30
- <attribute name="abbreviation"/>
31
- </optional>
32
- <ref name="DocumentType"/>
33
- </element>
34
- </define>
35
23
  <define name="admonition">
36
24
  <element name="admonition">
37
25
  <attribute name="type">
@@ -117,24 +105,6 @@
117
105
  </optional>
118
106
  </element>
119
107
  </define>
120
- <define name="bibitem">
121
- <element name="bibitem">
122
- <attribute name="id">
123
- <data type="ID"/>
124
- </attribute>
125
- <optional>
126
- <attribute name="hidden">
127
- <data type="boolean"/>
128
- </attribute>
129
- </optional>
130
- <optional>
131
- <attribute name="suppress_identifier">
132
- <data type="boolean"/>
133
- </attribute>
134
- </optional>
135
- <ref name="BibliographicItem"/>
136
- </element>
137
- </define>
138
108
  <define name="section-title">
139
109
  <element name="title">
140
110
  <zeroOrMore>
@@ -248,42 +218,6 @@
248
218
  <ref name="PureTextElement"/>
249
219
  </oneOrMore>
250
220
  </define>
251
- <define name="localityStack">
252
- <element name="localityStack">
253
- <optional>
254
- <attribute name="connective">
255
- <choice>
256
- <value>and</value>
257
- <value>or</value>
258
- <value>from</value>
259
- <value>to</value>
260
- <value/>
261
- </choice>
262
- </attribute>
263
- </optional>
264
- <zeroOrMore>
265
- <ref name="locality"/>
266
- </zeroOrMore>
267
- </element>
268
- </define>
269
- <define name="sourceLocalityStack">
270
- <element name="sourceLocalityStack">
271
- <optional>
272
- <attribute name="connective">
273
- <choice>
274
- <value>and</value>
275
- <value>or</value>
276
- <value>from</value>
277
- <value>to</value>
278
- <value/>
279
- </choice>
280
- </attribute>
281
- </optional>
282
- <zeroOrMore>
283
- <ref name="sourceLocality"/>
284
- </zeroOrMore>
285
- </element>
286
- </define>
287
221
  <define name="ul">
288
222
  <element name="ul">
289
223
  <attribute name="id">
@@ -827,21 +761,6 @@
827
761
  </zeroOrMore>
828
762
  </element>
829
763
  </define>
830
- <define name="BibDataExtensionType">
831
- <ref name="doctype"/>
832
- <optional>
833
- <ref name="docsubtype"/>
834
- </optional>
835
- <optional>
836
- <ref name="editorialgroup"/>
837
- </optional>
838
- <zeroOrMore>
839
- <ref name="ics"/>
840
- </zeroOrMore>
841
- <zeroOrMore>
842
- <ref name="structuredidentifier"/>
843
- </zeroOrMore>
844
- </define>
845
764
  <!-- TitleType = text -->
846
765
  <define name="sections">
847
766
  <element name="sections">
@@ -881,7 +800,7 @@
881
800
  <ref name="BasicBlock"/>
882
801
  </zeroOrMore>
883
802
  <zeroOrMore>
884
- <ref name="bibitem"/>
803
+ <ref name="doc_bibitem"/>
885
804
  <zeroOrMore>
886
805
  <ref name="note"/>
887
806
  </zeroOrMore>
@@ -1219,6 +1138,24 @@
1219
1138
  </define>
1220
1139
  </include>
1221
1140
  <!-- end overrides -->
1141
+ <define name="doc_bibitem">
1142
+ <element name="bibitem">
1143
+ <attribute name="id">
1144
+ <data type="ID"/>
1145
+ </attribute>
1146
+ <optional>
1147
+ <attribute name="hidden">
1148
+ <data type="boolean"/>
1149
+ </attribute>
1150
+ </optional>
1151
+ <optional>
1152
+ <attribute name="suppress_identifier">
1153
+ <data type="boolean"/>
1154
+ </attribute>
1155
+ </optional>
1156
+ <ref name="BibliographicItem"/>
1157
+ </element>
1158
+ </define>
1222
1159
  <define name="image" combine="choice">
1223
1160
  <element name="svg">
1224
1161
  <oneOrMore>
@@ -1237,14 +1174,6 @@
1237
1174
  <value>tag</value>
1238
1175
  </choice>
1239
1176
  </define>
1240
- <define name="docsubtype">
1241
- <element name="subdoctype">
1242
- <ref name="DocumentSubtype"/>
1243
- </element>
1244
- </define>
1245
- <define name="DocumentSubtype">
1246
- <text/>
1247
- </define>
1248
1177
  <define name="colgroup">
1249
1178
  <element name="colgroup">
1250
1179
  <oneOrMore>
@@ -1606,45 +1535,6 @@
1606
1535
  </choice>
1607
1536
  </element>
1608
1537
  </define>
1609
- <define name="editorialgroup">
1610
- <element name="editorialgroup">
1611
- <oneOrMore>
1612
- <ref name="technical-committee"/>
1613
- </oneOrMore>
1614
- </element>
1615
- </define>
1616
- <define name="technical-committee">
1617
- <element name="technical-committee">
1618
- <ref name="IsoWorkgroup"/>
1619
- </element>
1620
- </define>
1621
- <define name="IsoWorkgroup">
1622
- <optional>
1623
- <attribute name="number"/>
1624
- </optional>
1625
- <optional>
1626
- <attribute name="type"/>
1627
- </optional>
1628
- <optional>
1629
- <attribute name="identifier"/>
1630
- </optional>
1631
- <optional>
1632
- <attribute name="prefix"/>
1633
- </optional>
1634
- <text/>
1635
- </define>
1636
- <define name="ics">
1637
- <element name="ics">
1638
- <element name="code">
1639
- <text/>
1640
- </element>
1641
- <optional>
1642
- <element name="text">
1643
- <text/>
1644
- </element>
1645
- </optional>
1646
- </element>
1647
- </define>
1648
1538
  <define name="standard-document">
1649
1539
  <element name="standard-document">
1650
1540
  <attribute name="version"/>
@@ -2475,71 +2365,6 @@
2475
2365
  </optional>
2476
2366
  </element>
2477
2367
  </define>
2478
- <define name="structuredidentifier">
2479
- <element name="structuredidentifier">
2480
- <optional>
2481
- <attribute name="type"/>
2482
- </optional>
2483
- <oneOrMore>
2484
- <element name="agency">
2485
- <text/>
2486
- </element>
2487
- </oneOrMore>
2488
- <optional>
2489
- <element name="class">
2490
- <text/>
2491
- </element>
2492
- </optional>
2493
- <element name="docnumber">
2494
- <text/>
2495
- </element>
2496
- <optional>
2497
- <element name="partnumber">
2498
- <text/>
2499
- </element>
2500
- </optional>
2501
- <optional>
2502
- <element name="edition">
2503
- <text/>
2504
- </element>
2505
- </optional>
2506
- <optional>
2507
- <element name="version">
2508
- <text/>
2509
- </element>
2510
- </optional>
2511
- <optional>
2512
- <element name="supplementtype">
2513
- <text/>
2514
- </element>
2515
- </optional>
2516
- <optional>
2517
- <element name="supplementnumber">
2518
- <text/>
2519
- </element>
2520
- </optional>
2521
- <optional>
2522
- <element name="amendment">
2523
- <text/>
2524
- </element>
2525
- </optional>
2526
- <optional>
2527
- <element name="corrigendum">
2528
- <text/>
2529
- </element>
2530
- </optional>
2531
- <optional>
2532
- <element name="language">
2533
- <text/>
2534
- </element>
2535
- </optional>
2536
- <optional>
2537
- <element name="year">
2538
- <text/>
2539
- </element>
2540
- </optional>
2541
- </element>
2542
- </define>
2543
2368
  <define name="term-clause">
2544
2369
  <element name="clause">
2545
2370
  <optional>
@@ -2813,4 +2638,7 @@
2813
2638
  </attribute>
2814
2639
  </element>
2815
2640
  </define>
2641
+ <start>
2642
+ <ref name="standard-document"/>
2643
+ </start>
2816
2644
  </grammar>
@@ -0,0 +1,151 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
+ <include href="biblio-standoc.rng">
4
+ <define name="DocumentType">
5
+ <choice>
6
+ <value>guide</value>
7
+ <value>recommended-practice</value>
8
+ <value>standard</value>
9
+ <value>whitepaper</value>
10
+ <value>redline</value>
11
+ <value>other</value>
12
+ </choice>
13
+ </define>
14
+ <define name="stage">
15
+ <element name="stage">
16
+ <choice>
17
+ <value>draft</value>
18
+ <value>approved</value>
19
+ <value>superseded</value>
20
+ <value>withdrawn</value>
21
+ </choice>
22
+ </element>
23
+ </define>
24
+ <define name="editorialgroup">
25
+ <element name="editorialgroup">
26
+ <optional>
27
+ <ref name="society"/>
28
+ </optional>
29
+ <optional>
30
+ <ref name="balloting-group"/>
31
+ </optional>
32
+ <optional>
33
+ <ref name="working-group"/>
34
+ </optional>
35
+ <oneOrMore>
36
+ <ref name="committee"/>
37
+ </oneOrMore>
38
+ </element>
39
+ </define>
40
+ <define name="DocumentSubtype">
41
+ <choice>
42
+ <value>amendment</value>
43
+ <value>corrigendum</value>
44
+ <value>erratum</value>
45
+ </choice>
46
+ </define>
47
+ <define name="BibDataExtensionType">
48
+ <optional>
49
+ <attribute name="schema-version"/>
50
+ </optional>
51
+ <optional>
52
+ <ref name="doctype"/>
53
+ </optional>
54
+ <optional>
55
+ <ref name="docsubtype"/>
56
+ </optional>
57
+ <optional>
58
+ <ref name="trialuse"/>
59
+ </optional>
60
+ <optional>
61
+ <ref name="editorialgroup"/>
62
+ </optional>
63
+ <zeroOrMore>
64
+ <ref name="ics"/>
65
+ </zeroOrMore>
66
+ <optional>
67
+ <ref name="standard_status"/>
68
+ </optional>
69
+ <optional>
70
+ <ref name="standard_modified"/>
71
+ </optional>
72
+ <optional>
73
+ <ref name="pubstatus"/>
74
+ </optional>
75
+ <optional>
76
+ <ref name="holdstatus"/>
77
+ </optional>
78
+ </define>
79
+ </include>
80
+ <define name="standard_status">
81
+ <element name="standard_status">
82
+ <choice>
83
+ <value>Inactive</value>
84
+ <value>Active</value>
85
+ <value>Superseded</value>
86
+ </choice>
87
+ </element>
88
+ </define>
89
+ <define name="standard_modified">
90
+ <element name="standard_modified">
91
+ <choice>
92
+ <value>Draft</value>
93
+ <value>Withdrawn</value>
94
+ <value>Superseded</value>
95
+ <value>Approved</value>
96
+ <value>Reserved</value>
97
+ <value>Redline</value>
98
+ </choice>
99
+ </element>
100
+ </define>
101
+ <define name="pubstatus">
102
+ <element name="pubstatus">
103
+ <choice>
104
+ <value>Active</value>
105
+ <value>Inactive</value>
106
+ </choice>
107
+ </element>
108
+ </define>
109
+ <define name="holdstatus">
110
+ <element name="holdstatus">
111
+ <choice>
112
+ <value>Hold</value>
113
+ <value>Publish</value>
114
+ </choice>
115
+ </element>
116
+ </define>
117
+ <define name="BibliographicDateType" combine="choice">
118
+ <value>feedback-ended</value>
119
+ </define>
120
+ <define name="trialuse">
121
+ <element name="trial-use">
122
+ <data type="boolean"/>
123
+ </element>
124
+ </define>
125
+ <define name="balloting-group">
126
+ <element name="balloting-group">
127
+ <attribute name="type">
128
+ <choice>
129
+ <value>individual</value>
130
+ <value>entity</value>
131
+ </choice>
132
+ </attribute>
133
+ <text/>
134
+ </element>
135
+ </define>
136
+ <define name="working-group">
137
+ <element name="working-group">
138
+ <text/>
139
+ </element>
140
+ </define>
141
+ <define name="committee">
142
+ <element name="committee">
143
+ <text/>
144
+ </element>
145
+ </define>
146
+ <define name="society">
147
+ <element name="society">
148
+ <text/>
149
+ </element>
150
+ </define>
151
+ </grammar>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IEEE
3
- VERSION = "0.1.0".freeze
3
+ VERSION = "0.1.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ieee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-10 00:00:00.000000000 Z
11
+ date: 2022-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc
@@ -215,13 +215,13 @@ executables: []
215
215
  extensions: []
216
216
  extra_rdoc_files: []
217
217
  files:
218
+ - ".github/workflows/automerge.yml"
218
219
  - ".github/workflows/rake.yml"
219
220
  - ".github/workflows/release.yml"
220
221
  - ".hound.yml"
221
222
  - ".rubocop.yml"
222
223
  - CODE_OF_CONDUCT.md
223
224
  - Gemfile
224
- - Gemfile.devel
225
225
  - LICENSE
226
226
  - README.adoc
227
227
  - Rakefile
@@ -267,6 +267,7 @@ files:
267
267
  - lib/metanorma-ieee.rb
268
268
  - lib/metanorma/ieee.rb
269
269
  - lib/metanorma/ieee/basicdoc.rng
270
+ - lib/metanorma/ieee/biblio-standoc.rng
270
271
  - lib/metanorma/ieee/biblio.rng
271
272
  - lib/metanorma/ieee/boilerplate.xml
272
273
  - lib/metanorma/ieee/cleanup.rb
@@ -276,6 +277,7 @@ files:
276
277
  - lib/metanorma/ieee/ieee.rng
277
278
  - lib/metanorma/ieee/isodoc.rng
278
279
  - lib/metanorma/ieee/processor.rb
280
+ - lib/metanorma/ieee/relaton-ieee.rng
279
281
  - lib/metanorma/ieee/reqt.rng
280
282
  - lib/metanorma/ieee/term_lookup_cleanup.rb
281
283
  - lib/metanorma/ieee/validate.rb
data/Gemfile.devel DELETED
@@ -1 +0,0 @@
1
- gem "isodoc", git: "https://github.com/metanorma/isodoc", branch: "main"