metanorma-standoc 3.4.8 → 3.4.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8cbc11c6b0e55ec1404d12dd309d0f711c1d4918d079375716d0b0406f6bce2f
4
- data.tar.gz: 016b74cca05a97b06809a7e9af8d48b97b07c39e3d98fe0bd575da362f1bed57
3
+ metadata.gz: a76abb834a587adae31dae92f93936ca82968bc7b77a9d907633b51a0de29319
4
+ data.tar.gz: a03fe3c22052427818cc8161c376786c27b3ee570dec4f4fa243713b54ef30a6
5
5
  SHA512:
6
- metadata.gz: 7510bd34addc7e4e2f6d123aa19c89dffe555f1a2f06ff572824136b2269e073721bc7ac8df2f4a94ed09180bd724dbcdb2d5f6d29dc076c71650fe6d5f3c597
7
- data.tar.gz: d575b92f788e95d9754b9d0d2cf6af1f670d82d2f3710d82b165a6e453f8d8ec884fc407926bbf1f86594c61f2992ee3728e9fc3455e0eeb459a2dd4b1f5bcb1
6
+ metadata.gz: 17ac7b991acf83f47f01e79c8c0eb71f1531db814c77ec60b5fa69b0828707a25702f83a92492b49a2217f23525287d22fb6e064b3a48a3b3ecbbc8646a964d4
7
+ data.tar.gz: df7537f969e7559c90569125da0c3847da7cc723c998f96e1393229607d22271191b909c36262a8ee89a0c63fea20b5a4e005fa925e430c6b2e6b08d6699c1a6
data/.rubocop.yml CHANGED
@@ -2,6 +2,15 @@
2
2
  # See https://github.com/metanorma/cimas
3
3
  inherit_from:
4
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
5
14
 
6
15
  # Rubocop plugins enabled centrally so every metanorma-org gem picks them up
7
16
  # on cimas sync — best practice belongs at the shared-template layer, not
data/Gemfile CHANGED
@@ -6,5 +6,10 @@ git_source(:github) { |repo| "https://github.com/#{repo}" }
6
6
 
7
7
  gemspec
8
8
 
9
- eval_gemfile("Gemfile.devel") rescue nil
9
+ # Stopgap: lutaml 0.11.x removed lib/lutaml/xmi.rb, which metanorma-plugin-lutaml
10
+ # 0.7.x still `require`s. Hold lutaml at 0.10.x until plugin-lutaml follows the
11
+ # file to its new home. Remove once resolved:
12
+ # https://github.com/metanorma/metanorma-plugin-lutaml/issues/292
13
+ gem "lutaml", "< 0.11"
10
14
 
15
+ eval_gemfile("Gemfile.devel") rescue nil
@@ -150,6 +150,11 @@ a.FootnoteRef, span.FootnoteRef {
150
150
  vertical-align: super;
151
151
  }
152
152
 
153
+ a.TableFootnoteRef, a.FootnoteRef, a.footnote-number,
154
+ sup a, a:has(> sup) {
155
+ vertical-align: baseline;
156
+ }
157
+
153
158
  .addition {
154
159
  color: blue;
155
160
  }
@@ -198,15 +198,23 @@ module Metanorma
198
198
  XML
199
199
  end
200
200
 
201
- def published_base?(stage, _xmldoc)
201
+ def published_base?(stage, xmldoc)
202
202
  if @stage_published
203
203
  @stage_published == "true"
204
- else published?(stage, _xmldoc)
204
+ else !draft_stage?(stage, xmldoc)
205
205
  end
206
206
  end
207
207
 
208
+ # Is the stage a draft (unpublished) stage? Overridable seam for
209
+ # flavours whose stage repertoires are not the binary
210
+ # published/unpublished; the :docstage-published: document
211
+ # attribute (@stage_published, above) trumps it either way.
212
+ def draft_stage?(stage, xmldoc)
213
+ !published?(stage, xmldoc)
214
+ end
215
+
208
216
  def published?(stage, _xmldoc)
209
- stage.casecmp("published").zero?
217
+ stage.to_s.casecmp("published").zero?
210
218
  end
211
219
 
212
220
  # allows us to deal with doc relation localities,
