metanorma-ogc 1.3.8 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/asciidoctor/ogc/boilerplate.xml +6 -6
  3. data/lib/asciidoctor/ogc/cleanup.rb +173 -0
  4. data/lib/asciidoctor/ogc/converter.rb +62 -64
  5. data/lib/asciidoctor/ogc/front.rb +1 -1
  6. data/lib/asciidoctor/ogc/isodoc.rng +49 -11
  7. data/lib/asciidoctor/ogc/ogc.rng +13 -13
  8. data/lib/asciidoctor/ogc/reqt.rng +15 -4
  9. data/lib/asciidoctor/ogc/validate.rb +35 -20
  10. data/lib/isodoc/ogc/base_convert.rb +47 -10
  11. data/lib/isodoc/ogc/biblio.rb +57 -51
  12. data/lib/isodoc/ogc/html/htmlstyle.css +10 -0
  13. data/lib/isodoc/ogc/html/htmlstyle.scss +12 -0
  14. data/lib/isodoc/ogc/html/ogc.css +4 -0
  15. data/lib/isodoc/ogc/html/ogc.scss +4 -0
  16. data/lib/isodoc/ogc/i18n-en.yaml +24 -8
  17. data/lib/isodoc/ogc/metadata.rb +1 -1
  18. data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +541 -155
  19. data/lib/isodoc/ogc/ogc.best-practice.xsl +541 -155
  20. data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +541 -155
  21. data/lib/isodoc/ogc/ogc.community-practice.xsl +541 -155
  22. data/lib/isodoc/ogc/ogc.community-standard.xsl +541 -155
  23. data/lib/isodoc/ogc/ogc.discussion-paper.xsl +541 -155
  24. data/lib/isodoc/ogc/ogc.engineering-report.xsl +541 -155
  25. data/lib/isodoc/ogc/ogc.other.xsl +541 -155
  26. data/lib/isodoc/ogc/ogc.policy.xsl +541 -155
  27. data/lib/isodoc/ogc/ogc.reference-model.xsl +541 -155
  28. data/lib/isodoc/ogc/ogc.release-notes.xsl +541 -155
  29. data/lib/isodoc/ogc/ogc.standard.xsl +541 -155
  30. data/lib/isodoc/ogc/ogc.test-suite.xsl +541 -155
  31. data/lib/isodoc/ogc/ogc.user-guide.xsl +541 -155
  32. data/lib/isodoc/ogc/ogc.white-paper.xsl +400 -96
  33. data/lib/isodoc/ogc/presentation_xml_convert.rb +58 -48
  34. data/lib/isodoc/ogc/reqt.rb +90 -36
  35. data/lib/isodoc/ogc/xref.rb +59 -43
  36. data/lib/metanorma/ogc/processor.rb +2 -1
  37. data/lib/metanorma/ogc/version.rb +1 -1
  38. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1cf7a554aa5d0925f31dadc79986085ae51643cdcc2e3367087da1b2dc9e99b
4
- data.tar.gz: 95a95b35de2d3f9613779bcef6a32b3a21ecfd7b4df77c3411b9da2755369a35
3
+ metadata.gz: 6d485aa36153e193dceebf844193f8042fce9db6ce93b00e66ac43e7755a541e
4
+ data.tar.gz: '0692880332b57c821956e5d9ec5e3dd3ddf94e33f8b6b92f8f16b89f72bae1b9'
5
5
  SHA512:
6
- metadata.gz: 4b11e5d10627ebd1946e97cdd36ac9c32018033d3044242437149212d9ff6f182ba8c5e1fd9fda1a8fbb66629e36f2de8c40e20ed3022e33aa55a3850dc27141
7
- data.tar.gz: b362a4c65d8c69d3ab99251c9067d6c5a3225e1d391c05953eab122ce5b0a154c17c6d4ac25c5933d12f7542a2c57d42120e8e9eb9561f5b959ded3c2128ddb4
6
+ metadata.gz: f6d4d7d832023e182ef9f0bbe2a4603a5827f7667131f3a27cdc3ebd1a57917483011396f67b160ac91d65576d6d04a73fee200064f2caf0d10736ece807d51c
7
+ data.tar.gz: 846eb44d909ef21e3a08b3bddcb4171271a92dd65cf4c9d208dac02154228ac1b18699d2a71c0e1e7bc2a7912160dc815429bf5a80873591e0ae3708d5ca1693
@@ -95,13 +95,13 @@
95
95
  {% if doctype == "Standard" or doctype == "Community Standard" or doctype == "Abstract Specification" %}
