metanorma-csa 1.7.5 → 1.7.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 +9 -32
- data/lib/asciidoctor/csa/isodoc.rng +23 -1
- data/lib/isodoc/csa/csa.standard.xsl +267 -87
- 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: '038ff66044310e3d885d162467ea00ac88862984d42ed54090d450d91979dbfa'
|
|
4
|
+
data.tar.gz: 2878930f76d4fd76765ba564dae4b05f404873d4146fec60eadb2d86975a8e74
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a85d42849a4b81037444a83b4eb75c888705b83d9777dc84a45bbefaef6e56f3cb0a8b2ac813e7e7bd572c89da49fca6b3d557b293143b1be39b5f8a7e2811e2
|
|
7
|
+
data.tar.gz: 691de758131ffe0c1c4ef87dd11339aea79b41be5880a2b5a895f297efef431739999eb8b7331d87db6555144f371f4b23d17624fc00f8baade1c62d886c2f2f
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -4,7 +4,7 @@ name: rake
|
|
|
4
4
|
|
|
5
5
|
on:
|
|
6
6
|
push:
|
|
7
|
-
branches: [ master, main
|
|
7
|
+
branches: [ master, main ]
|
|
8
8
|
tags: [ v* ]
|
|
9
9
|
pull_request:
|
|
10
10
|
|
|
@@ -16,50 +16,27 @@ jobs:
|
|
|
16
16
|
strategy:
|
|
17
17
|
fail-fast: false
|
|
18
18
|
matrix:
|
|
19
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
|
19
|
+
ruby: [ '2.7', '2.6', '2.5', '2.4' ]
|
|
20
20
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
|
21
21
|
experimental: [ false ]
|
|
22
22
|
include:
|
|
23
|
-
- ruby: '
|
|
23
|
+
- ruby: '3.0'
|
|
24
24
|
os: 'ubuntu-latest'
|
|
25
25
|
experimental: true
|
|
26
|
-
- ruby: '
|
|
26
|
+
- ruby: '3.0'
|
|
27
27
|
os: 'windows-latest'
|
|
28
28
|
experimental: true
|
|
29
|
-
- ruby: '
|
|
29
|
+
- ruby: '3.0'
|
|
30
30
|
os: 'macos-latest'
|
|
31
31
|
experimental: true
|
|
32
32
|
steps:
|
|
33
|
-
- uses: actions/checkout@
|
|
33
|
+
- uses: actions/checkout@v2
|
|
34
|
+
with:
|
|
35
|
+
submodules: true
|
|
34
36
|
|
|
35
37
|
- uses: ruby/setup-ruby@v1
|
|
36
38
|
with:
|
|
37
39
|
ruby-version: ${{ matrix.ruby }}
|
|
38
|
-
|
|
39
|
-
- if: matrix.os == 'macos-latest'
|
|
40
|
-
run: brew install autoconf automake libtool
|
|
41
|
-
|
|
42
|
-
- uses: actions/cache@v2
|
|
43
|
-
with:
|
|
44
|
-
path: vendor/bundle
|
|
45
|
-
key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
|
|
46
|
-
restore-keys: bundle-${{ matrix.os }}-${{ matrix.ruby }}
|
|
47
|
-
|
|
48
|
-
- run: bundle config set path 'vendor/bundle'
|
|
49
|
-
|
|
50
|
-
- run: bundle install --jobs 4 --retry 3
|
|
40
|
+
bundler-cache: true
|
|
51
41
|
|
|
52
42
|
- run: bundle exec rake
|
|
53
|
-
|
|
54
|
-
tests-passed:
|
|
55
|
-
needs: rake
|
|
56
|
-
runs-on: ubuntu-latest
|
|
57
|
-
steps:
|
|
58
|
-
- name: Trigger tests passed event
|
|
59
|
-
uses: Sibz/github-status-action@v1
|
|
60
|
-
with:
|
|
61
|
-
authToken: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
|
62
|
-
context: 'tests-passed-successfully'
|
|
63
|
-
description: 'Tests passed successfully'
|
|
64
|
-
state: 'success'
|
|
65
|
-
sha: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
</attribute>
|
|
103
103
|
</optional>
|
|
104
104
|
<oneOrMore>
|
|
105
|
-
<ref name="
|
|
105
|
+
<ref name="ul_li"/>
|
|
106
106
|
</oneOrMore>
|
|
107
107
|
<zeroOrMore>
|
|
108
108
|
<ref name="note"/>
|
|
@@ -1716,4 +1716,26 @@
|
|
|
1716
1716
|
</zeroOrMore>
|
|
1717
1717
|
</element>
|
|
1718
1718
|
</define>
|
|
1719
|
+
<define name="ul_li">
|
|
1720
|
+
<element name="li">
|
|
1721
|
+
<optional>
|
|
1722
|
+
<attribute name="id">
|
|
1723
|
+
<data type="ID"/>
|
|
1724
|
+
</attribute>
|
|
1725
|
+
</optional>
|
|
1726
|
+
<optional>
|
|
1727
|
+
<attribute name="uncheckedcheckbox">
|
|
1728
|
+
<data type="boolean"/>
|
|
1729
|
+
</attribute>
|
|
1730
|
+
</optional>
|
|
1731
|
+
<optional>
|
|
1732
|
+
<attribute name="checkedcheckbox">
|
|
1733
|
+
<data type="boolean"/>
|
|
1734
|
+
</attribute>
|
|
1735
|
+
</optional>
|
|
1736
|
+
<oneOrMore>
|
|
1737
|
+
<ref name="BasicBlock"/>
|
|
1738
|
+
</oneOrMore>
|
|
1739
|
+
</element>
|
|
1740
|
+
</define>
|
|
1719
1741
|
</grammar>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="yes"/>
|
|
4
4
|
|
|
5
5
|
<xsl:param name="svg_images"/>
|
|
6
|
+
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
|
6
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
|
7
8
|
|
|
8
9
|
<xsl:variable name="pageWidth" select="'215.9mm'"/>
|
|
@@ -52,7 +53,9 @@
|
|
|
52
53
|
|
|
53
54
|
</fo:layout-master-set>
|
|
54
55
|
|
|
55
|
-
<
|
|
56
|
+
<fo:declarations>
|
|
57
|
+
<xsl:call-template name="addPDFUAmeta"/>
|
|
58
|
+
</fo:declarations>
|
|
56
59
|
|
|
57
60
|
<xsl:call-template name="addBookmarks">
|
|
58
61
|
<xsl:with-param name="contents" select="$contents"/>
|
|
@@ -1146,6 +1149,7 @@
|
|
|
1146
1149
|
|
|
1147
1150
|
|
|
1148
1151
|
|
|
1152
|
+
|
|
1149
1153
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
|
1150
1154
|
|
|
1151
1155
|
<xsl:attribute name="padding-right">10mm</xsl:attribute>
|
|
@@ -1753,7 +1757,15 @@
|
|
|
1753
1757
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
|
1754
1758
|
<xsl:value-of select="@target"/>
|
|
1755
1759
|
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
|
1756
|
-
<xsl:variable name="
|
|
1760
|
+
<xsl:variable name="mathml">
|
|
1761
|
+
<xsl:for-each select="*">
|
|
1762
|
+
<xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
|
|
1763
|
+
<xsl:copy-of select="."/>
|
|
1764
|
+
</xsl:if>
|
|
1765
|
+
</xsl:for-each>
|
|
1766
|
+
</xsl:variable>
|
|
1767
|
+
|
|
1768
|
+
<xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
|
|
1757
1769
|
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
|
1758
1770
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
|
1759
1771
|
<xsl:param name="cols-count"/>
|
|
@@ -2698,6 +2710,10 @@
|
|
|
2698
2710
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
|
2699
2711
|
<xsl:apply-templates/>
|
|
2700
2712
|
</fo:inline>
|
|
2713
|
+
</xsl:template><xsl:template match="*[local-name()='hi']">
|
|
2714
|
+
<fo:inline background-color="yellow">
|
|
2715
|
+
<xsl:apply-templates/>
|
|
2716
|
+
</fo:inline>
|
|
2701
2717
|
</xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
|
2702
2718
|
<xsl:variable name="text" select="normalize-space(.)"/>
|
|
2703
2719
|
<fo:inline font-size="75%">
|
|
@@ -3038,6 +3054,7 @@
|
|
|
3038
3054
|
<xsl:apply-templates select="." mode="mathml"/>
|
|
3039
3055
|
</xsl:variable>
|
|
3040
3056
|
<fo:instream-foreign-object fox:alt-text="Math">
|
|
3057
|
+
|
|
3041
3058
|
<!-- <xsl:copy-of select="."/> -->
|
|
3042
3059
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
|
3043
3060
|
</fo:instream-foreign-object>
|
|
@@ -3056,7 +3073,7 @@
|
|
|
3056
3073
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
|
3057
3074
|
</xsl:copy>
|
|
3058
3075
|
<mathml:mspace width="0.5ex"/>
|
|
3059
|
-
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
|
3076
|
+
</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">
|
|
3060
3077
|
<xsl:variable name="target">
|
|
3061
3078
|
<xsl:choose>
|
|
3062
3079
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
|
@@ -3090,8 +3107,6 @@
|
|
|
3090
3107
|
</xsl:otherwise>
|
|
3091
3108
|
</xsl:choose>
|
|
3092
3109
|
</fo:inline>
|
|
3093
|
-
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
|
3094
|
-
<fo:inline id="{@id}"/>
|
|
3095
3110
|
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
|
3096
3111
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
|
3097
3112
|
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
|
@@ -3302,6 +3317,7 @@
|
|
|
3302
3317
|
<fo:block id="{@id}">
|
|
3303
3318
|
<xsl:apply-templates/>
|
|
3304
3319
|
</fo:block>
|
|
3320
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
|
3305
3321
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
|
3306
3322
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
|
3307
3323
|
<xsl:apply-templates/>
|
|
@@ -3885,10 +3901,11 @@
|
|
|
3885
3901
|
</xsl:choose>
|
|
3886
3902
|
|
|
3887
3903
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
|
3888
|
-
|
|
3904
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
|
3889
3905
|
<xsl:variable name="element">
|
|
3890
3906
|
block
|
|
3891
3907
|
|
|
3908
|
+
|
|
3892
3909
|
</xsl:variable>
|
|
3893
3910
|
<xsl:choose>
|
|
3894
3911
|
<xsl:when test="normalize-space($element) = 'block'">
|
|
@@ -3992,29 +4009,47 @@
|
|
|
3992
4009
|
<xsl:text>— </xsl:text>
|
|
3993
4010
|
<xsl:apply-templates/>
|
|
3994
4011
|
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4012
|
+
|
|
4013
|
+
<xsl:variable name="bibitemid">
|
|
4014
|
+
<xsl:choose>
|
|
4015
|
+
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
|
|
4016
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
|
4017
|
+
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
|
4018
|
+
</xsl:choose>
|
|
4019
|
+
</xsl:variable>
|
|
4020
|
+
|
|
4021
|
+
<xsl:choose>
|
|
4022
|
+
<xsl:when test="normalize-space($bibitemid) != ''">
|
|
4023
|
+
<fo:inline xsl:use-attribute-sets="eref-style">
|
|
4024
|
+
<xsl:if test="@type = 'footnote'">
|
|
4025
|
+
|
|
4026
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
|
4027
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
|
4028
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
|
4029
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
|
4030
|
+
|
|
4031
|
+
|
|
4032
|
+
</xsl:if>
|
|
4033
|
+
|
|
4034
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
4035
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
|
4036
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
|
4037
|
+
</xsl:if>
|
|
4038
|
+
<xsl:if test="@type = 'inline'">
|
|
4039
|
+
|
|
4040
|
+
|
|
4041
|
+
|
|
4042
|
+
</xsl:if>
|
|
4043
|
+
|
|
4044
|
+
<xsl:apply-templates/>
|
|
4045
|
+
</fo:basic-link>
|
|
4046
|
+
|
|
4047
|
+
</fo:inline>
|
|
4048
|
+
</xsl:when>
|
|
4049
|
+
<xsl:otherwise>
|
|
4050
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
4051
|
+
</xsl:otherwise>
|
|
4052
|
+
</xsl:choose>
|
|
4018
4053
|
</xsl:template><xsl:template match="*[local-name() = 'tab']">
|
|
4019
4054
|
<!-- zero-space char -->
|
|
4020
4055
|
<xsl:variable name="depth">
|
|
@@ -4192,6 +4227,153 @@
|
|
|
4192
4227
|
</fo:block>
|
|
4193
4228
|
</xsl:otherwise>
|
|
4194
4229
|
</xsl:choose>
|
|
4230
|
+
</xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
|
|
4231
|
+
<xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
|
|
4232
|
+
<bookmark><xsl:value-of select="@id"/></bookmark>
|
|
4233
|
+
</xsl:for-each>
|
|
4234
|
+
</xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
|
|
4235
|
+
<xsl:copy>
|
|
4236
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id"/>
|
|
4237
|
+
</xsl:copy>
|
|
4238
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
|
4239
|
+
<xsl:variable name="id">
|
|
4240
|
+
<xsl:call-template name="generateIndexXrefId"/>
|
|
4241
|
+
</xsl:variable>
|
|
4242
|
+
<xsl:copy> <!-- add id to xref -->
|
|
4243
|
+
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
|
4244
|
+
<xsl:attribute name="id">
|
|
4245
|
+
<xsl:value-of select="$id"/>
|
|
4246
|
+
</xsl:attribute>
|
|
4247
|
+
<xsl:apply-templates mode="index_add_id"/>
|
|
4248
|
+
</xsl:copy>
|
|
4249
|
+
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
|
4250
|
+
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
|
4251
|
+
<xsl:if test="@to">
|
|
4252
|
+
<xsl:value-of select="$dash"/>
|
|
4253
|
+
<xsl:copy>
|
|
4254
|
+
<xsl:copy-of select="@*"/>
|
|
4255
|
+
<xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
|
|
4256
|
+
<xsl:attribute name="id">
|
|
4257
|
+
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
|
4258
|
+
</xsl:attribute>
|
|
4259
|
+
<xsl:apply-templates mode="index_add_id"/>
|
|
4260
|
+
</xsl:copy>
|
|
4261
|
+
</xsl:if>
|
|
4262
|
+
</xsl:template><xsl:template match="@*|node()" mode="index_update">
|
|
4263
|
+
<xsl:copy>
|
|
4264
|
+
<xsl:apply-templates select="@*|node()" mode="index_update"/>
|
|
4265
|
+
</xsl:copy>
|
|
4266
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" mode="index_update">
|
|
4267
|
+
<xsl:copy>
|
|
4268
|
+
<xsl:apply-templates select="@*" mode="index_update"/>
|
|
4269
|
+
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
|
4270
|
+
</xsl:copy>
|
|
4271
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/node()" mode="process_li_element" priority="2">
|
|
4272
|
+
<xsl:param name="element"/>
|
|
4273
|
+
<xsl:param name="remove" select="'false'"/>
|
|
4274
|
+
<xsl:param name="target"/>
|
|
4275
|
+
<!-- <node></node> -->
|
|
4276
|
+
<xsl:choose>
|
|
4277
|
+
<xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
|
|
4278
|
+
<!-- skip text (i.e. remove it) and process next element -->
|
|
4279
|
+
<!-- [removed_<xsl:value-of select="."/>] -->
|
|
4280
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
|
4281
|
+
<xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
|
|
4282
|
+
</xsl:apply-templates>
|
|
4283
|
+
</xsl:when>
|
|
4284
|
+
<xsl:when test="self::text()">
|
|
4285
|
+
<xsl:value-of select="."/>
|
|
4286
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
|
4287
|
+
</xsl:when>
|
|
4288
|
+
<xsl:when test="self::* and local-name(.) = 'xref'">
|
|
4289
|
+
<xsl:variable name="id" select="@id"/>
|
|
4290
|
+
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
|
4291
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
|
4292
|
+
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
|
4293
|
+
|
|
4294
|
+
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
|
4295
|
+
<xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
|
|
4296
|
+
|
|
4297
|
+
<xsl:choose>
|
|
4298
|
+
<!-- 2nd pass -->
|
|
4299
|
+
<!-- if page is equal to page for next and page is not the end of range -->
|
|
4300
|
+
<xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
|
|
4301
|
+
<!-- skip element (i.e. remove it) and remove next text ',' -->
|
|
4302
|
+
<!-- [removed_xref] -->
|
|
4303
|
+
|
|
4304
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
|
4305
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
|
4306
|
+
<xsl:with-param name="target">
|
|
4307
|
+
<xsl:choose>
|
|
4308
|
+
<xsl:when test="$target != ''"><xsl:value-of select="$target"/></xsl:when>
|
|
4309
|
+
<xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise>
|
|
4310
|
+
</xsl:choose>
|
|
4311
|
+
</xsl:with-param>
|
|
4312
|
+
</xsl:apply-templates>
|
|
4313
|
+
</xsl:when>
|
|
4314
|
+
|
|
4315
|
+
<xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
|
|
4316
|
+
<!-- remove xref -->
|
|
4317
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
|
4318
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
|
4319
|
+
</xsl:apply-templates>
|
|
4320
|
+
</xsl:when>
|
|
4321
|
+
|
|
4322
|
+
<xsl:otherwise>
|
|
4323
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
|
4324
|
+
<xsl:with-param name="target" select="$target"/>
|
|
4325
|
+
</xsl:apply-templates>
|
|
4326
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
|
4327
|
+
</xsl:otherwise>
|
|
4328
|
+
</xsl:choose>
|
|
4329
|
+
</xsl:when>
|
|
4330
|
+
<xsl:when test="self::* and local-name(.) = 'ul'">
|
|
4331
|
+
<!-- ul -->
|
|
4332
|
+
<xsl:apply-templates select="." mode="index_update"/>
|
|
4333
|
+
</xsl:when>
|
|
4334
|
+
<xsl:otherwise>
|
|
4335
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
|
4336
|
+
<xsl:with-param name="target" select="$target"/>
|
|
4337
|
+
</xsl:apply-templates>
|
|
4338
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
|
4339
|
+
</xsl:otherwise>
|
|
4340
|
+
</xsl:choose>
|
|
4341
|
+
</xsl:template><xsl:template match="@*|node()" mode="xref_copy">
|
|
4342
|
+
<xsl:param name="target"/>
|
|
4343
|
+
<xsl:copy>
|
|
4344
|
+
<xsl:apply-templates select="@*" mode="xref_copy"/>
|
|
4345
|
+
<xsl:if test="$target != '' and not(xalan:nodeset($bookmark_in_fn)//bookmark[. = $target])">
|
|
4346
|
+
<xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
|
|
4347
|
+
</xsl:if>
|
|
4348
|
+
<xsl:apply-templates select="node()" mode="xref_copy"/>
|
|
4349
|
+
</xsl:copy>
|
|
4350
|
+
</xsl:template><xsl:template name="generateIndexXrefId">
|
|
4351
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
|
4352
|
+
|
|
4353
|
+
<xsl:variable name="docid">
|
|
4354
|
+
<xsl:call-template name="getDocumentId"/>
|
|
4355
|
+
</xsl:variable>
|
|
4356
|
+
<xsl:variable name="item_number">
|
|
4357
|
+
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
|
4358
|
+
</xsl:variable>
|
|
4359
|
+
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
|
4360
|
+
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
|
4361
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
|
|
4362
|
+
<xsl:apply-templates/>
|
|
4363
|
+
<fo:block>
|
|
4364
|
+
<xsl:if test="following-sibling::*[local-name() = 'clause']">
|
|
4365
|
+
<fo:block> </fo:block>
|
|
4366
|
+
</xsl:if>
|
|
4367
|
+
</fo:block>
|
|
4368
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
|
|
4369
|
+
<xsl:apply-templates/>
|
|
4370
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
|
4371
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
|
4372
|
+
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
|
4373
|
+
<xsl:apply-templates/>
|
|
4374
|
+
</fo:block>
|
|
4375
|
+
</xsl:template><xsl:template match="*[local-name() = 'bookmark']">
|
|
4376
|
+
<fo:inline id="{@id}"/>
|
|
4195
4377
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
|
4196
4378
|
<!-- <row>
|
|
4197
4379
|
<date>05-07-2013</date>
|
|
@@ -4408,70 +4590,68 @@
|
|
|
4408
4590
|
<xsl:variable name="lang">
|
|
4409
4591
|
<xsl:call-template name="getLang"/>
|
|
4410
4592
|
</xsl:variable>
|
|
4411
|
-
<
|
|
4412
|
-
|
|
4413
|
-
<pdf:
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
<
|
|
4418
|
-
<rdf:
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
<
|
|
4422
|
-
<xsl:variable name="title">
|
|
4423
|
-
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
</xsl:for-each>
|
|
4433
|
-
</xsl:variable>
|
|
4434
|
-
<xsl:choose>
|
|
4435
|
-
<xsl:when test="normalize-space($title) != ''">
|
|
4436
|
-
<xsl:value-of select="$title"/>
|
|
4437
|
-
</xsl:when>
|
|
4438
|
-
<xsl:otherwise>
|
|
4439
|
-
<xsl:text> </xsl:text>
|
|
4440
|
-
</xsl:otherwise>
|
|
4441
|
-
</xsl:choose>
|
|
4442
|
-
</dc:title>
|
|
4443
|
-
<dc:creator>
|
|
4593
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
|
4594
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
|
4595
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
|
4596
|
+
</pdf:dictionary>
|
|
4597
|
+
</pdf:catalog>
|
|
4598
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
|
4599
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
|
4600
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
|
4601
|
+
<!-- Dublin Core properties go here -->
|
|
4602
|
+
<dc:title>
|
|
4603
|
+
<xsl:variable name="title">
|
|
4444
4604
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
|
4445
4605
|
|
|
4446
|
-
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
|
4447
|
-
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
|
4448
|
-
<xsl:if test="position() != last()">; </xsl:if>
|
|
4449
|
-
</xsl:for-each>
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
4606
|
|
|
4453
|
-
</xsl:for-each>
|
|
4454
|
-
</dc:creator>
|
|
4455
|
-
<dc:description>
|
|
4456
|
-
<xsl:variable name="abstract">
|
|
4457
4607
|
|
|
4458
|
-
|
|
4608
|
+
|
|
4609
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
|
4459
4610
|
|
|
4460
4611
|
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
</
|
|
4464
|
-
<
|
|
4465
|
-
<xsl:
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4612
|
+
|
|
4613
|
+
</xsl:for-each>
|
|
4614
|
+
</xsl:variable>
|
|
4615
|
+
<xsl:choose>
|
|
4616
|
+
<xsl:when test="normalize-space($title) != ''">
|
|
4617
|
+
<xsl:value-of select="$title"/>
|
|
4618
|
+
</xsl:when>
|
|
4619
|
+
<xsl:otherwise>
|
|
4620
|
+
<xsl:text> </xsl:text>
|
|
4621
|
+
</xsl:otherwise>
|
|
4622
|
+
</xsl:choose>
|
|
4623
|
+
</dc:title>
|
|
4624
|
+
<dc:creator>
|
|
4625
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
|
4626
|
+
|
|
4627
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
|
4628
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
|
4629
|
+
<xsl:if test="position() != last()">; </xsl:if>
|
|
4630
|
+
</xsl:for-each>
|
|
4631
|
+
|
|
4632
|
+
|
|
4633
|
+
|
|
4634
|
+
</xsl:for-each>
|
|
4635
|
+
</dc:creator>
|
|
4636
|
+
<dc:description>
|
|
4637
|
+
<xsl:variable name="abstract">
|
|
4638
|
+
|
|
4639
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
|
4640
|
+
|
|
4641
|
+
|
|
4642
|
+
</xsl:variable>
|
|
4643
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
|
4644
|
+
</dc:description>
|
|
4645
|
+
<pdf:Keywords>
|
|
4646
|
+
<xsl:call-template name="insertKeywords"/>
|
|
4647
|
+
</pdf:Keywords>
|
|
4648
|
+
</rdf:Description>
|
|
4649
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
|
4650
|
+
<!-- XMP properties go here -->
|
|
4651
|
+
<xmp:CreatorTool/>
|
|
4652
|
+
</rdf:Description>
|
|
4653
|
+
</rdf:RDF>
|
|
4654
|
+
</x:xmpmeta>
|
|
4475
4655
|
</xsl:template><xsl:template name="getId">
|
|
4476
4656
|
<xsl:choose>
|
|
4477
4657
|
<xsl:when test="../@id">
|
data/metanorma-csa.gemspec
CHANGED
|
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
|
35
35
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
|
36
36
|
spec.add_development_dependency "guard", "~> 2.14"
|
|
37
37
|
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
|
38
|
-
spec.add_development_dependency "rake", "~>
|
|
38
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
|
39
39
|
spec.add_development_dependency "rspec", "~> 3.6"
|
|
40
40
|
spec.add_development_dependency "rubocop", "= 0.54.0"
|
|
41
41
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
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.7.
|
|
4
|
+
version: 1.7.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-03-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|
|
@@ -100,14 +100,14 @@ dependencies:
|
|
|
100
100
|
requirements:
|
|
101
101
|
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '
|
|
103
|
+
version: '13.0'
|
|
104
104
|
type: :development
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '
|
|
110
|
+
version: '13.0'
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
112
|
name: rspec
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|