metanorma-iso 1.8.1 → 1.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +3 -13
  3. data/.hound.yml +3 -1
  4. data/.rubocop.yml +4 -8
  5. data/lib/asciidoctor/iso/base.rb +1 -0
  6. data/lib/asciidoctor/iso/biblio.rng +1 -0
  7. data/lib/asciidoctor/iso/cleanup.rb +17 -5
  8. data/lib/asciidoctor/iso/front.rb +3 -1
  9. data/lib/asciidoctor/iso/front_id.rb +66 -50
  10. data/lib/asciidoctor/iso/isodoc.rng +209 -4
  11. data/lib/asciidoctor/iso/isostandard-amd.rng +3 -0
  12. data/lib/asciidoctor/iso/isostandard.rng +12 -0
  13. data/lib/asciidoctor/iso/section.rb +2 -1
  14. data/lib/asciidoctor/iso/validate_section.rb +16 -9
  15. data/lib/isodoc/iso/base_convert.rb +13 -13
  16. data/lib/isodoc/iso/html/isodoc.css +475 -20
  17. data/lib/isodoc/iso/html/isodoc.scss +456 -23
  18. data/lib/isodoc/iso/html/wordstyle.css +202 -31
  19. data/lib/isodoc/iso/html/wordstyle.scss +194 -32
  20. data/lib/isodoc/iso/iso.amendment.xsl +679 -473
  21. data/lib/isodoc/iso/iso.international-standard.xsl +679 -473
  22. data/lib/isodoc/iso/metadata.rb +3 -2
  23. data/lib/isodoc/iso/presentation_xml_convert.rb +18 -9
  24. data/lib/isodoc/iso/sts_convert.rb +10 -13
  25. data/lib/isodoc/iso/word_convert.rb +153 -39
  26. data/lib/isodoc/iso/xref.rb +42 -27
  27. data/lib/metanorma/iso/version.rb +1 -1
  28. data/metanorma-iso.gemspec +4 -4
  29. data/spec/asciidoctor/base_spec.rb +426 -334
  30. data/spec/asciidoctor/blocks_spec.rb +96 -34
  31. data/spec/asciidoctor/cleanup_spec.rb +383 -25
  32. data/spec/asciidoctor/section_spec.rb +0 -14
  33. data/spec/asciidoctor/validate_spec.rb +119 -39
  34. data/spec/isodoc/amd_spec.rb +193 -201
  35. data/spec/isodoc/blocks_spec.rb +100 -88
  36. data/spec/isodoc/i18n_spec.rb +36 -36
  37. data/spec/isodoc/inline_spec.rb +282 -2
  38. data/spec/isodoc/iso_spec.rb +86 -138
  39. data/spec/isodoc/postproc_spec.rb +492 -442
  40. data/spec/isodoc/ref_spec.rb +6 -6
  41. data/spec/isodoc/section_spec.rb +301 -306
  42. data/spec/isodoc/table_spec.rb +166 -231
  43. data/spec/isodoc/terms_spec.rb +11 -8
  44. data/spec/isodoc/xref_spec.rb +147 -118
  45. data/spec/spec_helper.rb +16 -15
  46. metadata +9 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d170797212efc1050755714c1c875246a5b1b07ca8c4c1b6562b51ab2ee44a9
4
- data.tar.gz: a6deb053bf737183c275a1f93a110d89f8fa42a093bafd514c7d672b5e16f427
3
+ metadata.gz: 5a0192dfdd4d26ab4c59d50a8b7e91e36ce83a27c9835f01221444e1ecf2c278
4
+ data.tar.gz: 4f4b37c785f3fe5c58777962943ebe8c27a38415cd178d8abab18dc95cf24192
5
5
  SHA512:
