metanorma-ieee 1.4.5 → 1.4.6
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/lib/isodoc/ieee/ieee.amendment.xsl +26 -3
- data/lib/isodoc/ieee/ieee.standard.xsl +26 -3
- data/lib/isodoc/ieee/presentation_ref.rb +1 -1
- data/lib/isodoc/ieee/presentation_terms.rb +4 -4
- data/lib/metanorma/ieee/basicdoc.rng +9 -5
- data/lib/metanorma/ieee/cleanup.rb +4 -4
- data/lib/metanorma/ieee/cleanup_ref.rb +1 -1
- data/lib/metanorma/ieee/converter.rb +6 -6
- data/lib/metanorma/ieee/isodoc.rng +132 -5
- data/lib/metanorma/ieee/term_lookup_cleanup.rb +0 -2
- data/lib/metanorma/ieee/validate.rb +1 -1
- data/lib/metanorma/ieee/validate_section.rb +2 -6
- data/lib/metanorma/ieee/validate_style.rb +1 -1
- data/lib/metanorma/ieee/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc2daee357485b4efad7fe5220314a233d273c83aa17c858659e10a0487d463e
|
4
|
+
data.tar.gz: a0e2c4f055714a807b8aac206e807704524772a06963b55fc970726dcc3d08e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6775149a0ee2a0012029ea3587db49c0d8e238fb73600bae1e1c06e956a5c635351ad0d843475735334f1be17174fdaaaf70e6cebe4a97d15c6e265c536d1a0e
|
7
|
+
data.tar.gz: 908a354df2bacab753c6dea448b0426447359ee92fb3f6b73ee9ba87ccae1e9c972f4f6edd0715bd9828ef2ec4b809f93162f7404ba9620da623e2f1f9231e79
|
@@ -12195,11 +12195,11 @@
|
|
12195
12195
|
</xsl:template>
|
12196
12196
|
|
12197
12197
|
<!-- figure/fn -->
|
12198
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
12198
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
|
12199
12199
|
<!-- figure/note -->
|
12200
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
|
12200
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
|
12201
12201
|
<!-- figure/example -->
|
12202
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
|
12202
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
|
12203
12203
|
|
12204
12204
|
<!-- figure/note[@type = 'units'] -->
|
12205
12205
|
<!-- image/note[@type = 'units'] -->
|
@@ -15746,6 +15746,9 @@
|
|
15746
15746
|
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
15747
15747
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
15748
15748
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
15749
|
+
<!-- https://github.com/metanorma/isodoc/issues/687 -->
|
15750
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
|
15751
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
|
15749
15752
|
|
15750
15753
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
15751
15754
|
<xsl:copy>
|
@@ -16028,6 +16031,20 @@
|
|
16028
16031
|
</xsl:element>
|
16029
16032
|
</xsl:template>
|
16030
16033
|
|
16034
|
+
<xsl:template match="*[local-name() = 'fmt-source']"/>
|
16035
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
|
16036
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
16037
|
+
<xsl:copy-of select="@*"/>
|
16038
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
16039
|
+
</xsl:element>
|
16040
|
+
</xsl:template>
|
16041
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
|
16042
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
16043
|
+
<xsl:copy-of select="@*"/>
|
16044
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
16045
|
+
</xsl:element>
|
16046
|
+
</xsl:template>
|
16047
|
+
|
16031
16048
|
<xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
|
16032
16049
|
<xsl:apply-templates mode="update_xml_step1"/>
|
16033
16050
|
</xsl:template>
|
@@ -17489,6 +17506,12 @@
|
|
17489
17506
|
</xsl:if>
|
17490
17507
|
</xsl:template>
|
17491
17508
|
|
17509
|
+
<xsl:template name="setIDforNamedDestinationInline">
|
17510
|
+
<xsl:if test="@named_dest">
|
17511
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
17512
|
+
</xsl:if>
|
17513
|
+
</xsl:template>
|
17514
|
+
|
17492
17515
|
<xsl:template name="setNamedDestination">
|
17493
17516
|
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
17494
17517
|
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
|
@@ -12195,11 +12195,11 @@
|
|
12195
12195
|
</xsl:template>
|
12196
12196
|
|
12197
12197
|
<!-- figure/fn -->
|
12198
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
12198
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
|
12199
12199
|
<!-- figure/note -->
|
12200
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
|
12200
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
|
12201
12201
|
<!-- figure/example -->
|
12202
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
|
12202
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
|
12203
12203
|
|
12204
12204
|
<!-- figure/note[@type = 'units'] -->
|
12205
12205
|
<!-- image/note[@type = 'units'] -->
|
@@ -15746,6 +15746,9 @@
|
|
15746
15746
|
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
15747
15747
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
15748
15748
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
15749
|
+
<!-- https://github.com/metanorma/isodoc/issues/687 -->
|
15750
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
|
15751
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
|
15749
15752
|
|
15750
15753
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
15751
15754
|
<xsl:copy>
|
@@ -16028,6 +16031,20 @@
|
|
16028
16031
|
</xsl:element>
|
16029
16032
|
</xsl:template>
|
16030
16033
|
|
16034
|
+
<xsl:template match="*[local-name() = 'fmt-source']"/>
|
16035
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
|
16036
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
16037
|
+
<xsl:copy-of select="@*"/>
|
16038
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
16039
|
+
</xsl:element>
|
16040
|
+
</xsl:template>
|
16041
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
|
16042
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
16043
|
+
<xsl:copy-of select="@*"/>
|
16044
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
16045
|
+
</xsl:element>
|
16046
|
+
</xsl:template>
|
16047
|
+
|
16031
16048
|
<xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
|
16032
16049
|
<xsl:apply-templates mode="update_xml_step1"/>
|
16033
16050
|
</xsl:template>
|
@@ -17489,6 +17506,12 @@
|
|
17489
17506
|
</xsl:if>
|
17490
17507
|
</xsl:template>
|
17491
17508
|
|
17509
|
+
<xsl:template name="setIDforNamedDestinationInline">
|
17510
|
+
<xsl:if test="@named_dest">
|
17511
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
17512
|
+
</xsl:if>
|
17513
|
+
</xsl:template>
|
17514
|
+
|
17492
17515
|
<xsl:template name="setNamedDestination">
|
17493
17516
|
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
17494
17517
|
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
|
@@ -119,7 +119,7 @@ module IsoDoc
|
|
119
119
|
def availability_note(bib)
|
120
120
|
note = bib.at(ns("./note[@type = 'Availability']")) or return ""
|
121
121
|
id = UUIDTools::UUID.random_create.to_s
|
122
|
-
"<fn reference='#{id}'><p>#{note.content}</p></fn>"
|
122
|
+
"<fn id='_#{id}' reference='#{id}'><p>#{note.content}</p></fn>"
|
123
123
|
end
|
124
124
|
|
125
125
|
def omit_docid_prefix(prefix)
|
@@ -34,14 +34,14 @@ module IsoDoc
|
|
34
34
|
def unwrap_definition1(d)
|
35
35
|
%w(verbal-definition non-verbal-representation).each do |e|
|
36
36
|
v = d.at(ns("./#{e}")) or next
|
37
|
-
if v.elements.all? { |n| %w(
|
37
|
+
if v.elements.all? { |n| %w(source p).include?(n.name) }
|
38
38
|
p = v.xpath(ns("./p"))
|
39
|
-
s = v.xpath(ns("./
|
39
|
+
s = v.xpath(ns("./source"))
|
40
40
|
s.empty? or s = " (#{s.map { |x| to_xml(x) }.join})"
|
41
41
|
v.children =
|
42
42
|
"#{p.map(&:children).map { |x| to_xml(x) }.join("\n")}#{s}"
|
43
43
|
else
|
44
|
-
s = v.xpath(ns("./
|
44
|
+
s = v.xpath(ns("./source"))
|
45
45
|
unless s.empty?
|
46
46
|
s[0].previous = " ("
|
47
47
|
s[-1].next = ")"
|
@@ -117,7 +117,7 @@ module IsoDoc
|
|
117
117
|
def collapse_term_pref(opt)
|
118
118
|
p = opt[:pref]
|
119
119
|
p.text.strip.empty? and return "**TERM NOT FOUND**"
|
120
|
-
s = p.xpath(ns(".//semx[@element = '
|
120
|
+
s = p.xpath(ns(".//semx[@element = 'source']"))
|
121
121
|
unless s.empty?
|
122
122
|
s[0].previous = " ("
|
123
123
|
s[-1].next = ")"
|
@@ -267,6 +267,10 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
267
267
|
<value>justified</value>
|
268
268
|
</choice>
|
269
269
|
</define>
|
270
|
+
<define name="IdRefType">
|
271
|
+
<a:documentation>Type of cross-references to elements. In BasicDoc, these always point to id { xsd:ID } </a:documentation>
|
272
|
+
<data type="IDREF"/>
|
273
|
+
</define>
|
270
274
|
<define name="RequiredId">
|
271
275
|
<a:documentation>Mandatory anchor of element, to be used for cross-references within the document</a:documentation>
|
272
276
|
<attribute name="id">
|
@@ -409,13 +413,13 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
409
413
|
<attribute name="from">
|
410
414
|
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
411
415
|
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
412
|
-
<
|
416
|
+
<ref name="IdRefType"/>
|
413
417
|
</attribute>
|
414
418
|
</optional>
|
415
419
|
<optional>
|
416
420
|
<attribute name="to">
|
417
421
|
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
418
|
-
<
|
422
|
+
<ref name="IdRefType"/>
|
419
423
|
</attribute>
|
420
424
|
</optional>
|
421
425
|
</define>
|
@@ -1504,7 +1508,7 @@ Restricted recursively to contain only other such inline elements with no identi
|
|
1504
1508
|
<attribute name="to">
|
1505
1509
|
<a:documentation>A reference to an anchor element (typically a bookmark),
|
1506
1510
|
to indicate that the index range covers a range of locations between the current index element and the `to` anchor</a:documentation>
|
1507
|
-
<
|
1511
|
+
<ref name="IdRefType"/>
|
1508
1512
|
</attribute>
|
1509
1513
|
</optional>
|
1510
1514
|
<ref name="index-primary">
|
@@ -1662,7 +1666,7 @@ which can be bookmarks as well as block or section references</a:documentation>
|
|
1662
1666
|
<define name="XrefAttributes">
|
1663
1667
|
<attribute name="target">
|
1664
1668
|
<a:documentation>The identifier of a section, block or inlined element being referenced</a:documentation>
|
1665
|
-
<
|
1669
|
+
<ref name="IdRefType"/>
|
1666
1670
|
</attribute>
|
1667
1671
|
<optional>
|
1668
1672
|
<attribute name="type">
|
@@ -1723,7 +1727,7 @@ The target of a footnote is the location it is embedded in within the text</a:do
|
|
1723
1727
|
<attribute name="target">
|
1724
1728
|
<a:documentation>The target of the callout is understood to be the location of the callout within the source code;
|
1725
1729
|
the extent of the target is not expressed overtly</a:documentation>
|
1726
|
-
<
|
1730
|
+
<ref name="IdRefType"/>
|
1727
1731
|
</attribute>
|
1728
1732
|
<text>
|
1729
1733
|
<a:documentation>The label of the callout, used to identify its target within the source code</a:documentation>
|
@@ -30,7 +30,7 @@ module Metanorma
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def initial_note(xml)
|
33
|
-
n = xml.at("//boilerplate//note[@
|
33
|
+
n = xml.at("//boilerplate//note[@anchor = 'boilerplate_front']")
|
34
34
|
s = xml.at("//sections")
|
35
35
|
(n && s) or return
|
36
36
|
s.children.empty? and s << " "
|
@@ -39,7 +39,7 @@ module Metanorma
|
|
39
39
|
|
40
40
|
def word_usage(xml)
|
41
41
|
@document_scheme == "ieee-sa-2021" or return
|
42
|
-
n = xml.at("//boilerplate//clause[@
|
42
|
+
n = xml.at("//boilerplate//clause[@anchor = 'boilerplate_word_usage']")
|
43
43
|
&.remove
|
44
44
|
s = xml.at("//clause[@type = 'overview']")
|
45
45
|
(n && s) or return
|
@@ -155,13 +155,13 @@ module Metanorma
|
|
155
155
|
populate_participants(xml, k.to_s, v)
|
156
156
|
end
|
157
157
|
p = xml.at(".//p[@type = 'emeritus_sign']")
|
158
|
-
ul = xml.at("//clause[@
|
158
|
+
ul = xml.at("//clause[@anchor = 'boilerplate-participants-sb']//ul")
|
159
159
|
p && ul and ul.next = p
|
160
160
|
xml.at("//sections//clause[@type = 'participants']")&.remove
|
161
161
|
end
|
162
162
|
|
163
163
|
def populate_participants(xml, target, subtitle)
|
164
|
-
t = xml.at("//clause[@
|
164
|
+
t = xml.at("//clause[@anchor = '#{target}']/membership") or return
|
165
165
|
s = xml.xpath("//clause[@type = 'participants']/clause").detect do |x|
|
166
166
|
n = x.at("./title") and n.text.strip.downcase == subtitle
|
167
167
|
end
|
@@ -91,7 +91,7 @@ module Metanorma
|
|
91
91
|
ieee = xmldoc.xpath("//references/bibitem")
|
92
92
|
.each_with_object({}) do |b, m|
|
93
93
|
bib_pubs(b).include?(IEEE) and
|
94
|
-
m[b["
|
94
|
+
m[b["anchor"]] = b.at("./docidentifier[@scope = 'trademark']")&.text
|
95
95
|
end
|
96
96
|
trademark_ieee_erefs1(xmldoc, "//preface//eref", ieee)
|
97
97
|
trademark_ieee_erefs1(xmldoc, "//sections//eref | //annex//eref", ieee)
|
@@ -34,12 +34,12 @@ module Metanorma
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def clause_attrs_preprocess(attrs, node)
|
37
|
-
case node.title
|
38
|
-
when "
|
39
|
-
when "
|
40
|
-
when "
|
41
|
-
when "
|
42
|
-
when "
|
37
|
+
case node.title.downcase
|
38
|
+
when "purpose" then attrs[:type] = "purpose"
|
39
|
+
when "overview" then attrs[:type] = "overview"
|
40
|
+
when "scope" then attrs[:type] = "scope"
|
41
|
+
when "word usage" then attrs[:type] = "word-usage"
|
42
|
+
when "participants" then attrs[:type] = "participants"
|
43
43
|
end
|
44
44
|
super
|
45
45
|
end
|
@@ -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.0.
|
3
|
+
<!-- VERSION v2.0.5 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -36,6 +36,12 @@
|
|
36
36
|
</zeroOrMore>
|
37
37
|
</element>
|
38
38
|
</define>
|
39
|
+
<define name="IdRefType">
|
40
|
+
<a:documentation>Cross-references are not normalised to xsd:IDREF in Semantic XML: that is deferred to Presentation XML.
|
41
|
+
All IdRefType instances point not to `@id` in Semantic XML, which is the Content GUID for an element,
|
42
|
+
but to `@anchor`, the user-supplied cross-reference</a:documentation>
|
43
|
+
<text/>
|
44
|
+
</define>
|
39
45
|
<define name="index-primary">
|
40
46
|
<element name="primary">
|
41
47
|
<oneOrMore>
|
@@ -238,7 +244,7 @@
|
|
238
244
|
<a:documentation>Notes specific to this block</a:documentation>
|
239
245
|
</ref>
|
240
246
|
</zeroOrMore>
|
241
|
-
<ref name="
|
247
|
+
<ref name="BlockSource">
|
242
248
|
<a:documentation>A source for the table</a:documentation>
|
243
249
|
</ref>
|
244
250
|
</define>
|
@@ -262,10 +268,112 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
262
268
|
<a:documentation>Notes whose scope is the current block</a:documentation>
|
263
269
|
</ref>
|
264
270
|
</zeroOrMore>
|
265
|
-
<ref name="
|
271
|
+
<ref name="BlockSource">
|
272
|
+
<a:documentation>A source for the block</a:documentation>
|
273
|
+
</ref>
|
274
|
+
</define>
|
275
|
+
<define name="FigureBody">
|
276
|
+
<optional>
|
277
|
+
<ref name="tname">
|
278
|
+
<a:documentation>The caption of the block</a:documentation>
|
279
|
+
</ref>
|
280
|
+
</optional>
|
281
|
+
<choice>
|
282
|
+
<a:documentation>Content of the figure</a:documentation>
|
283
|
+
<ref name="image"/>
|
284
|
+
<ref name="video"/>
|
285
|
+
<ref name="audio"/>
|
286
|
+
<ref name="pre"/>
|
287
|
+
<oneOrMore>
|
288
|
+
<ref name="paragraph-with-footnote"/>
|
289
|
+
</oneOrMore>
|
290
|
+
<zeroOrMore>
|
291
|
+
<ref name="figure"/>
|
292
|
+
</zeroOrMore>
|
293
|
+
</choice>
|
294
|
+
<zeroOrMore>
|
295
|
+
<ref name="fn">
|
296
|
+
<a:documentation>Footnotes specific to the figure</a:documentation>
|
297
|
+
</ref>
|
298
|
+
</zeroOrMore>
|
299
|
+
<optional>
|
300
|
+
<ref name="dl">
|
301
|
+
<a:documentation>An optional definitions list defining any symbols used in the figure</a:documentation>
|
302
|
+
</ref>
|
303
|
+
</optional>
|
304
|
+
<zeroOrMore>
|
305
|
+
<ref name="note">
|
306
|
+
<a:documentation>Notes whose scope is the current block</a:documentation>
|
307
|
+
</ref>
|
308
|
+
</zeroOrMore>
|
309
|
+
<ref name="BlockSource">
|
266
310
|
<a:documentation>A source for the block</a:documentation>
|
267
311
|
</ref>
|
268
312
|
</define>
|
313
|
+
<define name="FigureNoIdBody">
|
314
|
+
<optional>
|
315
|
+
<ref name="source">
|
316
|
+
<a:documentation>A URI or other reference intended to link to an externally hosted image (or equivalent)</a:documentation>
|
317
|
+
</ref>
|
318
|
+
</optional>
|
319
|
+
<optional>
|
320
|
+
<ref name="tname">
|
321
|
+
<a:documentation>The caption of the block</a:documentation>
|
322
|
+
</ref>
|
323
|
+
</optional>
|
324
|
+
<choice>
|
325
|
+
<a:documentation>Content of the figure</a:documentation>
|
326
|
+
<ref name="image-no-id"/>
|
327
|
+
<ref name="video-no-id"/>
|
328
|
+
<ref name="audio-no-id"/>
|
329
|
+
<ref name="pre-no-id"/>
|
330
|
+
<oneOrMore>
|
331
|
+
<ref name="paragraph-with-footnote-no-id"/>
|
332
|
+
</oneOrMore>
|
333
|
+
<zeroOrMore>
|
334
|
+
<ref name="figure-no-id"/>
|
335
|
+
</zeroOrMore>
|
336
|
+
</choice>
|
337
|
+
<zeroOrMore>
|
338
|
+
<ref name="fn">
|
339
|
+
<a:documentation>Footnotes specific to the figure</a:documentation>
|
340
|
+
</ref>
|
341
|
+
</zeroOrMore>
|
342
|
+
<optional>
|
343
|
+
<ref name="dl-no-id">
|
344
|
+
<a:documentation>An optional definitions list defining any symbols used in the figure</a:documentation>
|
345
|
+
</ref>
|
346
|
+
</optional>
|
347
|
+
<zeroOrMore>
|
348
|
+
<ref name="note-no-id">
|
349
|
+
<a:documentation>Notes whose scope is the current block</a:documentation>
|
350
|
+
</ref>
|
351
|
+
</zeroOrMore>
|
352
|
+
<ref name="BlockSource">
|
353
|
+
<a:documentation>A source for the block</a:documentation>
|
354
|
+
</ref>
|
355
|
+
</define>
|
356
|
+
<define name="source">
|
357
|
+
<element name="source">
|
358
|
+
<attribute name="status">
|
359
|
+
<a:documentation>The status of the term as it is used in this document, relative to its definition in the original document</a:documentation>
|
360
|
+
<ref name="SourceStatusType"/>
|
361
|
+
</attribute>
|
362
|
+
<attribute name="type">
|
363
|
+
<a:documentation>The type of the managed term in the present context</a:documentation>
|
364
|
+
<ref name="SourceTypeType"/>
|
365
|
+
</attribute>
|
366
|
+
<ref name="origin">
|
367
|
+
<a:documentation>The original document and location where the term definition has been obtained from</a:documentation>
|
368
|
+
</ref>
|
369
|
+
<optional>
|
370
|
+
<ref name="modification">
|
371
|
+
<a:documentation>Any changes that the definition of the term has undergone relative to the original document,
|
372
|
+
in order to be applicable in this standardisation document</a:documentation>
|
373
|
+
</ref>
|
374
|
+
</optional>
|
375
|
+
</element>
|
376
|
+
</define>
|
269
377
|
<define name="sourcecodebody">
|
270
378
|
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
271
379
|
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
@@ -687,6 +795,20 @@ titlecase, or lowercase</a:documentation>
|
|
687
795
|
</attribute>
|
688
796
|
</optional>
|
689
797
|
</define>
|
798
|
+
<define name="RequiredId" combine="interleave">
|
799
|
+
<optional>
|
800
|
+
<attribute name="anchor">
|
801
|
+
<a:documentation>User-supplied anchor of element; replaced by content-based id, with all references to the anchor updated accordingly</a:documentation>
|
802
|
+
</attribute>
|
803
|
+
</optional>
|
804
|
+
</define>
|
805
|
+
<define name="OptionalId" combine="interleave">
|
806
|
+
<optional>
|
807
|
+
<attribute name="anchor">
|
808
|
+
<a:documentation> User-supplied anchor of element; replaced by content-based id, with all references to the anchor updated accordingly</a:documentation>
|
809
|
+
</attribute>
|
810
|
+
</optional>
|
811
|
+
</define>
|
690
812
|
<define name="ObligationType">
|
691
813
|
<a:documentation>The force of a clause in a standard document: whether it has normative or informative effect</a:documentation>
|
692
814
|
<choice>
|
@@ -1081,7 +1203,7 @@ That concept may be defined as a term within the current document, or it may be
|
|
1081
1203
|
<element name="label">
|
1082
1204
|
<!-- Identifier of form input element that this element is a label of -->
|
1083
1205
|
<attribute name="for">
|
1084
|
-
<
|
1206
|
+
<ref name="IdRefType"/>
|
1085
1207
|
</attribute>
|
1086
1208
|
<zeroOrMore>
|
1087
1209
|
<ref name="PureTextElement"/>
|
@@ -2121,7 +2243,7 @@ used in document amendments</a:documentation>
|
|
2121
2243
|
</define>
|
2122
2244
|
<define name="termsource">
|
2123
2245
|
<a:documentation>The bibliographic source where a term is defined in the sense applicable in this standardisation document</a:documentation>
|
2124
|
-
<element name="
|
2246
|
+
<element name="source">
|
2125
2247
|
<attribute name="status">
|
2126
2248
|
<a:documentation>The status of the term as it is used in this document, relative to its definition in the original document</a:documentation>
|
2127
2249
|
<ref name="SourceStatusType"/>
|
@@ -2503,6 +2625,11 @@ Normative References contents contain normative references, but as a clause in t
|
|
2503
2625
|
<ref name="termsource"/>
|
2504
2626
|
</zeroOrMore>
|
2505
2627
|
</define>
|
2628
|
+
<define name="BlockSource">
|
2629
|
+
<zeroOrMore>
|
2630
|
+
<ref name="source"/>
|
2631
|
+
</zeroOrMore>
|
2632
|
+
</define>
|
2506
2633
|
<start>
|
2507
2634
|
<ref name="standard-document"/>
|
2508
2635
|
</start>
|
@@ -4,8 +4,6 @@ module Metanorma
|
|
4
4
|
def remove_missing_ref_term(node, _target, type)
|
5
5
|
type == "symbol" and return super
|
6
6
|
node.at("../xrefrender")&.remove
|
7
|
-
#node.replace("<preferred><expression><name>#{node.children.to_xml}"\
|
8
|
-
# "</name></expression></preferred>")
|
9
7
|
node.replace("<refterm>#{node.children.to_xml}</refterm>")
|
10
8
|
end
|
11
9
|
end
|
@@ -77,7 +77,7 @@ module Metanorma
|
|
77
77
|
root.xpath("//references[@normative = 'true']/bibitem").each do |b|
|
78
78
|
b.at(".//date") or
|
79
79
|
@log.add("Style", b,
|
80
|
-
"Normative reference #{b
|
80
|
+
"Normative reference #{b.at('./@anchor')&.text} is not dated.")
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
@@ -99,12 +99,8 @@ module Metanorma
|
|
99
99
|
# Style manual 13.1
|
100
100
|
def onlychild_clause_validate(root)
|
101
101
|
root.xpath(Standoc::Utils::SUBCLAUSE_XPATH).each do |c|
|
102
|
-
|
103
|
-
|
104
|
-
title = c.at("./title")
|
105
|
-
location = c["id"] || "#{c.text[0..60]}..."
|
106
|
-
location += ":#{title.text}" if c["id"] && !title.nil?
|
107
|
-
@log.add("Style", nil, "#{location}: subclause is only child")
|
102
|
+
c.xpath("../clause").size == 1 or next
|
103
|
+
@log.add("Style", c, "subclause is only child")
|
108
104
|
end
|
109
105
|
end
|
110
106
|
|
@@ -2,7 +2,7 @@ module Metanorma
|
|
2
2
|
module Ieee
|
3
3
|
class Converter < Standoc::Converter
|
4
4
|
ASSETS_TO_STYLE =
|
5
|
-
"//
|
5
|
+
"//term//source | //formula | //termnote | " \
|
6
6
|
"//p[not(ancestor::boilerplate)] | //li[not(p)] | //dt | " \
|
7
7
|
"//dd[not(p)] | //td[not(p)][not(ancestor::boilerplate)] | " \
|
8
8
|
"//th[not(p)][not(ancestor::boilerplate)] | //example".freeze
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ieee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|