@@ -61,7 +61,7 @@ module Metanorma
61
61
  boilerplateauthority embed_hdr embed_id erefstyle originstyle
62
62
  xrefstyle blockunnumbered keepasciimath numberfmt_formula
63
63
  numberfmt_prof sort_biblio reqt_models default_requirement_model
64
- document_scheme
64
+ document_scheme publisher_sort_config
65
65
  ]
66
66
  end
67
67
 
@@ -34,6 +34,77 @@ module Metanorma
34
34
  bib
35
35
  end
36
36
 
37
+ BIBLIO_PUBLISHER_ORG =
38
+ "./contributor[role/@type = 'publisher']/organization".freeze
39
+
40
+ # Configurable publisher sort ranking, shared by every flavour's
41
+ # bibliography sort. `table` is the flavour's default ordering, an array
42
+ # of { abbrev:, name:, rank: }. A per-document / metanorma-taste override
43
+ # (:sort-biblio-<abbrev>: <rank>: <name> attributes, captured into
44
+ # @publisher_sort_config) REPLACES the flavour default when present.
45
+ #
46
+ # A matched publisher gets its configured rank; an unmatched standards
47
+ # reference sorts immediately after the ranked publishers, and a
48
+ # non-standard reference last. With no override and the flavour's own
49
+ # default table, this reproduces the flavour's historical hardcoded ranks.
50
+ def publisher_sort_rank(bib, table)
51
+ table = publisher_sort_table(table)
52
+ if (entry = publisher_sort_match(bib, table))
53
+ return entry[:rank]
54
+ end
55
+
56
+ maxrank = table.map { |e| e[:rank] }.max || 0
57
+ biblio_standards_ref?(bib) ? maxrank + 1 : maxrank + 2
58
+ end
59
+
60
+ # Secondary sort token: the co-publisher(s) other than the matched
61
+ # primary. Deterministic when several co-publishers exist (returns the
62
+ # smallest token), which reproduces e.g. JIS's "JIS+IEC before
63
+ # JIS+ISO, JIS+IEC+ISO alongside JIS+IEC" ordering.
64
+ def publisher_sort_second(bib, table)
65
+ entry = publisher_sort_match(bib, publisher_sort_table(table))
66
+ entry or return ""
67
+ bib.xpath(BIBLIO_PUBLISHER_ORG)
68
+ .reject { |o| publisher_org_match?(o, entry) }
69
+ .map { |o| (o.at("./abbreviation") || o.at("./name"))&.text&.strip }
70
+ .compact.reject(&:empty?).min || ""
71
+ end
72
+
73
+ def publisher_sort_table(default_table)
74
+ cfg = @publisher_sort_config
75
+ cfg && !cfg.empty? ? cfg : default_table
76
+ end
77
+
78
+ # lowest-ranked table entry whose publisher appears on the bibitem
79
+ def publisher_sort_match(bib, table)
80
+ orgs = bib.xpath(BIBLIO_PUBLISHER_ORG)
81
+ table.sort_by { |e| e[:rank] }.find do |e|
82
+ orgs.any? { |o| publisher_org_match?(o, e) }
83
+ end
84
+ end
85
+
86
+ # A table entry matches a publisher organization on its abbreviation
87
+ # (case-insensitive, since AsciiDoc lowercases attribute-derived abbrevs)
88
+ # or on any of its names (`name` may be a single string or an array; the
89
+ # latter lets a flavour list, e.g., a Japanese and an English publisher
90
+ # name for the same rank).
91
+ def publisher_org_match?(org, entry)
92
+ abbr = org.at("./abbreviation")&.text&.strip
93
+ name = org.at("./name")&.text&.strip
94
+ names = Array(entry[:name]).map { |n| n.to_s.strip }.reject(&:empty?)
95
+ (!entry[:abbrev].to_s.empty? && abbr&.casecmp?(entry[:abbrev])) ||
96
+ (!name.to_s.empty? && names.include?(name))
97
+ end
98
+
99
+ # Whether a bibitem is a standards reference (sorts after the ranked
100
+ # publishers, before non-standard references). Base definition: it has a
101
+ # typed, non-DOI/ISSN/ISBN docidentifier. Flavours may widen this (ISO
102
+ # also treats an untyped docidentifier as a standards reference).
103
+ def biblio_standards_ref?(bib)
104
+ !!bib.at("./docidentifier[@type][not(#{@conv.skip_docid} or " \
105
+ "@type = 'metanorma')]")
106
+ end
107
+
37
108
  # default presuppose that all citations in biblio numbered
