metanorma-csa 1.8.5 → 1.8.6
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/.github/workflows/rake.yml +1 -1
- data/lib/asciidoctor/csa/isodoc.rng +18 -1
- data/lib/isodoc/csa/csa.standard.xsl +297 -36
- data/lib/metanorma/csa/version.rb +1 -1
- data/metanorma-csa.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6a2e03feb739aabfc961bd51cc96d8a53e8674f3eb38bbac70454589af496b1d
|
|
4
|
+
data.tar.gz: 2c45447a23dabcdc9d576f639b9cdd33917ff50735a9ece2fe1e05fb3fb21d7d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd7fd0308056d12550c14d34d26d0c8edf28ba858a01c68bb3309cf3f0c4ea3783f209b99c4febf06b2273671bc6cbbf62588829fc5e1d15f611f7567cbfd933
|
|
7
|
+
data.tar.gz: f7d7afb0d291654e4d175199741f74477c2ed6ab0a9dc3f56907699562a48e1b0bb2e7b44f231430d098ff109c4f7844fdb51ec6afc3b6201e33bcbf07480b52
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -955,7 +955,24 @@
|
|
|
955
955
|
<define name="concept">
|
|
956
956
|
<element name="concept">
|
|
957
957
|
<optional>
|
|
958
|
-
<
|
|
958
|
+
<element name="refterm">
|
|
959
|
+
<zeroOrMore>
|
|
960
|
+
<choice>
|
|
961
|
+
<ref name="PureTextElement"/>
|
|
962
|
+
<ref name="stem"/>
|
|
963
|
+
</choice>
|
|
964
|
+
</zeroOrMore>
|
|
965
|
+
</element>
|
|
966
|
+
</optional>
|
|
967
|
+
<optional>
|
|
968
|
+
<element name="renderterm">
|
|
969
|
+
<zeroOrMore>
|
|
970
|
+
<choice>
|
|
971
|
+
<ref name="PureTextElement"/>
|
|
972
|
+
<ref name="stem"/>
|
|
973
|
+
</choice>
|
|
974
|
+
</zeroOrMore>
|
|
975
|
+
</element>
|
|
959
976
|
</optional>
|
|
960
977
|
<choice>
|
|
961
978
|
<ref name="eref"/>
|
|
@@ -7,8 +7,13 @@
|
|
|
7
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
|
8
8
|
<xsl:param name="basepath"/>
|
|
9
9
|
|
|
10
|
-
<xsl:variable name="pageWidth" select="
|
|
11
|
-
<xsl:variable name="pageHeight" select="
|
|
10
|
+
<xsl:variable name="pageWidth" select="215.9"/>
|
|
11
|
+
<xsl:variable name="pageHeight" select="279.4"/>
|
|
12
|
+
<xsl:variable name="marginLeftRight1" select="25"/>
|
|
13
|
+
<xsl:variable name="marginLeftRight2" select="25"/>
|
|
14
|
+
<xsl:variable name="marginTop" select="25"/>
|
|
15
|
+
<xsl:variable name="marginBottom" select="21"/>
|
|
16
|
+
|
|
12
17
|
|
|
13
18
|
|
|
14
19
|
|
|
@@ -38,18 +43,18 @@
|
|
|
38
43
|
<fo:root font-family="Azo Sans, STIX Two Math" font-size="10pt" xml:lang="{$lang}">
|
|
39
44
|
<fo:layout-master-set>
|
|
40
45
|
<!-- Cover page -->
|
|
41
|
-
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
|
46
|
+
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
|
42
47
|
<fo:region-body margin-top="21mm" margin-bottom="21mm" margin-left="25mm" margin-right="25mm"/>
|
|
43
48
|
<fo:region-before region-name="cover-page-header" extent="21mm" precedence="true"/>
|
|
44
49
|
<fo:region-after region-name="footer" extent="21mm"/>
|
|
45
50
|
</fo:simple-page-master>
|
|
46
51
|
|
|
47
|
-
<fo:simple-page-master master-name="document" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
|
48
|
-
<fo:region-body margin-top="
|
|
49
|
-
<fo:region-before region-name="header" extent="
|
|
50
|
-
<fo:region-after region-name="footer" extent="
|
|
51
|
-
<fo:region-start region-name="left-region" extent="
|
|
52
|
-
<fo:region-end region-name="right-region" extent="
|
|
52
|
+
<fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
|
53
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
|
54
|
+
<fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
|
|
55
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
|
56
|
+
<fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
|
|
57
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
|
53
58
|
</fo:simple-page-master>
|
|
54
59
|
|
|
55
60
|
</fo:layout-master-set>
|
|
@@ -1201,6 +1206,7 @@
|
|
|
1201
1206
|
|
|
1202
1207
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
|
1203
1208
|
|
|
1209
|
+
|
|
1204
1210
|
<xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
|
|
1205
1211
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
1206
1212
|
|
|
@@ -1428,14 +1434,15 @@
|
|
|
1428
1434
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
|
1429
1435
|
|
|
1430
1436
|
<!-- Normative references -->
|
|
1431
|
-
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
|
1437
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]" mode="contents"/>
|
|
1432
1438
|
<!-- Terms and definitions -->
|
|
1433
1439
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
|
1434
1440
|
<!-- Another main sections -->
|
|
1435
1441
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
|
1436
1442
|
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
|
1437
1443
|
<!-- Bibliography -->
|
|
1438
|
-
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
|
1444
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
|
1445
|
+
|
|
1439
1446
|
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
|
1440
1447
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
|
1441
1448
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
|
@@ -2205,6 +2212,7 @@
|
|
|
2205
2212
|
|
|
2206
2213
|
|
|
2207
2214
|
|
|
2215
|
+
|
|
2208
2216
|
<xsl:if test=".//*[local-name() = 'table']">
|
|
2209
2217
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
|
2210
2218
|
</xsl:if>
|
|
@@ -2234,6 +2242,7 @@
|
|
|
2234
2242
|
|
|
2235
2243
|
|
|
2236
2244
|
|
|
2245
|
+
|
|
2237
2246
|
<fo:inline padding-right="2mm">
|
|
2238
2247
|
|
|
2239
2248
|
|
|
@@ -2275,6 +2284,7 @@
|
|
|
2275
2284
|
|
|
2276
2285
|
|
|
2277
2286
|
|
|
2287
|
+
|
|
2278
2288
|
<xsl:value-of select="@reference"/>
|
|
2279
2289
|
|
|
2280
2290
|
|
|
@@ -2419,6 +2429,9 @@
|
|
|
2419
2429
|
|
|
2420
2430
|
|
|
2421
2431
|
|
|
2432
|
+
|
|
2433
|
+
|
|
2434
|
+
|
|
2422
2435
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
|
2423
2436
|
|
|
2424
2437
|
|
|
@@ -3318,6 +3331,7 @@
|
|
|
3318
3331
|
<fo:inline xsl:use-attribute-sets="link-style">
|
|
3319
3332
|
|
|
3320
3333
|
|
|
3334
|
+
|
|
3321
3335
|
<xsl:choose>
|
|
3322
3336
|
<xsl:when test="$target_text = ''">
|
|
3323
3337
|
<xsl:apply-templates/>
|
|
@@ -3670,6 +3684,234 @@
|
|
|
3670
3684
|
<xsl:param name="height"/>
|
|
3671
3685
|
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="0" x2="{$width}" y2="{$height}" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
|
3672
3686
|
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="{$height}" x2="{$width}" y2="0" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
|
3687
|
+
</xsl:template><xsl:variable name="figure_name_height">14</xsl:variable><xsl:variable name="width_effective" select="$pageWidth - $marginLeftRight1 - $marginLeftRight2"/><xsl:variable name="height_effective" select="$pageHeight - $marginTop - $marginBottom - $figure_name_height"/><xsl:variable name="image_dpi" select="96"/><xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/><xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/><xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image']) and *[local-name() = 'svg']]/*[local-name() = 'name']/*[local-name() = 'bookmark']" priority="2"/><xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image'])]/*[local-name() = 'svg']" priority="2" name="image_svg">
|
|
3688
|
+
<xsl:param name="name"/>
|
|
3689
|
+
|
|
3690
|
+
<xsl:variable name="svg_content">
|
|
3691
|
+
<xsl:apply-templates select="." mode="svg_update"/>
|
|
3692
|
+
</xsl:variable>
|
|
3693
|
+
|
|
3694
|
+
<xsl:variable name="alt-text">
|
|
3695
|
+
<xsl:choose>
|
|
3696
|
+
<xsl:when test="normalize-space(../*[local-name() = 'name']) != ''">
|
|
3697
|
+
<xsl:value-of select="../*[local-name() = 'name']"/>
|
|
3698
|
+
</xsl:when>
|
|
3699
|
+
<xsl:when test="normalize-space($name) != ''">
|
|
3700
|
+
<xsl:value-of select="$name"/>
|
|
3701
|
+
</xsl:when>
|
|
3702
|
+
<xsl:otherwise>Figure</xsl:otherwise>
|
|
3703
|
+
</xsl:choose>
|
|
3704
|
+
</xsl:variable>
|
|
3705
|
+
|
|
3706
|
+
<xsl:choose>
|
|
3707
|
+
<xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
|
|
3708
|
+
<fo:block>
|
|
3709
|
+
<xsl:variable name="width" select="@width"/>
|
|
3710
|
+
<xsl:variable name="height" select="@height"/>
|
|
3711
|
+
|
|
3712
|
+
<xsl:variable name="scale_x">
|
|
3713
|
+
<xsl:choose>
|
|
3714
|
+
<xsl:when test="$width > $width_effective_px">
|
|
3715
|
+
<xsl:value-of select="$width_effective_px div $width"/>
|
|
3716
|
+
</xsl:when>
|
|
3717
|
+
<xsl:otherwise>1</xsl:otherwise>
|
|
3718
|
+
</xsl:choose>
|
|
3719
|
+
</xsl:variable>
|
|
3720
|
+
|
|
3721
|
+
<xsl:variable name="scale_y">
|
|
3722
|
+
<xsl:choose>
|
|
3723
|
+
<xsl:when test="$height * $scale_x > $height_effective_px">
|
|
3724
|
+
<xsl:value-of select="$height_effective_px div ($height * $scale_x)"/>
|
|
3725
|
+
</xsl:when>
|
|
3726
|
+
<xsl:otherwise>1</xsl:otherwise>
|
|
3727
|
+
</xsl:choose>
|
|
3728
|
+
</xsl:variable>
|
|
3729
|
+
|
|
3730
|
+
<xsl:variable name="scale">
|
|
3731
|
+
<xsl:choose>
|
|
3732
|
+
<xsl:when test="$scale_y != 1">
|
|
3733
|
+
<xsl:value-of select="$scale_x * $scale_y"/>
|
|
3734
|
+
</xsl:when>
|
|
3735
|
+
<xsl:otherwise>
|
|
3736
|
+
<xsl:value-of select="$scale_x"/>
|
|
3737
|
+
</xsl:otherwise>
|
|
3738
|
+
</xsl:choose>
|
|
3739
|
+
</xsl:variable>
|
|
3740
|
+
|
|
3741
|
+
<xsl:variable name="width_scale" select="round($width * $scale)"/>
|
|
3742
|
+
<xsl:variable name="height_scale" select="round($height * $scale)"/>
|
|
3743
|
+
|
|
3744
|
+
<fo:table table-layout="fixed" width="100%">
|
|
3745
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
|
3746
|
+
<fo:table-column column-width="{$width_scale}px"/>
|
|
3747
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
|
3748
|
+
<fo:table-body>
|
|
3749
|
+
<fo:table-row>
|
|
3750
|
+
<fo:table-cell column-number="2">
|
|
3751
|
+
<fo:block>
|
|
3752
|
+
<fo:block-container width="{$width_scale}px" height="{$height_scale}px">
|
|
3753
|
+
<xsl:if test="../*[local-name() = 'name']/*[local-name() = 'bookmark']">
|
|
3754
|
+
<fo:block line-height="0" font-size="0">
|
|
3755
|
+
<xsl:for-each select="../*[local-name() = 'name']/*[local-name() = 'bookmark']">
|
|
3756
|
+
<xsl:call-template name="bookmark"/>
|
|
3757
|
+
</xsl:for-each>
|
|
3758
|
+
</fo:block>
|
|
3759
|
+
</xsl:if>
|
|
3760
|
+
<fo:block text-depth="0" line-height="0" font-size="0">
|
|
3761
|
+
|
|
3762
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
|
3763
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
|
3764
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
|
3765
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
3766
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
|
3767
|
+
|
|
3768
|
+
<xsl:apply-templates select="xalan:nodeset($svg_content)" mode="svg_remove_a"/>
|
|
3769
|
+
</fo:instream-foreign-object>
|
|
3770
|
+
</fo:block>
|
|
3771
|
+
|
|
3772
|
+
<xsl:apply-templates select=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]" mode="svg_imagemap_links">
|
|
3773
|
+
<xsl:with-param name="scale" select="$scale"/>
|
|
3774
|
+
</xsl:apply-templates>
|
|
3775
|
+
</fo:block-container>
|
|
3776
|
+
</fo:block>
|
|
3777
|
+
</fo:table-cell>
|
|
3778
|
+
</fo:table-row>
|
|
3779
|
+
</fo:table-body>
|
|
3780
|
+
</fo:table>
|
|
3781
|
+
</fo:block>
|
|
3782
|
+
|
|
3783
|
+
</xsl:when>
|
|
3784
|
+
<xsl:otherwise>
|
|
3785
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
|
3786
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
|
3787
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
|
3788
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
|
3789
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
3790
|
+
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
|
3791
|
+
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
|
3792
|
+
<!-- effective height / width = 1.48, 1.4 - with title -->
|
|
3793
|
+
<xsl:if test="@height > (@width * 1.4)"> <!-- for images with big height -->
|
|
3794
|
+
<xsl:variable name="width" select="((@width * 1.4) div @height) * 100"/>
|
|
3795
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
|
3796
|
+
</xsl:if>
|
|
3797
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
|
3798
|
+
<xsl:copy-of select="$svg_content"/>
|
|
3799
|
+
</fo:instream-foreign-object>
|
|
3800
|
+
</fo:block>
|
|
3801
|
+
</xsl:otherwise>
|
|
3802
|
+
</xsl:choose>
|
|
3803
|
+
</xsl:template><xsl:template match="@*|node()" mode="svg_update">
|
|
3804
|
+
<xsl:copy>
|
|
3805
|
+
<xsl:apply-templates select="@*|node()" mode="svg_update"/>
|
|
3806
|
+
</xsl:copy>
|
|
3807
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
|
3808
|
+
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
|
3809
|
+
<xsl:value-of select="."/>
|
|
3810
|
+
</xsl:attribute>
|
|
3811
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
|
3812
|
+
<xsl:variable name="svg_content" select="document(@src)"/>
|
|
3813
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
|
3814
|
+
<xsl:for-each select="xalan:nodeset($svg_content)/node()">
|
|
3815
|
+
<xsl:call-template name="image_svg">
|
|
3816
|
+
<xsl:with-param name="name" select="$name"/>
|
|
3817
|
+
</xsl:call-template>
|
|
3818
|
+
</xsl:for-each>
|
|
3819
|
+
</xsl:template><xsl:template match="@*|node()" mode="svg_remove_a">
|
|
3820
|
+
<xsl:copy>
|
|
3821
|
+
<xsl:apply-templates select="@*|node()" mode="svg_remove_a"/>
|
|
3822
|
+
</xsl:copy>
|
|
3823
|
+
</xsl:template><xsl:template match="*[local-name() = 'a']" mode="svg_remove_a">
|
|
3824
|
+
<xsl:apply-templates mode="svg_remove_a"/>
|
|
3825
|
+
</xsl:template><xsl:template match="*[local-name() = 'a']" mode="svg_imagemap_links">
|
|
3826
|
+
<xsl:param name="scale"/>
|
|
3827
|
+
<xsl:variable name="dest">
|
|
3828
|
+
<xsl:choose>
|
|
3829
|
+
<xsl:when test="starts-with(@href, '#')">
|
|
3830
|
+
<xsl:value-of select="substring-after(@href, '#')"/>
|
|
3831
|
+
</xsl:when>
|
|
3832
|
+
<xsl:otherwise>
|
|
3833
|
+
<xsl:value-of select="@href"/>
|
|
3834
|
+
</xsl:otherwise>
|
|
3835
|
+
</xsl:choose>
|
|
3836
|
+
</xsl:variable>
|
|
3837
|
+
<xsl:for-each select="./*[local-name() = 'rect']">
|
|
3838
|
+
<xsl:call-template name="insertSVGMapLink">
|
|
3839
|
+
<xsl:with-param name="left" select="floor(@x * $scale)"/>
|
|
3840
|
+
<xsl:with-param name="top" select="floor(@y * $scale)"/>
|
|
3841
|
+
<xsl:with-param name="width" select="floor(@width * $scale)"/>
|
|
3842
|
+
<xsl:with-param name="height" select="floor(@height * $scale)"/>
|
|
3843
|
+
<xsl:with-param name="dest" select="$dest"/>
|
|
3844
|
+
</xsl:call-template>
|
|
3845
|
+
</xsl:for-each>
|
|
3846
|
+
|
|
3847
|
+
<xsl:for-each select="./*[local-name() = 'polygon']">
|
|
3848
|
+
<xsl:variable name="points">
|
|
3849
|
+
<xsl:call-template name="split">
|
|
3850
|
+
<xsl:with-param name="pText" select="@points"/>
|
|
3851
|
+
</xsl:call-template>
|
|
3852
|
+
</xsl:variable>
|
|
3853
|
+
<xsl:variable name="x_coords">
|
|
3854
|
+
<xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
|
|
3855
|
+
<xsl:sort select="." data-type="number"/>
|
|
3856
|
+
<x><xsl:value-of select="."/></x>
|
|
3857
|
+
</xsl:for-each>
|
|
3858
|
+
</xsl:variable>
|
|
3859
|
+
<xsl:variable name="y_coords">
|
|
3860
|
+
<xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
|
|
3861
|
+
<xsl:sort select="." data-type="number"/>
|
|
3862
|
+
<y><xsl:value-of select="."/></y>
|
|
3863
|
+
</xsl:for-each>
|
|
3864
|
+
</xsl:variable>
|
|
3865
|
+
<xsl:variable name="x" select="xalan:nodeset($x_coords)//x[1]"/>
|
|
3866
|
+
<xsl:variable name="y" select="xalan:nodeset($y_coords)//y[1]"/>
|
|
3867
|
+
<xsl:variable name="width" select="xalan:nodeset($x_coords)//x[last()] - $x"/>
|
|
3868
|
+
<xsl:variable name="height" select="xalan:nodeset($y_coords)//y[last()] - $y"/>
|
|
3869
|
+
<xsl:call-template name="insertSVGMapLink">
|
|
3870
|
+
<xsl:with-param name="left" select="floor($x * $scale)"/>
|
|
3871
|
+
<xsl:with-param name="top" select="floor($y * $scale)"/>
|
|
3872
|
+
<xsl:with-param name="width" select="floor($width * $scale)"/>
|
|
3873
|
+
<xsl:with-param name="height" select="floor($height * $scale)"/>
|
|
3874
|
+
<xsl:with-param name="dest" select="$dest"/>
|
|
3875
|
+
</xsl:call-template>
|
|
3876
|
+
</xsl:for-each>
|
|
3877
|
+
|
|
3878
|
+
<xsl:for-each select="./*[local-name() = 'circle']">
|
|
3879
|
+
<xsl:call-template name="insertSVGMapLink">
|
|
3880
|
+
<xsl:with-param name="left" select="floor((@cx - @r) * $scale)"/>
|
|
3881
|
+
<xsl:with-param name="top" select="floor((@cy - @r) * $scale)"/>
|
|
3882
|
+
<xsl:with-param name="width" select="floor(@r * 2 * $scale)"/>
|
|
3883
|
+
<xsl:with-param name="height" select="floor(@r * 2 * $scale)"/>
|
|
3884
|
+
<xsl:with-param name="dest" select="$dest"/>
|
|
3885
|
+
</xsl:call-template>
|
|
3886
|
+
</xsl:for-each>
|
|
3887
|
+
<xsl:for-each select="./*[local-name() = 'ellipse']">
|
|
3888
|
+
<xsl:call-template name="insertSVGMapLink">
|
|
3889
|
+
<xsl:with-param name="left" select="floor((@cx - @rx) * $scale)"/>
|
|
3890
|
+
<xsl:with-param name="top" select="floor((@cy - @ry) * $scale)"/>
|
|
3891
|
+
<xsl:with-param name="width" select="floor(@rx * 2 * $scale)"/>
|
|
3892
|
+
<xsl:with-param name="height" select="floor(@ry * 2 * $scale)"/>
|
|
3893
|
+
<xsl:with-param name="dest" select="$dest"/>
|
|
3894
|
+
</xsl:call-template>
|
|
3895
|
+
</xsl:for-each>
|
|
3896
|
+
</xsl:template><xsl:template name="insertSVGMapLink">
|
|
3897
|
+
<xsl:param name="left"/>
|
|
3898
|
+
<xsl:param name="top"/>
|
|
3899
|
+
<xsl:param name="width"/>
|
|
3900
|
+
<xsl:param name="height"/>
|
|
3901
|
+
<xsl:param name="dest"/>
|
|
3902
|
+
<fo:block-container position="absolute" left="{$left}px" top="{$top}px" width="{$width}px" height="{$height}px">
|
|
3903
|
+
<fo:block font-size="1pt">
|
|
3904
|
+
<fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
|
|
3905
|
+
<fo:inline-container inline-progression-dimension="100%">
|
|
3906
|
+
<fo:block-container height="{$height - 1}px" width="100%">
|
|
3907
|
+
<!-- DEBUG <xsl:if test="local-name()='polygon'">
|
|
3908
|
+
<xsl:attribute name="background-color">magenta</xsl:attribute>
|
|
3909
|
+
</xsl:if> -->
|
|
3910
|
+
<fo:block> </fo:block></fo:block-container>
|
|
3911
|
+
</fo:inline-container>
|
|
3912
|
+
</fo:basic-link>
|
|
3913
|
+
</fo:block>
|
|
3914
|
+
</fo:block-container>
|
|
3673
3915
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
|
3674
3916
|
<xsl:apply-templates mode="contents"/>
|
|
3675
3917
|
<xsl:text> </xsl:text>
|
|
@@ -3698,28 +3940,39 @@
|
|
|
3698
3940
|
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
|
3699
3941
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
|
3700
3942
|
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
|
3943
|
+
<xsl:if test="@bundle = 'true'">
|
|
3944
|
+
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
|
3945
|
+
</xsl:if>
|
|
3701
3946
|
<fo:bookmark-title>
|
|
3702
|
-
<xsl:variable name="bookmark-title_">
|
|
3703
|
-
<xsl:call-template name="getLangVersion">
|
|
3704
|
-
<xsl:with-param name="lang" select="@lang"/>
|
|
3705
|
-
<xsl:with-param name="doctype" select="@doctype"/>
|
|
3706
|
-
<xsl:with-param name="title" select="@title-part"/>
|
|
3707
|
-
</xsl:call-template>
|
|
3708
|
-
</xsl:variable>
|
|
3709
3947
|
<xsl:choose>
|
|
3710
|
-
<xsl:when test="normalize-space(
|
|
3711
|
-
<xsl:
|
|
3712
|
-
|
|
3713
|
-
|
|
3948
|
+
<xsl:when test="not(normalize-space(@bundle) = 'true')"> <!-- 'bundle' means several different documents (not language versions) in one xml -->
|
|
3949
|
+
<xsl:variable name="bookmark-title_">
|
|
3950
|
+
<xsl:call-template name="getLangVersion">
|
|
3951
|
+
<xsl:with-param name="lang" select="@lang"/>
|
|
3952
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
|
3953
|
+
<xsl:with-param name="title" select="@title-part"/>
|
|
3954
|
+
</xsl:call-template>
|
|
3955
|
+
</xsl:variable>
|
|
3714
3956
|
<xsl:choose>
|
|
3715
|
-
<xsl:when test="
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
<xsl:otherwise
|
|
3957
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
|
3958
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
|
3959
|
+
</xsl:when>
|
|
3960
|
+
<xsl:otherwise>
|
|
3961
|
+
<xsl:choose>
|
|
3962
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
|
3963
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
|
3964
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
|
3965
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
|
3966
|
+
</xsl:choose>
|
|
3967
|
+
</xsl:otherwise>
|
|
3719
3968
|
</xsl:choose>
|
|
3969
|
+
</xsl:when>
|
|
3970
|
+
<xsl:otherwise>
|
|
3971
|
+
<xsl:value-of select="@title-part"/>
|
|
3720
3972
|
</xsl:otherwise>
|
|
3721
3973
|
</xsl:choose>
|
|
3722
3974
|
</fo:bookmark-title>
|
|
3975
|
+
|
|
3723
3976
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
|
3724
3977
|
|
|
3725
3978
|
<xsl:call-template name="insertFigureBookmarks">
|
|
@@ -3818,16 +4071,23 @@
|
|
|
3818
4071
|
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
|
3819
4072
|
</xsl:choose>
|
|
3820
4073
|
</xsl:template><xsl:template match="item" mode="bookmark">
|
|
3821
|
-
<
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
<xsl:
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
4074
|
+
<xsl:choose>
|
|
4075
|
+
<xsl:when test="@id != ''">
|
|
4076
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
|
4077
|
+
<fo:bookmark-title>
|
|
4078
|
+
<xsl:if test="@section != ''">
|
|
4079
|
+
<xsl:value-of select="@section"/>
|
|
4080
|
+
<xsl:text> </xsl:text>
|
|
4081
|
+
</xsl:if>
|
|
4082
|
+
<xsl:value-of select="normalize-space(title)"/>
|
|
4083
|
+
</fo:bookmark-title>
|
|
4084
|
+
<xsl:apply-templates mode="bookmark"/>
|
|
4085
|
+
</fo:bookmark>
|
|
4086
|
+
</xsl:when>
|
|
4087
|
+
<xsl:otherwise>
|
|
4088
|
+
<xsl:apply-templates mode="bookmark"/>
|
|
4089
|
+
</xsl:otherwise>
|
|
4090
|
+
</xsl:choose>
|
|
3831
4091
|
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
|
3832
4092
|
<xsl:if test="normalize-space() != ''">
|
|
3833
4093
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
|
@@ -4388,6 +4648,7 @@
|
|
|
4388
4648
|
</xsl:if>
|
|
4389
4649
|
|
|
4390
4650
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
4651
|
+
|
|
4391
4652
|
<xsl:if test="normalize-space(@citeas) = ''">
|
|
4392
4653
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
|
4393
4654
|
</xsl:if>
|
data/metanorma-csa.gemspec
CHANGED
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.require_paths = ["lib"]
|
|
29
29
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
|
30
30
|
|
|
31
|
-
spec.add_dependency "metanorma-generic", "~> 1.10.
|
|
31
|
+
spec.add_dependency "metanorma-generic", "~> 1.10.2"
|
|
32
32
|
|
|
33
33
|
spec.add_development_dependency "byebug", "~> 9.1"
|
|
34
34
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-csa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.8.
|
|
4
|
+
version: 1.8.6
|
|
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-07-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 1.10.
|
|
19
|
+
version: 1.10.2
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 1.10.
|
|
26
|
+
version: 1.10.2
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: byebug
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|