96
96
  {% if stage == "Approved" or stage == "Withdrawn" %}
97
97
  <clause>
98
- <title>Warning</title>
98
+ <title>Notice</title>
99
99
  <p>This document is an OGC Member approved international standard. This document is available on a royalty free, non-discriminatory basis. Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.
100
100
  </p>
101
101
  </clause>
102
102
  {% else %}
103
103
  <clause>
104
- <title>Warning for Drafts</title>
104
+ <title>Notice for Drafts</title>
105
105
  <p>This document is not an OGC Standard. This document is distributed for review and comment. This document is subject to change without notice and may not be referred to as an OGC Standard.</p>
106
106
 
107
107
  <p>Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</p>
@@ -111,7 +111,7 @@
111
111
 
112
112
  {% elsif doctype == "Engineering Report" %}
113
113
  <clause>
114
- <title>Warning</title>
114
+ <title>Notice</title>
115
115
  <p>This document is not an OGC Standard. This document is an OGC Public Engineering Report created as a deliverable in an OGC Interoperability Initiative and is <em>not an official position</em> of the OGC membership. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an OGC Standard.</p>
116
116
 
117
117
  <p>Further, any OGC Engineering Report should not be referenced as required or mandatory technology in procurements. However, the discussions in this document could very well lead to the definition of an OGC Standard.</p>
@@ -120,7 +120,7 @@
120
120
 
121
121
  {% elsif doctype == "Best Practice" %}
122
122
  <clause>
123
- <title>Warning</title>
123
+ <title>Notice</title>
124
124
  <p>This document defines an OGC Best Practice on a particular technology or approach related to an OGC standard. This document is <em>not</em> an OGC Standard and may not be referred to as an OGC Standard. It is subject to change without notice. However, this document is an <em>official</em> position of the OGC membership on this particular technology topic.</p>
125
125
 
126
126
  <p>Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</p>
@@ -128,7 +128,7 @@
128
128
 
129
129
  {% elsif doctype == "Release Notes" %}
130
130
  <clause>
131
- <title>Warning</title>
131
+ <title>Notice</title>
132
132
  <p>This document is not an OGC standard. This document provides release notes for an OGC standard. This document is subject to change without notice and may not be referred to as an OGC Standard.</p>
133
133
 
134
134
  <p>Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</p>
@@ -137,7 +137,7 @@
137
137
 
138
138
  {% else %}
139
139
  <clause>
140
- <title>Warning</title>
140
+ <title>Notice</title>
141
141
  <p>This document is not an OGC Standard. This document is an OGC {{ doctype }} and is therefore not an official position of the OGC membership. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an OGC Standard.</p>
142
142
  <p>Further, an OGC {{ doctype }} should not be referenced as required or mandatory technology in procurements.</p>
143
143
  </clause>
