metanorma-nist 1.2.14 → 1.2.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e78c8ae10f3132672926796f46dbf8878162307eff3397a4b3dcd851546bcfb
4
- data.tar.gz: 495b6372624db9ae53eac0da0d007093728d643aea4b991317e9cc600846b8cf
3
+ metadata.gz: 1c3bf5464e9a11cd435a402b9c0e6e574440135069641c783096caf05da339af
4
+ data.tar.gz: 6dabdea47dc0a2a9640c64be07de34b11d48519d0101a2481004de2b609d7685
5
5
  SHA512:
6
- metadata.gz: f5188d91752f67dcf8f0ec293b3875d86fead17a0b4cd05738deb2c1c111dddeb29fea79dbb516766b820b8419f75d3633a5c0d09396be5d3af100e1fc3ef13a
7
- data.tar.gz: 1106b9615698e0d044af2659c9c2d68c8ba152742586dbb6c64a7cfeb9fdbc679cd7139b149d69d0f0f6037af8f7d636666425bdfec20cfd672df68ed00bb968
6
+ metadata.gz: bb8bcdd5670fd5916e4a63907c41bd55e5c238be4ae82943f9466742a8669ba5ccf6e7e2a18667179b14c2d06ef5a99776e0e131f6055e2811ac9db63489a9af
7
+ data.tar.gz: fe3132a7a04a41672bd73196e1538f97f5307c675aa4a86a4c54f5e640f8deee555a34521212722002d1bd46b740a2797a29f482c16c3b708b6fffae7677614b
@@ -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: '2.7'
23
+ - ruby: '3.0'
24
24
  os: 'ubuntu-latest'
25
25
  experimental: true
26
- - ruby: '2.7'
26
+ - ruby: '3.0'
27
27
  os: 'windows-latest'
28
28
  experimental: true
29
- - ruby: '2.7'
29
+ - ruby: '3.0'
30
30
  os: 'macos-latest'
31
31
  experimental: true
32
32
  steps:
33
- - uses: actions/checkout@master
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 }}
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ .rubocop-https--*
data/.rubocop.yml CHANGED
@@ -1,6 +1,14 @@
1
1
  # This project follows the Ribose OSS style guide.
2
2
  # https://github.com/riboseinc/oss-guides
3
3
  # All project-specific additions and overrides should be specified in this file.
4
-
5
4
  inherit_from:
6
5
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
6
+
7
+ # local repo-specific modifications
8
+
9
+ AllCops:
10
+ DisplayCopNames: false
11
+ StyleGuideCopsOnly: false
12
+ TargetRubyVersion: 2.4
13
+ Rails:
14
+ Enabled: true
@@ -124,7 +124,7 @@
124
124
  <value>application/tei+xml</value>
125
125
  <value>text/x-asciidoc</value>
126
126
  <value>text/markdown</value>
127
- <value>application/x-isodoc+xml</value>
127
+ <value>application/x-metanorma+xml</value>
128
128
  <text/>
129
129
  </choice>
130
130
  </attribute>
@@ -452,6 +452,7 @@
452
452
  <attribute name="type">
453
453
  <choice>
454
454
  <value>isni</value>
455
+ <value>orcid</value>
455
456
  <value>uri</value>
456
457
  </choice>
457
458
  </attribute>
@@ -461,10 +462,7 @@
461
462
  <define name="org-identifier">
462
463
  <element name="identifier">
463
464
  <attribute name="type">
464
- <choice>
465
- <value>orcid</value>
466
- <value>uri</value>
467
- </choice>
465
+ <data type="string" datatypeLibrary=""/>
468
466
  </attribute>
469
467
  <text/>
470
468
  </element>
@@ -1106,7 +1104,7 @@
1106
1104
  <value>complementOf</value>
1107
1105
  <value>obsoletes</value>
1108
1106
  <value>obsoletedBy</value>
1109
- <value>cited</value>
1107
+ <value>cites</value>
1110
1108
  <value>isCitedIn</value>
1111
1109
  </choice>
1112
1110
  </define>
@@ -102,7 +102,7 @@
102
102
  </attribute>
103
103
  </optional>
104
104
  <oneOrMore>