38
109
  # consecutively, but that standards codes are preserved as is:
39
110
  # only numeric references are renumbered
@@ -48,6 +48,7 @@ module Metanorma
48
48
  def concept_cleanup
49
49
  xmldoc.xpath("//concept").each do |n|
50
50
  refterm = n.at("./refterm") or next
51
+ refterm.xpath(".//index").each(&:remove)
51
52
  lookup = norm_ref_id_text(refterm.text.strip)
52
53
  p = @lookup[:sec2prim][lookup] and refterm.children = @c.encode(p)
53
54
  end
@@ -111,7 +111,8 @@ module Metanorma
111
111
  $xreftext = {}
112
112
 
113
113
  attr_reader :bibdb, :lang, :script, :locale, :relaton_log, :libdir, :backend,
114
- :novalid, :local_log, :output_dir, :filename, :files_to_delete
114
+ :novalid, :local_log, :output_dir, :filename, :files_to_delete,
115
+ :docstage_valid
115
116
 
116
117
  def initialize(backend, opts)
117
118
  doc = opts&.dig(:document)
@@ -27,6 +27,7 @@ module Metanorma
27
27
  @document_scheme = document_scheme(node)
28
28
  @default_doctype = "standard"
29
29
  @stage_published = node.attr("docstage-published")
30
+ @docstage_valid = node.attr("docstage-valid")&.split(/,\s*/)
30
31
  @metadata_attrs = metadata_attrs(node)
31
32
  end
32
33
 
@@ -116,6 +117,11 @@ module Metanorma
116
117
  end
117
118
 
118
119
  def init_toc(node)
120
+ init_toc_levels(node)
121
+ init_toc_types(node)
122
+ end
123
+
124
+ def init_toc_levels(node)
119
125
  @htmltoclevels = node.attr("toclevels-html") ||
120
126
  node.attr("htmltoclevels") ||
121
127
  node.attr("toclevels") || toc_default[:html_levels]
@@ -125,10 +131,13 @@ module Metanorma
125
131
  @pdftoclevels = node.attr("toclevels-pdf") ||
126
132
  node.attr("toclevels") || toc_default[:pdf_levels]
127
133
  @toclevels = node.attr("toclevels") || toc_default[:html_levels]
128
- @tocfigures = node.attr("toc-figures")
129
- @toctables = node.attr("toc-tables")
130
- @tocrecommendations = node.attr("toc-recommendations")
131
- @tocexamples = node.attr("toc-examples")
134
+ end
135
+
136
+ def init_toc_types(node)
137
+ @tocfigures = node.attr("toc-figures") != "false"
138
+ @toctables = node.attr("toc-tables") != "false"
139
+ @tocrecommendations = node.attr("toc-recommendations") != "false"
140
+ @tocexamples = node.attr("toc-examples") != "false"
132
141
  end
133
142
 
134
143
  def toc_default
@@ -175,6 +184,7 @@ module Metanorma
175
184
  @no_isobib = node.attr("no-isobib")
176
185
  @flush_caches = node.attr("flush-caches")
177
186
  @sort_biblio = node.attr("sort-biblio") != "false"
187
+ @publisher_sort_config = init_publisher_sort_config(node)
178
188
  init_bib_db(node)
179
189
  init_bib_caches(node)
180
190
  init_iev_caches(node)
@@ -182,6 +192,21 @@ module Metanorma
182
192
  @biblio_cutoff = biblio_cutoff(node)
183
193
  end
184
194
 