@@ -0,0 +1,173 @@
1
+ module Asciidoctor
2
+ module Ogc
3
+ class Converter < Standoc::Converter
4
+ def sections_cleanup(xml)
5
+ super
6
+ xml.xpath("//*[@inline-header]").each do |h|
7
+ h.delete("inline-header")
8
+ end
9
+ end
10
+
11
+ def make_preface(xml, sect)
12
+ super
13
+ insert_security(xml, sect)
14
+ insert_submitters(xml, sect)
15
+ end
16
+
17
+ def add_id
18
+ %(id="_#{UUIDTools::UUID.random_create}")
19
+ end
20
+
21
+ def insert_security(xml, sect)
22
+ description = "document"
23
+ description = "standard" if %w(standard community-standard)
24
+ .include?(sect&.at("//bibdata/ext/doctype")&.text)
25
+ preface = sect.at("//preface") ||
26
+ sect.add_previous_sibling("<preface/>").first
27
+ sect = xml&.at("//clause[@type = 'security']")&.remove ||
28
+ "<clause type='security' #{add_id}>"\
29
+ "<title>Security considerations</title>"\
30
+ "<p>#{@i18n.security_empty.sub(/%/, description)}</p></clause>"
31
+ preface.add_child sect
32
+ end
33
+
34
+ def insert_submitters(xml, sect)
35
+ if xml.at("//submitters")
36
+ preface = sect.at("//preface") ||
37
+ sect.add_previous_sibling("<preface/>").first
38
+ submitters = xml.at("//submitters").remove
39
+ submitters.xpath(".//table").each do |t|
40
+ t["unnumbered"] = true
41
+ end
42
+ preface.add_child submitters.remove
43
+ end
44
+ end
45
+
46
+ def termdef_boilerplate_cleanup(xmldoc); end
47
+
48
+ def bibdata_cleanup(xmldoc)
49
+ super
50
+ a = xmldoc.at("//bibdata/status/stage")
51
+ a.text == "published" and a.children = "approved"
52
+ end
53
+
54
+ def section_names_terms_cleanup(xml)
55
+ replace_title(xml, "//definitions[@type = 'symbols']", @i18n&.symbols)
56
+ replace_title(xml, "//definitions[@type = 'abbreviated_terms']",
57
+ @i18n&.abbrev)
58
+ replace_title(xml, "//definitions[not(@type)]", @i18n&.symbolsabbrev)
59
+ replace_title(xml, "//sections//terms#{SYMnoABBR} | "\
60
+ "//sections//clause[.//terms]#{SYMnoABBR}",
61
+ @i18n&.termsdefsymbols, true)
62
+ replace_title(xml, "//sections//terms#{ABBRnoSYM} | "\
63
+ "//sections//clause[.//terms]#{ABBRnoSYM}",
64
+ @i18n&.termsdefabbrev, true)
65
+ replace_title(xml, "//sections//terms#{SYMABBR} | "\
66
+ "//sections//clause[.//terms]#{SYMABBR}",
67
+ @i18n&.termsdefsymbolsabbrev, true)
68
+ replace_title(xml, "//sections//terms#{NO_SYMABBR} | "\
69
+ "//sections//clause[.//terms]#{NO_SYMABBR}",
70
+ @i18n&.termsdefsymbolsabbrev, true)
71
+ replace_title(xml, "//sections//terms[not(.//definitions)] | "\
72
+ "//sections//clause[.//terms][not(.//definitions)]",
73
+ @i18n&.termsdef, true)
74
+ end
75
+
76
+ def requirement_metadata_component_tags
77
+ %w(test-purpose test-method test-method-type conditions part description
78
+ reference step requirement permission recommendation)
79
+ end
80
+
81
+ def requirement_metadata1(reqt, dlist, ins)
82
+ ins1 = super
83
+ dlist.xpath("./dt").each do |e|
84
+ tag = e&.text&.gsub(/ /, "-")&.downcase
85
+ next unless requirement_metadata_component_tags.include? tag
86
+
87
+ ins1.next = requirement_metadata1_component(e, tag)
88
+ ins1 = ins1.next
89
+ end
90
+ end
91
+
92
+ def requirement_metadata1_component(term, tag)
93
+ val = term.at("./following::dd")
94
+ val.name = tag
95
+ val.xpath("./dl").each do |d|
96
+ requirement_metadata1(val, d, d)
97
+ d.remove
98
+ end
99
+ if %w(requirement permission
100
+ recommendation).include?(term.text) && !val.text.empty?
101
+ val["label"] = val.text.strip
102
+ val.children.remove
103
+ end
104
+ val
105
+ end
106
+
107
+ def requirement_metadata(xmldoc)
108
+ super
109
+ xmldoc.xpath(REQRECPER).each do |r|
110
+ requirement_metadata_to_component(r)
111
+ requirement_metadata_to_requirement(r)
112
+ requirement_subparts_to_blocks(r)
113
+ end
114
+ end
115
+
116
+ def requirement_metadata_to_component(reqt)
117
+ reqt.xpath(".//test-method | .//test-purpose | .//conditions | "\
118
+ ".//part | .//test-method-type | .//step | .//reference")
119
+ .each do |c|
120
+ c["class"] = c.name
121
+ c.name = "component"
122
+ end
123
+ end
124
+
125
+ def requirement_metadata_to_requirement(reqt)
126
+ reqt.xpath("./requirement | ./permission | ./recommendation")
127
+ .each do |c|
128
+ c["id"] = Metanorma::Utils::anchor_or_uuid
129
+ end
130
+ end
131
+
132
+ def requirement_subparts_to_blocks(reqt)
133
+ reqt.xpath(".//component | .//description").each do |c|
134
+ next if %w(p ol ul dl table component description)
135
+ .include?(c&.elements&.first&.name)
136
+
137
+ c.children = "<p>#{c.children.to_xml}</p>"
138
+ end
139
+ end
140
+
141
+ # skip annex/terms/terms, which is empty node
142
+ def termdef_subclause_cleanup(xmldoc)
143
+ xmldoc.xpath("//annex//terms[terms]").each do |t|
144
+ next if t.parent.name == "terms"
145
+
146
+ t.children.each { |n| n.parent = t.parent }
147
+ t.remove
148
+ end
149
+ end
150
+
151
+ def requirement_cleanup(xmldoc)
152
+ requirement_type(xmldoc)
153
+ super
154
+ end
155
+
156
+ def requirement_type(xmldoc)
157
+ xmldoc.xpath(REQRECPER).each do |r|
158
+ next unless r["type"]
159
+
160
+ r["type"] = case r["type"]
161
+ when "requirement", "recommendation", "permission"
162
+ "general"
163
+ when "requirement_class" then "class"
164
+ when "conformance_test" then "verification"
165
+ when "conformance_class" then "conformanceclass"
166
+ when "abstract_test" then "abstracttest"
167
+ else r["type"]
168
+ end
169
+ end
170
+ end
171
+ end
172
+ end
173
+ end
@@ -3,6 +3,7 @@ require "asciidoctor/standoc/converter"
3
3
  require "fileutils"