105
- <ref name="li"/>
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>
@@ -1300,6 +1300,7 @@
1300
1300
 
1301
1301
 
1302
1302
 
1303
+
1303
1304
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1304
1305
 
1305
1306
 
@@ -1907,7 +1908,15 @@
1907
1908
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
1908
1909
  <xsl:value-of select="@target"/>
1909
1910
  </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
1910
- <xsl:variable name="math_text" select="normalize-space(.)"/>
1911
+ <xsl:variable name="mathml">
1912
+ <xsl:for-each select="*">
1913
+ <xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
1914
+ <xsl:copy-of select="."/>
1915
+ </xsl:if>
1916
+ </xsl:for-each>
1917
+ </xsl:variable>
1918
+
1919
+ <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
1911
1920
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
1912
1921
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1913
1922
  <xsl:param name="cols-count"/>
@@ -2898,6 +2907,10 @@
2898
2907
  <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2899
2908
  <xsl:apply-templates/>
2900
2909
  </fo:inline>
2910
+ </xsl:template><xsl:template match="*[local-name()='hi']">
2911
+ <fo:inline background-color="yellow">
2912
+ <xsl:apply-templates/>
2913
+ </fo:inline>
2901
2914
  </xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
2902
2915
  <xsl:variable name="text" select="normalize-space(.)"/>
2903
2916
  <fo:inline font-size="75%">
@@ -3238,6 +3251,7 @@
3238
3251
  <xsl:apply-templates select="." mode="mathml"/>
3239
3252
  </xsl:variable>
3240
3253
  <fo:instream-foreign-object fox:alt-text="Math">
3254
+
3241
3255
  <!-- <xsl:copy-of select="."/> -->
3242
3256
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
3243
3257
  </fo:instream-foreign-object>
@@ -3256,7 +3270,7 @@
3256
3270
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
3257
3271
  </xsl:copy>
3258
3272
  <mathml:mspace width="0.5ex"/>
3259
- </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3273
+ </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">
3260
3274
  <xsl:variable name="target">
3261
3275
  <xsl:choose>
3262
3276
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
@@ -3290,8 +3304,6 @@
3290
3304
  </xsl:otherwise>
3291
3305
  </xsl:choose>
3292
3306
  </fo:inline>
3293
- </xsl:template><xsl:template match="*[local-name()='bookmark']">
3294
- <fo:inline id="{@id}"/>
3295
3307
  </xsl:template><xsl:template match="*[local-name()='appendix']">
3296
3308
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
3297
3309
  <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
@@ -3502,6 +3514,7 @@
3502
3514
  <fo:block id="{@id}">
3503
3515
  <xsl:apply-templates/>
3504
3516
  </fo:block>
3517
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3505
3518
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
3506
3519
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
3507
3520
  <xsl:apply-templates/>
@@ -4089,10 +4102,11 @@
4089
4102
  </xsl:choose>
4090
4103
 
4091
4104
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
4092
-
4105
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
4093
4106
  <xsl:variable name="element">
4094
4107
  block
4095
4108
 
4109
+
4096
4110
  </xsl:variable>
4097
4111
  <xsl:choose>
4098
4112
  <xsl:when test="normalize-space($element) = 'block'">
@@ -4188,31 +4202,49 @@
4188
4202
  <xsl:text>— </xsl:text>
4189
4203
  <xsl:apply-templates/>
4190
4204
  </xsl:template><xsl:template match="*[local-name() = 'eref']">
