metanorma-cc 1.7.7 → 1.7.8
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/asciidoctor/cc/isodoc.rng +12 -0
- data/lib/isodoc/cc/cc.standard.xsl +84 -10
- data/lib/metanorma/cc/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: ba921a96ef914fa2953f1496d9f0cdb1187fbf899fb290db3e292bacf14a3c63
|
|
4
|
+
data.tar.gz: a1200323fce7dc2df2e100a8fe37f3a41e583a7311666da0823e3e0687493574
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c909ee60a09c15b24769d63cd7abbd23d56953e6c5d01018ed46f903a8a8c994491aea2937e318811f6332fba02fc6a8324cbad2ea18fe463cb93b2d6ed7f1c
|
|
7
|
+
data.tar.gz: aa2da60c821b1cefa7e1fef177ded1b9136a73a37b6d91ce449f3887a65e0a93642aad8cdfa7959507a4d73eb0677800a8f2e584f3a7473725d0394a7986945d
|
|
@@ -1011,8 +1011,14 @@
|
|
|
1011
1011
|
<ref name="imagemap"/>
|
|
1012
1012
|
<ref name="svgmap"/>
|
|
1013
1013
|
<ref name="inputform"/>
|
|
1014
|
+
<ref name="toc"/>
|
|
1014
1015
|
</choice>
|
|
1015
1016
|
</define>
|
|
1017
|
+
<define name="toc">
|
|
1018
|
+
<element name="toc">
|
|
1019
|
+
<ref name="ul"/>
|
|
1020
|
+
</element>
|
|
1021
|
+
</define>
|
|
1016
1022
|
<define name="inputform">
|
|
1017
1023
|
<element name="form">
|
|
1018
1024
|
<attribute name="id">
|
|
@@ -1254,6 +1260,12 @@
|
|
|
1254
1260
|
<optional>
|
|
1255
1261
|
<attribute name="type"/>
|
|
1256
1262
|
</optional>
|
|
1263
|
+
<optional>
|
|
1264
|
+
<attribute name="identifier"/>
|
|
1265
|
+
</optional>
|
|
1266
|
+
<optional>
|
|
1267
|
+
<attribute name="prefix"/>
|
|
1268
|
+
</optional>
|
|
1257
1269
|
<text/>
|
|
1258
1270
|
</define>
|
|
1259
1271
|
<define name="ics">
|
|
@@ -1091,7 +1091,9 @@
|
|
|
1091
1091
|
|
|
1092
1092
|
|
|
1093
1093
|
|
|
1094
|
-
</xsl:attribute-set><xsl:
|
|
1094
|
+
</xsl:attribute-set><xsl:variable name="table-border_">
|
|
1095
|
+
|
|
1096
|
+
</xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
|
|
1095
1097
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
1096
1098
|
|
|
1097
1099
|
|
|
@@ -1409,6 +1411,8 @@
|
|
|
1409
1411
|
<fo:block> </fo:block>
|
|
1410
1412
|
</xsl:if> -->
|
|
1411
1413
|
|
|
1414
|
+
|
|
1415
|
+
<!-- Display table's name before table as standalone block -->
|
|
1412
1416
|
<!-- $namespace = 'iso' or -->
|
|
1413
1417
|
|
|
1414
1418
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
@@ -1486,6 +1490,12 @@
|
|
|
1486
1490
|
|
|
1487
1491
|
|
|
1488
1492
|
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
|
|
1496
|
+
<!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
|
|
1497
|
+
|
|
1498
|
+
|
|
1489
1499
|
<xsl:variable name="table_width">
|
|
1490
1500
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
|
1491
1501
|
100%
|
|
@@ -1504,6 +1514,7 @@
|
|
|
1504
1514
|
|
|
1505
1515
|
|
|
1506
1516
|
|
|
1517
|
+
|
|
1507
1518
|
|
|
1508
1519
|
|
|
1509
1520
|
|
|
@@ -1927,6 +1938,8 @@
|
|
|
1927
1938
|
</xsl:choose>
|
|
1928
1939
|
</xsl:for-each>
|
|
1929
1940
|
|
|
1941
|
+
|
|
1942
|
+
|
|
1930
1943
|
<xsl:choose>
|
|
1931
1944
|
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
|
1932
1945
|
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
|
@@ -1963,6 +1976,7 @@
|
|
|
1963
1976
|
|
|
1964
1977
|
|
|
1965
1978
|
|
|
1979
|
+
|
|
1966
1980
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
|
1967
1981
|
|
|
1968
1982
|
|
|
@@ -2048,6 +2062,8 @@
|
|
|
2048
2062
|
|
|
2049
2063
|
|
|
2050
2064
|
|
|
2065
|
+
|
|
2066
|
+
|
|
2051
2067
|
</xsl:if>
|
|
2052
2068
|
<xsl:if test="$parent-name = 'tfoot'">
|
|
2053
2069
|
|
|
@@ -2062,6 +2078,8 @@
|
|
|
2062
2078
|
|
|
2063
2079
|
|
|
2064
2080
|
|
|
2081
|
+
|
|
2082
|
+
|
|
2065
2083
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
|
2066
2084
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
|
2067
2085
|
</xsl:if> -->
|
|
@@ -3566,7 +3584,24 @@
|
|
|
3566
3584
|
</fo:instream-foreign-object>
|
|
3567
3585
|
</xsl:when>
|
|
3568
3586
|
<xsl:otherwise>
|
|
3569
|
-
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"
|
|
3587
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
|
3588
|
+
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
|
3589
|
+
|
|
3590
|
+
<xsl:variable name="img_src">
|
|
3591
|
+
<xsl:choose>
|
|
3592
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
|
3593
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
|
3594
|
+
</xsl:choose>
|
|
3595
|
+
</xsl:variable>
|
|
3596
|
+
|
|
3597
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
|
|
3598
|
+
<xsl:if test="number($scale) < 100">
|
|
3599
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
|
3600
|
+
</xsl:if>
|
|
3601
|
+
|
|
3602
|
+
</xsl:if>
|
|
3603
|
+
|
|
3604
|
+
</fo:external-graphic>
|
|
3570
3605
|
</xsl:otherwise>
|
|
3571
3606
|
</xsl:choose>
|
|
3572
3607
|
|
|
@@ -3737,11 +3772,13 @@
|
|
|
3737
3772
|
<xsl:attribute name="width">100%</xsl:attribute>
|
|
3738
3773
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
|
3739
3774
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
3775
|
+
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
|
3776
|
+
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
|
3740
3777
|
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
|
3741
3778
|
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
|
3742
3779
|
<!-- effective height / width = 1.48, 1.4 - with title -->
|
|
3743
|
-
<xsl:if test="
|
|
3744
|
-
<xsl:variable name="width" select="((
|
|
3780
|
+
<xsl:if test="$svg_height > ($svg_width * 1.4)"> <!-- for images with big height -->
|
|
3781
|
+
<xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
|
|
3745
3782
|
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
|
3746
3783
|
</xsl:if>
|
|
3747
3784
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
|
@@ -3758,6 +3795,23 @@
|
|
|
3758
3795
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
|
3759
3796
|
<xsl:value-of select="."/>
|
|
3760
3797
|
</xsl:attribute>
|
|
3798
|
+
</xsl:template><xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
|
3799
|
+
<xsl:copy>
|
|
3800
|
+
<xsl:apply-templates select="@*" mode="svg_update"/>
|
|
3801
|
+
<xsl:variable name="viewbox">
|
|
3802
|
+
<xsl:call-template name="split">
|
|
3803
|
+
<xsl:with-param name="pText" select="@viewBox"/>
|
|
3804
|
+
<xsl:with-param name="sep" select="' '"/>
|
|
3805
|
+
</xsl:call-template>
|
|
3806
|
+
</xsl:variable>
|
|
3807
|
+
<xsl:attribute name="width">
|
|
3808
|
+
<xsl:value-of select="round(xalan:nodeset($viewbox)//item[3])"/>
|
|
3809
|
+
</xsl:attribute>
|
|
3810
|
+
<xsl:attribute name="height">
|
|
3811
|
+
<xsl:value-of select="round(xalan:nodeset($viewbox)//item[4])"/>
|
|
3812
|
+
</xsl:attribute>
|
|
3813
|
+
<xsl:apply-templates mode="svg_update"/>
|
|
3814
|
+
</xsl:copy>
|
|
3761
3815
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
|
3762
3816
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
|
3763
3817
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
|
@@ -5455,20 +5509,40 @@
|
|
|
5455
5509
|
</xsl:call-template>
|
|
5456
5510
|
</xsl:if>
|
|
5457
5511
|
</xsl:template><xsl:template name="getLocalizedString">
|
|
5458
|
-
<xsl:param name="key"/>
|
|
5512
|
+
<xsl:param name="key"/>
|
|
5513
|
+
<xsl:param name="formatted">false</xsl:param>
|
|
5459
5514
|
|
|
5460
5515
|
<xsl:variable name="curr_lang">
|
|
5461
5516
|
<xsl:call-template name="getLang"/>
|
|
5462
5517
|
</xsl:variable>
|
|
5463
5518
|
|
|
5464
|
-
<xsl:variable name="data_value"
|
|
5519
|
+
<xsl:variable name="data_value">
|
|
5520
|
+
<xsl:choose>
|
|
5521
|
+
<xsl:when test="$formatted = 'true'">
|
|
5522
|
+
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
|
5523
|
+
</xsl:when>
|
|
5524
|
+
<xsl:otherwise>
|
|
5525
|
+
<xsl:value-of select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
|
5526
|
+
</xsl:otherwise>
|
|
5527
|
+
</xsl:choose>
|
|
5528
|
+
</xsl:variable>
|
|
5465
5529
|
|
|
5466
5530
|
<xsl:choose>
|
|
5467
|
-
<xsl:when test="$data_value != ''">
|
|
5468
|
-
<xsl:
|
|
5531
|
+
<xsl:when test="normalize-space($data_value) != ''">
|
|
5532
|
+
<xsl:choose>
|
|
5533
|
+
<xsl:when test="$formatted = 'true'"><xsl:copy-of select="$data_value"/></xsl:when>
|
|
5534
|
+
<xsl:otherwise><xsl:value-of select="$data_value"/></xsl:otherwise>
|
|
5535
|
+
</xsl:choose>
|
|
5469
5536
|
</xsl:when>
|
|
5470
5537
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
|
5471
|
-
<xsl:
|
|
5538
|
+
<xsl:choose>
|
|
5539
|
+
<xsl:when test="$formatted = 'true'">
|
|
5540
|
+
<xsl:apply-templates select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
|
5541
|
+
</xsl:when>
|
|
5542
|
+
<xsl:otherwise>
|
|
5543
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
|
5544
|
+
</xsl:otherwise>
|
|
5545
|
+
</xsl:choose>
|
|
5472
5546
|
</xsl:when>
|
|
5473
5547
|
<xsl:otherwise>
|
|
5474
5548
|
<xsl:variable name="key_">
|
|
@@ -5479,7 +5553,7 @@
|
|
|
5479
5553
|
<xsl:value-of select="$key_"/>
|
|
5480
5554
|
</xsl:otherwise>
|
|
5481
5555
|
</xsl:choose>
|
|
5482
|
-
|
|
5556
|
+
|
|
5483
5557
|
</xsl:template><xsl:template name="setTrackChangesStyles">
|
|
5484
5558
|
<xsl:param name="isAdded"/>
|
|
5485
5559
|
<xsl:param name="isDeleted"/>
|
data/lib/metanorma/cc/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-cc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.8
|
|
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-
|
|
11
|
+
date: 2021-08-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|