4
4
  require_relative "front"
5
5
  require_relative "validate"
6
+ require_relative "cleanup"
6
7
 
7
8
  module Asciidoctor
8
9
  module Ogc
@@ -16,8 +17,7 @@ module Asciidoctor
16
17
  register_for "ogc"
17
18
 
18
19
  # ignore, we generate ToC outside of asciidoctor
19
- def toc(value)
20
- end
20
+ def toc(value); end
21
21
 
22
22
  def makexml(node)
23
23
  @draft = node.attributes.has_key?("draft")
@@ -27,11 +27,11 @@ module Asciidoctor
27
27
  def doctype(node)
28
28
  d = super
29
29
  d1 = ::IsoDoc::Ogc::DOCTYPE_ABBR.invert[d] and d = d1
30
- unless %w{abstract-specification-topic best-practice
31
- change-request-supporting-document community-practice
32
- community-standard discussion-paper engineering-report other policy
33
- reference-model release-notes standard user-guide white-paper
34
- test-suite}.include? d
30
+ unless %w{abstract-specification-topic best-practice other policy
31
+ change-request-supporting-document community-practice
32
+ community-standard discussion-paper engineering-report
33
+ reference-model release-notes standard user-guide white-paper
34
+ test-suite}.include? d
35
35
  @warned_doctype or
36
36
  @log.add("Document Attributes", nil,
37
37
  "'#{d}' is not a legal document type: reverting to 'standard'")
@@ -41,72 +41,42 @@ module Asciidoctor
41
41
  d
42
42
  end
43
43
 
44
+ def sectiontype(node, level = true)
45
+ ret = sectiontype_streamline(sectiontype1(node))
46
+ return ret if ret == "terms and definitions" &&
47
+ node.attr("style") == "appendix" && node.level == 1
48
+
49
+ super
50
+ end
51
+
44
52
  def sectiontype_streamline(ret)
45
53
  case ret
46
54
  when "preface" then "foreword"
47
- when "foreword" then "donotrecognise-foreword"
48
- when "introduction" then "donotrecognise-foreword"
55
+ when "foreword", "introduction" then "donotrecognise-foreword"
49
56
  when "references" then "normative references"
57
+ when "glossary" then "terms and definitions"
50
58
  else
51
59
  super
52
60
  end
53
61
  end
54
62
 
55
63
  def outputs(node, ret)
