metanorma-standoc 1.11.0.1 → 1.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/lib/asciidoctor/standoc/base.rb +4 -100
- data/lib/asciidoctor/standoc/blocks.rb +1 -1
- data/lib/asciidoctor/standoc/cleanup.rb +2 -1
- data/lib/asciidoctor/standoc/cleanup_block.rb +1 -2
- data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +28 -20
- data/lib/asciidoctor/standoc/cleanup_inline.rb +14 -4
- data/lib/asciidoctor/standoc/cleanup_ref_dl.rb +25 -15
- data/lib/asciidoctor/standoc/cleanup_reqt.rb +3 -3
- data/lib/asciidoctor/standoc/cleanup_section_names.rb +2 -2
- data/lib/asciidoctor/standoc/cleanup_terms.rb +58 -21
- data/lib/asciidoctor/standoc/cleanup_terms_designations.rb +58 -21
- data/lib/asciidoctor/standoc/cleanup_text.rb +23 -0
- data/lib/asciidoctor/standoc/datamodel/attributes_table_preprocessor.rb +6 -6
- data/lib/asciidoctor/standoc/front.rb +13 -9
- data/lib/asciidoctor/standoc/inline.rb +13 -11
- data/lib/asciidoctor/standoc/isodoc.rng +73 -19
- data/lib/asciidoctor/standoc/lists.rb +1 -3
- data/lib/asciidoctor/standoc/ref.rb +101 -75
- data/lib/asciidoctor/standoc/ref_date_id.rb +30 -1
- data/lib/asciidoctor/standoc/ref_sect.rb +16 -6
- data/lib/asciidoctor/standoc/render.rb +115 -0
- data/lib/asciidoctor/standoc/reqt.rb +1 -1
- data/lib/asciidoctor/standoc/section.rb +33 -15
- data/lib/asciidoctor/standoc/terms.rb +7 -1
- data/lib/asciidoctor/standoc/utils.rb +0 -16
- data/lib/asciidoctor/standoc/validate.rb +1 -1
- data/lib/isodoc/html/htmlstyle.css +20 -11
- data/lib/isodoc/html/htmlstyle.scss +11 -11
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +3 -3
- data/spec/asciidoctor/base_spec.rb +48 -0
- data/spec/asciidoctor/blocks_spec.rb +99 -17
- data/spec/asciidoctor/cleanup_blocks_spec.rb +24 -0
- data/spec/asciidoctor/cleanup_sections_spec.rb +1 -1
- data/spec/asciidoctor/cleanup_spec.rb +6 -6
- data/spec/asciidoctor/cleanup_terms_spec.rb +556 -89
- data/spec/asciidoctor/datamodel/attributes_table_preprocessor_spec.rb +21 -21
- data/spec/asciidoctor/datamodel/diagram_preprocessor_spec.rb +16 -16
- data/spec/asciidoctor/inline_spec.rb +174 -5
- data/spec/asciidoctor/isobib_cache_spec.rb +4 -8
- data/spec/asciidoctor/macros_spec.rb +2 -2
- data/spec/asciidoctor/refs_dl_spec.rb +4 -4
- data/spec/asciidoctor/refs_spec.rb +889 -495
- data/spec/asciidoctor/section_spec.rb +64 -2
- data/spec/spec_helper.rb +2 -2
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +182 -182
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_123.yml +14 -14
- data/spec/vcr_cassettes/isobib_get_123_1.yml +99 -99
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +107 -107
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +14 -14
- data/spec/vcr_cassettes/isobib_get_124.yml +12 -12
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +46 -46
- metadata +9 -8
@@ -2,17 +2,35 @@ module Asciidoctor
|
|
2
2
|
module Standoc
|
3
3
|
module Cleanup
|
4
4
|
def termdef_stem_cleanup(xmldoc)
|
5
|
+
termdef_stem2admitted(xmldoc)
|
6
|
+
xmldoc.xpath("//term//expression/name[stem]").each do |n|
|
7
|
+
test = n.dup
|
8
|
+
test.at("./stem").remove
|
9
|
+
next unless test.text.strip.empty?
|
10
|
+
|
11
|
+
n.parent.name = "letter-symbol"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def termdef_stem2admitted(xmldoc)
|
5
16
|
xmldoc.xpath("//term/p/stem").each do |a|
|
6
|
-
if a.parent
|
17
|
+
if initial_formula(a.parent)
|
7
18
|
parent = a.parent
|
8
19
|
parent.replace("<admitted>#{term_expr(a.to_xml)}</admitted>")
|
9
20
|
end
|
10
21
|
end
|
11
|
-
xmldoc.xpath("//term
|
12
|
-
|
22
|
+
xmldoc.xpath("//term/formula").each do |a|
|
23
|
+
initial_formula(a) and
|
24
|
+
a.replace("<admitted>#{term_expr(a.children.to_xml)}</admitted>")
|
13
25
|
end
|
14
26
|
end
|
15
27
|
|
28
|
+
def initial_formula(elem)
|
29
|
+
elem.elements.size == 1 && # para contains just stem expression
|
30
|
+
!elem.at("./preceding-sibling::p | ./preceding-sibling::dl | "\
|
31
|
+
"./preceding-sibling::ol | ./preceding-sibling::ul")
|
32
|
+
end
|
33
|
+
|
16
34
|
# release termdef tags from surrounding paras
|
17
35
|
def termdef_unnest_cleanup(xmldoc)
|
18
36
|
desgn = "//p/admitted | //p/deprecates | //p/preferred | //p//related"
|
@@ -26,7 +44,7 @@ module Asciidoctor
|
|
26
44
|
def term_dl_to_metadata(xmldoc)
|
27
45
|
xmldoc.xpath("//term[dl[@metadata = 'true']]").each do |t|
|
28
46
|
t.xpath("./dl[@metadata = 'true']").each do |dl|
|
29
|
-
prev = dl_to_designation(dl) or next
|
47
|
+
prev = related2pref(dl_to_designation(dl)) or next
|
30
48
|
term_dl_to_designation_metadata(prev, dl)
|
31
49
|
term_dl_to_term_metadata(prev, dl)
|
32
50
|
term_dl_to_expression_metadata(prev, dl)
|
@@ -40,13 +58,18 @@ module Asciidoctor
|
|
40
58
|
prev.at("./preceding-sibling::preferred").nil?
|
41
59
|
|
42
60
|
ins = term_element_insert_point(prev)
|
43
|
-
%w(domain subject
|
61
|
+
%w(domain subject).each do |a|
|
44
62
|
ins = dl_to_elems(ins, prev.parent, dlist, a)
|
45
63
|
end
|
46
64
|
end
|
47
65
|
|
48
66
|
def term_dl_to_designation_metadata(prev, dlist)
|
49
|
-
%w(absent
|
67
|
+
%w(absent geographic-area).each do |a|
|
68
|
+
dl_to_attrs(prev, dlist, a)
|
69
|
+
end
|
70
|
+
%w(field-of-application usage-info).reverse.each do |a|
|
71
|
+
dl_to_elems(prev.at("./expression"), prev, dlist, a)
|
72
|
+
end
|
50
73
|
end
|
51
74
|
|
52
75
|
def term_element_insert_point(prev)
|
@@ -59,34 +82,48 @@ module Asciidoctor
|
|
59
82
|
end
|
60
83
|
|
61
84
|
def term_dl_to_expression_metadata(prev, dlist)
|
62
|
-
|
63
|
-
|
85
|
+
term_dl_to_expression_root_metadata(prev, dlist)
|
86
|
+
term_dl_to_expression_name_metadata(prev, dlist)
|
87
|
+
term_to_letter_symbol(prev, dlist)
|
88
|
+
end
|
89
|
+
|
90
|
+
def term_dl_to_expression_root_metadata(prev, dlist)
|
91
|
+
%w(isInternational).each do |a|
|
92
|
+
p = prev.at("./expression | ./letter-symbol | ./graphical-symbol")
|
93
|
+
dl_to_attrs(p, dlist, a)
|
94
|
+
end
|
95
|
+
%w(language script type).each do |a|
|
96
|
+
p = prev.at("./expression") or next
|
97
|
+
dl_to_attrs(p, dlist, a)
|
64
98
|
end
|
65
|
-
|
99
|
+
end
|
100
|
+
|
101
|
+
def term_dl_to_expression_name_metadata(prev, dlist)
|
102
|
+
%w(abbreviation-type pronunciation).reverse.each do |a|
|
66
103
|
dl_to_elems(prev.at("./expression/name"), prev, dlist, a)
|
67
104
|
end
|
68
105
|
g = dlist.at("./dt[text()='grammar']/following::dd//dl") and
|
69
106
|
term_dl_to_expression_grammar(prev, g)
|
70
|
-
term_to_letter_symbol(prev, dlist)
|
71
107
|
end
|
72
108
|
|
73
109
|
def term_dl_to_expression_grammar(prev, dlist)
|
74
110
|
prev.at(".//expression") or return
|
75
111
|
prev.at(".//expression") << "<grammar><sentinel/></grammar>"
|
76
|
-
%w(gender isPreposition isParticiple isAdjective isAdverb isNoun
|
77
|
-
|
112
|
+
%w(gender number isPreposition isParticiple isAdjective isAdverb isNoun
|
113
|
+
grammar-value).reverse.each do |a|
|
78
114
|
dl_to_elems(prev.at(".//expression/grammar/*"), prev.elements.last,
|
79
115
|
dlist, a)
|
80
116
|
end
|
81
|
-
|
117
|
+
term_dl_to_designation_category(prev, "gender")
|
118
|
+
term_dl_to_designation_category(prev, "number")
|
119
|
+
prev.at(".//expression/grammar/sentinel").remove
|
82
120
|
end
|
83
121
|
|
84
|
-
def
|
85
|
-
|
86
|
-
/,/.match?(
|
87
|
-
|
88
|
-
.map { |x| "
|
89
|
-
prev.at(".//expression/grammar/sentinel").remove
|
122
|
+
def term_dl_to_designation_category(prev, category)
|
123
|
+
cat = prev.at(".//expression/grammar/#{category}")
|
124
|
+
/,/.match?(cat&.text) and
|
125
|
+
cat.replace(cat.text.split(/,\s*/)
|
126
|
+
.map { |x| "<#{category}>#{x}</#{category}>" }.join)
|
90
127
|
end
|
91
128
|
|
92
129
|
def term_to_letter_symbol(prev, dlist)
|
@@ -134,7 +171,7 @@ module Asciidoctor
|
|
134
171
|
def term_termsource_to_designation(xmldoc)
|
135
172
|
xmldoc.xpath("//term/termsource").each do |t|
|
136
173
|
p = t.previous_element
|
137
|
-
while %w(domain subject
|
174
|
+
while %w(domain subject).include? p&.name
|
138
175
|
p = p.previous_element
|
139
176
|
end
|
140
177
|
%w(preferred admitted deprecates related).include?(p&.name) or
|
@@ -155,7 +192,7 @@ module Asciidoctor
|
|
155
192
|
end
|
156
193
|
|
157
194
|
def related2pref(elem)
|
158
|
-
elem
|
195
|
+
elem&.name == "related" ? elem = elem.at("./preferred") : elem
|
159
196
|
end
|
160
197
|
end
|
161
198
|
end
|
@@ -28,6 +28,7 @@ module Asciidoctor
|
|
28
28
|
end
|
29
29
|
|
30
30
|
# "abc<tag/>", def => "abc",<tag/> def
|
31
|
+
=begin
|
31
32
|
def uninterrupt_quotes_around_xml(xmldoc)
|
32
33
|
xmldoc.xpath("//*[following::text()[1]"\
|
33
34
|
"[starts-with(., '\"') or starts-with(., \"'\")]]")
|
@@ -37,6 +38,28 @@ module Asciidoctor
|
|
37
38
|
uninterrupt_quotes_around_xml1(x)
|
38
39
|
end
|
39
40
|
end
|
41
|
+
=end
|
42
|
+
=begin
|
43
|
+
def uninterrupt_quotes_around_xml(xmldoc)
|
44
|
+
xmldoc.traverse do |n|
|
45
|
+
next unless n.element? && n&.next&.text? &&
|
46
|
+
n.ancestors("pre, tt, sourcecode, stem, figure").empty?
|
47
|
+
next unless /^['"]/.match?(n.next.text)
|
48
|
+
|
49
|
+
uninterrupt_quotes_around_xml1(n)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
=end
|
53
|
+
def uninterrupt_quotes_around_xml(xmldoc)
|
54
|
+
xmldoc.traverse do |n|
|
55
|
+
next unless n.text? && n&.previous&.element?
|
56
|
+
next unless /^['"]/.match?(n.text)
|
57
|
+
next unless n.previous.ancestors("pre, tt, sourcecode, stem, figure")
|
58
|
+
.empty?
|
59
|
+
|
60
|
+
uninterrupt_quotes_around_xml1(n.previous)
|
61
|
+
end
|
62
|
+
end
|
40
63
|
|
41
64
|
def uninterrupt_quotes_around_xml1(elem)
|
42
65
|
prev = elem.at(".//preceding::text()[1]") or return
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "erb"
|
4
4
|
|
5
5
|
module Asciidoctor
|
6
6
|
module Standoc
|
@@ -9,7 +9,7 @@ module Asciidoctor
|
|
9
9
|
BLOCK_START_REGEXP = /\{(.+?)\.\*,(.+),(.+)\}/
|
10
10
|
BLOCK_END_REGEXP = /\A\{[A-Z]+\}\z/
|
11
11
|
MARCO_REGEXP = /\[datamodel_attributes_table,([^,]+),?(.+)?\]/
|
12
|
-
TEMPLATES_PATH = File.expand_path(
|
12
|
+
TEMPLATES_PATH = File.expand_path("../views/datamodel", __dir__).freeze
|
13
13
|
# search document for block `datamodel_attributes_table`
|
14
14
|
# read include derectives that goes after that in block and transform
|
15
15
|
# into yaml2text blocks
|
@@ -39,16 +39,16 @@ module Asciidoctor
|
|
39
39
|
def model_representation(model_path)
|
40
40
|
template = File.read(File.join(
|
41
41
|
TEMPLATES_PATH,
|
42
|
-
|
43
|
-
|
44
|
-
file_name = File.basename(model_path).gsub(/\.ya?ml/,
|
42
|
+
"model_representation.adoc.erb",
|
43
|
+
))
|
44
|
+
file_name = File.basename(model_path).gsub(/\.ya?ml/, "")
|
45
45
|
ERB
|
46
46
|
.new(template)
|
47
47
|
.result(binding)
|
48
48
|
end
|
49
49
|
|
50
50
|
def yaml_relative_path(file_path, document)
|
51
|
-
directory = File.dirname(document.attributes[
|
51
|
+
directory = File.dirname(document.attributes["docfile"] || ".")
|
52
52
|
document.path_resolver.system_path(file_path, directory)
|
53
53
|
end
|
54
54
|
end
|
@@ -94,7 +94,7 @@ module Asciidoctor
|
|
94
94
|
|
95
95
|
def metadata_script(node, xml)
|
96
96
|
xml.script (node.attr("script") ||
|
97
|
-
default_script(node.attr("language")))
|
97
|
+
Metanorma::Utils.default_script(node.attr("language")))
|
98
98
|
end
|
99
99
|
|
100
100
|
def relaton_relations
|
@@ -120,15 +120,19 @@ module Asciidoctor
|
|
120
120
|
end
|
121
121
|
|
122
122
|
def metadata_getrelation(node, xml, type, desc = nil)
|
123
|
-
docs = node.attr(desc || type)
|
123
|
+
docs = node.attr(desc || type) or return
|
124
124
|
HTMLEntities.new.decode(docs).split(/;\s*/).each do |d|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
125
|
+
metadata_getrelation1(d, xml, type, desc)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
def metadata_getrelation1(doc, xml, type, desc)
|
130
|
+
id = doc.split(/,\s*/)
|
131
|
+
xml.relation **{ type: relation_normalise(type) } do |r|
|
132
|
+
desc.nil? or r.description desc.gsub(/-/, " ")
|
133
|
+
fetch_ref(r, doc, nil, **{}) or r.bibitem do |b|
|
134
|
+
b.title id[1] || "--"
|
135
|
+
b.docidentifier id[0]
|
132
136
|
end
|
133
137
|
end
|
134
138
|
end
|
@@ -15,14 +15,10 @@ module Asciidoctor
|
|
15
15
|
|
16
16
|
def inline_anchor(node)
|
17
17
|
case node.type
|
18
|
-
when :ref
|
19
|
-
|
20
|
-
when :
|
21
|
-
|
22
|
-
when :link
|
23
|
-
inline_anchor_link node
|
24
|
-
when :bibref
|
25
|
-
inline_anchor_bibref node
|
18
|
+
when :ref then inline_anchor_ref node
|
19
|
+
when :xref then inline_anchor_xref node
|
20
|
+
when :link then inline_anchor_link node
|
21
|
+
when :bibref then inline_anchor_bibref node
|
26
22
|
end
|
27
23
|
end
|
28
24
|
|
@@ -50,7 +46,12 @@ module Asciidoctor
|
|
50
46
|
m.nil? and return { target: t, type: "inline", text: node.text }
|
51
47
|
droploc = m[:drop].nil? && m[:drop2].nil? ? nil : true
|
52
48
|
f = m[:fn].nil? ? "inline" : "footnote"
|
53
|
-
c = %i[case fn drop drop2].any?
|
49
|
+
c = if %i[case fn drop drop2].any? do |x|
|
50
|
+
!m[x].nil?
|
51
|
+
end
|
52
|
+
m[:text]
|
53
|
+
else node.text
|
54
|
+
end
|
54
55
|
{ target: t, type: f, case: m[:case]&.sub(/%$/, ""), droploc: droploc,
|
55
56
|
text: c }
|
56
57
|
end
|
@@ -58,8 +59,9 @@ module Asciidoctor
|
|
58
59
|
def inline_anchor_link(node)
|
59
60
|
contents = node.text
|
60
61
|
contents = "" if node.target.gsub(%r{^mailto:}, "") == node.text
|
61
|
-
attributes = {
|
62
|
-
"
|
62
|
+
attributes = { target: node.target, alt: node.attr("title"),
|
63
|
+
"update-type": node.attr("updatetype") ||
|
64
|
+
node.attr("update-type") }
|
63
65
|
noko do |xml|
|
64
66
|
xml.link **attr_code(attributes) do |l|
|
65
67
|
l << contents
|
@@ -58,7 +58,7 @@
|
|
58
58
|
<attribute name="alt"/>
|
59
59
|
</optional>
|
60
60
|
<optional>
|
61
|
-
<attribute name="
|
61
|
+
<attribute name="update-type">
|
62
62
|
<data type="boolean"/>
|
63
63
|
</attribute>
|
64
64
|
</optional>
|
@@ -1796,6 +1796,20 @@
|
|
1796
1796
|
<data type="ID"/>
|
1797
1797
|
</attribute>
|
1798
1798
|
</optional>
|
1799
|
+
<optional>
|
1800
|
+
<attribute name="language"/>
|
1801
|
+
</optional>
|
1802
|
+
<optional>
|
1803
|
+
<attribute name="script"/>
|
1804
|
+
</optional>
|
1805
|
+
<optional>
|
1806
|
+
<attribute name="tag"/>
|
1807
|
+
</optional>
|
1808
|
+
<optional>
|
1809
|
+
<attribute name="multilingual-rendering">
|
1810
|
+
<ref name="MultilingualRenderingType"/>
|
1811
|
+
</attribute>
|
1812
|
+
</optional>
|
1799
1813
|
<oneOrMore>
|
1800
1814
|
<ref name="preferred"/>
|
1801
1815
|
</oneOrMore>
|
@@ -1814,9 +1828,6 @@
|
|
1814
1828
|
<optional>
|
1815
1829
|
<ref name="termsubject"/>
|
1816
1830
|
</optional>
|
1817
|
-
<optional>
|
1818
|
-
<ref name="termusage"/>
|
1819
|
-
</optional>
|
1820
1831
|
<oneOrMore>
|
1821
1832
|
<ref name="termdefinition"/>
|
1822
1833
|
</oneOrMore>
|
@@ -1880,17 +1891,37 @@
|
|
1880
1891
|
</attribute>
|
1881
1892
|
</optional>
|
1882
1893
|
<optional>
|
1883
|
-
<attribute name="
|
1894
|
+
<attribute name="geographic-area"/>
|
1884
1895
|
</optional>
|
1885
1896
|
<choice>
|
1886
1897
|
<ref name="expression_designation"/>
|
1887
1898
|
<ref name="letter_symbol_designation"/>
|
1888
1899
|
<ref name="graphical_symbol_designation"/>
|
1889
1900
|
</choice>
|
1901
|
+
<optional>
|
1902
|
+
<ref name="fieldofapplication"/>
|
1903
|
+
</optional>
|
1904
|
+
<optional>
|
1905
|
+
<ref name="usageinfo"/>
|
1906
|
+
</optional>
|
1890
1907
|
<zeroOrMore>
|
1891
1908
|
<ref name="termsource"/>
|
1892
1909
|
</zeroOrMore>
|
1893
1910
|
</define>
|
1911
|
+
<define name="fieldofapplication">
|
1912
|
+
<element name="field-of-application">
|
1913
|
+
<oneOrMore>
|
1914
|
+
<ref name="PureTextElement"/>
|
1915
|
+
</oneOrMore>
|
1916
|
+
</element>
|
1917
|
+
</define>
|
1918
|
+
<define name="usageinfo">
|
1919
|
+
<element name="usage-info">
|
1920
|
+
<oneOrMore>
|
1921
|
+
<ref name="PureTextElement"/>
|
1922
|
+
</oneOrMore>
|
1923
|
+
</element>
|
1924
|
+
</define>
|
1894
1925
|
<define name="letter_symbol_designation">
|
1895
1926
|
<element name="letter-symbol">
|
1896
1927
|
<optional>
|
@@ -1942,11 +1973,15 @@
|
|
1942
1973
|
</optional>
|
1943
1974
|
<element name="name">
|
1944
1975
|
<zeroOrMore>
|
1945
|
-
<
|
1976
|
+
<choice>
|
1977
|
+
<ref name="PureTextElement"/>
|
1978
|
+
<ref name="stem"/>
|
1979
|
+
<ref name="index"/>
|
1980
|
+
</choice>
|
1946
1981
|
</zeroOrMore>
|
1947
1982
|
</element>
|
1948
1983
|
<optional>
|
1949
|
-
<element name="
|
1984
|
+
<element name="abbreviation-type">
|
1950
1985
|
<ref name="AbbreviationType"/>
|
1951
1986
|
</element>
|
1952
1987
|
</optional>
|
@@ -1956,7 +1991,7 @@
|
|
1956
1991
|
</element>
|
1957
1992
|
</optional>
|
1958
1993
|
<optional>
|
1959
|
-
<element name="
|
1994
|
+
<element name="grammar">
|
1960
1995
|
<ref name="Grammar"/>
|
1961
1996
|
</element>
|
1962
1997
|
</optional>
|
@@ -1983,6 +2018,11 @@
|
|
1983
2018
|
<ref name="GrammarGender"/>
|
1984
2019
|
</element>
|
1985
2020
|
</zeroOrMore>
|
2021
|
+
<zeroOrMore>
|
2022
|
+
<element name="number">
|
2023
|
+
<ref name="GrammarNumber"/>
|
2024
|
+
</element>
|
2025
|
+
</zeroOrMore>
|
1986
2026
|
<optional>
|
1987
2027
|
<element name="isPreposition">
|
1988
2028
|
<data type="boolean"/>
|
@@ -2014,7 +2054,7 @@
|
|
2014
2054
|
</element>
|
2015
2055
|
</optional>
|
2016
2056
|
<zeroOrMore>
|
2017
|
-
<element name="
|
2057
|
+
<element name="grammar-value">
|
2018
2058
|
<text/>
|
2019
2059
|
</element>
|
2020
2060
|
</zeroOrMore>
|
@@ -2027,6 +2067,13 @@
|
|
2027
2067
|
<value>common</value>
|
2028
2068
|
</choice>
|
2029
2069
|
</define>
|
2070
|
+
<define name="GrammarNumber">
|
2071
|
+
<choice>
|
2072
|
+
<value>singular</value>
|
2073
|
+
<value>dual</value>
|
2074
|
+
<value>plural</value>
|
2075
|
+
</choice>
|
2076
|
+
</define>
|
2030
2077
|
<define name="termdomain">
|
2031
2078
|
<element name="domain">
|
2032
2079
|
<oneOrMore>
|
@@ -2041,13 +2088,6 @@
|
|
2041
2088
|
</oneOrMore>
|
2042
2089
|
</element>
|
2043
2090
|
</define>
|
2044
|
-
<define name="termusage">
|
2045
|
-
<element name="usageinfo">
|
2046
|
-
<oneOrMore>
|
2047
|
-
<ref name="BasicBlock"/>
|
2048
|
-
</oneOrMore>
|
2049
|
-
</element>
|
2050
|
-
</define>
|
2051
2091
|
<define name="termdefinition">
|
2052
2092
|
<element name="definition">
|
2053
2093
|
<choice>
|
@@ -2061,9 +2101,17 @@
|
|
2061
2101
|
</element>
|
2062
2102
|
</define>
|
2063
2103
|
<define name="verbaldefinition">
|
2064
|
-
<element name="
|
2104
|
+
<element name="verbal-definition">
|
2065
2105
|
<oneOrMore>
|
2066
|
-
<
|
2106
|
+
<choice>
|
2107
|
+
<ref name="paragraph"/>
|
2108
|
+
<ref name="dl"/>
|
2109
|
+
<ref name="ol"/>
|
2110
|
+
<ref name="ul"/>
|
2111
|
+
<ref name="table"/>
|
2112
|
+
<ref name="figure"/>
|
2113
|
+
<ref name="formula"/>
|
2114
|
+
</choice>
|
2067
2115
|
</oneOrMore>
|
2068
2116
|
<zeroOrMore>
|
2069
2117
|
<ref name="termsource"/>
|
@@ -2071,7 +2119,7 @@
|
|
2071
2119
|
</element>
|
2072
2120
|
</define>
|
2073
2121
|
<define name="nonverbalrep">
|
2074
|
-
<element name="
|
2122
|
+
<element name="non-verbal-representation">
|
2075
2123
|
<oneOrMore>
|
2076
2124
|
<choice>
|
2077
2125
|
<ref name="table"/>
|
@@ -2163,6 +2211,12 @@
|
|
2163
2211
|
<value>modified</value>
|
2164
2212
|
</choice>
|
2165
2213
|
</attribute>
|
2214
|
+
<attribute name="type">
|
2215
|
+
<choice>
|
2216
|
+
<value>authoritative</value>
|
2217
|
+
<value>lineage</value>
|
2218
|
+
</choice>
|
2219
|
+
</attribute>
|
2166
2220
|
<ref name="origin"/>
|
2167
2221
|
<optional>
|
2168
2222
|
<ref name="modification"/>
|
@@ -14,11 +14,9 @@ module Asciidoctor
|
|
14
14
|
|
15
15
|
def ul_li(xml_ul, item)
|
16
16
|
xml_ul.li **ul_li_attrs(item) do |xml_li|
|
17
|
+
xml_li.p(**attr_code(id_attr(item))) { |t| t << item.text }
|
17
18
|
if item.blocks?
|
18
|
-
xml_li.p(**attr_code(id_attr(item))) { |t| t << item.text }
|
19
19
|
xml_li << item.content
|
20
|
-
else
|
21
|
-
xml_li.p(**attr_code(id_attr(item))) { |p| p << item.text }
|
22
20
|
end
|
23
21
|
end
|
24
22
|
end
|