4191
- <fo:inline xsl:use-attribute-sets="eref-style">
4192
- <xsl:if test="@type = 'footnote'">
4193
-
4194
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
4195
- <xsl:attribute name="font-size">80%</xsl:attribute>
4196
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4197
- <xsl:attribute name="vertical-align">super</xsl:attribute>
4198
-
4199
-
4200
- </xsl:if>
4201
-
4202
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4203
-
4204
- <xsl:if test="@type = 'inline'">
4205
-
4206
-
4207
-
4208
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
4209
-
4210
- </xsl:if>
4211
-
4212
-
4213
- <xsl:apply-templates/>
4214
- </fo:basic-link>
4215
- </fo:inline>
4205
+
4206
+ <xsl:variable name="bibitemid">
4207
+ <xsl:choose>
4208
+ <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
4209
+ <xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
4210
+ <xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
4211
+ </xsl:choose>
4212
+ </xsl:variable>
4213
+
4214
+ <xsl:choose>
4215
+ <xsl:when test="normalize-space($bibitemid) != ''">
4216
+ <fo:inline xsl:use-attribute-sets="eref-style">
4217
+ <xsl:if test="@type = 'footnote'">
4218
+
4219
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
4220
+ <xsl:attribute name="font-size">80%</xsl:attribute>
4221
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4222
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
4223
+
4224
+
4225
+ </xsl:if>
4226
+
4227
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4228
+ <xsl:if test="normalize-space(@citeas) = ''">
4229
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
4230
+ </xsl:if>
4231
+ <xsl:if test="@type = 'inline'">
4232
+
4233
+
4234
+
4235
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4236
+
4237
+ </xsl:if>
4238
+
4239
+ <xsl:apply-templates/>
4240
+ </fo:basic-link>
4241
+
4242
+ </fo:inline>
4243
+ </xsl:when>
4244
+ <xsl:otherwise>
4245
+ <fo:inline><xsl:apply-templates/></fo:inline>
4246
+ </xsl:otherwise>
4247
+ </xsl:choose>
4216
4248
  </xsl:template><xsl:template match="*[local-name() = 'tab']">
4217
4249
  <!-- zero-space char -->
4218
4250
  <xsl:variable name="depth">
@@ -4396,6 +4428,153 @@
4396
4428
  </fo:block>
4397
4429
  </xsl:otherwise>
4398
4430
  </xsl:choose>