56
- File.open(@filename + ".xml", "w:UTF-8") { |f| f.write(ret) }
57
- presentation_xml_converter(node).convert(@filename + ".xml")
58
- html_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.html")
59
- doc_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.doc")
60
- pdf_converter(node)&.convert(@filename + ".presentation.xml", nil, false, "#{@filename}.pdf")
61
- end
62
-
63
- def validate(doc)
64
- content_validate(doc)
65
- schema_validate(formattedstr_strip(doc.dup), File.join(File.dirname(__FILE__), "ogc.rng"))
66
- end
67
-
68
- def sections_cleanup(x)
69
- super
70
- x.xpath("//*[@inline-header]").each do |h|
71
- h.delete("inline-header")
72
- end
73
- end
74
-
75
- def make_preface(x, s)
76
- super
77
- insert_security(x, s)
78
- insert_submitters(x, s)
79
- end
80
-
81
- def add_id
82
- %(id="_#{UUIDTools::UUID.random_create}")
83
- end
84
-
85
- def insert_security(x, s)
86
- doctype = s&.at("//bibdata/ext/doctype")&.text
87
- description = %w(standard community-standard).include?(doctype) ? "standard" : "document"
88
- preface = s.at("//preface") || s.add_previous_sibling("<preface/>").first
89
- s = x&.at("//clause[@type = 'security']")&.remove ||
90
- "<clause type='security' #{add_id}>"\
91
- "<title>Security Considerations</title>"\
92
- "<p>#{@i18n.security_empty.sub(/%/, description)}</p></clause>"
93
- preface.add_child s
94
- end
95
-
96
- def insert_submitters(x, s)
97
- if x.at("//submitters")
98
- preface = s.at("//preface") || s.add_previous_sibling("<preface/>").first
99
- submitters = x.at("//submitters").remove
100
- preface.add_child submitters.remove
101
- end
64
+ File.open("#{@filename}.xml", "w:UTF-8") { |f| f.write(ret) }
65
+ presentation_xml_converter(node).convert("#{@filename}.xml")
66
+ html_converter(node).convert("#{@filename}.presentation.xml", nil,
67
+ false, "#{@filename}.html")
68
+ doc_converter(node).convert("#{@filename}.presentation.xml", nil,
69
+ false, "#{@filename}.doc")
70
+ pdf_converter(node)&.convert("#{@filename}.presentation.xml", nil,
71
+ false, "#{@filename}.pdf")
102
72
  end
103
73
 
104
74
  def clause_parse(attrs, xml, node)
105
- case clausetype = node&.attr("heading")&.downcase || node.title.downcase
75
+ case node&.attr("heading")&.downcase || node.title.downcase
106
76
  when "submitters" then return submitters_parse(attrs, xml, node)
107
77
  when "conformance" then attrs = attrs.merge(type: "conformance")
108
- when "security considerations" then attrs =
109
- attrs.merge(type: "security")
78
+ when "security considerations" then attrs =
79
+ attrs.merge(type: "security")
110
80
  end
111
81
  super
112
82
  end
@@ -118,23 +88,50 @@ module Asciidoctor
118
88
  end
119
89
  end
120
90
 
121
- def style(n, t)
122
- return
91
+ def style(_node, _text)
92
+ nil
123
93
  end
124
94
 
125
- def termdef_boilerplate_cleanup(xmldoc)
95
+ def term_def_parse(attrs, xml, node, _toplevel)
96
+ if node.attr("style") == "appendix" && node.level == 1
97
+ terms_annex_parse(attrs, xml, node)
98
+ else
99
+ super
100
+ end
126
101
  end
127
102
 
128
- def bibdata_cleanup(xmldoc)
103
+ def table_cell(node, xml_tr, tblsec)
104
+ node.set_attr("valign", "middle")
129
105
  super
130
- a = xmldoc.at("//bibdata/status/stage")
131
- a.text == "published" and a.children = "approved"
106
+ end
107
+
108
+ def terms_annex_parse(attrs, xml, node)
109
+ attrs1 = attrs.merge(id: "_#{UUIDTools::UUID.random_create}")
110
+ xml.annex **attr_code(attrs1) do |xml_section|
111
+ xml_section.title { |name| name << node.title }
112
+ xml_section.terms **attr_code(attrs) do |terms|
113
+ (s = node.attr("source")) && s.split(",").each do |s1|
114
+ terms.termdocsource(nil, **attr_code(bibitemid: s1))
115
+ end
116
+ terms << node.content
117
+ end
118
+ end
132
119
  end
