metanorma-bipm 1.1.8 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,6 +58,14 @@
58
58
  <optional>
59
59
  <attribute name="type"/>
60
60
  </optional>
61
+ <optional>
62
+ <attribute name="tag"/>
63
+ </optional>
64
+ <optional>
65
+ <attribute name="multilingual-rendering">
66
+ <ref name="MultilingualRenderingType"/>
67
+ </attribute>
68
+ </optional>
61
69
  <optional>
62
70
  <ref name="reqtitle"/>
63
71
  </optional>
@@ -101,7 +109,9 @@
101
109
  </define>
102
110
  <define name="label">
103
111
  <element name="label">
104
- <text/>
112
+ <oneOrMore>
113
+ <ref name="TextElement"/>
114
+ </oneOrMore>
105
115
  </element>
106
116
  </define>
107
117
  <define name="subject">
@@ -175,8 +185,19 @@
175
185
  <data type="boolean"/>
176
186
  </attribute>
177
187
  </optional>
188
+ <optional>
189
+ <attribute name="tag"/>
190
+ </optional>
191
+ <optional>
192
+ <attribute name="multilingual-rendering">
193
+ <ref name="MultilingualRenderingType"/>
194
+ </attribute>
195
+ </optional>
178
196
  <oneOrMore>
179
- <ref name="BasicBlock"/>
197
+ <choice>
198
+ <ref name="BasicBlock"/>
199
+ <ref name="component"/>
200
+ </choice>
180
201
  </oneOrMore>
181
202
  </define>
182
203
  <define name="ObligationType">
@@ -74,12 +74,23 @@ module IsoDoc
74
74
  def termref_cleanup(docxml)
75
75
  docxml
76
76
  .gsub(/\s*\[MODIFICATION\]\s*\[\/TERMREF\]/,
77
- l10n(", #{@i18n.modified} [/TERMREF]"))
77
+ l10n(", #{@i18n.modified} [/TERMREF]"))
78
78
  .gsub(%r{\s*\[/TERMREF\]\s*</p>\s*<p>\s*\[TERMREF\]}, "; ")
79
79
  .gsub(/\[TERMREF\]\s*/, l10n("[#{@i18n.source} "))
80
80
  .gsub(%r{\s*\[/TERMREF\]\s*}, l10n("]"))
81
81
  .gsub(/\s*\[MODIFICATION\]/, l10n(", #{@i18n.modified} &mdash; "))
82
82
  end
83
+
84
+ def error_parse(node, out)
85
+ case node.name
86
+ when "blacksquare" then blacksquare_parse(node, out)
87
+ else super
88
+ end
89
+ end
90
+
91
+ def blacksquare_parse(_node, out)
92
+ out << "&#x25a0;"
93
+ end
83
94
  end
84
95
  end
85
96
  end