6
- metadata.gz: 63752e6b4a75cba612fca7cacf5c0ccd7a4553f51b9743e667d7a2891737dff68deace61efcab395be2f22e8b4d6559ee8eee6c50ad84e3f13e627af1ca98a68
7
- data.tar.gz: 401f42f155a7424266d3bf62cb6fca9a67ad1adeddf01145c55de95397a91de22847b56fa92563d64045eb6dc2682511eab3925d60f74b1ca737f8ecefacee63
6
+ metadata.gz: 91c94f57a7a8437f4c64366aeb1f14a5ede637357fd19485de1311e18d112ec22ff4325e35158c4322fc5a763292add832d4bc02b64c425e59b778e92ca757e8
7
+ data.tar.gz: 47e01118ffc205d246a082130c25893e6e3c41bc4c2ce171949d5f3e308e30a64c7ce49b903aa9f3434537eac2f275e50443f1887014b8a256a48061e38d3250
@@ -4,7 +4,7 @@ name: rake
4
4
 
5
5
  on:
6
6
  push:
7
- branches: [ master, main ]
7
+ branches: [ master, main ]
8
8
  tags: [ v* ]
9
9
  pull_request:
10
10
 
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
  steps:
33
23
  - uses: actions/checkout@master
34
24
 
@@ -49,5 +39,5 @@ jobs:
49
39
  with:
50
40
  token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
51
41
  repository: ${{ github.repository }}
52
- event-type: notify
42
+ event-type: tests-passed
53
43
  client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
data/.hound.yml CHANGED
@@ -1,3 +1,5 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
1
3
  ruby:
2
- Enabled: true
4
+ enabled: true
3
5
  config_file: .rubocop.yml
data/.rubocop.yml CHANGED
@@ -1,14 +1,10 @@
1
- # This project follows the Ribose OSS style guide.
2
- # https://github.com/riboseinc/oss-guides
3
- # All project-specific additions and overrides should be specified in this file.
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
4
3
  inherit_from:
5
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
6
5
 
7
6
  # local repo-specific modifications
7
+ # ...
8
8
 
9
9
  AllCops:
10
- DisplayCopNames: false
11
- StyleGuideCopsOnly: false
12
- TargetRubyVersion: 2.4
13
- Rails:
14
- Enabled: true
10
+ TargetRubyVersion: 2.5
@@ -44,6 +44,7 @@ module Asciidoctor
44
44
  def init(node)
45
45
  super
46
46
  @amd = %w(amendment technical-corrigendum).include? doctype(node)
47
+ @vocab = node.attr("docsubtype") == "vocabulary"
47
48
  end
48
49
 
49
50
  def ol_attrs(node)
@@ -787,6 +787,7 @@
787
787
  <value>adapted</value>
788
788
  <value>vote-started</value>
789
789
  <value>vote-ended</value>
790
+ <value>announced</value>
790
791
  </choice>
791
792
  </define>
792
793
  <define name="bdate">
@@ -65,8 +65,12 @@ module Asciidoctor
65
65
  super
66
66
  end
67
67
 
68
- TERM_CLAUSE = "//sections//terms".freeze
68
+ TERM_CLAUSE = "//sections//terms | "\
69
+ "//sections//clause[descendant::terms][not(descendant::definitions)]"
70
+ .freeze
71
+
69
72
  PUBLISHER = "./contributor[role/@type = 'publisher']/organization".freeze
73
+
70
74
  OTHERIDS = "@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or "\
71
75
  "@type = 'ISBN'".freeze
72
76
 
@@ -154,12 +158,20 @@ module Asciidoctor
154
158
 
155
159
  id = b.at("docidentifier").text
156
160
  b.at("./language | ./script | ./abstract | ./status")