133
120
 
134
121
  def highlight_parse(text, xml)
135
122
  xml.hi { |s| s << text }
136
123
  end
137
124
 
125
+ def example(node)
126
+ role = node.role || node.attr("style")
127
+ if %w(requirement_class conformance_test conformance_class
128
+ abstract_test).include?(role)
129
+ node.set_attr("type", role)
130
+ return requirement(node, "requirement")
131
+ end
132
+ super
133
+ end
134
+
138
135
  def presentation_xml_converter(node)
139
136
  IsoDoc::Ogc::PresentationXMLConvert.new(html_extract_attributes(node))
140
137
  end
@@ -145,6 +142,7 @@ module Asciidoctor
145
142
 
146
143
  def pdf_converter(node)
147
144
  return nil if node.attr("no-pdf")
145
+
148
146
  IsoDoc::Ogc::PdfConvert.new(html_extract_attributes(node))
149
147
  end
150
148
 
@@ -171,7 +171,7 @@ module Asciidoctor
171
171
  s = "general"
172
172
  end
173
173
  end
174
- s and xml.docsubtype s
174
+ s and xml.subdoctype s
175
175
  end
176
176
 
177
177
  def title(node, xml)
@@ -32,6 +32,18 @@
32
32
  <ref name="DocumentType"/>
33
33
  </element>
34
34
  </define>
35
+ <define name="section-title">
36
+ <element name="title">
37
+ <zeroOrMore>
38
+ <ref name="TextElement"/>
39
+ </zeroOrMore>
40
+ </element>
41
+ <zeroOrMore>
42
+ <element name="variant-title">
43
+ <ref name="TypedTitleString"/>
44
+ </element>
45
+ </zeroOrMore>
46
+ </define>
35
47
  <define name="hyperlink">
36
48
  <element name="link">
37
49
  <attribute name="target">
@@ -158,15 +170,17 @@
158
170
  <data type="boolean"/>
159
171
  </attribute>
160
172
  </optional>
161
- <attribute name="type">
162
- <choice>
163
- <value>roman</value>
164
- <value>alphabet</value>
165
- <value>arabic</value>
166
- <value>roman_upper</value>
167
- <value>alphabet_upper</value>
168
- </choice>
169
- </attribute>
173
+ <optional>
174
+ <attribute name="type">
175
+ <choice>
176
+ <value>roman</value>
177
+ <value>alphabet</value>
178
+ <value>arabic</value>
179
+ <value>roman_upper</value>
180
+ <value>alphabet_upper</value>
181
+ </choice>
182
+ </attribute>
183
+ </optional>
170
184
  <oneOrMore>
171
185
  <ref name="li"/>
172
186
  </oneOrMore>
@@ -976,6 +990,16 @@
976
990
  <data type="boolean"/>
977
991
  </attribute>
978
992
  </optional>
993
+ <optional>
994
+ <attribute name="linkmention">
995
+ <data type="boolean"/>
996
+ </attribute>
997
+ </optional>
998
+ <optional>
999
+ <attribute name="linkref">
1000
+ <data type="boolean"/>
1001
+ </attribute>
1002
+ </optional>
979
1003
  <optional>
980
1004
  <element name="refterm">
981
1005
  <zeroOrMore>
@@ -1012,6 +1036,7 @@
1012
1036
  <ref name="svgmap"/>
1013
1037
  <ref name="inputform"/>
1014
1038
  <ref name="toc"/>
1039
+ <ref name="passthrough"/>
1015
1040
  </choice>
1016
1041
  </define>
1017
1042
  <define name="toc">
@@ -1019,6 +1044,14 @@
1019
1044
  <ref name="ul"/>
1020
1045
  </element>
1021
1046
  </define>
1047
+ <define name="passthrough">
1048
+ <element name="passthrough">
1049
+ <optional>
1050
+ <attribute name="formats"/>
1051
+ </optional>
1052
+ <text/>
1053
+ </element>
1054
+ </define>
1022
1055
  <define name="inputform">
1023
1056
  <element name="form">
1024
1057
  <attribute name="id">
