metanorma-ietf 3.7.5 → 3.7.8
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/.rubocop.yml +23 -2
- data/lib/isodoc/ietf/cleanup.rb +16 -7
- data/lib/isodoc/ietf/cleanup_blocks.rb +11 -2
- data/lib/isodoc/ietf/inline.rb +8 -4
- data/lib/isodoc/ietf/metadata.rb +7 -1
- data/lib/isodoc/ietf/rfc_convert.rb +20 -20
- data/lib/isodoc/ietf/table.rb +7 -3
- data/lib/metanorma/ietf/basicdoc.rng +40 -6
- data/lib/metanorma/ietf/biblio.rng +8 -12
- data/lib/metanorma/ietf/isodoc.rng +60 -9
- data/lib/metanorma/ietf/mathml4-content.rng +1568 -0
- data/lib/metanorma/ietf/mathml4-core.rng +1041 -0
- data/lib/metanorma/ietf/mathml4-presentation.rng +1448 -0
- data/lib/metanorma/ietf/mathml4-strict-content.rng +289 -0
- data/lib/metanorma/ietf/mathml4.rng +30 -0
- data/lib/metanorma/ietf/metanorma-mathml.rng +59 -0
- data/lib/metanorma/ietf/reqt.rng +19 -3
- data/lib/metanorma/ietf/version.rb +1 -1
- data/lib/relaton/render/config.yml +3 -3
- data/lib/relaton/render/fields.rb +3 -1
- data/lib/relaton/render/parse.rb +34 -10
- data/metanorma-ietf.gemspec +3 -3
- metadata +16 -14
- data/.hound.yml +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e8481e986bb9e8f6f6544aa626251e7d4af18be4650a654c6fa6e1f9f4c093e
|
|
4
|
+
data.tar.gz: 26b7391ce2715daf4ce3f7c10387ce9620b5485229b646ca8c1817bf0206797f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7edb00b1b05b750cdba48d04dc71f7725f9b6086db0b8c76c6f8b793e72a8c914a6949bf5613da391d9149b175dde49762f639498a75e0c01b20294abcc091d2
|
|
7
|
+
data.tar.gz: ca1b556936be2cb95a8ab1bad6af2b2d1db870869cb76752bd1f14f5f1a7fd95b7fbca17adb596d011ee48245c6135474b8df05b4f5530261a0b6e6db7d37371
|
data/.rubocop.yml
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
# Auto-generated by Cimas: Do not edit it manually!
|
|
2
2
|
# See https://github.com/metanorma/cimas
|
|
3
3
|
inherit_from:
|
|
4
|
-
- https://raw.githubusercontent.com/riboseinc/oss-guides/
|
|
4
|
+
- https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
|
|
5
|
+
# .rubocop_todo.yml MUST be the last entry. inherit_from is last-wins:
|
|
6
|
+
# if listed before oss-guides, the shared config's stricter Metrics/
|
|
7
|
+
# (MethodLength, BlockLength, etc.) rules override the todo's per-file
|
|
8
|
+
# grandfathering, and the todo becomes inert on those cops. Empirically
|
|
9
|
+
# verified on suma 2026-07-06: with todo listed first, 34 Metrics/* offenses
|
|
10
|
+
# remained; moved last, cleared. Every gem in the metanorma-org fleet
|
|
11
|
+
# already ships a `.rubocop_todo.yml` on its live tree (audited 2026-07-06,
|
|
12
|
+
# 54/54 have it), so this reference is safe to emit unconditionally.
|
|
13
|
+
- .rubocop_todo.yml
|
|
14
|
+
|
|
15
|
+
# Rubocop plugins enabled centrally so every metanorma-org gem picks them up
|
|
16
|
+
# on cimas sync — best practice belongs at the shared-template layer, not
|
|
17
|
+
# per-repo. Per ronaldtse feedback on metanorma/ci#332.
|
|
18
|
+
plugins:
|
|
19
|
+
- rubocop-rspec
|
|
20
|
+
- rubocop-performance
|
|
21
|
+
- rubocop-rake
|
|
5
22
|
|
|
6
23
|
# local repo-specific modifications
|
|
7
24
|
# ...
|
|
8
25
|
|
|
9
26
|
AllCops:
|
|
10
|
-
|
|
27
|
+
# 3.3 matches the org-wide minimum being pushed via #274 (Raise minimum
|
|
28
|
+
# Ruby version to 3.3 due to EOL of 3.2 on 2026-03-31). Was 3.4 before
|
|
29
|
+
# this commit — 3.4 was above the org's stated minimum and would have
|
|
30
|
+
# applied Rubocop rules that fail-close on gems still targeting 3.3.
|
|
31
|
+
TargetRubyVersion: 3.3
|
data/lib/isodoc/ietf/cleanup.rb
CHANGED
|
@@ -79,7 +79,8 @@ module IsoDoc
|
|
|
79
79
|
xmldoc.xpath("//refcontent").each do |a|
|
|
80
80
|
val = a.text.strip
|
|
81
81
|
if val.empty? then a.remove
|
|
82
|
-
else a.
|
|
82
|
+
else a.content = val # not children=: a literal "<" in the text
|
|
83
|
+
# would be reparsed as markup and fabricate an element (#267)
|
|
83
84
|
end
|
|
84
85
|
end
|
|
85
86
|
end
|
|
@@ -98,18 +99,26 @@ module IsoDoc
|
|
|
98
99
|
end.join
|
|
99
100
|
end
|
|
100
101
|
|
|
102
|
+
# Flatten titles to the plain text RFC XML v3 allows, without a
|
|
103
|
+
# string -> XML round-trip: replacing an empty eref with its raw
|
|
104
|
+
# target string, then reparsing the title text as markup, fabricated
|
|
105
|
+
# an element out of a URL adjacent to a literal "<" in a formattedref
|
|
106
|
+
# ("<http:>", a QName violation fatal to xml2rfc, #267). Text nodes
|
|
107
|
+
# and content= keep the same flattening semantics with escaping.
|
|
101
108
|
def front_cleanup(xmldoc)
|
|
102
|
-
xmldoc.xpath("//title").each
|
|
103
|
-
s.xpath(".//eref[normalize-space(.)='']").each do |e|
|
|
104
|
-
e.replace(e["target"])
|
|
105
|
-
end
|
|
106
|
-
s.children = s.text
|
|
107
|
-
end
|
|
109
|
+
xmldoc.xpath("//title").each { |s| title_flatten(s, xmldoc) }
|
|
108
110
|
xmldoc.xpath("//reference/front[not(author)]").each do |f|
|
|
109
111
|
insert = f.at("./seriesInfo[last()]") || f.at("./title")
|
|
110
112
|
insert.next = "<author surname='Unknown'/>"
|
|
111
113
|
end
|
|
112
114
|
end
|
|
115
|
+
|
|
116
|
+
def title_flatten(title, xmldoc)
|
|
117
|
+
title.xpath(".//eref[normalize-space(.)='']").each do |e|
|
|
118
|
+
e.replace(xmldoc.create_text_node(e["target"]))
|
|
119
|
+
end
|
|
120
|
+
title.content = title.text
|
|
121
|
+
end
|
|
113
122
|
end
|
|
114
123
|
end
|
|
115
124
|
end
|
|
@@ -117,14 +117,23 @@ module IsoDoc
|
|
|
117
117
|
|
|
118
118
|
def crossref_remove_markup_elem(node)
|
|
119
119
|
case node.name
|
|
120
|
-
when "eref"
|
|
121
|
-
node.replace(node.children.empty? ? node["target"] : node.children)
|
|
120
|
+
when "eref" then crossref_flatten_eref(node)
|
|
122
121
|
when "xref"
|
|
123
122
|
node.children.empty? ? sourcecode_xref(node) : node.replace(node.children)
|
|
124
123
|
# when "relref" then n.replace(n.children.empty? ? n["target"] : n.children)
|
|
125
124
|
end
|
|
126
125
|
end
|
|
127
126
|
|
|
127
|
+
# empty eref: insert the target as a text node, not a raw string
|
|
128
|
+
# that Nokogiri would reparse as markup (#267)
|
|
129
|
+
def crossref_flatten_eref(node)
|
|
130
|
+
if node.children.empty?
|
|
131
|
+
node.replace(node.document.create_text_node(node["target"]))
|
|
132
|
+
else
|
|
133
|
+
node.replace(node.children)
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
128
137
|
def sourcecode_remove_markup_elem(node)
|
|
129
138
|
case node.name
|
|
130
139
|
when "br" then node.replace("\n")
|
data/lib/isodoc/ietf/inline.rb
CHANGED
|
@@ -142,18 +142,22 @@ module IsoDoc
|
|
|
142
142
|
end
|
|
143
143
|
end
|
|
144
144
|
|
|
145
|
+
# Empty localities are omitted, not emitted as section=""
|
|
146
|
+
# relative="" junk attributes (#269): attr_code drops nil, not ""
|
|
145
147
|
def eref_relative(node)
|
|
146
|
-
node["relative"] ||
|
|
147
|
-
node.at(ns(".//locality[@type = 'anchor']/referenceFrom"))&.text
|
|
148
|
+
ret = node["relative"] ||
|
|
149
|
+
node.at(ns(".//locality[@type = 'anchor']/referenceFrom"))&.text
|
|
150
|
+
ret.nil? || ret.empty? ? nil : ret
|
|
148
151
|
end
|
|
149
152
|
|
|
150
153
|
def eref_section(node)
|
|
151
154
|
ret = @isodoc.eref_localities(
|
|
152
155
|
node.xpath(ns("./locality | ./localityStack")), nil, node
|
|
153
|
-
) or return
|
|
154
|
-
ret.gsub(%r{</?span[^>]*>}, "").sub(/^,/, "")
|
|
156
|
+
) or return nil
|
|
157
|
+
ret = ret.gsub(%r{</?span[^>]*>}, "").sub(/^,/, "")
|
|
155
158
|
.sub(/^\s*(Sections?|Clauses?)/, "").strip.sub(/,$/, "")
|
|
156
159
|
.gsub(/\s+/, " ")
|
|
160
|
+
ret.empty? ? nil : ret
|
|
157
161
|
end
|
|
158
162
|
|
|
159
163
|
def semx_origin_parse(node, out)
|
data/lib/isodoc/ietf/metadata.rb
CHANGED
|
@@ -47,9 +47,15 @@ module IsoDoc
|
|
|
47
47
|
set(:wg, workgroups)
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
# Standoc emits <doctype>rfc</doctype>, which the base class
|
|
51
|
+
# capitalises to "Rfc"; the front/section renderers compare against
|
|
52
|
+
# the exact "RFC", so the document's own RFC seriesInfo (and with it
|
|
53
|
+
# the "Request for Comments" masthead line) was dropped (#268).
|
|
54
|
+
# Normalise casing here so every consumer sees "RFC".
|
|
50
55
|
def doctype(isoxml, _out)
|
|
51
56
|
super
|
|
52
|
-
|
|
57
|
+
d = get[:doctype]
|
|
58
|
+
d.nil? || d.casecmp?("rfc") and set(:doctype, "RFC")
|
|
53
59
|
end
|
|
54
60
|
|
|
55
61
|
def initialize(lang, script, locale, i18n, fonts_options = {})
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
require_relative "
|
|
2
|
-
require_relative "
|
|
3
|
-
require_relative "
|
|
4
|
-
require_relative "
|
|
5
|
-
require_relative "
|
|
6
|
-
require_relative "
|
|
7
|
-
require_relative "
|
|
8
|
-
require_relative "
|
|
9
|
-
require_relative "
|
|
10
|
-
require_relative "
|
|
11
|
-
require_relative "
|
|
12
|
-
require_relative "
|
|
13
|
-
require_relative "
|
|
14
|
-
require_relative "
|
|
15
|
-
require_relative "
|
|
1
|
+
require_relative "terms"
|
|
2
|
+
require_relative "blocks"
|
|
3
|
+
require_relative "lists"
|
|
4
|
+
require_relative "metadata"
|
|
5
|
+
require_relative "front"
|
|
6
|
+
require_relative "table"
|
|
7
|
+
require_relative "inline"
|
|
8
|
+
require_relative "reqt"
|
|
9
|
+
require_relative "cleanup"
|
|
10
|
+
require_relative "footnotes"
|
|
11
|
+
require_relative "references"
|
|
12
|
+
require_relative "section"
|
|
13
|
+
require_relative "validation"
|
|
14
|
+
require_relative "xref"
|
|
15
|
+
require_relative "init"
|
|
16
16
|
|
|
17
17
|
module IsoDoc
|
|
18
18
|
module Ietf
|
|
@@ -32,10 +32,11 @@ module IsoDoc
|
|
|
32
32
|
|
|
33
33
|
def document_preprocess(docxml)
|
|
34
34
|
@isodoc.reqt_models = Metanorma::Requirements
|
|
35
|
-
.new({ default: "default", lang: @lang,
|
|
36
|
-
locale: @locale, labels: @i18n.get })
|
|
35
|
+
.new({ conv: @isodoc, default: "default", lang: @lang,
|
|
36
|
+
script: @script, locale: @locale, labels: @i18n.get })
|
|
37
37
|
populate_id(docxml)
|
|
38
38
|
info docxml, nil
|
|
39
|
+
@xrefs.reqt_models = @isodoc.reqt_models
|
|
39
40
|
@xrefs.parse docxml
|
|
40
41
|
@isodoc.xrefs = @xrefs
|
|
41
42
|
@isodoc.bibrender = @isodoc.bibrenderer
|
|
@@ -88,7 +89,7 @@ module IsoDoc
|
|
|
88
89
|
"fmt-provision"
|
|
89
90
|
node.elements.each { |n| parse(n, out) }
|
|
90
91
|
else
|
|
91
|
-
text = node.to_xml.gsub(
|
|
92
|
+
text = node.to_xml.gsub("<", "<").gsub(">", ">")
|
|
92
93
|
out.t { |p| p << text }
|
|
93
94
|
end
|
|
94
95
|
end
|
|
@@ -127,8 +128,7 @@ module IsoDoc
|
|
|
127
128
|
@isodoc.i18n_init("en", "Latn", nil, nil)
|
|
128
129
|
end
|
|
129
130
|
|
|
130
|
-
def bibdata(docxml)
|
|
131
|
-
end
|
|
131
|
+
def bibdata(docxml); end
|
|
132
132
|
|
|
133
133
|
include ::IsoDoc::Ietf::Init
|
|
134
134
|
end
|
data/lib/isodoc/ietf/table.rb
CHANGED
|
@@ -18,9 +18,13 @@ module IsoDoc
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def table_parse_tail(node, out)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
table_parse_tail_elems.each do |k|
|
|
22
|
+
node.xpath(ns(k)).each { |n| parse(n, out) }
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def table_parse_tail_elems
|
|
27
|
+
["./key", "./source", "./note"]
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
def table_title_parse(node, out)
|
|
@@ -187,6 +187,15 @@ Applicable to modify and delete</a:documentation>
|
|
|
187
187
|
<a:documentation>Optional caption of this block</a:documentation>
|
|
188
188
|
</attribute>
|
|
189
189
|
</optional>
|
|
190
|
+
<optional>
|
|
191
|
+
<attribute name="position">
|
|
192
|
+
<a:documentation>For an "add" change, whether the change is added before or after the location</a:documentation>
|
|
193
|
+
<choice>
|
|
194
|
+
<value>before</value>
|
|
195
|
+
<value>after</value>
|
|
196
|
+
</choice>
|
|
197
|
+
</attribute>
|
|
198
|
+
</optional>
|
|
190
199
|
<optional>
|
|
191
200
|
<element name="location">
|
|
192
201
|
<a:documentation>The location(s) in the original document which have undergone the change described in this block</a:documentation>
|
|
@@ -1893,15 +1902,40 @@ or as the string "auto"</a:documentation>
|
|
|
1893
1902
|
<a:documentation>Mathematically formatted text</a:documentation>
|
|
1894
1903
|
<element name="stem">
|
|
1895
1904
|
<ref name="StemAttributes"/>
|
|
1896
|
-
<
|
|
1897
|
-
<
|
|
1905
|
+
<optional>
|
|
1906
|
+
<text>
|
|
1898
1907
|
<a:documentation>The content of the mathematically formatted text</a:documentation>
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1908
|
+
</text>
|
|
1909
|
+
</optional>
|
|
1910
|
+
<optional>
|
|
1911
|
+
<ref name="mathml"/>
|
|
1912
|
+
</optional>
|
|
1913
|
+
<optional>
|
|
1914
|
+
<ref name="asciimath"/>
|
|
1915
|
+
</optional>
|
|
1916
|
+
<optional>
|
|
1917
|
+
<ref name="latexmath"/>
|
|
1918
|
+
</optional>
|
|
1903
1919
|
</element>
|
|
1904
1920
|
</define>
|
|
1921
|
+
<define name="latexmath">
|
|
1922
|
+
<a:documentation>Encoding of LatexMath</a:documentation>
|
|
1923
|
+
<element name="latexmath">
|
|
1924
|
+
<text/>
|
|
1925
|
+
</element>
|
|
1926
|
+
</define>
|
|
1927
|
+
<define name="asciimath">
|
|
1928
|
+
<a:documentation>Encoding of AsciiMath</a:documentation>
|
|
1929
|
+
<element name="asciimath">
|
|
1930
|
+
<text/>
|
|
1931
|
+
</element>
|
|
1932
|
+
</define>
|
|
1933
|
+
<define name="mathml">
|
|
1934
|
+
<a:documentation>Encoding of MathML: the official W3C MathML 4 grammar (namespace
|
|
1935
|
+
http://www.w3.org/1998/Math/MathML), via the metanorma wrapper in
|
|
1936
|
+
grammars/mathml/. See grammars/mathml/README.adoc and basicdoc-models#35.</a:documentation>
|
|
1937
|
+
<externalRef href="metanorma-mathml.rng"/>
|
|
1938
|
+
</define>
|
|
1905
1939
|
<define name="StemAttributes">
|
|
1906
1940
|
<attribute name="type">
|
|
1907
1941
|
<a:documentation>The notation used to mathematically format the text</a:documentation>
|
|
@@ -1142,11 +1142,11 @@ NOTE: This should preferably be encoded as a URI or short identifier, rather th
|
|
|
1142
1142
|
<a:documentation>Information about how long the current description of the bibliographic item is valid for</a:documentation>
|
|
1143
1143
|
</ref>
|
|
1144
1144
|
</optional>
|
|
1145
|
-
<
|
|
1145
|
+
<zeroOrMore>
|
|
1146
1146
|
<ref name="depiction">
|
|
1147
1147
|
<a:documentation>Depiction of the bibliographic item, typically an image</a:documentation>
|
|
1148
1148
|
</ref>
|
|
1149
|
-
</
|
|
1149
|
+
</zeroOrMore>
|
|
1150
1150
|
</define>
|
|
1151
1151
|
<define name="ReducedBibliographicItem">
|
|
1152
1152
|
<a:documentation>Reduced description of a bibliographic resource, without mandatory title and docidentifier, used for document relations
|
|
@@ -2015,15 +2015,11 @@ provided that it is not the entire bibliographic item that is so related</a:docu
|
|
|
2015
2015
|
<a:documentation>A version of the bibliographic item (within an edition). Can be used for drafts</a:documentation>
|
|
2016
2016
|
<element name="version">
|
|
2017
2017
|
<optional>
|
|
2018
|
-
<
|
|
2019
|
-
<a:documentation>
|
|
2020
|
-
</
|
|
2021
|
-
</optional>
|
|
2022
|
-
<optional>
|
|
2023
|
-
<ref name="draft">
|
|
2024
|
-
<a:documentation>The identifier for the current draft of the bibliographic item</a:documentation>
|
|
2025
|
-
</ref>
|
|
2018
|
+
<attribute name="type">
|
|
2019
|
+
<a:documentation>Versioning scheme, in case of multiple versioning schemes</a:documentation>
|
|
2020
|
+
</attribute>
|
|
2026
2021
|
</optional>
|
|
2022
|
+
<text/>
|
|
2027
2023
|
</element>
|
|
2028
2024
|
</define>
|
|
2029
2025
|
<define name="vedition">
|
|
@@ -2063,13 +2059,13 @@ provided that it is not the entire bibliographic item that is so related</a:docu
|
|
|
2063
2059
|
<ref name="LocalizedString"/>
|
|
2064
2060
|
</element>
|
|
2065
2061
|
</optional>
|
|
2066
|
-
<
|
|
2062
|
+
<zeroOrMore>
|
|
2067
2063
|
<element name="taxon">
|
|
2068
2064
|
<a:documentation>The keywords as a hierarchical taxonomy. For example, the sequence of `taxon` elements
|
|
2069
2065
|
`pump`, `centrifugal pump`, `line shaft pump` represents a taxonomic classification</a:documentation>
|
|
2070
2066
|
<ref name="LocalizedString"/>
|
|
2071
2067
|
</element>
|
|
2072
|
-
</
|
|
2068
|
+
</zeroOrMore>
|
|
2073
2069
|
<zeroOrMore>
|
|
2074
2070
|
<ref name="vocabid">
|
|
2075
2071
|
<a:documentation>Identifiers for the keyword as a controlled vocabulary</a:documentation>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<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">
|
|
3
|
-
<!-- VERSION v2.1.
|
|
3
|
+
<!-- VERSION v2.1.6 -->
|
|
4
4
|
|
|
5
5
|
<!--
|
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
|
@@ -164,6 +164,9 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
|
|
|
164
164
|
</choice>
|
|
165
165
|
</attribute>
|
|
166
166
|
</optional>
|
|
167
|
+
<optional>
|
|
168
|
+
<ref name="DisplayDirective"/>
|
|
169
|
+
</optional>
|
|
167
170
|
</define>
|
|
168
171
|
<define name="DlAttributes">
|
|
169
172
|
<ref name="BlockAttributes"/>
|
|
@@ -210,6 +213,12 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
|
|
|
210
213
|
<define name="ExampleAttributes">
|
|
211
214
|
<ref name="NumberingAttributes"/>
|
|
212
215
|
<ref name="BlockAttributes"/>
|
|
216
|
+
<optional>
|
|
217
|
+
<attribute name="collapsible">
|
|
218
|
+
<a:documentation>Render the example as collapsible (HTML5 details/summary)</a:documentation>
|
|
219
|
+
<data type="boolean"/>
|
|
220
|
+
</attribute>
|
|
221
|
+
</optional>
|
|
213
222
|
</define>
|
|
214
223
|
<define name="ExampleBody">
|
|
215
224
|
<optional>
|
|
@@ -814,6 +823,9 @@ titlecase, or lowercase</a:documentation>
|
|
|
814
823
|
</define>
|
|
815
824
|
<define name="UlAttributes" combine="interleave">
|
|
816
825
|
<ref name="BlockAttributes"/>
|
|
826
|
+
<optional>
|
|
827
|
+
<ref name="DisplayDirective"/>
|
|
828
|
+
</optional>
|
|
817
829
|
</define>
|
|
818
830
|
<define name="TableAttributes" combine="interleave">
|
|
819
831
|
<optional>
|
|
@@ -840,7 +852,7 @@ titlecase, or lowercase</a:documentation>
|
|
|
840
852
|
<a:documentation>Width of the figure block in rendering</a:documentation>
|
|
841
853
|
</attribute>
|
|
842
854
|
</optional>
|
|
843
|
-
<ref name="
|
|
855
|
+
<ref name="BlockAttributesCore"/>
|
|
844
856
|
</define>
|
|
845
857
|
<define name="SourceAttributes" combine="interleave">
|
|
846
858
|
<ref name="BlockAttributes"/>
|
|
@@ -1271,7 +1283,11 @@ That concept may be defined as a term within the current document, or it may be
|
|
|
1271
1283
|
<a:documentation>Class of input form</a:documentation>
|
|
1272
1284
|
</attribute>
|
|
1273
1285
|
</optional>
|
|
1274
|
-
<ref name="
|
|
1286
|
+
<ref name="BlockAttributesCore">
|
|
1287
|
+
<a:documentation>form declares its own class above, so it uses BlockAttributesCore to
|
|
1288
|
+
avoid duplicating the custom-class slot in BlockAttributes. Treated like
|
|
1289
|
+
figure. See metanorma/metanorma-standoc#1197</a:documentation>
|
|
1290
|
+
</ref>
|
|
1275
1291
|
<zeroOrMore>
|
|
1276
1292
|
<!-- Input form contents -->
|
|
1277
1293
|
<choice>
|
|
@@ -1968,7 +1984,7 @@ used in document amendments</a:documentation>
|
|
|
1968
1984
|
<a:documentation>Zero or more examples of how the term is to be used</a:documentation>
|
|
1969
1985
|
</ref>
|
|
1970
1986
|
</zeroOrMore>
|
|
1971
|
-
<ref name="
|
|
1987
|
+
<ref name="TermSources">
|
|
1972
1988
|
<a:documentation>Bibliographic references for the managed term</a:documentation>
|
|
1973
1989
|
</ref>
|
|
1974
1990
|
</element>
|
|
@@ -2077,7 +2093,7 @@ used in document amendments</a:documentation>
|
|
|
2077
2093
|
<a:documentation>Information about how the designation is to be used</a:documentation>
|
|
2078
2094
|
</ref>
|
|
2079
2095
|
</optional>
|
|
2080
|
-
<ref name="
|
|
2096
|
+
<ref name="TermSources">
|
|
2081
2097
|
<a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
|
|
2082
2098
|
</ref>
|
|
2083
2099
|
</define>
|
|
@@ -2348,7 +2364,7 @@ used in document amendments</a:documentation>
|
|
|
2348
2364
|
<ref name="formula"/>
|
|
2349
2365
|
</choice>
|
|
2350
2366
|
</oneOrMore>
|
|
2351
|
-
<ref name="
|
|
2367
|
+
<ref name="TermSources">
|
|
2352
2368
|
<a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
|
|
2353
2369
|
</ref>
|
|
2354
2370
|
</element>
|
|
@@ -2365,7 +2381,7 @@ used in document amendments</a:documentation>
|
|
|
2365
2381
|
<ref name="formula"/>
|
|
2366
2382
|
</choice>
|
|
2367
2383
|
</oneOrMore>
|
|
2368
|
-
<ref name="
|
|
2384
|
+
<ref name="TermSources">
|
|
2369
2385
|
<a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
|
|
2370
2386
|
</ref>
|
|
2371
2387
|
</element>
|
|
@@ -2756,7 +2772,11 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
|
|
|
2756
2772
|
</oneOrMore>
|
|
2757
2773
|
</element>
|
|
2758
2774
|
</define>
|
|
2759
|
-
<define name="
|
|
2775
|
+
<define name="BlockAttributesCore">
|
|
2776
|
+
<a:documentation>Block attributes excluding the custom CSS class. Blocks that already carry
|
|
2777
|
+
their own `class` attribute (e.g. figure, via basicdoc FigureAttributes)
|
|
2778
|
+
include this directly, to avoid a duplicate-attribute collision with the
|
|
2779
|
+
`class` added in BlockAttributes. See metanorma/metanorma-standoc#1197</a:documentation>
|
|
2760
2780
|
<optional>
|
|
2761
2781
|
<attribute name="keep-with-next">
|
|
2762
2782
|
<a:documentation>Keep this block on the same page as the following block in paged media</a:documentation>
|
|
@@ -2788,6 +2808,37 @@ to span across both columns</a:documentation>
|
|
|
2788
2808
|
</attribute>
|
|
2789
2809
|
</optional>
|
|
2790
2810
|
</define>
|
|
2811
|
+
<define name="BlockAttributes">
|
|
2812
|
+
<a:documentation>Universal block attributes, including a custom CSS class (space-separated,
|
|
2813
|
+
appended additively to the block's built-in HTML class, HTML output only).
|
|
2814
|
+
See metanorma/metanorma-standoc#1197</a:documentation>
|
|
2815
|
+
<ref name="BlockAttributesCore"/>
|
|
2816
|
+
<optional>
|
|
2817
|
+
<attribute name="class">
|
|
2818
|
+
<a:documentation>Custom CSS class(es) for the block in HTML output</a:documentation>
|
|
2819
|
+
</attribute>
|
|
2820
|
+
</optional>
|
|
2821
|
+
</define>
|
|
2822
|
+
<define name="DisplayDirective">
|
|
2823
|
+
<a:documentation>Directive on how to render a block in Presentation XML </a:documentation>
|
|
2824
|
+
<optional>
|
|
2825
|
+
<attribute name="display">
|
|
2826
|
+
<a:documentation>Display style for block.
|
|
2827
|
+
If the block is `ol` or `ul` and dispay is `table`,
|
|
2828
|
+
the list is to be rendered as a table, with a column for each nested level, and a row for each terminal sublist</a:documentation>
|
|
2829
|
+
</attribute>
|
|
2830
|
+
</optional>
|
|
2831
|
+
<optional>
|
|
2832
|
+
<attribute name="display-directives">
|
|
2833
|
+
<a:documentation>display-directives is a key-value set of attributes, guiding how the rendering of the block should happen.
|
|
2834
|
+
The key-value set is comma-delimited, and encoded as `key1='value1',key2='value'`,
|
|
2835
|
+
as with stem//mn/@data-metanorma-numberformat
|
|
2836
|
+
* If the block is `ol` or `ul` and dispay is `table`, display-directives can have the value `colgroup='col1,col2,...coln'`,
|
|
2837
|
+
where each col value is a percentage width of the column in the output table (with no % suffix).
|
|
2838
|
+
e.g. `colgroup='50,33.3,16.7'` </a:documentation>
|
|
2839
|
+
</attribute>
|
|
2840
|
+
</optional>
|
|
2841
|
+
</define>
|
|
2791
2842
|
<define name="ReferencesAttributes">
|
|
2792
2843
|
<optional>
|
|
2793
2844
|
<attribute name="obligation">
|
|
@@ -2800,7 +2851,7 @@ Normative References contents contain normative references, but as a clause in t
|
|
|
2800
2851
|
<data type="boolean"/>
|
|
2801
2852
|
</attribute>
|
|
2802
2853
|
</define>
|
|
2803
|
-
<define name="
|
|
2854
|
+
<define name="TermSources">
|
|
2804
2855
|
<zeroOrMore>
|
|
2805
2856
|
<ref name="termsource"/>
|
|
2806
2857
|
</zeroOrMore>
|