4431
+ </xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
4432
+ <xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
4433
+ <bookmark><xsl:value-of select="@id"/></bookmark>
4434
+ </xsl:for-each>
4435
+ </xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
4436
+ <xsl:copy>
4437
+ <xsl:apply-templates select="@*|node()" mode="index_add_id"/>
4438
+ </xsl:copy>
4439
+ </xsl:template><xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
4440
+ <xsl:variable name="id">
4441
+ <xsl:call-template name="generateIndexXrefId"/>
4442
+ </xsl:variable>
4443
+ <xsl:copy> <!-- add id to xref -->
4444
+ <xsl:apply-templates select="@*" mode="index_add_id"/>
4445
+ <xsl:attribute name="id">
4446
+ <xsl:value-of select="$id"/>
4447
+ </xsl:attribute>
4448
+ <xsl:apply-templates mode="index_add_id"/>
4449
+ </xsl:copy>
4450
+ <!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
4451
+ <xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
4452
+ <xsl:if test="@to">
4453
+ <xsl:value-of select="$dash"/>
4454
+ <xsl:copy>
4455
+ <xsl:copy-of select="@*"/>
4456
+ <xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
4457
+ <xsl:attribute name="id">
4458
+ <xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
4459
+ </xsl:attribute>
4460
+ <xsl:apply-templates mode="index_add_id"/>
4461
+ </xsl:copy>
4462
+ </xsl:if>
4463
+ </xsl:template><xsl:template match="@*|node()" mode="index_update">
4464
+ <xsl:copy>
4465
+ <xsl:apply-templates select="@*|node()" mode="index_update"/>
4466
+ </xsl:copy>
4467
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" mode="index_update">
4468
+ <xsl:copy>
4469
+ <xsl:apply-templates select="@*" mode="index_update"/>
4470
+ <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
4471
+ </xsl:copy>
4472
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/node()" mode="process_li_element" priority="2">
4473
+ <xsl:param name="element"/>
4474
+ <xsl:param name="remove" select="'false'"/>
4475
+ <xsl:param name="target"/>
4476
+ <!-- <node></node> -->
4477
+ <xsl:choose>
4478
+ <xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
4479
+ <!-- skip text (i.e. remove it) and process next element -->
4480
+ <!-- [removed_<xsl:value-of select="."/>] -->
4481
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
4482
+ <xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
4483
+ </xsl:apply-templates>
4484
+ </xsl:when>
4485
+ <xsl:when test="self::text()">
4486
+ <xsl:value-of select="."/>
4487
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
4488
+ </xsl:when>
4489
+ <xsl:when test="self::* and local-name(.) = 'xref'">
4490
+ <xsl:variable name="id" select="@id"/>
4491
+ <xsl:variable name="page" select="$index//item[@id = $id]"/>
4492
+ <xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
4493
+ <xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
4494
+
4495
+ <xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
4496
+ <xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
4497
+
4498
+ <xsl:choose>
4499
+ <!-- 2nd pass -->
4500
+ <!-- if page is equal to page for next and page is not the end of range -->
4501
+ <xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
4502
+ <!-- skip element (i.e. remove it) and remove next text ',' -->
4503
+ <!-- [removed_xref] -->
4504
+
4505
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
4506
+ <xsl:with-param name="remove">true</xsl:with-param>
4507
+ <xsl:with-param name="target">
4508
+ <xsl:choose>
4509
+ <xsl:when test="$target != ''"><xsl:value-of select="$target"/></xsl:when>
4510
+ <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise>
4511
+ </xsl:choose>
4512
+ </xsl:with-param>
4513
+ </xsl:apply-templates>
4514
+ </xsl:when>
4515
+
4516
+ <xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
4517
+ <!-- remove xref -->
4518
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
4519
+ <xsl:with-param name="remove">true</xsl:with-param>
4520
+ </xsl:apply-templates>
4521
+ </xsl:when>
4522
+
4523
+ <xsl:otherwise>
4524
+ <xsl:apply-templates select="." mode="xref_copy">
4525
+ <xsl:with-param name="target" select="$target"/>
4526
+ </xsl:apply-templates>
4527
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
4528
+ </xsl:otherwise>
4529
+ </xsl:choose>
4530
+ </xsl:when>
4531
+ <xsl:when test="self::* and local-name(.) = 'ul'">
4532
+ <!-- ul -->
4533
+ <xsl:apply-templates select="." mode="index_update"/>
4534
+ </xsl:when>
4535
+ <xsl:otherwise>
4536
+ <xsl:apply-templates select="." mode="xref_copy">
4537
+ <xsl:with-param name="target" select="$target"/>
4538
+ </xsl:apply-templates>
4539
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
4540
+ </xsl:otherwise>
4541
+ </xsl:choose>
4542
+ </xsl:template><xsl:template match="@*|node()" mode="xref_copy">
4543
+ <xsl:param name="target"/>
4544
+ <xsl:copy>
4545
+ <xsl:apply-templates select="@*" mode="xref_copy"/>
4546
+ <xsl:if test="$target != '' and not(xalan:nodeset($bookmark_in_fn)//bookmark[. = $target])">
4547
+ <xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
4548
+ </xsl:if>
4549
+ <xsl:apply-templates select="node()" mode="xref_copy"/>
4550
+ </xsl:copy>
4551
+ </xsl:template><xsl:template name="generateIndexXrefId">
4552
+ <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
4553
+
4554
+ <xsl:variable name="docid">
4555
+ <xsl:call-template name="getDocumentId"/>
4556
+ </xsl:variable>
4557
+ <xsl:variable name="item_number">
4558
+ <xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
4559
+ </xsl:variable>
4560
+ <xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
4561
+ <xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
4562
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
4563
+ <xsl:apply-templates/>
4564
+ <fo:block>
4565
+ <xsl:if test="following-sibling::*[local-name() = 'clause']">
4566
+ <fo:block> </fo:block>
4567
+ </xsl:if>
4568
+ </fo:block>
4569
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
4570
+ <xsl:apply-templates/>
4571
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
4572
+ <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
4573
+ <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
4574
+ <xsl:apply-templates/>
4575
+ </fo:block>
4576
+ </xsl:template><xsl:template match="*[local-name() = 'bookmark']">
4577
+ <fo:inline id="{@id}"/>
4399
4578
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
4400
4579
  <!-- <row>
4401
4580
  <date>05-07-2013</date>
@@ -4614,70 +4793,68 @@
4614
4793
  <xsl:variable name="lang">
4615
4794
  <xsl:call-template name="getLang"/>
4616
4795
  </xsl:variable>