@@ -1686,7 +1719,9 @@
1686
1719
  <zeroOrMore>
1687
1720
  <ref name="termgrammar"/>
1688
1721
  </zeroOrMore>
1689
- <ref name="definition"/>
1722
+ <oneOrMore>
1723
+ <ref name="termdefinition"/>
1724
+ </oneOrMore>
1690
1725
  <zeroOrMore>
1691
1726
  <ref name="termnote"/>
1692
1727
  </zeroOrMore>
@@ -1749,7 +1784,7 @@
1749
1784
  </oneOrMore>
1750
1785
  </element>
1751
1786
  </define>
1752
- <define name="definition">
1787
+ <define name="termdefinition">
1753
1788
  <element name="definition">
1754
1789
  <oneOrMore>
1755
1790
  <choice>
@@ -1758,6 +1793,9 @@
1758
1793
  <ref name="formula"/>
1759
1794
  </choice>
1760
1795
  </oneOrMore>
1796
+ <zeroOrMore>
1797
+ <ref name="termsource"/>
1798
+ </zeroOrMore>
1761
1799
  </element>
1762
1800
  </define>
1763
1801
  <define name="termnote">
@@ -62,6 +62,19 @@
62
62
  </optional>
63
63
  </element>
64
64
  </define>
65
+ <define name="DocumentSubtype">
66
+ <choice>
67
+ <value>conceptual-model</value>
68
+ <value>conceptual-model-and-encoding</value>
69
+ <value>conceptual-model-and-implementation</value>
70
+ <value>encoding</value>
71
+ <value>extension</value>
72
+ <value>implementation</value>
73
+ <value>profile</value>
74
+ <value>profile-with-extension</value>
75
+ <value>general</value>
76
+ </choice>
77
+ </define>
65
78
  </include>
66
79
  <define name="TextElement" combine="choice">
67
80
  <ref name="hi"/>
@@ -79,19 +92,6 @@
79
92
  </zeroOrMore>
80
93
  </element>
81
94
  </define>
82
- <define name="DocumentSubtype">
83
- <choice>
84
- <value>conceptual-model</value>
85
- <value>conceptual-model-and-encoding</value>
86
- <value>conceptual-model-and-implementation</value>
87
- <value>encoding</value>
88
- <value>extension</value>
89
- <value>implementation</value>
90
- <value>profile</value>
91
- <value>profile-with-extension</value>
92
- <value>general</value>
93
- </choice>
94
- </define>
95
95
  <define name="submitters">
96
96
  <element name="submitters">
97
97
  <ref name="Basic-Section"/>
@@ -64,9 +64,9 @@
64
64
  <optional>
65
65
  <ref name="label"/>
66
66
  </optional>
67
- <optional>
67
+ <zeroOrMore>
68
68
  <ref name="subject"/>
69
- </optional>
69
+ </zeroOrMore>
70
70
  <zeroOrMore>
71
71
  <ref name="reqinherit"/>
72
72
  </zeroOrMore>
@@ -80,6 +80,7 @@
80
80
  <ref name="verification"/>
81
81
  <ref name="import"/>
82
82
  <ref name="description"/>
83
+ <ref name="component"/>
83
84
  </choice>
84
85
  </zeroOrMore>
85
86
  <optional>
@@ -105,12 +106,16 @@
105
106
  </define>
106
107
  <define name="subject">
107
108
  <element name="subject">
108
- <text/>
109
+ <oneOrMore>
110
+ <ref name="TextElement"/>
111
+ </oneOrMore>
109
112
  </element>
110
113
  </define>
111
114
  <define name="reqinherit">
112
115
  <element name="inherit">
113
- <text/>
116
+ <oneOrMore>
117
+ <ref name="TextElement"/>
118
+ </oneOrMore>
114
119
  </element>
115
120
  </define>
116
121
  <define name="measurementtarget">
@@ -138,6 +143,12 @@
138
143
  <ref name="RequirementSubpart"/>
139
144
  </element>
140
145
  </define>
146
+ <define name="component">
147
+ <element name="component">
148
+ <attribute name="class"/>
149
+ <ref name="RequirementSubpart"/>
150
+ </element>
151
+ </define>
141
152
  <define name="reqt_references">
142
153
  <element name="references">
143
154
  <oneOrMore>