metanorma-ietf 3.5.8 → 3.6.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/lib/isodoc/ietf/blocks.rb +9 -2
- data/lib/isodoc/ietf/cleanup_blocks.rb +1 -1
- data/lib/isodoc/ietf/reqt.rb +1 -1
- data/lib/isodoc/ietf/section.rb +1 -1
- data/lib/metanorma/ietf/blocks.rb +2 -3
- data/lib/metanorma/ietf/cleanup.rb +2 -2
- data/lib/metanorma/ietf/isodoc.rng +51 -6
- data/lib/metanorma/ietf/version.rb +1 -1
- data/lib/relaton/render/template.rb +4 -4
- 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: 89f6ac422dac62904d909f6993446eb129be1d8c7e4de293efff0a00d7a214f6
|
4
|
+
data.tar.gz: 2e143432805fa1d7cd1cb206b7c7145b957771819ad222674583380923576104
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 990260a7fbc5f14ee4df3d5b354fc2f4e5cf7f5e2ab5192350cf2fec94da5bef65a506726eda678faf76f54381e0344d9f9d4ebdafe9557379193c15c23caa2d
|
7
|
+
data.tar.gz: f95f99fc706252db1900bd701a13d6f95903db3340b764e67728a88e4549efd4b80222769ea88c04852b8eda19732a306f76591bd6bb308c71f5550545b78949
|
data/lib/isodoc/ietf/blocks.rb
CHANGED
@@ -83,10 +83,10 @@ module IsoDoc
|
|
83
83
|
|
84
84
|
def annotation_parse(node, out)
|
85
85
|
@sourcecode = false
|
86
|
-
node.at(ns("./annotation")) or return
|
86
|
+
node.at(ns("./callout-annotation")) or return
|
87
87
|
out.t { |p| p << @i18n.key }
|
88
88
|
out.dl do |dl|
|
89
|
-
node.xpath(ns("./annotation")).each do |a|
|
89
|
+
node.xpath(ns("./callout-annotation")).each do |a|
|
90
90
|
annotation_parse1(a, dl)
|
91
91
|
end
|
92
92
|
end
|
@@ -162,7 +162,14 @@ module IsoDoc
|
|
162
162
|
end
|
163
163
|
end
|
164
164
|
|
165
|
+
def render_annotations?(node)
|
166
|
+
node.at(ns("//presentation-metadata/render-document-annotations"))
|
167
|
+
&.text == "true" ||
|
168
|
+
node.at(ns("//bibdata/ext/notedraftinprogress"))
|
169
|
+
end
|
170
|
+
|
165
171
|
def review_note_parse(node, out)
|
172
|
+
render_annotations?(node) or return
|
166
173
|
out.cref **attr_code(anchor: node["id"], display: node["display"],
|
167
174
|
source: node["reviewer"], from: node["from"]) do |c|
|
168
175
|
if name = node.at(ns("./name"))
|
@@ -109,7 +109,7 @@ module IsoDoc
|
|
109
109
|
def sourcecode_remove_markup(node)
|
110
110
|
node.traverse do |n|
|
111
111
|
n.text? and next
|
112
|
-
%w(name callout annotation note sourcecode).include? n.name and next
|
112
|
+
%w(name callout callout-annotation note sourcecode).include? n.name and next
|
113
113
|
sourcecode_remove_markup_elem(n)
|
114
114
|
end
|
115
115
|
end
|
data/lib/isodoc/ietf/reqt.rb
CHANGED
data/lib/isodoc/ietf/section.rb
CHANGED
@@ -38,14 +38,13 @@ module Metanorma
|
|
38
38
|
))
|
39
39
|
end
|
40
40
|
|
41
|
-
def
|
41
|
+
def sidebar_attrs(node)
|
42
42
|
super.merge(attr_code(display: node.attr("display")))
|
43
43
|
end
|
44
44
|
|
45
45
|
def sidebar(node)
|
46
|
-
draft? or return
|
47
46
|
noko do |xml|
|
48
|
-
xml.
|
47
|
+
xml.annotation **sidebar_attrs(node) do |r|
|
49
48
|
block_title(node, r)
|
50
49
|
wrap_in_para(node, r)
|
51
50
|
end
|
@@ -36,14 +36,14 @@ module Metanorma
|
|
36
36
|
|
37
37
|
def cref_cleanup(xmldoc)
|
38
38
|
xmldoc.xpath("//crefref").each do |r|
|
39
|
-
if c = xmldoc.at("//
|
39
|
+
if c = xmldoc.at("//annotation[@anchor = '#{r.text}']")
|
40
40
|
id = "_#{UUIDTools::UUID.random_create}"
|
41
41
|
c["from"] = id
|
42
42
|
c["to"] = id
|
43
43
|
r.replace("<bookmark id='#{id}'/>")
|
44
44
|
else
|
45
45
|
@log.add("Crossrefences", r,
|
46
|
-
"No matching
|
46
|
+
"No matching annotation for cref:[#{r.text}]", severity: 1)
|
47
47
|
end
|
48
48
|
end
|
49
49
|
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.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>
|
@@ -17,10 +17,10 @@ module Relaton
|
|
17
17
|
module Ietf
|
18
18
|
module Template
|
19
19
|
class Name < ::Relaton::Render::Template::Name
|
20
|
-
def
|
21
|
-
super
|
22
|
-
::
|
23
|
-
|
20
|
+
def create_liquid_environment
|
21
|
+
env = super
|
22
|
+
env.register_filter(::Relaton::Render::Template::Ascii)
|
23
|
+
env
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ietf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
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-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-ietf-data
|