metanorma-itu 2.3.6 → 2.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -8
- data/lib/isodoc/itu/html/_coverpage.css +8 -0
- data/lib/isodoc/itu/html/htmlstyle.css +16 -0
- data/lib/isodoc/itu/itu.implementers-guide.xsl +2 -2
- data/lib/isodoc/itu/itu.in-force.xsl +2 -2
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +2 -2
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +2 -2
- data/lib/isodoc/itu/itu.recommendation.xsl +2 -2
- data/lib/isodoc/itu/itu.resolution.xsl +2 -2
- data/lib/isodoc/itu/itu.service-publication.xsl +2 -2
- data/lib/isodoc/itu/itu.technical-paper.xsl +2 -2
- data/lib/isodoc/itu/itu.technical-report.xsl +2 -2
- data/lib/metanorma/itu/basicdoc.rng +26 -17
- data/lib/metanorma/itu/cleanup.rb +5 -4
- data/lib/metanorma/itu/converter.rb +2 -1
- data/lib/metanorma/itu/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: 8e5ccf7d02a156a8e35cb60e886610fb211bfc8c350e30cfb2930b7d9c607067
|
4
|
+
data.tar.gz: 792305bd1bacc71c47b9158944b1ffec6351976cf2d413c34caae9bbcbf19d61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b332a7f7b7c3bbb22b141bb24c68df4610d0c35f5d6977f8e5c3091c79a8f0d6598bf9a68679a3dc852b474fd50cb2c291a95dcd35d8c1ebf22a56df465e1e9
|
7
|
+
data.tar.gz: d7230a61d6d476864006fc9b660d6bdfbaaeaa09697adeb31a19f0e36c243b4af0d70d56b59f1c7dc480bbd6ee19c79da53ae7e1e318119054357007bd37ea06
|
data/Gemfile
CHANGED
@@ -4,12 +4,6 @@ Encoding.default_internal = Encoding::UTF_8
|
|
4
4
|
source "https://rubygems.org"
|
5
5
|
git_source(:github) { |repo| "https://github.com/#{repo}" }
|
6
6
|
|
7
|
-
group :development, :test do
|
8
|
-
gem "rspec"
|
9
|
-
end
|
10
|
-
|
11
|
-
if File.exist? "Gemfile.devel"
|
12
|
-
eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
|
13
|
-
end
|
14
|
-
|
15
7
|
gemspec
|
8
|
+
|
9
|
+
eval_gemfile("Gemfile.devel") rescue nil
|
@@ -132,6 +132,14 @@ a.FootnoteRef, span.FootnoteRef {
|
|
132
132
|
color: red;
|
133
133
|
text-decoration: line-through; }
|
134
134
|
|
135
|
+
ruby {
|
136
|
+
ruby-position: over;
|
137
|
+
-webkit-ruby-position: before; }
|
138
|
+
|
139
|
+
ruby ruby {
|
140
|
+
ruby-position: under;
|
141
|
+
-webkit-ruby-position: after; }
|
142
|
+
|
135
143
|
/* code highlighting with line numbers */
|
136
144
|
table.rouge-line-table td.rouge-gutter {
|
137
145
|
-moz-user-select: none;
|
@@ -132,6 +132,14 @@ a.FootnoteRef, span.FootnoteRef {
|
|
132
132
|
color: red;
|
133
133
|
text-decoration: line-through; }
|
134
134
|
|
135
|
+
ruby {
|
136
|
+
ruby-position: over;
|
137
|
+
-webkit-ruby-position: before; }
|
138
|
+
|
139
|
+
ruby ruby {
|
140
|
+
ruby-position: under;
|
141
|
+
-webkit-ruby-position: after; }
|
142
|
+
|
135
143
|
/* code highlighting with line numbers */
|
136
144
|
table.rouge-line-table td.rouge-gutter {
|
137
145
|
-moz-user-select: none;
|
@@ -415,6 +423,14 @@ a.FootnoteRef, span.FootnoteRef {
|
|
415
423
|
color: red;
|
416
424
|
text-decoration: line-through; }
|
417
425
|
|
426
|
+
ruby {
|
427
|
+
ruby-position: over;
|
428
|
+
-webkit-ruby-position: before; }
|
429
|
+
|
430
|
+
ruby ruby {
|
431
|
+
ruby-position: under;
|
432
|
+
-webkit-ruby-position: after; }
|
433
|
+
|
418
434
|
/* code highlighting with line numbers */
|
419
435
|
table.rouge-line-table td.rouge-gutter {
|
420
436
|
-moz-user-select: none;
|
@@ -11656,10 +11656,10 @@
|
|
11656
11656
|
|
11657
11657
|
<xsl:variable name="toc_level">
|
11658
11658
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
11659
|
-
<xsl:variable name="
|
11659
|
+
<xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
|
11660
11660
|
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
11661
11661
|
<xsl:choose>
|
11662
|
-
<xsl:when test="$
|
11662
|
+
<xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11663
11663
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11664
11664
|
<xsl:otherwise><!-- default value -->
|
11665
11665
|
2
|
@@ -11656,10 +11656,10 @@
|
|
11656
11656
|
|
11657
11657
|
<xsl:variable name="toc_level">
|
11658
11658
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
11659
|
-
<xsl:variable name="
|
11659
|
+
<xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
|
11660
11660
|
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
11661
11661
|
<xsl:choose>
|
11662
|
-
<xsl:when test="$
|
11662
|
+
<xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11663
11663
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11664
11664
|
<xsl:otherwise><!-- default value -->
|
11665
11665
|
2
|
@@ -11656,10 +11656,10 @@
|
|
11656
11656
|
|
11657
11657
|
<xsl:variable name="toc_level">
|
11658
11658
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
11659
|
-
<xsl:variable name="
|
11659
|
+
<xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
|
11660
11660
|
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
11661
11661
|
<xsl:choose>
|
11662
|
-
<xsl:when test="$
|
11662
|
+
<xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11663
11663
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11664
11664
|
<xsl:otherwise><!-- default value -->
|
11665
11665
|
2
|
@@ -11656,10 +11656,10 @@
|
|
11656
11656
|
|
11657
11657
|
<xsl:variable name="toc_level">
|
11658
11658
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
11659
|
-
<xsl:variable name="
|
11659
|
+
<xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
|
11660
11660
|
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
11661
11661
|
<xsl:choose>
|
11662
|
-
<xsl:when test="$
|
11662
|
+
<xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11663
11663
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11664
11664
|
<xsl:otherwise><!-- default value -->
|
11665
11665
|
2
|
@@ -11656,10 +11656,10 @@
|
|
11656
11656
|
|
11657
11657
|
<xsl:variable name="toc_level">
|
11658
11658
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
11659
|
-
<xsl:variable name="
|
11659
|
+
<xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
|
11660
11660
|
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
11661
11661
|
<xsl:choose>
|
11662
|
-
<xsl:when test="$
|
11662
|
+
<xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11663
11663
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11664
11664
|
<xsl:otherwise><!-- default value -->
|
11665
11665
|
2
|
@@ -11656,10 +11656,10 @@
|
|
11656
11656
|
|
11657
11657
|
<xsl:variable name="toc_level">
|
11658
11658
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
11659
|
-
<xsl:variable name="
|
11659
|
+
<xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
|
11660
11660
|
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
11661
11661
|
<xsl:choose>
|
11662
|
-
<xsl:when test="$
|
11662
|
+
<xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11663
11663
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11664
11664
|
<xsl:otherwise><!-- default value -->
|
11665
11665
|
2
|
@@ -11656,10 +11656,10 @@
|
|
11656
11656
|
|
11657
11657
|
<xsl:variable name="toc_level">
|
11658
11658
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
11659
|
-
<xsl:variable name="
|
11659
|
+
<xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
|
11660
11660
|
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
11661
11661
|
<xsl:choose>
|
11662
|
-
<xsl:when test="$
|
11662
|
+
<xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11663
11663
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11664
11664
|
<xsl:otherwise><!-- default value -->
|
11665
11665
|
2
|
@@ -11656,10 +11656,10 @@
|
|
11656
11656
|
|
11657
11657
|
<xsl:variable name="toc_level">
|
11658
11658
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
11659
|
-
<xsl:variable name="
|
11659
|
+
<xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
|
11660
11660
|
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
11661
11661
|
<xsl:choose>
|
11662
|
-
<xsl:when test="$
|
11662
|
+
<xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11663
11663
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11664
11664
|
<xsl:otherwise><!-- default value -->
|
11665
11665
|
2
|
@@ -11656,10 +11656,10 @@
|
|
11656
11656
|
|
11657
11657
|
<xsl:variable name="toc_level">
|
11658
11658
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
11659
|
-
<xsl:variable name="
|
11659
|
+
<xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
|
11660
11660
|
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
11661
11661
|
<xsl:choose>
|
11662
|
-
<xsl:when test="$
|
11662
|
+
<xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11663
11663
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
11664
11664
|
<xsl:otherwise><!-- default value -->
|
11665
11665
|
2
|
@@ -715,27 +715,36 @@
|
|
715
715
|
</define>
|
716
716
|
<define name="ruby">
|
717
717
|
<element name="ruby">
|
718
|
-
<
|
719
|
-
<
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
718
|
+
<choice>
|
719
|
+
<ref name="ruby_pronunciation"/>
|
720
|
+
<ref name="ruby_annotation"/>
|
721
|
+
</choice>
|
722
|
+
<choice>
|
723
|
+
<text/>
|
724
|
+
<ref name="ruby"/>
|
725
|
+
</choice>
|
725
726
|
</element>
|
726
727
|
</define>
|
727
|
-
<define name="
|
728
|
-
<element name="
|
729
|
-
<
|
730
|
-
|
731
|
-
|
728
|
+
<define name="ruby_pronunciation">
|
729
|
+
<element name="pronunciation">
|
730
|
+
<attribute name="value"/>
|
731
|
+
<optional>
|
732
|
+
<attribute name="script"/>
|
733
|
+
</optional>
|
734
|
+
<optional>
|
735
|
+
<attribute name="lang"/>
|
736
|
+
</optional>
|
732
737
|
</element>
|
733
738
|
</define>
|
734
|
-
<define name="
|
735
|
-
<element name="
|
736
|
-
<
|
737
|
-
|
738
|
-
|
739
|
+
<define name="ruby_annotation">
|
740
|
+
<element name="annotation">
|
741
|
+
<attribute name="value"/>
|
742
|
+
<optional>
|
743
|
+
<attribute name="script"/>
|
744
|
+
</optional>
|
745
|
+
<optional>
|
746
|
+
<attribute name="lang"/>
|
747
|
+
</optional>
|
739
748
|
</element>
|
740
749
|
</define>
|
741
750
|
<define name="br">
|
@@ -11,8 +11,7 @@ module Metanorma
|
|
11
11
|
def resolution_inline_header(xml)
|
12
12
|
@doctype == "resolution" or return
|
13
13
|
xml.xpath("//clause//clause").each do |c|
|
14
|
-
|
15
|
-
|
14
|
+
(title = c.at("./title")) && !title.text&.empty? and next
|
16
15
|
c["inline-header"] = true
|
17
16
|
end
|
18
17
|
end
|
@@ -26,6 +25,8 @@ module Metanorma
|
|
26
25
|
end
|
27
26
|
|
28
27
|
def insert_missing_sections(xml)
|
28
|
+
xml.at("//metanorma-extension/semantic-metadata/" \
|
29
|
+
"headless[text() = 'true']") and return nil
|
29
30
|
insert_scope(xml)
|
30
31
|
insert_norm_ref(xml)
|
31
32
|
insert_terms(xml)
|
@@ -47,7 +48,7 @@ module Metanorma
|
|
47
48
|
ins.previous =
|
48
49
|
"<clause type='scope' #{add_id}><title>#{@i18n.scope}</title><p>" \
|
49
50
|
"#{@i18n.clause_empty}</p></clause>"
|
50
|
-
xml
|
51
|
+
xml.at("//sentinel")&.remove
|
51
52
|
end
|
52
53
|
|
53
54
|
def insert_norm_ref(xml)
|
@@ -58,7 +59,7 @@ module Metanorma
|
|
58
59
|
xml.at("//bibliography/references[@normative = 'true']") or
|
59
60
|
ins.previous = "<references #{add_id} normative='true'>" \
|
60
61
|
"<title>#{@i18n.normref}</title></references>"
|
61
|
-
xml
|
62
|
+
xml.at("//sentinel")&.remove
|
62
63
|
end
|
63
64
|
|
64
65
|
def insert_terms(xml)
|
@@ -22,7 +22,8 @@ module Metanorma
|
|
22
22
|
super
|
23
23
|
@smartquotes = node.attr("smartquotes") == "true"
|
24
24
|
@no_insert_missing_sections = doctype(node) != "recommendation" ||
|
25
|
-
node.attr("legacy-do-not-insert-missing-sections")
|
25
|
+
node.attr("legacy-do-not-insert-missing-sections") ||
|
26
|
+
node.attr("document-schema") == "legacy"
|
26
27
|
end
|
27
28
|
|
28
29
|
def boilerplate_file(_xmldoc)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-itu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|