metanorma-bipm 1.0.5 → 1.1.2
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 +4 -4
- data/.github/workflows/rake.yml +9 -32
- data/.gitignore +4 -0
- data/.rubocop.yml +12 -0
- data/Gemfile +2 -2
- data/Rakefile +2 -2
- data/lib/asciidoctor/bipm/biblio.rng +4 -6
- data/lib/asciidoctor/bipm/converter.rb +72 -34
- data/lib/asciidoctor/bipm/isodoc.rng +327 -2
- data/lib/isodoc/bipm/base_convert.rb +25 -11
- data/lib/isodoc/bipm/bipm.brochure.xsl +985 -410
- data/lib/isodoc/bipm/bipm.guide.xsl +985 -410
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +985 -410
- data/lib/isodoc/bipm/bipm.rapport.xsl +985 -410
- data/lib/isodoc/bipm/html/html_bipm_titlepage.html +2 -0
- data/lib/isodoc/bipm/html/htmlstyle.css +7 -0
- data/lib/isodoc/bipm/i18n-en.yaml +11 -0
- data/lib/isodoc/bipm/i18n-fr.yaml +8 -0
- data/lib/isodoc/bipm/index.rb +32 -20
- data/lib/isodoc/bipm/init.rb +1 -2
- data/lib/isodoc/bipm/jcgm.standard.xsl +900 -333
- data/lib/isodoc/bipm/metadata.rb +15 -7
- data/lib/isodoc/bipm/pdf_convert.rb +12 -9
- data/lib/isodoc/bipm/presentation_xml_convert.rb +161 -44
- data/lib/isodoc/bipm/xref.rb +133 -36
- data/lib/metanorma-bipm.rb +4 -4
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +7 -6
- metadata +33 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc4887a20e51de45b5d3caaaf643031ae87fc6e1856a52dc686a419ef6927f44
|
4
|
+
data.tar.gz: 72c3c2058fd5f61dc26e7c3f911c595e095acd69bca7aea3a998073092c18d27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1030c749fb1377c3c187b910c00569f986060dfe61e76f76089d67b471a85127b1166a702dc8ea494a1b98d1e666031ac9fcc80b8e469ee796f9f81a425152e
|
7
|
+
data.tar.gz: 28478e4d92e1978c3e5f1ac86162ddeccfd581949bea1694fe5b82e9b368c74907841ddf81eaa9000a9f487a1fcdf80a53007ea63ef2d05e0038dfd7abbf2da0
|
data/.github/workflows/rake.yml
CHANGED
@@ -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,50 +16,27 @@ jobs:
|
|
16
16
|
strategy:
|
17
17
|
fail-fast: false
|
18
18
|
matrix:
|
19
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
19
|
+
ruby: [ '2.7', '2.6', '2.5', '2.4' ]
|
20
20
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
21
|
experimental: [ false ]
|
22
22
|
include:
|
23
|
-
- ruby: '
|
23
|
+
- ruby: '3.0'
|
24
24
|
os: 'ubuntu-latest'
|
25
25
|
experimental: true
|
26
|
-
- ruby: '
|
26
|
+
- ruby: '3.0'
|
27
27
|
os: 'windows-latest'
|
28
28
|
experimental: true
|
29
|
-
- ruby: '
|
29
|
+
- ruby: '3.0'
|
30
30
|
os: 'macos-latest'
|
31
31
|
experimental: true
|
32
32
|
steps:
|
33
|
-
- uses: actions/checkout@
|
33
|
+
- uses: actions/checkout@v2
|
34
|
+
with:
|
35
|
+
submodules: true
|
34
36
|
|
35
37
|
- uses: ruby/setup-ruby@v1
|
36
38
|
with:
|
37
39
|
ruby-version: ${{ matrix.ruby }}
|
38
|
-
|
39
|
-
- if: matrix.os == 'macos-latest'
|
40
|
-
run: brew install autoconf automake libtool
|
41
|
-
|
42
|
-
- uses: actions/cache@v2
|
43
|
-
with:
|
44
|
-
path: vendor/bundle
|
45
|
-
key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
|
46
|
-
restore-keys: bundle-${{ matrix.os }}-${{ matrix.ruby }}
|
47
|
-
|
48
|
-
- run: bundle config set path 'vendor/bundle'
|
49
|
-
|
50
|
-
- run: bundle install --jobs 4 --retry 3
|
40
|
+
bundler-cache: true
|
51
41
|
|
52
42
|
- run: bundle exec rake
|
53
|
-
|
54
|
-
tests-passed:
|
55
|
-
needs: rake
|
56
|
-
runs-on: ubuntu-latest
|
57
|
-
steps:
|
58
|
-
- name: Trigger tests passed event
|
59
|
-
uses: Sibz/github-status-action@v1
|
60
|
-
with:
|
61
|
-
authToken: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
62
|
-
context: 'tests-passed-successfully'
|
63
|
-
description: 'Tests passed successfully'
|
64
|
-
state: 'success'
|
65
|
-
sha: ${{ github.event.pull_request.head.sha || github.sha }}
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,12 @@
|
|
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.
|
4
|
+
inherit_from:
|
5
|
+
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
6
|
+
|
7
|
+
# local repo-specific modifications
|
8
|
+
|
9
|
+
AllCops:
|
10
|
+
DisplayCopNames: false
|
11
|
+
StyleGuideCopsOnly: false
|
12
|
+
TargetRubyVersion: 2.4
|
data/Gemfile
CHANGED
@@ -6,6 +6,6 @@ git_source(:github) { |repo| "https://github.com/#{repo}" }
|
|
6
6
|
|
7
7
|
gemspec
|
8
8
|
|
9
|
-
if File.exist?
|
10
|
-
eval File.read(
|
9
|
+
if File.exist? "Gemfile.devel"
|
10
|
+
eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
|
11
11
|
end
|
data/Rakefile
CHANGED
@@ -124,7 +124,7 @@
|
|
124
124
|
<value>application/tei+xml</value>
|
125
125
|
<value>text/x-asciidoc</value>
|
126
126
|
<value>text/markdown</value>
|
127
|
-
<value>application/x-
|
127
|
+
<value>application/x-metanorma+xml</value>
|
128
128
|
<text/>
|
129
129
|
</choice>
|
130
130
|
</attribute>
|
@@ -452,6 +452,7 @@
|
|
452
452
|
<attribute name="type">
|
453
453
|
<choice>
|
454
454
|
<value>isni</value>
|
455
|
+
<value>orcid</value>
|
455
456
|
<value>uri</value>
|
456
457
|
</choice>
|
457
458
|
</attribute>
|
@@ -461,10 +462,7 @@
|
|
461
462
|
<define name="org-identifier">
|
462
463
|
<element name="identifier">
|
463
464
|
<attribute name="type">
|
464
|
-
<
|
465
|
-
<value>orcid</value>
|
466
|
-
<value>uri</value>
|
467
|
-
</choice>
|
465
|
+
<data type="string" datatypeLibrary=""/>
|
468
466
|
</attribute>
|
469
467
|
<text/>
|
470
468
|
</element>
|
@@ -1106,7 +1104,7 @@
|
|
1106
1104
|
<value>complementOf</value>
|
1107
1105
|
<value>obsoletes</value>
|
1108
1106
|
<value>obsoletedBy</value>
|
1109
|
-
<value>
|
1107
|
+
<value>cites</value>
|
1110
1108
|
<value>isCitedIn</value>
|
1111
1109
|
</choice>
|
1112
1110
|
</define>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require "asciidoctor/standoc/converter"
|
2
|
-
require
|
2
|
+
require "asciidoctor/generic/converter"
|
3
3
|
|
4
4
|
module Asciidoctor
|
5
5
|
module BIPM
|
@@ -19,20 +19,26 @@ module Asciidoctor
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def org_abbrev
|
22
|
-
|
22
|
+
{ org_name_long => configuration.organization_name_short }
|
23
23
|
end
|
24
24
|
|
25
25
|
def metadata_committee(node, xml)
|
26
26
|
return unless node.attr("committee-en") || node.attr("committee-fr")
|
27
|
+
|
27
28
|
xml.editorialgroup do |a|
|
28
29
|
metadata_committee1(node, a)
|
29
|
-
|
30
|
+
i = 2
|
31
|
+
while node.attr("committee-en_#{i}") || node.attr("committee-fr_#{i}")
|
32
|
+
metadata_committee2(node, a, i)
|
33
|
+
i += 1
|
34
|
+
end
|
30
35
|
metadata_workgroup(node, a)
|
31
36
|
end
|
32
37
|
end
|
33
38
|
|
34
|
-
def metadata_committee1(node,
|
35
|
-
|
39
|
+
def metadata_committee1(node, xml)
|
40
|
+
xml.committee **attr_code(acronym:
|
41
|
+
node.attr("committee-acronym")) do |c|
|
36
42
|
e = node.attr("committee-en") and
|
37
43
|
c.variant e, language: "en", script: "Latn"
|
38
44
|
e = node.attr("committee-fr") and
|
@@ -40,24 +46,25 @@ module Asciidoctor
|
|
40
46
|
end
|
41
47
|
end
|
42
48
|
|
43
|
-
def metadata_committee2(node,
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
e = node.attr("committee
|
48
|
-
|
49
|
+
def metadata_committee2(node, xml, num)
|
50
|
+
xml.committee **attr_code(acronym:
|
51
|
+
node.attr("committee-acronym_#{num}")) do |c|
|
52
|
+
%w(en fr).each do |lg|
|
53
|
+
e = node.attr("committee-#{lg}_#{num}") and
|
54
|
+
c.variant e, language: lg, script: "Latn"
|
49
55
|
end
|
50
|
-
i += 1
|
51
56
|
end
|
52
57
|
end
|
53
58
|
|
54
|
-
def metadata_workgroup(node,
|
55
|
-
|
56
|
-
|
59
|
+
def metadata_workgroup(node, xml)
|
60
|
+
xml.workgroup(node.attr("workgroup"),
|
61
|
+
**attr_code(acronym: node.attr("workgroup-acronym")))
|
57
62
|
i = 2
|
58
|
-
while node.attr("workgroup_#{i}")
|
59
|
-
|
63
|
+
while node.attr("workgroup_#{i}")
|
64
|
+
xml.workgroup(
|
65
|
+
node.attr("workgroup_#{i}"),
|
60
66
|
**attr_code(acronym: node.attr("workgroup-acronym_#{i}"))
|
67
|
+
)
|
61
68
|
i += 1
|
62
69
|
end
|
63
70
|
end
|
@@ -76,13 +83,15 @@ module Asciidoctor
|
|
76
83
|
draft = node.attr("supersedes-draft#{suffix}")
|
77
84
|
edition = node.attr("supersedes-edition#{suffix}")
|
78
85
|
return false unless d || draft || edition
|
86
|
+
|
79
87
|
relation_supersedes_self1(xml, d, edition, draft)
|
80
88
|
end
|
81
89
|
|
82
|
-
def relation_supersedes_self1(xml,
|
90
|
+
def relation_supersedes_self1(xml, date, edition, draft)
|
83
91
|
xml.relation **{ type: "supersedes" } do |r|
|
84
92
|
r.bibitem do |b|
|
85
|
-
|
93
|
+
date and b.date(date,
|
94
|
+
**{ type: edition ? "published" : "circulated" })
|
86
95
|
edition and b.edition edition
|
87
96
|
draft and b.version do |v|
|
88
97
|
v.draft draft
|
@@ -91,13 +100,13 @@ module Asciidoctor
|
|
91
100
|
end
|
92
101
|
end
|
93
102
|
|
94
|
-
def personal_role(node,
|
103
|
+
def personal_role(node, xml, suffix)
|
95
104
|
role = node.attr("role#{suffix}") || "author"
|
96
105
|
unless %w(author editor).include?(role.downcase)
|
97
106
|
desc = role
|
98
107
|
role = "editor"
|
99
108
|
end
|
100
|
-
|
109
|
+
xml.role desc, **{ type: role.downcase }
|
101
110
|
end
|
102
111
|
|
103
112
|
def title(node, xml)
|
@@ -106,7 +115,7 @@ module Asciidoctor
|
|
106
115
|
xml.title **attr_code(at.merge(type: "main")) do |t1|
|
107
116
|
t1 << Metanorma::Utils::asciidoc_sub(node.attr("title-#{lang}"))
|
108
117
|
end
|
109
|
-
%w(cover appendix annex part subpart).each do |w|
|
118
|
+
%w(cover appendix annex part subpart provenance).each do |w|
|
110
119
|
typed_title(node, xml, lang, w)
|
111
120
|
end
|
112
121
|
end
|
@@ -115,6 +124,7 @@ module Asciidoctor
|
|
115
124
|
def typed_title(node, xml, lang, type)
|
116
125
|
at = { language: lang, format: "text/plain" }
|
117
126
|
return unless title = node.attr("title-#{type}-#{lang}")
|
127
|
+
|
118
128
|
xml.title **attr_code(at.merge(type: type)) do |t1|
|
119
129
|
t1 << Metanorma::Utils::asciidoc_sub(title)
|
120
130
|
end
|
@@ -122,21 +132,28 @@ module Asciidoctor
|
|
122
132
|
|
123
133
|
def sectiontype_streamline(ret)
|
124
134
|
case ret
|
125
|
-
when "introduction" then "clause"
|
135
|
+
when "introduction" then @jcgm ? "introduction" : "clause"
|
126
136
|
else
|
127
137
|
super
|
128
138
|
end
|
129
139
|
end
|
130
140
|
|
141
|
+
def sectiontype(node, level = true)
|
142
|
+
ret = sectiontype1(node)
|
143
|
+
return ret if ret == "terms and definitions"
|
144
|
+
|
145
|
+
super
|
146
|
+
end
|
147
|
+
|
131
148
|
def inline_anchor_xref_attrs(node)
|
132
149
|
flags = %w(pagenumber nosee nopage).each_with_object({}) do |w, m|
|
133
|
-
if /#{w}%/.match(node.text)
|
150
|
+
if /#{w}%/.match?(node.text)
|
134
151
|
node.text = node.text.sub(/#{w}%/, "")
|
135
152
|
m[w] = true
|
136
153
|
end
|
137
154
|
end
|
138
155
|
ret = super
|
139
|
-
flags.
|
156
|
+
flags.each_key { |k| ret[k.to_sym] = true }
|
140
157
|
ret
|
141
158
|
end
|
142
159
|
|
@@ -154,9 +171,6 @@ module Asciidoctor
|
|
154
171
|
super.merge(attr_code(start: node.attr("start")))
|
155
172
|
end
|
156
173
|
|
157
|
-
def section_names_terms_cleanup(x)
|
158
|
-
end
|
159
|
-
|
160
174
|
def committee_validate(xml)
|
161
175
|
committees = Array(configuration&.committees) || return
|
162
176
|
committees.empty? and return
|
@@ -173,21 +187,44 @@ module Asciidoctor
|
|
173
187
|
end
|
174
188
|
|
175
189
|
def boilerplate_file(xmldoc)
|
176
|
-
return super unless
|
177
|
-
|
190
|
+
return super unless @jcgm
|
191
|
+
|
192
|
+
File.join(File.dirname(__FILE__), "boilerplate-jcgm-en.xml")
|
178
193
|
end
|
179
194
|
|
195
|
+
def sections_cleanup(xml)
|
196
|
+
super
|
197
|
+
jcgm_untitled_sections_cleanup(xml) if @jcgm
|
198
|
+
end
|
199
|
+
|
200
|
+
def jcgm_untitled_sections_cleanup(xml)
|
201
|
+
xml.xpath("//clause//clause | //annex//clause").each do |c|
|
202
|
+
next if !c&.at("./title")&.text&.empty?
|
203
|
+
|
204
|
+
c["inline-header"] = true
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
def section_names_terms_cleanup(xml); end
|
209
|
+
|
210
|
+
def section_names_refs_cleanup(xml); end
|
211
|
+
|
180
212
|
def mathml_mi_italics
|
181
213
|
{ uppergreek: false, upperroman: false,
|
182
214
|
lowergreek: false, lowerroman: true }
|
183
215
|
end
|
184
216
|
|
217
|
+
def document(node)
|
218
|
+
@jcgm = node.attr("committee-acronym") == "JCGM"
|
219
|
+
super
|
220
|
+
end
|
221
|
+
|
185
222
|
def outputs(node, ret)
|
186
|
-
File.open(@filename
|
187
|
-
presentation_xml_converter(node).convert(@filename
|
188
|
-
html_converter(node).convert(@filename
|
223
|
+
File.open("#{@filename}.xml", "w:UTF-8") { |f| f.write(ret) }
|
224
|
+
presentation_xml_converter(node).convert("#{@filename}.xml")
|
225
|
+
html_converter(node).convert("#{@filename}.presentation.xml",
|
189
226
|
nil, false, "#{@filename}.html")
|
190
|
-
pdf_converter(node)&.convert(@filename
|
227
|
+
pdf_converter(node)&.convert("#{@filename}.presentation.xml",
|
191
228
|
nil, false, "#{@filename}.pdf")
|
192
229
|
end
|
193
230
|
|
@@ -201,6 +238,7 @@ module Asciidoctor
|
|
201
238
|
|
202
239
|
def pdf_converter(node)
|
203
240
|
return nil if node.attr("no-pdf")
|
241
|
+
|
204
242
|
IsoDoc::BIPM::PdfConvert.new(doc_extract_attributes(node))
|
205
243
|
end
|
206
244
|
end
|
@@ -86,6 +86,35 @@
|
|
86
86
|
<text/>
|
87
87
|
</element>
|
88
88
|
</define>
|
89
|
+
<define name="erefType">
|
90
|
+
<optional>
|
91
|
+
<attribute name="normative">
|
92
|
+
<data type="boolean"/>
|
93
|
+
</attribute>
|
94
|
+
</optional>
|
95
|
+
<attribute name="citeas"/>
|
96
|
+
<attribute name="type">
|
97
|
+
<ref name="ReferenceFormat"/>
|
98
|
+
</attribute>
|
99
|
+
<optional>
|
100
|
+
<attribute name="alt"/>
|
101
|
+
</optional>
|
102
|
+
<optional>
|
103
|
+
<attribute name="case">
|
104
|
+
<choice>
|
105
|
+
<value>capital</value>
|
106
|
+
<value>lowercase</value>
|
107
|
+
</choice>
|
108
|
+
</attribute>
|
109
|
+
</optional>
|
110
|
+
<optional>
|
111
|
+
<attribute name="droploc">
|
112
|
+
<data type="boolean"/>
|
113
|
+
</attribute>
|
114
|
+
</optional>
|
115
|
+
<ref name="CitationType"/>
|
116
|
+
<text/>
|
117
|
+
</define>
|
89
118
|
<define name="ul">
|
90
119
|
<element name="ul">
|
91
120
|
<attribute name="id">
|
@@ -102,7 +131,7 @@
|
|
102
131
|
</attribute>
|
103
132
|
</optional>
|
104
133
|
<oneOrMore>
|
105
|
-
<ref name="
|
134
|
+
<ref name="ul_li"/>
|
106
135
|
</oneOrMore>
|
107
136
|
<zeroOrMore>
|
108
137
|
<ref name="note"/>
|
@@ -775,6 +804,90 @@
|
|
775
804
|
<ref name="paragraph"/>
|
776
805
|
</element>
|
777
806
|
</define>
|
807
|
+
<define name="em">
|
808
|
+
<element name="em">
|
809
|
+
<zeroOrMore>
|
810
|
+
<choice>
|
811
|
+
<ref name="PureTextElement"/>
|
812
|
+
<ref name="stem"/>
|
813
|
+
<ref name="index"/>
|
814
|
+
</choice>
|
815
|
+
</zeroOrMore>
|
816
|
+
</element>
|
817
|
+
</define>
|
818
|
+
<define name="strong">
|
819
|
+
<element name="strong">
|
820
|
+
<zeroOrMore>
|
821
|
+
<choice>
|
822
|
+
<ref name="PureTextElement"/>
|
823
|
+
<ref name="stem"/>
|
824
|
+
<ref name="index"/>
|
825
|
+
</choice>
|
826
|
+
</zeroOrMore>
|
827
|
+
</element>
|
828
|
+
</define>
|
829
|
+
<define name="tt">
|
830
|
+
<element name="tt">
|
831
|
+
<zeroOrMore>
|
832
|
+
<choice>
|
833
|
+
<ref name="PureTextElement"/>
|
834
|
+
<ref name="index"/>
|
835
|
+
</choice>
|
836
|
+
</zeroOrMore>
|
837
|
+
</element>
|
838
|
+
</define>
|
839
|
+
<define name="keyword">
|
840
|
+
<element name="keyword">
|
841
|
+
<zeroOrMore>
|
842
|
+
<choice>
|
843
|
+
<ref name="PureTextElement"/>
|
844
|
+
<ref name="index"/>
|
845
|
+
</choice>
|
846
|
+
</zeroOrMore>
|
847
|
+
</element>
|
848
|
+
</define>
|
849
|
+
<define name="strike">
|
850
|
+
<element name="strike">
|
851
|
+
<zeroOrMore>
|
852
|
+
<choice>
|
853
|
+
<ref name="PureTextElement"/>
|
854
|
+
<ref name="index"/>
|
855
|
+
</choice>
|
856
|
+
</zeroOrMore>
|
857
|
+
</element>
|
858
|
+
</define>
|
859
|
+
<define name="underline">
|
860
|
+
<element name="underline">
|
861
|
+
<zeroOrMore>
|
862
|
+
<choice>
|
863
|
+
<ref name="PureTextElement"/>
|
864
|
+
<ref name="index"/>
|
865
|
+
</choice>
|
866
|
+
</zeroOrMore>
|
867
|
+
</element>
|
868
|
+
</define>
|
869
|
+
<define name="smallcap">
|
870
|
+
<element name="smallcap">
|
871
|
+
<zeroOrMore>
|
872
|
+
<choice>
|
873
|
+
<ref name="PureTextElement"/>
|
874
|
+
<ref name="index"/>
|
875
|
+
</choice>
|
876
|
+
</zeroOrMore>
|
877
|
+
</element>
|
878
|
+
</define>
|
879
|
+
<define name="pagebreak">
|
880
|
+
<element name="pagebreak">
|
881
|
+
<optional>
|
882
|
+
<attribute name="orientation">
|
883
|
+
<choice>
|
884
|
+
<value>landscape</value>
|
885
|
+
<value>portrait</value>
|
886
|
+
</choice>
|
887
|
+
</attribute>
|
888
|
+
</optional>
|
889
|
+
</element>
|
890
|
+
</define>
|
778
891
|
</include>
|
779
892
|
<!-- end overrides -->
|
780
893
|
<define name="colgroup">
|
@@ -793,7 +906,35 @@
|
|
793
906
|
<value>internal</value>
|
794
907
|
</define>
|
795
908
|
<define name="TextElement" combine="choice">
|
796
|
-
<
|
909
|
+
<choice>
|
910
|
+
<ref name="concept"/>
|
911
|
+
<ref name="add"/>
|
912
|
+
<ref name="del"/>
|
913
|
+
</choice>
|
914
|
+
</define>
|
915
|
+
<define name="add">
|
916
|
+
<element name="add">
|
917
|
+
<choice>
|
918
|
+
<ref name="PureTextElement"/>
|
919
|
+
<ref name="eref"/>
|
920
|
+
<ref name="stem"/>
|
921
|
+
<ref name="keyword"/>
|
922
|
+
<ref name="xref"/>
|
923
|
+
<ref name="hyperlink"/>
|
924
|
+
</choice>
|
925
|
+
</element>
|
926
|
+
</define>
|
927
|
+
<define name="del">
|
928
|
+
<element name="del">
|
929
|
+
<choice>
|
930
|
+
<ref name="PureTextElement"/>
|
931
|
+
<ref name="eref"/>
|
932
|
+
<ref name="stem"/>
|
933
|
+
<ref name="keyword"/>
|
934
|
+
<ref name="xref"/>
|
935
|
+
<ref name="hyperlink"/>
|
936
|
+
</choice>
|
937
|
+
</element>
|
797
938
|
</define>
|
798
939
|
<define name="concept">
|
799
940
|
<element name="concept">
|
@@ -814,8 +955,170 @@
|
|
814
955
|
<ref name="permission"/>
|
815
956
|
<ref name="imagemap"/>
|
816
957
|
<ref name="svgmap"/>
|
958
|
+
<ref name="inputform"/>
|
959
|
+
</choice>
|
960
|
+
</define>
|
961
|
+
<define name="inputform">
|
962
|
+
<element name="form">
|
963
|
+
<attribute name="id">
|
964
|
+
<data type="ID"/>
|
965
|
+
</attribute>
|
966
|
+
<attribute name="name"/>
|
967
|
+
<attribute name="action"/>
|
968
|
+
<zeroOrMore>
|
969
|
+
<choice>
|
970
|
+
<ref name="TextElement"/>
|
971
|
+
<ref name="FormInput"/>
|
972
|
+
</choice>
|
973
|
+
</zeroOrMore>
|
974
|
+
</element>
|
975
|
+
</define>
|
976
|
+
<define name="FormInput">
|
977
|
+
<choice>
|
978
|
+
<ref name="input"/>
|
979
|
+
<ref name="formlabel"/>
|
980
|
+
<ref name="select"/>
|
981
|
+
<ref name="textarea"/>
|
982
|
+
</choice>
|
983
|
+
</define>
|
984
|
+
<define name="InputType">
|
985
|
+
<choice>
|
986
|
+
<value>button</value>
|
987
|
+
<value>checkbox</value>
|
988
|
+
<value>date</value>
|
989
|
+
<value>file</value>
|
990
|
+
<value>password</value>
|
991
|
+
<value>radio</value>
|
992
|
+
<value>submit</value>
|
993
|
+
<value>text</value>
|
817
994
|
</choice>
|
818
995
|
</define>
|
996
|
+
<define name="input">
|
997
|
+
<element name="input">
|
998
|
+
<attribute name="type">
|
999
|
+
<ref name="InputType"/>
|
1000
|
+
</attribute>
|
1001
|
+
<optional>
|
1002
|
+
<attribute name="checked">
|
1003
|
+
<data type="boolean"/>
|
1004
|
+
</attribute>
|
1005
|
+
</optional>
|
1006
|
+
<optional>
|
1007
|
+
<attribute name="disabled">
|
1008
|
+
<data type="boolean"/>
|
1009
|
+
</attribute>
|
1010
|
+
</optional>
|
1011
|
+
<optional>
|
1012
|
+
<attribute name="readonly">
|
1013
|
+
<data type="boolean"/>
|
1014
|
+
</attribute>
|
1015
|
+
</optional>
|
1016
|
+
<optional>
|
1017
|
+
<attribute name="maxlength">
|
1018
|
+
<data type="int"/>
|
1019
|
+
</attribute>
|
1020
|
+
</optional>
|
1021
|
+
<optional>
|
1022
|
+
<attribute name="minlength">
|
1023
|
+
<data type="int"/>
|
1024
|
+
</attribute>
|
1025
|
+
</optional>
|
1026
|
+
<optional>
|
1027
|
+
<attribute name="name"/>
|
1028
|
+
</optional>
|
1029
|
+
<optional>
|
1030
|
+
<attribute name="value"/>
|
1031
|
+
</optional>
|
1032
|
+
<optional>
|
1033
|
+
<attribute name="id">
|
1034
|
+
<data type="ID"/>
|
1035
|
+
</attribute>
|
1036
|
+
</optional>
|
1037
|
+
</element>
|
1038
|
+
</define>
|
1039
|
+
<define name="formlabel">
|
1040
|
+
<element name="label">
|
1041
|
+
<attribute name="for">
|
1042
|
+
<data type="IDREF"/>
|
1043
|
+
</attribute>
|
1044
|
+
<zeroOrMore>
|
1045
|
+
<ref name="PureTextElement"/>
|
1046
|
+
</zeroOrMore>
|
1047
|
+
</element>
|
1048
|
+
</define>
|
1049
|
+
<define name="select">
|
1050
|
+
<element name="select">
|
1051
|
+
<optional>
|
1052
|
+
<attribute name="name"/>
|
1053
|
+
</optional>
|
1054
|
+
<optional>
|
1055
|
+
<attribute name="value"/>
|
1056
|
+
</optional>
|
1057
|
+
<optional>
|
1058
|
+
<attribute name="id">
|
1059
|
+
<data type="ID"/>
|
1060
|
+
</attribute>
|
1061
|
+
</optional>
|
1062
|
+
<optional>
|
1063
|
+
<attribute name="disabled">
|
1064
|
+
<data type="boolean"/>
|
1065
|
+
</attribute>
|
1066
|
+
</optional>
|
1067
|
+
<optional>
|
1068
|
+
<attribute name="multiple">
|
1069
|
+
<data type="boolean"/>
|
1070
|
+
</attribute>
|
1071
|
+
</optional>
|
1072
|
+
<optional>
|
1073
|
+
<attribute name="size">
|
1074
|
+
<data type="int"/>
|
1075
|
+
</attribute>
|
1076
|
+
</optional>
|
1077
|
+
<oneOrMore>
|
1078
|
+
<ref name="option"/>
|
1079
|
+
</oneOrMore>
|
1080
|
+
</element>
|
1081
|
+
</define>
|
1082
|
+
<define name="option">
|
1083
|
+
<element name="option">
|
1084
|
+
<optional>
|
1085
|
+
<attribute name="disabled">
|
1086
|
+
<data type="boolean"/>
|
1087
|
+
</attribute>
|
1088
|
+
</optional>
|
1089
|
+
<optional>
|
1090
|
+
<attribute name="value"/>
|
1091
|
+
</optional>
|
1092
|
+
<zeroOrMore>
|
1093
|
+
<ref name="PureTextElement"/>
|
1094
|
+
</zeroOrMore>
|
1095
|
+
</element>
|
1096
|
+
</define>
|
1097
|
+
<define name="textarea">
|
1098
|
+
<element name="textarea">
|
1099
|
+
<optional>
|
1100
|
+
<attribute name="name"/>
|
1101
|
+
</optional>
|
1102
|
+
<optional>
|
1103
|
+
<attribute name="value"/>
|
1104
|
+
</optional>
|
1105
|
+
<optional>
|
1106
|
+
<attribute name="id">
|
1107
|
+
<data type="ID"/>
|
1108
|
+
</attribute>
|
1109
|
+
</optional>
|
1110
|
+
<optional>
|
1111
|
+
<attribute name="rows">
|
1112
|
+
<data type="int"/>
|
1113
|
+
</attribute>
|
1114
|
+
</optional>
|
1115
|
+
<optional>
|
1116
|
+
<attribute name="cols">
|
1117
|
+
<data type="int"/>
|
1118
|
+
</attribute>
|
1119
|
+
</optional>
|
1120
|
+
</element>
|
1121
|
+
</define>
|
819
1122
|
<define name="bibliography">
|
820
1123
|
<element name="bibliography">
|
821
1124
|
<oneOrMore>
|
@@ -1716,4 +2019,26 @@
|
|
1716
2019
|
</zeroOrMore>
|
1717
2020
|
</element>
|
1718
2021
|
</define>
|
2022
|
+
<define name="ul_li">
|
2023
|
+
<element name="li">
|
2024
|
+
<optional>
|
2025
|
+
<attribute name="id">
|
2026
|
+
<data type="ID"/>
|
2027
|
+
</attribute>
|
2028
|
+
</optional>
|
2029
|
+
<optional>
|
2030
|
+
<attribute name="uncheckedcheckbox">
|
2031
|
+
<data type="boolean"/>
|
2032
|
+
</attribute>
|
2033
|
+
</optional>
|
2034
|
+
<optional>
|
2035
|
+
<attribute name="checkedcheckbox">
|
2036
|
+
<data type="boolean"/>
|
2037
|
+
</attribute>
|
2038
|
+
</optional>
|
2039
|
+
<oneOrMore>
|
2040
|
+
<ref name="BasicBlock"/>
|
2041
|
+
</oneOrMore>
|
2042
|
+
</element>
|
2043
|
+
</define>
|
1719
2044
|
</grammar>
|