195
+ # Per-publisher bibliography sort ranks, from
196
+ # :sort-biblio-<abbrev>: <rank>: <name> document attributes (set directly
197
+ # in a document or injected by a metanorma-taste config). AsciiDoc
198
+ # lowercases attribute names, so <abbrev> is matched case-insensitively
199
+ # downstream. Returns [] when none are set (flavours keep their default
200
+ # publisher ordering).
201
+ def init_publisher_sort_config(node)
202
+ node.attributes.each_with_object([]) do |(k, v), acc|
203
+ m = /\Asort-biblio-(?<abbrev>.+)\z/.match(k.to_s) or next
204
+ rank_s, name = v.to_s.split(":", 2)
205
+ rank = Integer(rank_s.to_s.strip, exception: false) or next
206
+ acc << { abbrev: m[:abbrev].strip, name: name&.strip, rank: rank }
207
+ end
208
+ end
209
+
185
210
  def init_bib_db(node)
186
211
  @bibdb = nil
187
212
  @local_bibdb =
@@ -103,6 +103,7 @@ module Metanorma
103
103
  .merge(
104
104
  metadata: node.option?("metadata") ? "true" : nil,
105
105
  key: node.option?("key") ? "true" : nil,
106
+ class: node.attr("class"),
106
107
  )))
107
108
  end
108
109
 
@@ -67,16 +67,23 @@ module Metanorma
67
67
  end.join
68
68
  end
69
69
 
70
- # debugging output of results of all preprocessing,
71
- # including include files concatenation and Lutaml/Liquid processing
70
+ # debugging output of results of all preprocessing, including include
71
+ # files concatenation and Lutaml/Liquid processing.
72
+ #
73
+ # Skipped for docfile-less (string/stdin) input: the target would
74
+ # degenerate to a single CWD-relative "./metanorma.asciidoc.log.txt" that
75
+ # the thousands of collection sub-compiles all truncate-rewrite (so it
76
+ # carries no useful diagnostics anyway). And a diagnostic write must never
77
+ # abort the build, so a write failure degrades to a warning rather than
78
+ # propagating out of the preprocessor. metanorma/metanorma-standoc#1209
72
79
  def log(doc, text)
73
- source = doc.attr("docfile") || "metanorma"
80
+ source = doc.attr("docfile") or return
74
81
  dirname = File.dirname(source)
75
82
  basename = File.basename(source, ".*")
76
83
  fname = File.join(dirname, "#{basename}.asciidoc.log.txt")
77
- File.open(fname, "w:UTF-8") do |f|
78
- f.write(text.join("\n"))
79
- end
84
+ File.open(fname, "w:UTF-8") { |f| f.write(text.join("\n")) }
85
+ rescue SystemCallError => e
86
+ warn "metanorma: could not write preprocessing log #{fname}: #{e.message}"
80
87
  end
81
88
  end
82
89
 
@@ -19,6 +19,6 @@ module Metanorma
19
19
  end
20
20
 
21
21
  module Standoc
22
- VERSION = "3.4.8".freeze
22
+ VERSION = "3.4.9".freeze
23
23
  end
24
24
  end
@@ -1931,7 +1931,7 @@ or as the string "auto"</a:documentation>
1931
1931
  </element>
1932
1932
  </define>
1933
1933
  <define name="mathml">
