metanorma-iso 3.0.10 → 3.1.0
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/Gemfile +2 -0
- data/lib/isodoc/iso/base_convert.rb +0 -4
- data/lib/isodoc/iso/iso.amendment.xsl +807 -666
- data/lib/isodoc/iso/iso.international-standard.xsl +807 -666
- data/lib/isodoc/iso/presentation_section.rb +5 -5
- data/lib/isodoc/iso/presentation_xml_convert.rb +1 -1
- data/lib/isodoc/iso/word_cleanup.rb +1 -0
- data/lib/metanorma/iso/base.rb +3 -3
- data/lib/metanorma/iso/cleanup.rb +3 -0
- data/lib/metanorma/iso/isodoc.rng +51 -6
- data/lib/metanorma/iso/version.rb +1 -1
- metadata +2 -2
@@ -29,13 +29,13 @@ module IsoDoc
|
|
29
29
|
def warning_for_missing_metadata_post(docxml, ret)
|
30
30
|
from = docxml.at(ns("//sections/*/@id"))&.text or return
|
31
31
|
ret = <<~REVIEW
|
32
|
-
<
|
32
|
+
<annotation date='#{Date.today}' reviewer='Metanorma' #{add_id_text} from='#{from}' to='#{from}'>
|
33
33
|
<p><strong>Metadata warnings:</strong></p> #{ret}
|
34
|
-
</
|
34
|
+
</annotation>
|
35
35
|
REVIEW
|
36
|
-
unless ins = docxml.at(ns("//
|
37
|
-
docxml.root << "<
|
38
|
-
ins = docxml.at(ns("//
|
36
|
+
unless ins = docxml.at(ns("//annotation-container"))
|
37
|
+
docxml.root << "<annotation-container></annotation-container>"
|
38
|
+
ins = docxml.at(ns("//annotation-container"))
|
39
39
|
end
|
40
40
|
ins.add_first_child ret
|
41
41
|
end
|
@@ -139,7 +139,7 @@ module IsoDoc
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def table1_fmt_xref_modspec(elem)
|
142
|
-
p = elem.parent.parent.at(ns("./fmt-xref-label"))
|
142
|
+
p = elem.parent.parent.at(ns("./fmt-xref-label")) or return
|
143
143
|
t = elem.at(ns("./fmt-xref-label"))&.remove or return
|
144
144
|
n = t.at(ns("./span[@class='fmt-element-name'][2]")) or return
|
145
145
|
while i = n.next
|
@@ -123,6 +123,7 @@ module IsoDoc
|
|
123
123
|
|
124
124
|
def authority_copyright_style(auth)
|
125
125
|
auth.xpath(".//p[not(@class)]").each { |p| p["class"] = "zzCopyright" }
|
126
|
+
auth.xpath(".//p[@class = 'Tablebody']").each { |p| p["class"] = "zzCopyright" }
|
126
127
|
auth.xpath(".//p[@id = 'boilerplate-message']").each do |p|
|
127
128
|
p["class"] = "zzCopyright1"
|
128
129
|
end
|
data/lib/metanorma/iso/base.rb
CHANGED
@@ -65,9 +65,9 @@ module Metanorma
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def ol_attrs(node)
|
68
|
-
|
69
|
-
|
70
|
-
|
68
|
+
ret = super
|
69
|
+
ret.delete(:type)
|
70
|
+
ret
|
71
71
|
end
|
72
72
|
|
73
73
|
def admonition_name(node)
|
@@ -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.8 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -72,6 +72,46 @@ but to `@anchor`, the user-supplied cross-reference</a:documentation>
|
|
72
72
|
</oneOrMore>
|
73
73
|
</element>
|
74
74
|
</define>
|
75
|
+
<define name="review">
|
76
|
+
<a:documentation>Generalise BasicDoc element from just review comments, to general annotations;
|
77
|
+
the type attribute defaults to `review` for reviews</a:documentation>
|
78
|
+
<element name="annotation">
|
79
|
+
<ref name="RequiredId"/>
|
80
|
+
<ref name="ReviewAttributes"/>
|
81
|
+
<oneOrMore>
|
82
|
+
<ref name="paragraph">
|
83
|
+
<a:documentation>Reviewer comments content</a:documentation>
|
84
|
+
</ref>
|
85
|
+
</oneOrMore>
|
86
|
+
</element>
|
87
|
+
</define>
|
88
|
+
<define name="ruby_pronunciation">
|
89
|
+
<a:documentation>Ruby annotation giving pronunciation of text: change tag from BasicDoc for disambiguation</a:documentation>
|
90
|
+
<element name="ruby-pronunciation">
|
91
|
+
<attribute name="value">
|
92
|
+
<a:documentation>Ruby annotation value</a:documentation>
|
93
|
+
</attribute>
|
94
|
+
<ref name="LocalizedStringAttributes"/>
|
95
|
+
</element>
|
96
|
+
</define>
|
97
|
+
<define name="ruby_annotation">
|
98
|
+
<a:documentation>Ruby annotation giving information other than pronunciation of text: change tag from BasicDoc for disambiguation</a:documentation>
|
99
|
+
<element name="ruby-annotation">
|
100
|
+
<attribute name="value">
|
101
|
+
<a:documentation>Ruby annotation value</a:documentation>
|
102
|
+
</attribute>
|
103
|
+
<ref name="LocalizedStringAttributes"/>
|
104
|
+
</element>
|
105
|
+
</define>
|
106
|
+
<define name="annotation">
|
107
|
+
<a:documentation>Source code annotation, corresponding to a callout</a:documentation>
|
108
|
+
<element name="callout-annotation">
|
109
|
+
<ref name="RequiredId"/>
|
110
|
+
<oneOrMore>
|
111
|
+
<ref name="paragraph"/>
|
112
|
+
</oneOrMore>
|
113
|
+
</element>
|
114
|
+
</define>
|
75
115
|
<define name="section-title">
|
76
116
|
<a:documentation>Title(s) of a clause</a:documentation>
|
77
117
|
<element name="title">
|
@@ -540,7 +580,7 @@ normative or informative references, some split references into sections organiz
|
|
540
580
|
<ref name="OptionalId"/>
|
541
581
|
<optional>
|
542
582
|
<attribute name="style">
|
543
|
-
<a:documentation>CSS style: only background-color supported</a:documentation>
|
583
|
+
<a:documentation>CSS style: only background-color, color, border supported</a:documentation>
|
544
584
|
</attribute>
|
545
585
|
</optional>
|
546
586
|
</define>
|
@@ -620,7 +660,7 @@ This is done if the footnote reference is already presented in some other form,
|
|
620
660
|
<ref name="RequiredId"/>
|
621
661
|
<optional>
|
622
662
|
<attribute name="style">
|
623
|
-
<a:documentation>CSS style: only background-color supported</a:documentation>
|
663
|
+
<a:documentation>CSS style: only background-color, color, border supported</a:documentation>
|
624
664
|
</attribute>
|
625
665
|
</optional>
|
626
666
|
</define>
|
@@ -700,6 +740,11 @@ titlecase, or lowercase</a:documentation>
|
|
700
740
|
<a:documentation>Width of the table block in rendering</a:documentation>
|
701
741
|
</attribute>
|
702
742
|
</optional>
|
743
|
+
<optional>
|
744
|
+
<attribute name="style">
|
745
|
+
<a:documentation>CSS style: only background-color, color, border supported</a:documentation>
|
746
|
+
</attribute>
|
747
|
+
</optional>
|
703
748
|
<ref name="BlockAttributes"/>
|
704
749
|
</define>
|
705
750
|
<define name="FigureAttributes" combine="interleave">
|
@@ -1417,7 +1462,7 @@ numbers</a:documentation>
|
|
1417
1462
|
</optional>
|
1418
1463
|
<ref name="DocumentBody"/>
|
1419
1464
|
<optional>
|
1420
|
-
<ref name="
|
1465
|
+
<ref name="annotation-container">
|
1421
1466
|
<a:documentation>Annotations to the document</a:documentation>
|
1422
1467
|
</ref>
|
1423
1468
|
</optional>
|
@@ -1461,8 +1506,8 @@ numbers</a:documentation>
|
|
1461
1506
|
</oneOrMore>
|
1462
1507
|
</element>
|
1463
1508
|
</define>
|
1464
|
-
<define name="
|
1465
|
-
<element name="
|
1509
|
+
<define name="annotation-container">
|
1510
|
+
<element name="annotation-container">
|
1466
1511
|
<oneOrMore>
|
1467
1512
|
<ref name="review"/>
|
1468
1513
|
</oneOrMore>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|