157
- .previous = <<~NOTE
158
- <note type="Unpublished-Status">
159
- <p>#{@i18n.under_preparation.sub(/%/, id)}</p></note>
160
- NOTE
161
+ .previous = %(<note type="Unpublished-Status">
162
+ <p>#{@i18n.under_preparation.sub(/%/, id)}</p></note>)
161
163
  end
162
164
  end
165
+
166
+ def termdef_boilerplate_insert(xmldoc, isodoc, once = false)
167
+ once = true
168
+ super
169
+ end
170
+
171
+ def term_defs_boilerplate_cont(src, term, isodoc)
172
+ @vocab and src.empty? and return
173
+ super
174
+ end
163
175
  end
164
176
  end
165
177
  end
@@ -115,7 +115,9 @@ module Asciidoctor
115
115
  return unless node.attr("title-amendment-#{lang}")
116
116
 
117
117
  xml.title(**attr_code(at.merge(type: "title-amd"))) do |t1|
118
- t1 << Metanorma::Utils::asciidoc_sub(node.attr("title-amendment-#{lang}"))
118
+ t1 << Metanorma::Utils::asciidoc_sub(
119
+ node.attr("title-amendment-#{lang}")
120
+ )
119
121
  end
120
122
  end
121
123
 
@@ -35,22 +35,26 @@ module Asciidoctor
35
35
 
36
36
  def stage_abbr(stage, substage, doctype)
37
37
  return nil if stage.to_i > 60
38
+
38
39
  ret = STAGE_ABBRS[stage.to_sym]
39
40
  ret = "PRF" if stage == "60" && substage == "00"
40
41
  ret = "AWI" if stage == "10" && substage == "99"
41
- if %w(amendment technical-corrigendum technical-report
42
- technical-specification).include?(doctype)
42
+ if %w(amendment technical-corrigendum technical-report
43
+ technical-specification).include?(doctype)
43
44
  ret = "D" if stage == "40" && doctype == "amendment"
44
- ret = "FD" if stage == "50" && %w(amendment technical-corrigendum).include?(doctype)
45
+ ret = "FD" if stage == "50" && %w(amendment technical-corrigendum)
46
+ .include?(doctype)
45
47
  end
46
48
  ret
47
49
  end
48
50
 
49
51
  def stage_name(stage, substage, doctype, iteration = nil)
50
52
  return "Proof" if stage == "60" && substage == "00"
53
+
51
54
  ret = STAGE_NAMES[stage.to_sym]
52
55
  if iteration && %w(20 30).include?(stage)
53
- prefix = iteration.to_i.localize(@lang.to_sym).to_rbnf_s("SpelloutRules", "spellout-ordinal")
56
+ prefix = iteration.to_i.localize(@lang.to_sym)
57
+ .to_rbnf_s("SpelloutRules", "spellout-ordinal")
54
58
  ret = "#{prefix.capitalize} #{ret.downcase}"
55
59
  end
56
60
  ret
@@ -65,37 +69,39 @@ module Asciidoctor
65
69
  end
66
70
 
67
71
  def iso_id(node, xml)
68
- return unless !@amd && node.attr("docnumber") || @amd && node.attr("updates")
72
+ !@amd && node.attr("docnumber") || @amd && node.attr("updates") or
73
+ return
74
+
69
75
  dn = iso_id1(node)
70
76
  dn1 = id_stage_prefix(dn, node, false)
71
77
  dn2 = id_stage_prefix(dn, node, true)
72
78
  xml.docidentifier dn1, **attr_code(type: "ISO")
73
- xml.docidentifier id_langsuffix(dn1, node), **attr_code(type: "iso-with-lang")
74
- xml.docidentifier id_langsuffix(dn2, node), **attr_code(type: "iso-reference")
79
+ xml.docidentifier(id_langsuffix(dn1, node),
80
+ **attr_code(type: "iso-with-lang"))
81
+ xml.docidentifier(id_langsuffix(dn2, node),
82
+ **attr_code(type: "iso-reference"))
75
83
  end
76
84
 
77
85
  def iso_id1(node)
78
86
  if @amd
79
87
  dn = node.attr("updates")
80
- return add_amd_parts(dn, node)
88
+ add_amd_parts(dn, node)
81
89
  else
82
90
  part, subpart = node&.attr("partnumber")&.split(/-/)
83
- return add_id_parts(node.attr("docnumber"), part, subpart)
91
+ add_id_parts(node.attr("docnumber"), part, subpart)
84
92
  end
85
93
  end
86
94
 
87
- def add_amd_parts(dn, node)
88
- a = node.attr("amendment-number")
89
- c = node.attr("corrigendum-number")
95
+ def add_amd_parts(docnum, node)
90
96
  case doctype(node)
91
97
  when "amendment"
92
- "#{dn}/Amd #{node.attr('amendment-number')}"
98
+ "#{docnum}/Amd #{node.attr('amendment-number')}"
93
99
  when "technical-corrigendum"
94
- "#{dn}/Cor.#{node.attr('corrigendum-number')}"
100
+ "#{docnum}/Cor.#{node.attr('corrigendum-number')}"
95
101
  end
96
102
  end
97
103
 
98
- def id_langsuffix(dn, node)
104
+ def id_langsuffix(docnum, node)
99
105
  lang = node.attr("language") || "en"
100
106
  suffix = case lang
101
107
  when "en" then "(E)"
@@ -103,38 +109,43 @@ module Asciidoctor
103
109
  else
104
110
  "(X)"
105
111
  end
106
- "#{dn}#{suffix}"
112
+ "#{docnum}#{suffix}"
107
113
  end
108
114
 
109
115
  def structured_id(node, xml)
110
116
  return unless node.attr("docnumber")
117
+
111
118
  part, subpart = node&.attr("partnumber")&.split(/-/)
112
119
  xml.structuredidentifier do |i|
113
- i.project_number node.attr("docnumber"),
114
- **attr_code(part: part, subpart: subpart,
115
- amendment: node.attr("amendment-number"),
116
- corrigendum: node.attr("corrigendum-number"),
117
- origyr: node.attr("created-date"))
120
+ i.project_number(node.attr("docnumber"), **attr_code(
121
+ part: part, subpart: subpart,
122
+ amendment: node.attr("amendment-number"),
123
+ corrigendum: node.attr("corrigendum-number"),
124
+ origyr: node.attr("created-date")
125
+ ))
118
126
  end
119
127
  end
120
128
 
121
- def add_id_parts(dn, part, subpart)
122
- dn += "-#{part}" if part
123
- dn += "-#{subpart}" if subpart
124
- dn
129
+ def add_id_parts(docnum, part, subpart)
130
+ docnum += "-#{part}" if part
131
+ docnum += "-#{subpart}" if subpart
132
+ docnum
125
133
  end
126
134
 
127
135
  def id_stage_abbr(stage, substage, node, bare = false)
128
- ret = bare ?
129
- IsoDoc::Iso::Metadata.new("en", "Latn", @i18n)
130
- .status_abbrev(stage_abbr(stage, substage, doctype(node)),
131
- substage, nil, nil, doctype(node)) :
132
- IsoDoc::Iso::Metadata.new("en", "Latn", @i18n)
133
- .status_abbrev(stage_abbr(stage, substage, doctype(node)),
134
- substage, node.attr("iteration"),
135
- node.attr("draft"), doctype(node))
136
- if %w(amendment technical-corrigendum technical-report technical-specification).include?(doctype(node))
137
- ret = ret + " " unless %w(D FD).include?(ret)
136
+ ret = if bare
137
+ IsoDoc::Iso::Metadata.new("en", "Latn", @i18n)
138
+ .status_abbrev(stage_abbr(stage, substage, doctype(node)),
139
+ substage, nil, nil, doctype(node))
140
+ else
141
+ IsoDoc::Iso::Metadata.new("en", "Latn", @i18n)
142
+ .status_abbrev(stage_abbr(stage, substage, doctype(node)),
143
+ substage, node.attr("iteration"),
144
+ node.attr("draft"), doctype(node))
145
+ end
146
+ if %w(amendment technical-corrigendum technical-report
147
+ technical-specification).include?(doctype(node))
148
+ ret = "#{ret} " unless %w(D FD).include?(ret)
138
149
  end
139
150
  ret
140
151
  end
@@ -143,51 +154,56 @@ module Asciidoctor
143
154
  stage = get_stage(node)
144
155
  abbr = id_stage_abbr(get_stage(node), get_substage(node), node, true)
145
156
  typeabbr = get_typeabbr(node, true)
146
- typeabbr = "" if stage.to_i > 50 || stage.to_i == 60 && get_substage(node).to_i < 60
157
+ if stage.to_i > 50 || stage.to_i == 60 && get_substage(node).to_i < 60
158
+ typeabbr = ""
159
+ end
147
160
  "#{abbr}#{typeabbr}".strip
148
161
  end
149
162
 
150
- def id_stage_prefix(dn, node, force_year)
163
+ def id_stage_prefix(docnum, node, force_year)
151
164
  stage = get_stage(node)
152
165
  typeabbr = get_typeabbr(node)
153
166
  if stage && (stage.to_i < 60)
154
- dn = unpub_stage_prefix(dn, stage, typeabbr, node)
155
- elsif typeabbr && !@amd then dn = "/#{typeabbr}#{dn}"
167
+ docnum = unpub_stage_prefix(docnum, stage, typeabbr, node)
168
+ elsif typeabbr == "DIR " then docnum = "#{typeabbr}#{docnum}"
169
+ elsif typeabbr && !@amd then docnum = "/#{typeabbr}#{docnum}"
156
170
  end
157
171
  (force_year || !(stage && (stage.to_i < 60))) and
158
- dn = id_add_year(dn, node)
159
- dn
172
+ docnum = id_add_year(docnum, node)
173
+ docnum
160
174
  end
161
175
 
162
- def unpub_stage_prefix(dn, stage, typeabbr, node)
176
+ def unpub_stage_prefix(docnum, stage, typeabbr, node)
163
177
  abbr = id_stage_abbr(stage, get_substage(node), node)
164
178
  %w(40 50).include?(stage) && i = node.attr("iteration") and
165
179
  itersuffix = ".#{i}"
166
- return dn if abbr.nil? || abbr.empty? # prefixes added in cleanup
167
- return "/#{abbr}#{typeabbr} #{dn}#{itersuffix}" unless @amd
168
- a = dn.split(%r{/})
180
+ return docnum if abbr.nil? || abbr.empty? # prefixes added in cleanup
181
+ return "/#{abbr}#{typeabbr} #{docnum}#{itersuffix}" unless @amd
182
+
183
+ a = docnum.split(%r{/})
169
184
  a[-1] = "#{abbr}#{a[-1]}#{itersuffix}"
170
185
  a.join("/")
171
186
  end
172
187
 
173
- def id_add_year(dn, node)
188
+ def id_add_year(docnum, node)
174
189
  year = node.attr("copyright-year")
175
190
  @amd and year ||= node.attr("updated-date")&.sub(/-.*$/, "")
176
- dn += ":#{year}" if year
177
- dn
191
+ docnum += ":#{year}" if year
192
+ docnum
178
193
  end
179
194
 
180
195
  def get_stage(node)
181
- stage = node.attr("status") || node.attr("docstage") || "60"
196
+ node.attr("status") || node.attr("docstage") || "60"
182
197
  end
183
198
 
184
199
  def get_substage(node)
185
200
  stage = get_stage(node)
186
- node.attr("docsubstage") || ( stage == "60" ? "60" : "00" )
201
+ node.attr("docsubstage") || (stage == "60" ? "60" : "00")
187
202
  end
188
203
 
189
204
  def get_typeabbr(node, amd = false)
190
205
  case doctype(node)
206
+ when "directive" then "DIR "
191
207
  when "technical-report" then "TR "
192
208
  when "technical-specification" then "TS "
193
209
  when "amendment" then (amd ? "Amd " : "")
@@ -45,6 +45,11 @@
45
45
  <optional>
46
46
  <attribute name="alt"/>
47
47
  </optional>
48
+ <optional>
49
+ <attribute name="updatetype">
50
+ <data type="boolean"/>
51
+ </attribute>
52
+ </optional>
48
53
  <text/>
49
54
  </element>
50
55
  </define>
@@ -543,6 +548,9 @@
543
548
  </define>
544
549
  <define name="BibDataExtensionType">
545
550
  <ref name="doctype"/>
551
+ <optional>
552
+ <ref name="docsubtype"/>
553
+ </optional>
546
554
  <optional>
547
555
  <ref name="editorialgroup"/>
548
556
  </optional>
@@ -876,8 +884,28 @@
876
884
  </zeroOrMore>
877
885
  </element>
878
886
  </define>
887
+ <define name="pagebreak">
888
+ <element name="pagebreak">
889
+ <optional>
890
+ <attribute name="orientation">
891
+ <choice>
892
+ <value>landscape</value>
893
+ <value>portrait</value>
894
+ </choice>
895
+ </attribute>
896
+ </optional>
897
+ </element>
898
+ </define>
879
899
  </include>
880
900
  <!-- end overrides -->
901
+ <define name="docsubtype">
902
+ <element name="docsubtype">
903
+ <ref name="DocumentSubtype"/>
904
+ </element>
905
+ </define>
906
+ <define name="DocumentSubtype">
907
+ <text/>
908
+ </define>
881
909
  <define name="colgroup">
882
910
  <element name="colgroup">
883
911
  <oneOrMore>
@@ -927,7 +955,24 @@
927
955
  <define name="concept">
928
956
  <element name="concept">
929
957
  <optional>
930
- <attribute name="term"/>
958
+ <element name="refterm">
959
+ <zeroOrMore>
960
+ <choice>
961
+ <ref name="PureTextElement"/>
962
+ <ref name="stem"/>
963
+ </choice>
964
+ </zeroOrMore>
965
+ </element>
966
+ </optional>
967
+ <optional>
968
+ <element name="renderterm">
969
+ <zeroOrMore>
970
+ <choice>
971
+ <ref name="PureTextElement"/>
972
+ <ref name="stem"/>
973
+ </choice>
974
+ </zeroOrMore>
975
+ </element>
931
976
  </optional>
932
977
  <choice>
933
978
  <ref name="eref"/>
@@ -943,8 +988,170 @@
943
988
  <ref name="permission"/>
944
989
  <ref name="imagemap"/>
945
990
  <ref name="svgmap"/>
991
+ <ref name="inputform"/>
992
+ </choice>
993
+ </define>
994
+ <define name="inputform">
995
+ <element name="form">
996
+ <attribute name="id">
997
+ <data type="ID"/>
998
+ </attribute>
999
+ <attribute name="name"/>
1000
+ <attribute name="action"/>
1001
+ <zeroOrMore>
1002
+ <choice>
1003
+ <ref name="TextElement"/>
1004
+ <ref name="FormInput"/>
1005
+ </choice>
1006
+ </zeroOrMore>
1007
+ </element>
1008
+ </define>
1009
+ <define name="FormInput">
1010
+ <choice>
1011
+ <ref name="input"/>
1012
+ <ref name="formlabel"/>
1013
+ <ref name="select"/>
1014
+ <ref name="textarea"/>
946
1015
  </choice>
947
1016
  </define>
1017
+ <define name="InputType">
1018
+ <choice>
1019
+ <value>button</value>
1020
+ <value>checkbox</value>
1021
+ <value>date</value>
1022
+ <value>file</value>
1023
+ <value>password</value>
1024
+ <value>radio</value>
1025
+ <value>submit</value>
1026
+ <value>text</value>
1027
+ </choice>
1028
+ </define>
1029
+ <define name="input">
1030
+ <element name="input">
1031
+ <attribute name="type">
1032
+ <ref name="InputType"/>
1033
+ </attribute>
1034
+ <optional>
1035
+ <attribute name="checked">
1036
+ <data type="boolean"/>
1037
+ </attribute>
1038
+ </optional>
1039
+ <optional>
1040
+ <attribute name="disabled">
1041
+ <data type="boolean"/>
1042
+ </attribute>
1043
+ </optional>
1044
+ <optional>
1045
+ <attribute name="readonly">
1046
+ <data type="boolean"/>
1047
+ </attribute>
1048
+ </optional>
1049
+ <optional>
1050
+ <attribute name="maxlength">
1051
+ <data type="int"/>
1052
+ </attribute>
1053
+ </optional>
1054
+ <optional>
1055
+ <attribute name="minlength">
1056
+ <data type="int"/>
1057
+ </attribute>
1058
+ </optional>
1059
+ <optional>
1060
+ <attribute name="name"/>
1061
+ </optional>
1062
+ <optional>
1063
+ <attribute name="value"/>
1064
+ </optional>
1065
+ <optional>
1066
+ <attribute name="id">
1067
+ <data type="ID"/>
1068
+ </attribute>
1069
+ </optional>
1070
+ </element>
1071
+ </define>
1072
+ <define name="formlabel">
1073
+ <element name="label">
1074
+ <attribute name="for">
1075
+ <data type="IDREF"/>
1076
+ </attribute>
1077
+ <zeroOrMore>
1078
+ <ref name="PureTextElement"/>
1079
+ </zeroOrMore>
1080
+ </element>
1081
+ </define>
1082
+ <define name="select">
1083
+ <element name="select">
1084
+ <optional>
1085
+ <attribute name="name"/>
1086
+ </optional>
1087
+ <optional>
1088
+ <attribute name="value"/>
1089
+ </optional>
1090
+ <optional>
1091
+ <attribute name="id">
1092
+ <data type="ID"/>
1093
+ </attribute>
1094
+ </optional>
1095
+ <optional>
1096
+ <attribute name="disabled">
1097
+ <data type="boolean"/>
1098
+ </attribute>
1099
+ </optional>
1100
+ <optional>
1101
+ <attribute name="multiple">
1102
+ <data type="boolean"/>
1103
+ </attribute>
1104
+ </optional>
1105
+ <optional>
1106
+ <attribute name="size">
1107
+ <data type="int"/>
1108
+ </attribute>
1109
+ </optional>
1110
+ <oneOrMore>
1111
+ <ref name="option"/>
1112
+ </oneOrMore>
1113
+ </element>
1114
+ </define>
1115
+ <define name="option">
1116
+ <element name="option">
1117
+ <optional>
1118
+ <attribute name="disabled">
1119
+ <data type="boolean"/>
1120
+ </attribute>
1121
+ </optional>
1122
+ <optional>
1123
+ <attribute name="value"/>
1124
+ </optional>
1125
+ <zeroOrMore>
1126
+ <ref name="PureTextElement"/>
1127
+ </zeroOrMore>
1128
+ </element>
1129
+ </define>
1130
+ <define name="textarea">
1131
+ <element name="textarea">
1132
+ <optional>
1133
+ <attribute name="name"/>
1134
+ </optional>
1135
+ <optional>
1136
+ <attribute name="value"/>
1137
+ </optional>
1138
+ <optional>
1139
+ <attribute name="id">
1140
+ <data type="ID"/>
1141
+ </attribute>
1142
+ </optional>
1143
+ <optional>
1144
+ <attribute name="rows">
1145
+ <data type="int"/>
1146
+ </attribute>
1147
+ </optional>
1148
+ <optional>
1149
+ <attribute name="cols">
1150
+ <data type="int"/>
1151
+ </attribute>
1152
+ </optional>
1153
+ </element>
1154
+ </define>
948
1155
  <define name="bibliography">
949
1156
  <element name="bibliography">
950
1157
  <oneOrMore>
@@ -1017,9 +1224,7 @@
1017
1224
  </define>
1018
1225
  <define name="IsoWorkgroup">
1019
1226
  <optional>
1020
- <attribute name="number">
1021
- <data type="int"/>
1022
- </attribute>
1227
+ <attribute name="number"/>
1023
1228
  </optional>
1024
1229
  <optional>
1025
1230
  <attribute name="type"/>