4617
- <fo:declarations>
4618
- <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
4619
- <pdf:dictionary type="normal" key="ViewerPreferences">
4620
- <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
4621
- </pdf:dictionary>
4622
- </pdf:catalog>
4623
- <x:xmpmeta xmlns:x="adobe:ns:meta/">
4624
- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
4625
- <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
4626
- <!-- Dublin Core properties go here -->
4627
- <dc:title>
4628
- <xsl:variable name="title">
4629
- <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4630
-
4631
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
4632
-
4633
-
4634
-
4635
-
4636
-
4637
-
4638
- </xsl:for-each>
4639
- </xsl:variable>
4640
- <xsl:choose>
4641
- <xsl:when test="normalize-space($title) != ''">
4642
- <xsl:value-of select="$title"/>
4643
- </xsl:when>
4644
- <xsl:otherwise>
4645
- <xsl:text> </xsl:text>
4646
- </xsl:otherwise>
4647
- </xsl:choose>
4648
- </dc:title>
4649
- <dc:creator>
4796
+ <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
4797
+ <pdf:dictionary type="normal" key="ViewerPreferences">
4798
+ <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
4799
+ </pdf:dictionary>
4800
+ </pdf:catalog>
4801
+ <x:xmpmeta xmlns:x="adobe:ns:meta/">
4802
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
4803
+ <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
4804
+ <!-- Dublin Core properties go here -->
4805
+ <dc:title>
4806
+ <xsl:variable name="title">
4650
4807
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4651
4808
 
4809
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
4652
4810
 
4653
4811
 
4654
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
4655
- <xsl:value-of select="*[local-name() = 'person']/*[local-name() = 'name']/*[local-name() = 'completename']"/>
4656
- <xsl:if test="position() != last()">; </xsl:if>
4657
- </xsl:for-each>
4658
-
4659
- </xsl:for-each>
4660
- </dc:creator>
4661
- <dc:description>
4662
- <xsl:variable name="abstract">
4663
4812
 
4664
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
4665
4813
 
4666
4814
 
4667
- </xsl:variable>
4668
- <xsl:value-of select="normalize-space($abstract)"/>
4669
- </dc:description>
4670
- <pdf:Keywords>
4671
- <xsl:call-template name="insertKeywords"/>
4672
- </pdf:Keywords>
4673
- </rdf:Description>
4674
- <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
4675
- <!-- XMP properties go here -->
4676
- <xmp:CreatorTool/>
4677
- </rdf:Description>
4678
- </rdf:RDF>
4679
- </x:xmpmeta>
4680
- </fo:declarations>
4815
+
4816
+ </xsl:for-each>
4817
+ </xsl:variable>
4818
+ <xsl:choose>
4819
+ <xsl:when test="normalize-space($title) != ''">
4820
+ <xsl:value-of select="$title"/>
4821
+ </xsl:when>
4822
+ <xsl:otherwise>
4823
+ <xsl:text> </xsl:text>
4824
+ </xsl:otherwise>
4825
+ </xsl:choose>
4826
+ </dc:title>
4827
+ <dc:creator>
4828
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4829
+
4830
+
4831
+
4832
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
4833
+ <xsl:value-of select="*[local-name() = 'person']/*[local-name() = 'name']/*[local-name() = 'completename']"/>
4834
+ <xsl:if test="position() != last()">; </xsl:if>
4835
+ </xsl:for-each>
4836
+
4837
+ </xsl:for-each>
4838
+ </dc:creator>
4839
+ <dc:description>
4840
+ <xsl:variable name="abstract">
4841
+
4842
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
4843
+
4844
+
4845
+ </xsl:variable>
4846
+ <xsl:value-of select="normalize-space($abstract)"/>
4847
+ </dc:description>
4848
+ <pdf:Keywords>
4849
+ <xsl:call-template name="insertKeywords"/>
4850
+ </pdf:Keywords>
4851
+ </rdf:Description>
4852
+ <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
4853
+ <!-- XMP properties go here -->
4854
+ <xmp:CreatorTool/>
4855
+ </rdf:Description>
4856
+ </rdf:RDF>
4857
+ </x:xmpmeta>
4681
4858
  </xsl:template><xsl:template name="getId">
4682
4859
  <xsl:choose>
4683
4860
  <xsl:when test="../@id">