1934
- <a:documentation>Encoding of MathML: the official W3C MathML 3.0 grammar (namespace
1934
+ <a:documentation>Encoding of MathML: the official W3C MathML 4 grammar (namespace
1935
1935
  http://www.w3.org/1998/Math/MathML), via the metanorma wrapper in
1936
1936
  grammars/mathml/. See grammars/mathml/README.adoc and basicdoc-models#35.</a:documentation>
1937
1937
  <externalRef href="metanorma-mathml.rng"/>
@@ -1,22 +1,21 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <!--
4
- This is the Mathematical Markup Language (MathML) 3.0, an XML
5
- application for describing mathematical notation and capturing
6
- both its structure and content.
7
-
8
- Copyright 1998-2014 W3C (MIT, ERCIM, Keio, Beihang)
9
-
10
- Use and distribution of this code are permitted under the terms
11
- W3C Software Notice and License
12
- http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
13
- -->
14
- <include href="mathml3-strict-content.rng">
2
+ <!--
3
+ MathML 4 (Content)
4
+ ##################
5
+ -->
6
+ <!--
7
+ Copyright 1998-2026 W3C (MIT, ERCIM, Keio, Beihang)
8
+
9
+ Use and distribution of this code are permitted under the terms
10
+ W3C Software Notice and License
11
+ http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
12
+ -->
13
+ <grammar ns="http://www.w3.org/1998/Math/MathML" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
14
+ <include href="mathml4-strict-content.rng">
15
15
  <define name="cn.content">
16
16
  <zeroOrMore>
17
17
  <choice>
18
18
  <text/>
19
- <ref name="mglyph"/>
20
19
  <ref name="sep"/>
21
20
  <ref name="PresentationExpression"/>
22
21
  </choice>
@@ -46,7 +45,6 @@
46
45
  <zeroOrMore>
47
46
  <choice>
48
47
  <text/>
49
- <ref name="mglyph"/>
50
48
  <ref name="PresentationExpression"/>
51
49
  </choice>
52
50
  </zeroOrMore>
@@ -65,11 +63,22 @@
65
63
  <zeroOrMore>
66
64
  <choice>
67
65
  <text/>
68
- <ref name="mglyph"/>
69
66
  <ref name="PresentationExpression"/>
70
67
  </choice>
71
68
  </zeroOrMore>
72
69
  </define>
70
+ <define name="annotation-xml.attributes" combine="choice">
71
+ <ref name="CommonAtt"/>
72
+ <optional>
73
+ <ref name="cd"/>
74
+ </optional>
75
+ <optional>
76
+ <ref name="name"/>
77
+ </optional>
78
+ <optional>
79
+ <ref name="encoding"/>
80
+ </optional>
81
+ </define>
73
82
  <define name="bvar">
74
83
  <element name="bvar">
75
84
  <ref name="CommonAtt"/>
@@ -113,6 +122,63 @@
113
122
  <ref name="apply.content"/>
114
123
  </define>
115
124
  </include>
125
+ <define name="NonMathMLAtt" combine="choice">
126
+ <attribute>
127
+ <anyName>
128
+ <except>
129
+ <nsName ns=""/>
130
+ <nsName/>
131
+ </except>
132
+ </anyName>
133
+ <data type="string"/>
134
+ </attribute>
135
+ </define>
136
+ <!--
137
+ METANORMA MODIFICATION (basicdoc-models#39): upstream re-adds
138
+ `attribute alttext` to math.attributes here, but mathml4-core.rnc already
139
+ defines it on math; RELAX NG's duplicate-attribute restriction rejects the
140
+ composed grammar (jing: 'duplicate attribute "alttext"').
141
+ Upstream text was:
142
+ math.attributes &=
143
+ attribute alttext {text}?
144
+ -->
145
+ <!--
146
+ METANORMA MODIFICATION (basicdoc-models#39): upstream re-adds the
147
+ `data-other` placeholder to MathMLDataAttributes here; dropped for the
148
+ same reason as the core placeholder (see mathml4-core.rnc modification).
149
+ Upstream text was:
150
+ MathMLDataAttributes &=
151
+ attribute data-other {text}?
152
+ -->
153
+ <define name="CommonAtt" combine="interleave">
154
+ <zeroOrMore>
155
+ <ref name="NonMathMLAtt"/>
156
+ </zeroOrMore>
157
+ <ref name="MathMLDataAttributes"/>
158
+ <optional>
159
+ <attribute name="class">
160
+ <data type="NCName"/>
161
+ </attribute>
162
+ </optional>
163
+ <optional>
164
+ <attribute name="style">
165
+ <data type="string"/>
166
+ </attribute>
167
+ </optional>
168
+ <optional>
169
+ <attribute name="href">
170
+ <data type="anyURI"/>
171
+ </attribute>
172
+ </optional>
173
+ <optional>
174
+ <attribute name="intent"/>
175
+ </optional>
176
+ <optional>
177
+ <attribute name="arg">
178
+ <data type="NCName"/>
179
+ </attribute>
180
+ </optional>
181
+ </define>
116
182
  <define name="base">
117
183
  <attribute name="base"/>
118
184
  </define>
@@ -124,6 +190,18 @@
124
190
  <define name="PresentationExpression" combine="choice">
125
191
  <notAllowed/>
126
192
  </define>
193
+ <define name="DefEncAtt">
194
+ <optional>
195
+ <attribute name="encoding">
196
+ <data type="string"/>
197
+ </attribute>
198
+ </optional>
199
+ <optional>
200
+ <attribute name="definitionURL">
201
+ <data type="anyURI"/>
202
+ </attribute>
203
+ </optional>
204
+ </define>
127
205
  <define name="DomainQ">
128
206
  <zeroOrMore>
129
207
  <choice>
@@ -228,60 +306,6 @@
228
306
  <ref name="ContExp"/>
229
307
  </element>
230
308
  </define>
231
- <define name="DeprecatedContExp">
232
- <choice>
233
- <ref name="reln"/>
234
- <ref name="fn"/>
235
- <ref name="declare"/>
236
- </choice>
237
- </define>
238
- <define name="ContExp" combine="choice">
239
- <ref name="DeprecatedContExp"/>
240
- </define>
241
- <define name="reln">
242
- <element name="reln">
243
- <zeroOrMore>
244
- <ref name="ContExp"/>
245
- </zeroOrMore>
246
- </element>
247
- </define>
248
- <define name="fn">
249
- <element name="fn">
250
- <ref name="ContExp"/>
251
- </element>
252
- </define>
253
- <define name="declare">
254
- <element name="declare">
255
- <optional>
256
- <attribute name="type">
257
- <data type="string"/>
258
- </attribute>
259
- </optional>
260
- <optional>
261
- <attribute name="scope">
262
- <data type="string"/>
263
- </attribute>
264
- </optional>
265
- <optional>
266
- <attribute name="nargs">
267
- <data type="nonNegativeInteger"/>
268
- </attribute>
269
- </optional>
270
- <optional>
271
- <attribute name="occurrence">
272
- <choice>
273
- <value>prefix</value>
274
- <value>infix</value>
275
- <value>function-model</value>
276
- </choice>
277
- </attribute>
278
- </optional>
279
- <ref name="DefEncAtt"/>
280
- <oneOrMore>
281
- <ref name="ContExp"/>
282
- </oneOrMore>
283
- </element>
284
- </define>
285
309
  <define name="interval.class">
286
310
  <ref name="interval"/>
287
311
  </define>
@@ -1253,10 +1277,10 @@
1253
1277
  <define name="nary-stats.class">
1254
1278
  <choice>
1255
1279
  <ref name="mean"/>
1256
- <ref name="sdev"/>
1257
- <ref name="variance"/>
1258
1280
  <ref name="median"/>
1259
1281
  <ref name="mode"/>
1282
+ <ref name="sdev"/>
1283
+ <ref name="variance"/>
1260
1284
  </choice>
1261
1285
  </define>
1262
1286
  <define name="ContExp" combine="choice">
@@ -1269,29 +1293,29 @@
1269
1293
  <empty/>
1270
1294
  </element>
1271
1295
  </define>
1272
- <define name="sdev">
1273
- <element name="sdev">
1296
+ <define name="median">
1297
+ <element name="median">
1274
1298
  <ref name="CommonAtt"/>
1275
1299
  <ref name="DefEncAtt"/>
1276
1300
  <empty/>
1277
1301
  </element>
1278
1302
  </define>
1279
- <define name="variance">
1280
- <element name="variance">
1303
+ <define name="mode">
1304
+ <element name="mode">
1281
1305
  <ref name="CommonAtt"/>
1282
1306
  <ref name="DefEncAtt"/>
1283
1307
  <empty/>
1284
1308
  </element>
1285
1309
  </define>
1286
- <define name="median">
1287
- <element name="median">
1310
+ <define name="sdev">
1311
+ <element name="sdev">
1288
1312
  <ref name="CommonAtt"/>
1289
1313
  <ref name="DefEncAtt"/>
1290
1314
  <empty/>
1291
1315
  </element>
1292
1316
  </define>
1293
- <define name="mode">
1294
- <element name="mode">
1317
+ <define name="variance">
1318
+ <element name="variance">
1295
1319
  <ref name="CommonAtt"/>
1296
1320
  <ref name="DefEncAtt"/>
1297
1321
  <empty/>