metanorma-itu 1.3.8 → 1.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/itu/front.rb +38 -42
- data/lib/asciidoctor/itu/reqt.rng +15 -4
- data/lib/isodoc/itu/itu.implementers-guide.xsl +52 -30
- data/lib/isodoc/itu/itu.in-force.xsl +52 -30
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +52 -30
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +52 -30
- data/lib/isodoc/itu/itu.recommendation.xsl +52 -30
- data/lib/isodoc/itu/itu.resolution.xsl +52 -30
- data/lib/isodoc/itu/itu.service-publication.xsl +52 -30
- data/lib/isodoc/itu/itu.technical-paper.xsl +52 -30
- data/lib/isodoc/itu/itu.technical-report.xsl +52 -30
- data/lib/isodoc/itu/metadata.rb +20 -9
- data/lib/metanorma/itu/processor.rb +1 -1
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +2 -2
@@ -1891,7 +1891,7 @@
|
|
1891
1891
|
</xsl:choose>
|
1892
1892
|
</xsl:variable>
|
1893
1893
|
<xsl:element name="{$element-name}">
|
1894
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1894
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
1895
1895
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1896
1896
|
<xsl:if test="local-name(..) != 'dt' and not(ancestor::itu:dd) and not(ancestor::itu:title)">
|
1897
1897
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -2505,7 +2505,7 @@
|
|
2505
2505
|
|
2506
2506
|
|
2507
2507
|
|
2508
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2508
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
2509
2509
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
2510
2510
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2511
2511
|
|
@@ -2589,6 +2589,7 @@
|
|
2589
2589
|
|
2590
2590
|
|
2591
2591
|
|
2592
|
+
|
2592
2593
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2593
2594
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2594
2595
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -3070,6 +3071,8 @@
|
|
3070
3071
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
3071
3072
|
</xsl:if>
|
3072
3073
|
|
3074
|
+
|
3075
|
+
|
3073
3076
|
<xsl:choose>
|
3074
3077
|
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
3075
3078
|
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
@@ -3357,9 +3360,9 @@
|
|
3357
3360
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
3358
3361
|
<xsl:with-param name="continued">true</xsl:with-param>
|
3359
3362
|
</xsl:apply-templates>
|
3360
|
-
|
3361
|
-
|
3362
|
-
|
3363
|
+
|
3364
|
+
|
3365
|
+
|
3363
3366
|
|
3364
3367
|
</fo:table-cell>
|
3365
3368
|
</fo:table-row>
|
@@ -3445,7 +3448,11 @@
|
|
3445
3448
|
|
3446
3449
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3447
3450
|
|
3448
|
-
<xsl:
|
3451
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3452
|
+
|
3453
|
+
</xsl:variable>
|
3454
|
+
|
3455
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
|
3449
3456
|
|
3450
3457
|
<xsl:variable name="cols-count">
|
3451
3458
|
<xsl:choose>
|
@@ -3603,6 +3610,19 @@
|
|
3603
3610
|
|
3604
3611
|
</fo:table-body>
|
3605
3612
|
|
3613
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
|
3614
|
+
<xsl:choose>
|
3615
|
+
<xsl:when test="substring-after(., '—') != ''">
|
3616
|
+
<xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
|
3617
|
+
</xsl:when>
|
3618
|
+
<xsl:otherwise>
|
3619
|
+
<xsl:value-of select="."/>
|
3620
|
+
</xsl:otherwise>
|
3621
|
+
</xsl:choose>
|
3622
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
|
3623
|
+
<xsl:apply-templates mode="presentation_name"/>
|
3624
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
|
3625
|
+
<xsl:apply-templates select="."/>
|
3606
3626
|
</xsl:template><xsl:template match="*[local-name()='tr']">
|
3607
3627
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
3608
3628
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
@@ -3801,18 +3821,12 @@
|
|
3801
3821
|
<xsl:apply-templates/>
|
3802
3822
|
</xsl:template><xsl:template name="fn_display">
|
3803
3823
|
<xsl:variable name="references">
|
3824
|
+
|
3804
3825
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
3805
|
-
<
|
3806
|
-
|
3807
|
-
<xsl:if test="ancestor::*[local-name()='preface']">
|
3808
|
-
<xsl:attribute name="preface">true</xsl:attribute>
|
3809
|
-
</xsl:if>
|
3810
|
-
|
3811
|
-
|
3812
|
-
<xsl:apply-templates/>
|
3813
|
-
</fn>
|
3826
|
+
<xsl:call-template name="create_fn"/>
|
3814
3827
|
</xsl:for-each>
|
3815
3828
|
</xsl:variable>
|
3829
|
+
|
3816
3830
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
3817
3831
|
<xsl:variable name="reference" select="@reference"/>
|
3818
3832
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
@@ -3860,6 +3874,16 @@
|
|
3860
3874
|
</fo:block>
|
3861
3875
|
</xsl:if>
|
3862
3876
|
</xsl:for-each>
|
3877
|
+
</xsl:template><xsl:template name="create_fn">
|
3878
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
3879
|
+
|
3880
|
+
<xsl:if test="ancestor::*[local-name()='preface']">
|
3881
|
+
<xsl:attribute name="preface">true</xsl:attribute>
|
3882
|
+
</xsl:if>
|
3883
|
+
|
3884
|
+
|
3885
|
+
<xsl:apply-templates/>
|
3886
|
+
</fn>
|
3863
3887
|
</xsl:template><xsl:template name="fn_name_display">
|
3864
3888
|
<!-- <xsl:variable name="references">
|
3865
3889
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
@@ -4880,19 +4904,6 @@
|
|
4880
4904
|
<!-- replace start and end spaces to non-break space -->
|
4881
4905
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
4882
4906
|
</xsl:copy>
|
4883
|
-
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
4884
|
-
<xsl:copy>
|
4885
|
-
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
4886
|
-
</xsl:copy>
|
4887
|
-
<xsl:choose>
|
4888
|
-
<!-- if in msub, then don't add space -->
|
4889
|
-
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
4890
|
-
<!-- if next char in digit, don't add space -->
|
4891
|
-
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
4892
|
-
<xsl:otherwise>
|
4893
|
-
<mathml:mspace width="0.5ex"/>
|
4894
|
-
</xsl:otherwise>
|
4895
|
-
</xsl:choose>
|
4896
4907
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
4897
4908
|
<xsl:variable name="target">
|
4898
4909
|
<xsl:choose>
|
@@ -6080,7 +6091,19 @@
|
|
6080
6091
|
</fo:inline>
|
6081
6092
|
</xsl:if>
|
6082
6093
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
6083
|
-
<
|
6094
|
+
<xsl:variable name="element">inline
|
6095
|
+
|
6096
|
+
</xsl:variable>
|
6097
|
+
<xsl:choose>
|
6098
|
+
<xsl:when test="contains($element, 'block')">
|
6099
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
6100
|
+
<xsl:apply-templates/>
|
6101
|
+
</fo:block>
|
6102
|
+
</xsl:when>
|
6103
|
+
<xsl:otherwise>
|
6104
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
6105
|
+
</xsl:otherwise>
|
6106
|
+
</xsl:choose>
|
6084
6107
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
6085
6108
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
6086
6109
|
|
@@ -6657,7 +6680,6 @@
|
|
6657
6680
|
</xsl:template><xsl:template name="processBibitem">
|
6658
6681
|
|
6659
6682
|
|
6660
|
-
<!-- end BIPM bibitem processing-->
|
6661
6683
|
|
6662
6684
|
|
6663
6685
|
|
data/lib/isodoc/itu/metadata.rb
CHANGED
@@ -3,7 +3,6 @@ require "twitter_cldr"
|
|
3
3
|
|
4
4
|
module IsoDoc
|
5
5
|
module ITU
|
6
|
-
|
7
6
|
class Metadata < IsoDoc::Metadata
|
8
7
|
def initialize(lang, script, labels)
|
9
8
|
super
|
@@ -96,10 +95,10 @@ module IsoDoc
|
|
96
95
|
lbl = oblig == "informative" ? @labels["appendix"] : @labels["annex"]
|
97
96
|
dn and set(:annexid, @i18n.l10n("#{lbl} #{dn&.text}"))
|
98
97
|
dn = isoxml.at(ns("//bibdata/ext/structuredidentifier/amendment")) and
|
99
|
-
set(:amendmentid, @i18n.l10n("#{@labels[
|
98
|
+
set(:amendmentid, @i18n.l10n("#{@labels['amendment']} #{dn&.text}"))
|
100
99
|
dn = isoxml.at(ns("//bibdata/ext/structuredidentifier/corrigendum")) and
|
101
100
|
set(:corrigendumid,
|
102
|
-
@i18n.l10n("#{@labels[
|
101
|
+
@i18n.l10n("#{@labels['corrigendum']} #{dn&.text}"))
|
103
102
|
end
|
104
103
|
|
105
104
|
def unpublished(status)
|
@@ -114,13 +113,17 @@ module IsoDoc
|
|
114
113
|
pubdate = isoxml.at(ns("//bibdata/date[not(@format)][@type = 'published']")) ||
|
115
114
|
isoxml.at(ns("//bibdata/copyright/from"))
|
116
115
|
pubdate and set(:placedate_year,
|
117
|
-
@labels["placedate"].sub(/%/,
|
116
|
+
@labels["placedate"].sub(/%/,
|
117
|
+
pubdate.text.sub(
|
118
|
+
/^(\d\d\d\d).*$/, "\\1"
|
119
|
+
)))
|
118
120
|
end
|
119
121
|
|
120
122
|
def monthyr(isodate)
|
121
123
|
m = /(?<yr>\d\d\d\d)-(?<mo>\d\d)/.match isodate
|
122
124
|
return isodate unless m && m[:yr] && m[:mo]
|
123
|
-
|
125
|
+
|
126
|
+
"#{m[:mo]}/#{m[:yr]}"
|
124
127
|
end
|
125
128
|
|
126
129
|
def keywords(isoxml, _out)
|
@@ -149,6 +152,7 @@ module IsoDoc
|
|
149
152
|
def ddMMMYYYY(isodate)
|
150
153
|
m = /(?<yr>\d\d\d\d)-(?<mo>\d\d)-(?<dd>\d\d)/.match isodate
|
151
154
|
return isodate unless m && m[:yr] && m[:mo] && m[:dd]
|
155
|
+
|
152
156
|
mmm = DateTime.parse(isodate).localize(@lang.to_sym).to_additional_s("MMM")
|
153
157
|
@i18n.l10n("#{m[:dd]} #{mmm} #{m[:yr]}")
|
154
158
|
end
|
@@ -184,9 +188,15 @@ module IsoDoc
|
|
184
188
|
set(:meeting, a)
|
185
189
|
set(:meeting_acronym, a)
|
186
190
|
end
|
187
|
-
a = isoxml&.at(ns("//bibdata/ext/meeting/@acronym"))&.text and set(
|
188
|
-
|
189
|
-
|
191
|
+
a = isoxml&.at(ns("//bibdata/ext/meeting/@acronym"))&.text and set(
|
192
|
+
:meeting_acronym, a
|
193
|
+
)
|
194
|
+
a = isoxml&.at(ns("//bibdata/ext/meeting-place"))&.text and set(
|
195
|
+
:meeting_place, a
|
196
|
+
)
|
197
|
+
a = isoxml&.at(ns("//bibdata/ext/intended-type"))&.text and set(
|
198
|
+
:intended_type, a
|
199
|
+
)
|
190
200
|
a = isoxml&.at(ns("//bibdata/ext/source"))&.text and set(:source, a)
|
191
201
|
meeting(isoxml)
|
192
202
|
end
|
@@ -197,7 +207,8 @@ module IsoDoc
|
|
197
207
|
set(:meeting_date, resolution ? ddMMMMYYYY(o, nil) : ddMMMYYYY(o))
|
198
208
|
elsif f = isoxml&.at(ns("//bibdata/ext/meeting-date/from"))&.text
|
199
209
|
t = isoxml&.at(ns("//bibdata/ext/meeting-date/to"))&.text
|
200
|
-
set(:meeting_date,
|
210
|
+
set(:meeting_date,
|
211
|
+
resolution ? ddMMMMYYYY(f, t) : "#{ddMMMYYYY(f)}/#{ddMMMYYYY(t)}")
|
201
212
|
end
|
202
213
|
end
|
203
214
|
end
|
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: 1.3.
|
4
|
+
version: 1.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|