metanorma-un 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -0
- data/lib/isodoc/un/html/wordstyle.scss +0 -1
- data/lib/isodoc/un/un.plenary-attachment.xsl +59 -14
- data/lib/isodoc/un/un.plenary.xsl +59 -14
- data/lib/isodoc/un/un.recommendation.xsl +64 -5
- data/lib/metanorma/un/version.rb +1 -1
- data/metanorma-unece.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09ef046fed83e64186ae44ed245c9dcf523ed069b6fdaefc510790d380caf8c3'
|
4
|
+
data.tar.gz: 4742eefe7ed3a6b9129a907241e2a231e42c1cac3716169d806fa55870f23b1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9ac17f71bd2afd8a4db2b0242af44853a6bfdf3b1c2d208afbf6fbf6dbcf1a74a1f997681a1d78bafb357f157a0e60e14a857f84823660dee1825392c0a4cf6
|
7
|
+
data.tar.gz: fb492348cb0d339631afd97db82efa7ef7234fa4b3db59abe2876e3219dd6b5e35486b1b220e9925a77dfeec87dd38c64de2e71b20b504af742accd69cd58896
|
data/Rakefile
CHANGED
@@ -761,9 +761,12 @@
|
|
761
761
|
<fo:block id="{@id}" font-weight="bold" margin-left="6mm" margin-right="6mm" keep-with-next="always">
|
762
762
|
<xsl:value-of select="$title-box"/><xsl:number/><xsl:text>: </xsl:text><xsl:apply-templates select="un:name" mode="process"/>
|
763
763
|
</fo:block>
|
764
|
-
<fo:block margin-left="5mm" margin-right="5mm">
|
765
|
-
|
766
|
-
|
764
|
+
<!-- <fo:block margin-left="5mm" margin-right="5mm"> -->
|
765
|
+
<fo:block-container margin-left="2mm" margin-right="2mm">
|
766
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
767
|
+
<xsl:apply-templates/>
|
768
|
+
</fo:block-container>
|
769
|
+
</fo:block-container>
|
767
770
|
</fo:block-container>
|
768
771
|
<fo:block margin-bottom="4pt"> </fo:block>
|
769
772
|
</xsl:template>
|
@@ -1148,6 +1151,17 @@
|
|
1148
1151
|
|
1149
1152
|
<xsl:template match="un:note/un:p | un:annex//un:note/un:p" name="note">
|
1150
1153
|
<fo:block font-size="10pt" space-after="12pt" text-indent="0">
|
1154
|
+
<xsl:if test="../@type = 'source' or ../@type = 'abbreviation'">
|
1155
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
1156
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1157
|
+
<xsl:attribute name="padding-top">0mm</xsl:attribute>
|
1158
|
+
<fo:inline>
|
1159
|
+
<xsl:call-template name="capitalize">
|
1160
|
+
<xsl:with-param name="str" select="../@type"/>
|
1161
|
+
</xsl:call-template>
|
1162
|
+
<xsl:text>: </xsl:text>
|
1163
|
+
</fo:inline>
|
1164
|
+
</xsl:if>
|
1151
1165
|
<xsl:variable name="title-note">
|
1152
1166
|
<xsl:call-template name="getTitle">
|
1153
1167
|
<xsl:with-param name="name" select="'title-note'"/>
|
@@ -1614,17 +1628,6 @@
|
|
1614
1628
|
<xsl:variable name="result" select="normalize-space(concat($day, ' ', $monthStr, ' ', $year))"/>
|
1615
1629
|
<xsl:value-of select="$result"/>
|
1616
1630
|
</xsl:template>
|
1617
|
-
|
1618
|
-
<xsl:template name="getLanguage">
|
1619
|
-
<xsl:param name="lang"/>
|
1620
|
-
<xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
|
1621
|
-
<xsl:choose>
|
1622
|
-
<xsl:when test="$language = 'en'">English</xsl:when>
|
1623
|
-
<xsl:when test="$language = 'de'">Deutsch</xsl:when>
|
1624
|
-
<xsl:when test="$language = 'cn'">Chinese</xsl:when>
|
1625
|
-
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
1626
|
-
</xsl:choose>
|
1627
|
-
</xsl:template>
|
1628
1631
|
|
1629
1632
|
<xsl:variable name="Image-Logo">
|
1630
1633
|
<xsl:text>
|
@@ -3186,6 +3189,17 @@ k7xSqrdd135+AIqVLd+k6ICjZETxZhgY8HLnv3VGvTZa/+9kz/qlzuHctP4A89UE73L1sCJO
|
|
3186
3189
|
<fo:inline padding-right="2mm">
|
3187
3190
|
|
3188
3191
|
|
3192
|
+
|
3193
|
+
<xsl:if test="@type = 'source' or @type = 'abbreviation'">
|
3194
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
3195
|
+
<fo:inline>
|
3196
|
+
<xsl:call-template name="capitalize">
|
3197
|
+
<xsl:with-param name="str" select="@type"/>
|
3198
|
+
</xsl:call-template>
|
3199
|
+
<xsl:text>: </xsl:text>
|
3200
|
+
</fo:inline>
|
3201
|
+
</xsl:if>
|
3202
|
+
|
3189
3203
|
<xsl:variable name="title-note">
|
3190
3204
|
<xsl:call-template name="getTitle">
|
3191
3205
|
<xsl:with-param name="name" select="'title-note'"/>
|
@@ -4238,4 +4252,35 @@ k7xSqrdd135+AIqVLd+k6ICjZETxZhgY8HLnv3VGvTZa/+9kz/qlzuHctP4A89UE73L1sCJO
|
|
4238
4252
|
</xsl:if>
|
4239
4253
|
</xsl:template><xsl:template name="getDocumentId">
|
4240
4254
|
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
4255
|
+
</xsl:template><xsl:template name="namespaceCheck">
|
4256
|
+
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
|
4257
|
+
<xsl:variable name="XSLNS">
|
4258
|
+
|
4259
|
+
|
4260
|
+
|
4261
|
+
|
4262
|
+
<xsl:value-of select="document('')//*/namespace::unece"/>
|
4263
|
+
|
4264
|
+
|
4265
|
+
|
4266
|
+
|
4267
|
+
|
4268
|
+
|
4269
|
+
|
4270
|
+
|
4271
|
+
|
4272
|
+
</xsl:variable>
|
4273
|
+
<xsl:if test="$documentNS != $XSLNS">
|
4274
|
+
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
4275
|
+
</xsl:if>
|
4276
|
+
</xsl:template><xsl:template name="getLanguage">
|
4277
|
+
<xsl:param name="lang"/>
|
4278
|
+
<xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
|
4279
|
+
<xsl:choose>
|
4280
|
+
<xsl:when test="$language = 'en'">English</xsl:when>
|
4281
|
+
<xsl:when test="$language = 'fr'">French</xsl:when>
|
4282
|
+
<xsl:when test="$language = 'de'">Deutsch</xsl:when>
|
4283
|
+
<xsl:when test="$language = 'cn'">Chinese</xsl:when>
|
4284
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
4285
|
+
</xsl:choose>
|
4241
4286
|
</xsl:template></xsl:stylesheet>
|
@@ -761,9 +761,12 @@
|
|
761
761
|
<fo:block id="{@id}" font-weight="bold" margin-left="6mm" margin-right="6mm" keep-with-next="always">
|
762
762
|
<xsl:value-of select="$title-box"/><xsl:number/><xsl:text>: </xsl:text><xsl:apply-templates select="un:name" mode="process"/>
|
763
763
|
</fo:block>
|
764
|
-
<fo:block margin-left="5mm" margin-right="5mm">
|
765
|
-
|
766
|
-
|
764
|
+
<!-- <fo:block margin-left="5mm" margin-right="5mm"> -->
|
765
|
+
<fo:block-container margin-left="2mm" margin-right="2mm">
|
766
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
767
|
+
<xsl:apply-templates/>
|
768
|
+
</fo:block-container>
|
769
|
+
</fo:block-container>
|
767
770
|
</fo:block-container>
|
768
771
|
<fo:block margin-bottom="4pt"> </fo:block>
|
769
772
|
</xsl:template>
|
@@ -1148,6 +1151,17 @@
|
|
1148
1151
|
|
1149
1152
|
<xsl:template match="un:note/un:p | un:annex//un:note/un:p" name="note">
|
1150
1153
|
<fo:block font-size="10pt" space-after="12pt" text-indent="0">
|
1154
|
+
<xsl:if test="../@type = 'source' or ../@type = 'abbreviation'">
|
1155
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
1156
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1157
|
+
<xsl:attribute name="padding-top">0mm</xsl:attribute>
|
1158
|
+
<fo:inline>
|
1159
|
+
<xsl:call-template name="capitalize">
|
1160
|
+
<xsl:with-param name="str" select="../@type"/>
|
1161
|
+
</xsl:call-template>
|
1162
|
+
<xsl:text>: </xsl:text>
|
1163
|
+
</fo:inline>
|
1164
|
+
</xsl:if>
|
1151
1165
|
<xsl:variable name="title-note">
|
1152
1166
|
<xsl:call-template name="getTitle">
|
1153
1167
|
<xsl:with-param name="name" select="'title-note'"/>
|
@@ -1614,17 +1628,6 @@
|
|
1614
1628
|
<xsl:variable name="result" select="normalize-space(concat($day, ' ', $monthStr, ' ', $year))"/>
|
1615
1629
|
<xsl:value-of select="$result"/>
|
1616
1630
|
</xsl:template>
|
1617
|
-
|
1618
|
-
<xsl:template name="getLanguage">
|
1619
|
-
<xsl:param name="lang"/>
|
1620
|
-
<xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
|
1621
|
-
<xsl:choose>
|
1622
|
-
<xsl:when test="$language = 'en'">English</xsl:when>
|
1623
|
-
<xsl:when test="$language = 'de'">Deutsch</xsl:when>
|
1624
|
-
<xsl:when test="$language = 'cn'">Chinese</xsl:when>
|
1625
|
-
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
1626
|
-
</xsl:choose>
|
1627
|
-
</xsl:template>
|
1628
1631
|
|
1629
1632
|
<xsl:variable name="Image-Logo">
|
1630
1633
|
<xsl:text>
|
@@ -3186,6 +3189,17 @@ k7xSqrdd135+AIqVLd+k6ICjZETxZhgY8HLnv3VGvTZa/+9kz/qlzuHctP4A89UE73L1sCJO
|
|
3186
3189
|
<fo:inline padding-right="2mm">
|
3187
3190
|
|
3188
3191
|
|
3192
|
+
|
3193
|
+
<xsl:if test="@type = 'source' or @type = 'abbreviation'">
|
3194
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
3195
|
+
<fo:inline>
|
3196
|
+
<xsl:call-template name="capitalize">
|
3197
|
+
<xsl:with-param name="str" select="@type"/>
|
3198
|
+
</xsl:call-template>
|
3199
|
+
<xsl:text>: </xsl:text>
|
3200
|
+
</fo:inline>
|
3201
|
+
</xsl:if>
|
3202
|
+
|
3189
3203
|
<xsl:variable name="title-note">
|
3190
3204
|
<xsl:call-template name="getTitle">
|
3191
3205
|
<xsl:with-param name="name" select="'title-note'"/>
|
@@ -4238,4 +4252,35 @@ k7xSqrdd135+AIqVLd+k6ICjZETxZhgY8HLnv3VGvTZa/+9kz/qlzuHctP4A89UE73L1sCJO
|
|
4238
4252
|
</xsl:if>
|
4239
4253
|
</xsl:template><xsl:template name="getDocumentId">
|
4240
4254
|
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
4255
|
+
</xsl:template><xsl:template name="namespaceCheck">
|
4256
|
+
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
|
4257
|
+
<xsl:variable name="XSLNS">
|
4258
|
+
|
4259
|
+
|
4260
|
+
|
4261
|
+
|
4262
|
+
<xsl:value-of select="document('')//*/namespace::unece"/>
|
4263
|
+
|
4264
|
+
|
4265
|
+
|
4266
|
+
|
4267
|
+
|
4268
|
+
|
4269
|
+
|
4270
|
+
|
4271
|
+
|
4272
|
+
</xsl:variable>
|
4273
|
+
<xsl:if test="$documentNS != $XSLNS">
|
4274
|
+
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
4275
|
+
</xsl:if>
|
4276
|
+
</xsl:template><xsl:template name="getLanguage">
|
4277
|
+
<xsl:param name="lang"/>
|
4278
|
+
<xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
|
4279
|
+
<xsl:choose>
|
4280
|
+
<xsl:when test="$language = 'en'">English</xsl:when>
|
4281
|
+
<xsl:when test="$language = 'fr'">French</xsl:when>
|
4282
|
+
<xsl:when test="$language = 'de'">Deutsch</xsl:when>
|
4283
|
+
<xsl:when test="$language = 'cn'">Chinese</xsl:when>
|
4284
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
4285
|
+
</xsl:choose>
|
4241
4286
|
</xsl:template></xsl:stylesheet>
|
@@ -853,9 +853,12 @@
|
|
853
853
|
</xsl:variable>
|
854
854
|
<xsl:value-of select="$title-box"/><xsl:value-of select="$num"/><xsl:text>. </xsl:text><xsl:apply-templates select="un:name" mode="process"/>
|
855
855
|
</fo:block>
|
856
|
-
<fo:block margin-left="29mm" margin-right="34mm">
|
857
|
-
|
858
|
-
|
856
|
+
<!-- <fo:block margin-left="29mm" margin-right="34mm"> -->
|
857
|
+
<fo:block-container margin-left="20mm" margin-right="20mm">
|
858
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
859
|
+
<xsl:apply-templates/>
|
860
|
+
</fo:block-container>
|
861
|
+
</fo:block-container>
|
859
862
|
</fo:block-container>
|
860
863
|
<fo:block margin-bottom="6pt"> </fo:block>
|
861
864
|
</xsl:template>
|
@@ -1066,8 +1069,8 @@
|
|
1066
1069
|
<xsl:template match="un:figure">
|
1067
1070
|
<fo:block-container id="{@id}">
|
1068
1071
|
<xsl:if test="ancestor::un:admonition">
|
1069
|
-
<xsl:attribute name="margin-left"
|
1070
|
-
<xsl:attribute name="margin-right"
|
1072
|
+
<xsl:attribute name="margin-left">-5mm</xsl:attribute>
|
1073
|
+
<xsl:attribute name="margin-right">-5mm</xsl:attribute>
|
1071
1074
|
</xsl:if>
|
1072
1075
|
<xsl:if test="un:name">
|
1073
1076
|
<fo:block text-align="center" font-size="9pt" margin-bottom="6pt" keep-with-next="always" keep-together.within-column="always">
|
@@ -1216,7 +1219,21 @@
|
|
1216
1219
|
|
1217
1220
|
<xsl:template match="un:note/un:p | un:annex//un:note/un:p" name="note">
|
1218
1221
|
<fo:block-container margin-top="3pt" border-top="0.1mm solid black" space-after="12pt">
|
1222
|
+
<xsl:if test="../@type = 'source' or ../@type = 'abbreviation'">
|
1223
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
1224
|
+
</xsl:if>
|
1219
1225
|
<fo:block font-size="10pt" text-indent="0" padding-top="1.5mm">
|
1226
|
+
<xsl:if test="../@type = 'source' or ../@type = 'abbreviation'">
|
1227
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
1228
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1229
|
+
<xsl:attribute name="padding-top">0mm</xsl:attribute>
|
1230
|
+
<fo:inline>
|
1231
|
+
<xsl:call-template name="capitalize">
|
1232
|
+
<xsl:with-param name="str" select="../@type"/>
|
1233
|
+
</xsl:call-template>
|
1234
|
+
<xsl:text>: </xsl:text>
|
1235
|
+
</fo:inline>
|
1236
|
+
</xsl:if>
|
1220
1237
|
<!-- <fo:inline padding-right="4mm"><xsl:text>NOTE </xsl:text>
|
1221
1238
|
<xsl:if test="../following-sibling::un:note or ../preceding-sibling::un:note">
|
1222
1239
|
<xsl:number count="un:note"/><xsl:text> </xsl:text>
|
@@ -12636,6 +12653,17 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
12636
12653
|
<fo:inline padding-right="2mm">
|
12637
12654
|
|
12638
12655
|
|
12656
|
+
|
12657
|
+
<xsl:if test="@type = 'source' or @type = 'abbreviation'">
|
12658
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
12659
|
+
<fo:inline>
|
12660
|
+
<xsl:call-template name="capitalize">
|
12661
|
+
<xsl:with-param name="str" select="@type"/>
|
12662
|
+
</xsl:call-template>
|
12663
|
+
<xsl:text>: </xsl:text>
|
12664
|
+
</fo:inline>
|
12665
|
+
</xsl:if>
|
12666
|
+
|
12639
12667
|
<xsl:variable name="title-note">
|
12640
12668
|
<xsl:call-template name="getTitle">
|
12641
12669
|
<xsl:with-param name="name" select="'title-note'"/>
|
@@ -13688,4 +13716,35 @@ w+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC
|
|
13688
13716
|
</xsl:if>
|
13689
13717
|
</xsl:template><xsl:template name="getDocumentId">
|
13690
13718
|
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
13719
|
+
</xsl:template><xsl:template name="namespaceCheck">
|
13720
|
+
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
|
13721
|
+
<xsl:variable name="XSLNS">
|
13722
|
+
|
13723
|
+
|
13724
|
+
|
13725
|
+
|
13726
|
+
<xsl:value-of select="document('')//*/namespace::unece"/>
|
13727
|
+
|
13728
|
+
|
13729
|
+
|
13730
|
+
|
13731
|
+
|
13732
|
+
|
13733
|
+
|
13734
|
+
|
13735
|
+
|
13736
|
+
</xsl:variable>
|
13737
|
+
<xsl:if test="$documentNS != $XSLNS">
|
13738
|
+
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
13739
|
+
</xsl:if>
|
13740
|
+
</xsl:template><xsl:template name="getLanguage">
|
13741
|
+
<xsl:param name="lang"/>
|
13742
|
+
<xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
|
13743
|
+
<xsl:choose>
|
13744
|
+
<xsl:when test="$language = 'en'">English</xsl:when>
|
13745
|
+
<xsl:when test="$language = 'fr'">French</xsl:when>
|
13746
|
+
<xsl:when test="$language = 'de'">Deutsch</xsl:when>
|
13747
|
+
<xsl:when test="$language = 'cn'">Chinese</xsl:when>
|
13748
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
13749
|
+
</xsl:choose>
|
13691
13750
|
</xsl:template></xsl:stylesheet>
|
data/lib/metanorma/un/version.rb
CHANGED
data/metanorma-unece.gemspec
CHANGED
@@ -36,6 +36,7 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_dependency "isodoc", "~> 1.1.0"
|
37
37
|
|
38
38
|
spec.add_development_dependency "byebug", "~> 9.1"
|
39
|
+
spec.add_development_dependency "sassc", "2.4.0"
|
39
40
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
40
41
|
spec.add_development_dependency "guard", "~> 2.14"
|
41
42
|
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-un
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '9.1'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: sassc
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 2.4.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 2.4.0
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: equivalent-xml
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|