metanorma-gb 1.5.3 → 1.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +44 -0
- data/lib/asciidoctor/gb/basicdoc.rng +23 -0
- data/lib/asciidoctor/gb/gbstandard.rng +7 -0
- data/lib/asciidoctor/gb/isodoc.rng +122 -58
- data/lib/asciidoctor/gb/isostandard.rng +8 -1
- data/lib/isodoc/gb/gb.recommendation.xsl +951 -232
- data/lib/isodoc/gb/html/gb.css +16 -4
- data/lib/isodoc/gb/html/gb.scss +18 -4
- data/lib/isodoc/gb/html/htmlcompliantstyle.css +5 -1
- data/lib/isodoc/gb/html/htmlstyle.css +5 -1
- data/lib/metanorma/gb/version.rb +1 -1
- data/metanorma-gb.gemspec +1 -1
- metadata +5 -7
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d46303e99f34675c8e5112ca0f788f75d876103dc3d7390dc342248d779558da
|
4
|
+
data.tar.gz: 5f7d21e5b5ae96ef0f9d3c01db40e1cfe31a56d6729d14cd3fa3d8f221d9f559
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fae9bbe397db589f7fbde426075fb9e89ef756ab29308f3c668909a6107c22488bd65d3a107f4c8a42054eacd4880534dc66382cc0cfdd5b5daff050a58daae
|
7
|
+
data.tar.gz: edb31756662a5ad8b431a64655c046f9b385c27d093c8e2f77707fb2d594e273e02225f6209accd6cfe5ebce39c76dbe60939622e332c1b7197408cd50afc587
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
|
+
name: rake
|
4
|
+
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches: [ master ]
|
8
|
+
pull_request:
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
rake:
|
12
|
+
name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
|
13
|
+
runs-on: ${{ matrix.os }}
|
14
|
+
continue-on-error: ${{ matrix.experimental }}
|
15
|
+
strategy:
|
16
|
+
fail-fast: false
|
17
|
+
matrix:
|
18
|
+
ruby: [ '2.6', '2.5', '2.4' ]
|
19
|
+
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
20
|
+
experimental: [ false ]
|
21
|
+
include:
|
22
|
+
- ruby: '2.7'
|
23
|
+
os: 'ubuntu-latest'
|
24
|
+
experimental: true
|
25
|
+
- ruby: '2.7'
|
26
|
+
os: 'windows-latest'
|
27
|
+
experimental: true
|
28
|
+
- ruby: '2.7'
|
29
|
+
os: 'macos-latest'
|
30
|
+
experimental: true
|
31
|
+
steps:
|
32
|
+
- uses: actions/checkout@master
|
33
|
+
|
34
|
+
- name: Use Ruby
|
35
|
+
uses: ruby/setup-ruby@v1
|
36
|
+
with:
|
37
|
+
ruby-version: ${{ matrix.ruby }}
|
38
|
+
bundler-cache: true
|
39
|
+
|
40
|
+
- name: Update gems
|
41
|
+
run: bundle install --jobs 4 --retry 3
|
42
|
+
|
43
|
+
- name: Run specs
|
44
|
+
run: bundle exec rake
|
@@ -402,6 +402,16 @@
|
|
402
402
|
</choice>
|
403
403
|
</attribute>
|
404
404
|
</optional>
|
405
|
+
<optional>
|
406
|
+
<attribute name="valign">
|
407
|
+
<choice>
|
408
|
+
<value>top</value>
|
409
|
+
<value>middle</value>
|
410
|
+
<value>bottom</value>
|
411
|
+
<value>baseline</value>
|
412
|
+
</choice>
|
413
|
+
</attribute>
|
414
|
+
</optional>
|
405
415
|
<choice>
|
406
416
|
<zeroOrMore>
|
407
417
|
<ref name="TextElement"/>
|
@@ -429,6 +439,16 @@
|
|
429
439
|
</choice>
|
430
440
|
</attribute>
|
431
441
|
</optional>
|
442
|
+
<optional>
|
443
|
+
<attribute name="valign">
|
444
|
+
<choice>
|
445
|
+
<value>top</value>
|
446
|
+
<value>middle</value>
|
447
|
+
<value>bottom</value>
|
448
|
+
<value>baseline</value>
|
449
|
+
</choice>
|
450
|
+
</attribute>
|
451
|
+
</optional>
|
432
452
|
<choice>
|
433
453
|
<zeroOrMore>
|
434
454
|
<ref name="TextElement"/>
|
@@ -998,6 +1018,9 @@
|
|
998
1018
|
<value>alphabet_upper</value>
|
999
1019
|
</choice>
|
1000
1020
|
</attribute>
|
1021
|
+
<optional>
|
1022
|
+
<attribute name="start"/>
|
1023
|
+
</optional>
|
1001
1024
|
<oneOrMore>
|
1002
1025
|
<ref name="li"/>
|
1003
1026
|
</oneOrMore>
|
@@ -183,6 +183,13 @@
|
|
183
183
|
<!-- identical structure to iso-standard -->
|
184
184
|
<define name="gb-standard">
|
185
185
|
<element name="gb-standard">
|
186
|
+
<attribute name="version"/>
|
187
|
+
<attribute name="type">
|
188
|
+
<choice>
|
189
|
+
<value>semantic</value>
|
190
|
+
<value>presentation</value>
|
191
|
+
</choice>
|
192
|
+
</attribute>
|
186
193
|
<ref name="bibdata"/>
|
187
194
|
<zeroOrMore>
|
188
195
|
<ref name="termdocsource"/>
|
@@ -42,7 +42,6 @@
|
|
42
42
|
</define>
|
43
43
|
<define name="xref">
|
44
44
|
<element name="xref">
|
45
|
-
<!-- attribute target { xsd:IDREF }, -->
|
46
45
|
<attribute name="target">
|
47
46
|
<data type="string">
|
48
47
|
<param name="pattern">\i\c*|\c+#\c+</param>
|
@@ -64,6 +63,11 @@
|
|
64
63
|
</choice>
|
65
64
|
</attribute>
|
66
65
|
</optional>
|
66
|
+
<optional>
|
67
|
+
<attribute name="droploc">
|
68
|
+
<data type="boolean"/>
|
69
|
+
</attribute>
|
70
|
+
</optional>
|
67
71
|
<text/>
|
68
72
|
</element>
|
69
73
|
</define>
|
@@ -581,6 +585,8 @@
|
|
581
585
|
<ref name="ol"/>
|
582
586
|
<ref name="dl"/>
|
583
587
|
<ref name="formula"/>
|
588
|
+
<ref name="quote"/>
|
589
|
+
<ref name="sourcecode"/>
|
584
590
|
</choice>
|
585
591
|
</oneOrMore>
|
586
592
|
</element>
|
@@ -664,6 +670,16 @@
|
|
664
670
|
</choice>
|
665
671
|
</attribute>
|
666
672
|
</optional>
|
673
|
+
<optional>
|
674
|
+
<attribute name="valign">
|
675
|
+
<choice>
|
676
|
+
<value>top</value>
|
677
|
+
<value>middle</value>
|
678
|
+
<value>bottom</value>
|
679
|
+
<value>baseline</value>
|
680
|
+
</choice>
|
681
|
+
</attribute>
|
682
|
+
</optional>
|
667
683
|
<choice>
|
668
684
|
<zeroOrMore>
|
669
685
|
<choice>
|
@@ -700,6 +716,16 @@
|
|
700
716
|
</choice>
|
701
717
|
</attribute>
|
702
718
|
</optional>
|
719
|
+
<optional>
|
720
|
+
<attribute name="valign">
|
721
|
+
<choice>
|
722
|
+
<value>top</value>
|
723
|
+
<value>middle</value>
|
724
|
+
<value>bottom</value>
|
725
|
+
<value>baseline</value>
|
726
|
+
</choice>
|
727
|
+
</attribute>
|
728
|
+
</optional>
|
703
729
|
<choice>
|
704
730
|
<zeroOrMore>
|
705
731
|
<choice>
|
@@ -837,6 +863,13 @@
|
|
837
863
|
</define>
|
838
864
|
<define name="standard-document">
|
839
865
|
<element name="standard-document">
|
866
|
+
<attribute name="version"/>
|
867
|
+
<attribute name="type">
|
868
|
+
<choice>
|
869
|
+
<value>semantic</value>
|
870
|
+
<value>presentation</value>
|
871
|
+
</choice>
|
872
|
+
</attribute>
|
840
873
|
<ref name="bibdata"/>
|
841
874
|
<optional>
|
842
875
|
<ref name="boilerplate"/>
|
@@ -858,7 +891,7 @@
|
|
858
891
|
<oneOrMore>
|
859
892
|
<choice>
|
860
893
|
<ref name="content"/>
|
861
|
-
<ref name="
|
894
|
+
<ref name="abstract"/>
|
862
895
|
<ref name="foreword"/>
|
863
896
|
<ref name="introduction"/>
|
864
897
|
<ref name="acknowledgements"/>
|
@@ -1052,14 +1085,17 @@
|
|
1052
1085
|
<ref name="section-title"/>
|
1053
1086
|
</optional>
|
1054
1087
|
<group>
|
1055
|
-
<
|
1056
|
-
<
|
1057
|
-
<
|
1058
|
-
|
1059
|
-
|
1060
|
-
<
|
1061
|
-
|
1062
|
-
|
1088
|
+
<choice>
|
1089
|
+
<group>
|
1090
|
+
<zeroOrMore>
|
1091
|
+
<ref name="BasicBlock"/>
|
1092
|
+
</zeroOrMore>
|
1093
|
+
<zeroOrMore>
|
1094
|
+
<ref name="note"/>
|
1095
|
+
</zeroOrMore>
|
1096
|
+
</group>
|
1097
|
+
<ref name="amend"/>
|
1098
|
+
</choice>
|
1063
1099
|
<zeroOrMore>
|
1064
1100
|
<choice>
|
1065
1101
|
<ref name="clause-subsection"/>
|
@@ -1128,49 +1164,7 @@
|
|
1128
1164
|
</define>
|
1129
1165
|
<define name="annex">
|
1130
1166
|
<element name="annex">
|
1131
|
-
<
|
1132
|
-
<attribute name="id">
|
1133
|
-
<data type="ID"/>
|
1134
|
-
</attribute>
|
1135
|
-
</optional>
|
1136
|
-
<optional>
|
1137
|
-
<attribute name="language"/>
|
1138
|
-
</optional>
|
1139
|
-
<optional>
|
1140
|
-
<attribute name="script"/>
|
1141
|
-
</optional>
|
1142
|
-
<optional>
|
1143
|
-
<attribute name="inline-header">
|
1144
|
-
<data type="boolean"/>
|
1145
|
-
</attribute>
|
1146
|
-
</optional>
|
1147
|
-
<attribute name="obligation">
|
1148
|
-
<choice>
|
1149
|
-
<value>normative</value>
|
1150
|
-
<value>informative</value>
|
1151
|
-
</choice>
|
1152
|
-
</attribute>
|
1153
|
-
<optional>
|
1154
|
-
<ref name="section-title"/>
|
1155
|
-
</optional>
|
1156
|
-
<group>
|
1157
|
-
<group>
|
1158
|
-
<zeroOrMore>
|
1159
|
-
<ref name="BasicBlock"/>
|
1160
|
-
</zeroOrMore>
|
1161
|
-
<zeroOrMore>
|
1162
|
-
<ref name="note"/>
|
1163
|
-
</zeroOrMore>
|
1164
|
-
</group>
|
1165
|
-
<zeroOrMore>
|
1166
|
-
<choice>
|
1167
|
-
<ref name="annex-subsection"/>
|
1168
|
-
<ref name="terms"/>
|
1169
|
-
<ref name="definitions"/>
|
1170
|
-
<ref name="references"/>
|
1171
|
-
</choice>
|
1172
|
-
</zeroOrMore>
|
1173
|
-
</group>
|
1167
|
+
<ref name="Annex-Section"/>
|
1174
1168
|
</element>
|
1175
1169
|
</define>
|
1176
1170
|
<define name="terms">
|
@@ -1456,11 +1450,6 @@
|
|
1456
1450
|
</optional>
|
1457
1451
|
</element>
|
1458
1452
|
</define>
|
1459
|
-
<define name="preface_abstract">
|
1460
|
-
<element name="abstract">
|
1461
|
-
<ref name="Basic-Section"/>
|
1462
|
-
</element>
|
1463
|
-
</define>
|
1464
1453
|
<define name="term-clause">
|
1465
1454
|
<element name="clause">
|
1466
1455
|
<optional>
|
@@ -1510,4 +1499,79 @@
|
|
1510
1499
|
<ref name="CitationType"/>
|
1511
1500
|
</element>
|
1512
1501
|
</define>
|
1502
|
+
<define name="amend">
|
1503
|
+
<element name="amend">
|
1504
|
+
<optional>
|
1505
|
+
<attribute name="id">
|
1506
|
+
<data type="ID"/>
|
1507
|
+
</attribute>
|
1508
|
+
</optional>
|
1509
|
+
<attribute name="change">
|
1510
|
+
<choice>
|
1511
|
+
<value>add</value>
|
1512
|
+
<value>modify</value>
|
1513
|
+
<value>delete</value>
|
1514
|
+
</choice>
|
1515
|
+
</attribute>
|
1516
|
+
<optional>
|
1517
|
+
<attribute name="path"/>
|
1518
|
+
</optional>
|
1519
|
+
<optional>
|
1520
|
+
<attribute name="path_end"/>
|
1521
|
+
</optional>
|
1522
|
+
<optional>
|
1523
|
+
<attribute name="title"/>
|
1524
|
+
</optional>
|
1525
|
+
<optional>
|
1526
|
+
<element name="location">
|
1527
|
+
<zeroOrMore>
|
1528
|
+
<ref name="locality"/>
|
1529
|
+
</zeroOrMore>
|
1530
|
+
</element>
|
1531
|
+
</optional>
|
1532
|
+
<zeroOrMore>
|
1533
|
+
<ref name="autonumber"/>
|
1534
|
+
</zeroOrMore>
|
1535
|
+
<optional>
|
1536
|
+
<element name="description">
|
1537
|
+
<zeroOrMore>
|
1538
|
+
<ref name="BasicBlock"/>
|
1539
|
+
</zeroOrMore>
|
1540
|
+
</element>
|
1541
|
+
</optional>
|
1542
|
+
<optional>
|
1543
|
+
<element name="newcontent">
|
1544
|
+
<zeroOrMore>
|
1545
|
+
<ref name="BasicBlock"/>
|
1546
|
+
</zeroOrMore>
|
1547
|
+
</element>
|
1548
|
+
</optional>
|
1549
|
+
<optional>
|
1550
|
+
<element name="description">
|
1551
|
+
<zeroOrMore>
|
1552
|
+
<ref name="BasicBlock"/>
|
1553
|
+
</zeroOrMore>
|
1554
|
+
</element>
|
1555
|
+
</optional>
|
1556
|
+
</element>
|
1557
|
+
</define>
|
1558
|
+
<define name="autonumber">
|
1559
|
+
<element name="autonumber">
|
1560
|
+
<attribute name="type">
|
1561
|
+
<choice>
|
1562
|
+
<value>requirement</value>
|
1563
|
+
<value>recommendation</value>
|
1564
|
+
<value>permission</value>
|
1565
|
+
<value>table</value>
|
1566
|
+
<value>figure</value>
|
1567
|
+
<value>admonition</value>
|
1568
|
+
<value>formula</value>
|
1569
|
+
<value>sourcecode</value>
|
1570
|
+
<value>example</value>
|
1571
|
+
<value>note</value>
|
1572
|
+
</choice>
|
1573
|
+
</attribute>
|
1574
|
+
<text/>
|
1575
|
+
</element>
|
1576
|
+
</define>
|
1513
1577
|
</grammar>
|
@@ -253,7 +253,7 @@
|
|
253
253
|
<define name="preface">
|
254
254
|
<element name="preface">
|
255
255
|
<optional>
|
256
|
-
<ref name="
|
256
|
+
<ref name="abstract"/>
|
257
257
|
</optional>
|
258
258
|
<ref name="foreword"/>
|
259
259
|
<optional>
|
@@ -405,6 +405,13 @@
|
|
405
405
|
-->
|
406
406
|
<define name="iso-standard">
|
407
407
|
<element name="iso-standard">
|
408
|
+
<attribute name="version"/>
|
409
|
+
<attribute name="type">
|
410
|
+
<choice>
|
411
|
+
<value>semantic</value>
|
412
|
+
<value>presentation</value>
|
413
|
+
</choice>
|
414
|
+
</attribute>
|
408
415
|
<ref name="bibdata"/>
|
409
416
|
<zeroOrMore>
|
410
417
|
<ref name="termdocsource"/>
|
@@ -113,6 +113,10 @@
|
|
113
113
|
</fo:layout-master-set>
|
114
114
|
|
115
115
|
<xsl:call-template name="addPDFUAmeta"/>
|
116
|
+
|
117
|
+
<xsl:call-template name="addBookmarks">
|
118
|
+
<xsl:with-param name="contents" select="$contents"/>
|
119
|
+
</xsl:call-template>
|
116
120
|
|
117
121
|
<fo:page-sequence master-reference="cover" force-page-count="no-force">
|
118
122
|
<fo:flow flow-name="xsl-region-body">
|
@@ -329,19 +333,19 @@
|
|
329
333
|
|
330
334
|
<fo:block line-height="220%">
|
331
335
|
<xsl:variable name="margin-left">12</xsl:variable>
|
332
|
-
<xsl:for-each select="xalan:nodeset($contents)//item"><!-- [@display = 'true'][not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
336
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [@display = 'true'][not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
333
337
|
<fo:block text-align-last="justify">
|
334
338
|
<xsl:if test="@level =2">
|
335
339
|
<xsl:attribute name="margin-left">3.7mm</xsl:attribute>
|
336
340
|
</xsl:if>
|
337
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
341
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
338
342
|
<xsl:if test="normalize-space(@section) != ''">
|
339
343
|
<fo:inline>
|
340
344
|
<xsl:value-of select="@section"/>
|
341
345
|
</fo:inline>
|
342
346
|
<xsl:value-of select="$tab_zh"/>
|
343
347
|
</xsl:if>
|
344
|
-
<xsl:apply-templates/>
|
348
|
+
<xsl:apply-templates select="title"/>
|
345
349
|
<fo:inline keep-together.within-line="always">
|
346
350
|
<fo:leader font-weight="normal" leader-pattern="dots"/>
|
347
351
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
@@ -456,15 +460,21 @@
|
|
456
460
|
</xsl:variable>
|
457
461
|
|
458
462
|
<xsl:variable name="display">
|
459
|
-
<xsl:choose>
|
460
|
-
<xsl:when test="ancestor-or-self::gb:bibitem">false</xsl:when>
|
461
|
-
<xsl:when test="ancestor-or-self::gb:term">false</xsl:when>
|
463
|
+
<xsl:choose>
|
462
464
|
<xsl:when test="$level <= 2">true</xsl:when>
|
463
465
|
<xsl:otherwise>false</xsl:otherwise>
|
464
466
|
</xsl:choose>
|
465
467
|
</xsl:variable>
|
466
468
|
|
467
|
-
<xsl:
|
469
|
+
<xsl:variable name="skip">
|
470
|
+
<xsl:choose>
|
471
|
+
<xsl:when test="ancestor-or-self::gb:bibitem">true</xsl:when>
|
472
|
+
<xsl:when test="ancestor-or-self::gb:term">true</xsl:when>
|
473
|
+
<xsl:otherwise>false</xsl:otherwise>
|
474
|
+
</xsl:choose>
|
475
|
+
</xsl:variable>
|
476
|
+
|
477
|
+
<xsl:if test="$skip = 'false'">
|
468
478
|
|
469
479
|
<xsl:variable name="section">
|
470
480
|
<xsl:call-template name="getSection"/>
|
@@ -478,10 +488,13 @@
|
|
478
488
|
<xsl:value-of select="local-name()"/>
|
479
489
|
</xsl:variable>
|
480
490
|
|
481
|
-
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
|
482
|
-
<
|
491
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
492
|
+
<title>
|
493
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
494
|
+
</title>
|
495
|
+
<xsl:apply-templates mode="contents"/>
|
483
496
|
</item>
|
484
|
-
|
497
|
+
|
485
498
|
</xsl:if>
|
486
499
|
|
487
500
|
</xsl:template>
|
@@ -820,7 +833,7 @@
|
|
820
833
|
|
821
834
|
|
822
835
|
|
823
|
-
<xsl:template match="gb:ul | gb:ol">
|
836
|
+
<xsl:template match="gb:ul | gb:ol" mode="ul_ol">
|
824
837
|
<fo:list-block margin-bottom="12pt" margin-left="7.4mm" provisional-distance-between-starts="4mm"> <!-- margin-bottom="8pt" -->
|
825
838
|
<xsl:if test="local-name() = 'ol'">
|
826
839
|
<xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
|
@@ -850,6 +863,9 @@
|
|
850
863
|
</fo:list-item>
|
851
864
|
</xsl:template>
|
852
865
|
|
866
|
+
<xsl:template match="gb:note" mode="process">
|
867
|
+
<xsl:call-template name="note"/>
|
868
|
+
</xsl:template>
|
853
869
|
|
854
870
|
|
855
871
|
<xsl:template match="gb:preferred" priority="2">
|
@@ -997,8 +1013,12 @@
|
|
997
1013
|
|
998
1014
|
<xsl:template match="mathml:math" priority="2">
|
999
1015
|
<fo:inline font-family="Cambria Math">
|
1016
|
+
<xsl:variable name="mathml">
|
1017
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
1018
|
+
</xsl:variable>
|
1000
1019
|
<fo:instream-foreign-object fox:alt-text="Math">
|
1001
|
-
<xsl:copy-of select="."/>
|
1020
|
+
<!-- <xsl:copy-of select="."/> -->
|
1021
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
1002
1022
|
</fo:instream-foreign-object>
|
1003
1023
|
</fo:inline>
|
1004
1024
|
</xsl:template>
|
@@ -1031,10 +1051,13 @@
|
|
1031
1051
|
|
1032
1052
|
|
1033
1053
|
<xsl:template match="gb:formula/gb:stem">
|
1034
|
-
<fo:block
|
1035
|
-
<
|
1036
|
-
<
|
1037
|
-
|
1054
|
+
<fo:block margin-top="14pt" margin-bottom="14pt">
|
1055
|
+
<xsl:if test="not(ancestor::*[local-name()='note'])">
|
1056
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1057
|
+
</xsl:if>
|
1058
|
+
<fo:table table-layout="fixed" width="100%"> <!-- width="170mm" -->
|
1059
|
+
<fo:table-column column-width="95%"/><!-- 165mm -->
|
1060
|
+
<fo:table-column column-width="5%"/> <!-- 5mm -->
|
1038
1061
|
<fo:table-body>
|
1039
1062
|
<fo:table-row>
|
1040
1063
|
<fo:table-cell display-align="center">
|
@@ -1112,6 +1135,10 @@
|
|
1112
1135
|
<title-edition lang="en">
|
1113
1136
|
|
1114
1137
|
|
1138
|
+
</title-edition>
|
1139
|
+
|
1140
|
+
<title-edition lang="fr">
|
1141
|
+
|
1115
1142
|
</title-edition>
|
1116
1143
|
|
1117
1144
|
|
@@ -1122,7 +1149,12 @@
|
|
1122
1149
|
<xsl:text>Table of contents</xsl:text>
|
1123
1150
|
|
1124
1151
|
</title-toc>
|
1125
|
-
<title-toc lang="fr">
|
1152
|
+
<title-toc lang="fr">
|
1153
|
+
|
1154
|
+
<xsl:text>Sommaire</xsl:text>
|
1155
|
+
|
1156
|
+
|
1157
|
+
</title-toc>
|
1126
1158
|
|
1127
1159
|
|
1128
1160
|
<title-toc lang="zh">目次</title-toc>
|
@@ -1160,7 +1192,12 @@
|
|
1160
1192
|
<title-modified lang="zh">改写</title-modified>
|
1161
1193
|
|
1162
1194
|
|
1163
|
-
<title-source lang="en">
|
1195
|
+
<title-source lang="en">
|
1196
|
+
|
1197
|
+
<xsl:text>SOURCE</xsl:text>
|
1198
|
+
|
1199
|
+
|
1200
|
+
</title-source>
|
1164
1201
|
|
1165
1202
|
<title-keywords lang="en">Keywords</title-keywords>
|
1166
1203
|
|
@@ -1203,12 +1240,25 @@
|
|
1203
1240
|
<title-warning lang="zh">警告</title-warning>
|
1204
1241
|
|
1205
1242
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1243
|
+
|
1244
|
+
<title-continued lang="en">(continued)</title-continued>
|
1245
|
+
<title-continued lang="fr">(continué)</title-continued>
|
1246
|
+
|
1206
1247
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1207
1248
|
<xsl:param name="name"/>
|
1208
|
-
<xsl:
|
1209
|
-
|
1249
|
+
<xsl:param name="lang"/>
|
1250
|
+
<xsl:variable name="lang_">
|
1251
|
+
<xsl:choose>
|
1252
|
+
<xsl:when test="$lang != ''">
|
1253
|
+
<xsl:value-of select="$lang"/>
|
1254
|
+
</xsl:when>
|
1255
|
+
<xsl:otherwise>
|
1256
|
+
<xsl:call-template name="getLang"/>
|
1257
|
+
</xsl:otherwise>
|
1258
|
+
</xsl:choose>
|
1210
1259
|
</xsl:variable>
|
1211
|
-
<xsl:variable name="
|
1260
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1261
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
1212
1262
|
<xsl:choose>
|
1213
1263
|
<xsl:when test="normalize-space($title_) != ''">
|
1214
1264
|
<xsl:value-of select="$title_"/>
|
@@ -1217,15 +1267,17 @@
|
|
1217
1267
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
1218
1268
|
</xsl:otherwise>
|
1219
1269
|
</xsl:choose>
|
1220
|
-
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="
|
1270
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
1271
|
+
|
1272
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1273
|
+
|
1221
1274
|
|
1222
1275
|
|
1223
1276
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1224
1277
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1225
1278
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
1226
1279
|
|
1227
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1228
|
-
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
1280
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1229
1281
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1230
1282
|
|
1231
1283
|
|
@@ -1235,6 +1287,7 @@
|
|
1235
1287
|
|
1236
1288
|
|
1237
1289
|
|
1290
|
+
|
1238
1291
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1239
1292
|
|
1240
1293
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -1285,6 +1338,7 @@
|
|
1285
1338
|
|
1286
1339
|
|
1287
1340
|
|
1341
|
+
|
1288
1342
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1289
1343
|
|
1290
1344
|
|
@@ -1305,6 +1359,7 @@
|
|
1305
1359
|
|
1306
1360
|
|
1307
1361
|
|
1362
|
+
|
1308
1363
|
|
1309
1364
|
|
1310
1365
|
|
@@ -1353,6 +1408,7 @@
|
|
1353
1408
|
|
1354
1409
|
|
1355
1410
|
|
1411
|
+
|
1356
1412
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1357
1413
|
|
1358
1414
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -1372,11 +1428,13 @@
|
|
1372
1428
|
|
1373
1429
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1374
1430
|
|
1375
|
-
|
1431
|
+
|
1432
|
+
|
1376
1433
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1377
1434
|
|
1378
1435
|
|
1379
1436
|
|
1437
|
+
|
1380
1438
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1381
1439
|
|
1382
1440
|
|
@@ -1398,8 +1456,7 @@
|
|
1398
1456
|
|
1399
1457
|
|
1400
1458
|
|
1401
|
-
|
1402
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1459
|
+
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
1403
1460
|
|
1404
1461
|
|
1405
1462
|
|
@@ -1410,7 +1467,9 @@
|
|
1410
1467
|
|
1411
1468
|
|
1412
1469
|
|
1413
|
-
|
1470
|
+
|
1471
|
+
|
1472
|
+
|
1414
1473
|
|
1415
1474
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1416
1475
|
|
@@ -1436,6 +1495,8 @@
|
|
1436
1495
|
|
1437
1496
|
|
1438
1497
|
|
1498
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1499
|
+
|
1439
1500
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1440
1501
|
|
1441
1502
|
|
@@ -1464,6 +1525,7 @@
|
|
1464
1525
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1465
1526
|
|
1466
1527
|
|
1528
|
+
|
1467
1529
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1468
1530
|
|
1469
1531
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1471,6 +1533,7 @@
|
|
1471
1533
|
|
1472
1534
|
|
1473
1535
|
|
1536
|
+
|
1474
1537
|
|
1475
1538
|
<xsl:attribute name="font-family">SimHei</xsl:attribute>
|
1476
1539
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -1514,14 +1577,16 @@
|
|
1514
1577
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1515
1578
|
|
1516
1579
|
|
1517
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1518
|
-
|
1580
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1581
|
+
|
1519
1582
|
|
1520
1583
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1521
1584
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1522
1585
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1523
1586
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1524
1587
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1588
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1589
|
+
|
1525
1590
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1526
1591
|
|
1527
1592
|
<xsl:attribute name="padding-left">7.4mm</xsl:attribute>
|
@@ -1587,6 +1652,10 @@
|
|
1587
1652
|
|
1588
1653
|
|
1589
1654
|
|
1655
|
+
|
1656
|
+
|
1657
|
+
<!-- $namespace = 'iso' or -->
|
1658
|
+
|
1590
1659
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1591
1660
|
|
1592
1661
|
|
@@ -1622,6 +1691,7 @@
|
|
1622
1691
|
<xsl:with-param name="table" select="$simple-table"/>
|
1623
1692
|
</xsl:call-template>
|
1624
1693
|
</xsl:variable>
|
1694
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1625
1695
|
|
1626
1696
|
<!-- <xsl:variable name="colwidths2">
|
1627
1697
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1642,28 +1712,52 @@
|
|
1642
1712
|
|
1643
1713
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1644
1714
|
|
1715
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1716
|
+
|
1717
|
+
|
1718
|
+
|
1719
|
+
|
1720
|
+
|
1645
1721
|
|
1646
1722
|
|
1723
|
+
|
1647
1724
|
|
1648
1725
|
|
1649
1726
|
|
1650
1727
|
|
1651
1728
|
|
1652
1729
|
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1730
|
+
|
1731
|
+
<xsl:variable name="table_attributes">
|
1732
|
+
<attribute name="table-layout">fixed</attribute>
|
1733
|
+
<attribute name="width">100%</attribute>
|
1734
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1735
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1658
1736
|
|
1659
1737
|
|
1660
1738
|
|
1661
1739
|
|
1740
|
+
|
1741
|
+
|
1742
|
+
|
1662
1743
|
|
1663
|
-
|
1744
|
+
|
1664
1745
|
|
1746
|
+
</xsl:variable>
|
1747
|
+
|
1748
|
+
|
1749
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1665
1750
|
|
1751
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1752
|
+
<xsl:attribute name="{@name}">
|
1753
|
+
<xsl:value-of select="."/>
|
1754
|
+
</xsl:attribute>
|
1755
|
+
</xsl:for-each>
|
1666
1756
|
|
1757
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1758
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1759
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1760
|
+
</xsl:if>
|
1667
1761
|
|
1668
1762
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1669
1763
|
<xsl:choose>
|
@@ -1687,6 +1781,33 @@
|
|
1687
1781
|
|
1688
1782
|
</fo:table>
|
1689
1783
|
|
1784
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1785
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1786
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1787
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1788
|
+
</xsl:call-template>
|
1789
|
+
</xsl:for-each>
|
1790
|
+
|
1791
|
+
<!-- insert footer as table -->
|
1792
|
+
<!-- <fo:table>
|
1793
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1794
|
+
<xsl:attribute name="{@name}">
|
1795
|
+
<xsl:value-of select="."/>
|
1796
|
+
</xsl:attribute>
|
1797
|
+
</xsl:for-each>
|
1798
|
+
|
1799
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1800
|
+
<xsl:choose>
|
1801
|
+
<xsl:when test=". = 1 or . = 0">
|
1802
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1803
|
+
</xsl:when>
|
1804
|
+
<xsl:otherwise>
|
1805
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1806
|
+
</xsl:otherwise>
|
1807
|
+
</xsl:choose>
|
1808
|
+
</xsl:for-each>
|
1809
|
+
</fo:table>-->
|
1810
|
+
|
1690
1811
|
|
1691
1812
|
<xsl:apply-templates select="*[local-name()='note']" mode="process"/>
|
1692
1813
|
|
@@ -1697,8 +1818,9 @@
|
|
1697
1818
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1698
1819
|
<xsl:if test="normalize-space() != ''">
|
1699
1820
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1700
|
-
|
1701
|
-
|
1821
|
+
|
1822
|
+
<xsl:apply-templates/>
|
1823
|
+
</fo:block>
|
1702
1824
|
</xsl:if>
|
1703
1825
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1704
1826
|
<xsl:param name="table-row"/>
|
@@ -1752,6 +1874,13 @@
|
|
1752
1874
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1753
1875
|
<xsl:variable name="td_text">
|
1754
1876
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1877
|
+
|
1878
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1879
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1880
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1881
|
+
</xsl:for-each>
|
1882
|
+
</xsl:if> -->
|
1883
|
+
|
1755
1884
|
</xsl:variable>
|
1756
1885
|
<xsl:variable name="words">
|
1757
1886
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1811,13 +1940,31 @@
|
|
1811
1940
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1812
1941
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1813
1942
|
<xsl:value-of select="@target"/>
|
1943
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1944
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1945
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1814
1946
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1815
1947
|
<xsl:param name="cols-count"/>
|
1816
1948
|
<!-- font-weight="bold" -->
|
1817
|
-
<fo:table-header>
|
1949
|
+
<fo:table-header>
|
1818
1950
|
|
1819
1951
|
<xsl:apply-templates/>
|
1820
1952
|
</fo:table-header>
|
1953
|
+
</xsl:template><xsl:template name="table-header-title">
|
1954
|
+
<xsl:param name="cols-count"/>
|
1955
|
+
<!-- row for title -->
|
1956
|
+
<fo:table-row>
|
1957
|
+
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
1958
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1959
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1960
|
+
<xsl:call-template name="fn_name_display"/>
|
1961
|
+
</xsl:for-each>
|
1962
|
+
<fo:block text-align="right" font-style="italic">
|
1963
|
+
<xsl:text> </xsl:text>
|
1964
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1965
|
+
</fo:block>
|
1966
|
+
</fo:table-cell>
|
1967
|
+
</fo:table-row>
|
1821
1968
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1822
1969
|
<fo:table-body>
|
1823
1970
|
<xsl:apply-templates/>
|
@@ -1825,6 +1972,13 @@
|
|
1825
1972
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1826
1973
|
<xsl:apply-templates/>
|
1827
1974
|
</xsl:template><xsl:template name="insertTableFooter">
|
1975
|
+
<xsl:param name="cols-count"/>
|
1976
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1977
|
+
<fo:table-footer>
|
1978
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1979
|
+
</fo:table-footer>
|
1980
|
+
</xsl:if>
|
1981
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1828
1982
|
<xsl:param name="cols-count"/>
|
1829
1983
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1830
1984
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1848,9 +2002,27 @@
|
|
1848
2002
|
<!-- fn will be processed inside 'note' processing -->
|
1849
2003
|
|
1850
2004
|
|
2005
|
+
|
2006
|
+
|
2007
|
+
|
2008
|
+
|
1851
2009
|
<!-- except gb -->
|
1852
2010
|
|
1853
2011
|
|
2012
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
2013
|
+
<!-- empty, because notes show at page side in main sections -->
|
2014
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2015
|
+
<xsl:choose>
|
2016
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2017
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2018
|
+
</xsl:when>
|
2019
|
+
<xsl:otherwise>
|
2020
|
+
<fo:block/>
|
2021
|
+
</xsl:otherwise>
|
2022
|
+
</xsl:choose>
|
2023
|
+
</xsl:if> -->
|
2024
|
+
|
2025
|
+
|
1854
2026
|
<!-- horizontal row separator -->
|
1855
2027
|
|
1856
2028
|
|
@@ -1864,6 +2036,88 @@
|
|
1864
2036
|
</fo:table-footer>
|
1865
2037
|
|
1866
2038
|
</xsl:if>
|
2039
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2040
|
+
<xsl:param name="table_attributes"/>
|
2041
|
+
<xsl:param name="colwidths"/>
|
2042
|
+
|
2043
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2044
|
+
|
2045
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2046
|
+
|
2047
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
2048
|
+
|
2049
|
+
<fo:table keep-with-previous="always">
|
2050
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2051
|
+
<xsl:choose>
|
2052
|
+
<xsl:when test="@name = 'border-top'">
|
2053
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
2054
|
+
</xsl:when>
|
2055
|
+
<xsl:when test="@name = 'border'">
|
2056
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2057
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
2058
|
+
</xsl:when>
|
2059
|
+
<xsl:otherwise>
|
2060
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2061
|
+
</xsl:otherwise>
|
2062
|
+
</xsl:choose>
|
2063
|
+
</xsl:for-each>
|
2064
|
+
|
2065
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2066
|
+
<xsl:choose>
|
2067
|
+
<xsl:when test=". = 1 or . = 0">
|
2068
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2069
|
+
</xsl:when>
|
2070
|
+
<xsl:otherwise>
|
2071
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2072
|
+
</xsl:otherwise>
|
2073
|
+
</xsl:choose>
|
2074
|
+
</xsl:for-each>
|
2075
|
+
|
2076
|
+
<fo:table-body>
|
2077
|
+
<fo:table-row>
|
2078
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
2079
|
+
|
2080
|
+
<xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
|
2081
|
+
|
2082
|
+
|
2083
|
+
|
2084
|
+
<!-- fn will be processed inside 'note' processing -->
|
2085
|
+
|
2086
|
+
|
2087
|
+
|
2088
|
+
|
2089
|
+
|
2090
|
+
|
2091
|
+
|
2092
|
+
<!-- except gb -->
|
2093
|
+
|
2094
|
+
|
2095
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2096
|
+
<xsl:choose>
|
2097
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2098
|
+
show Note under table in preface (ex. abstract) sections
|
2099
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2100
|
+
</xsl:when>
|
2101
|
+
<xsl:otherwise>
|
2102
|
+
empty, because notes show at page side in main sections
|
2103
|
+
<fo:block/>
|
2104
|
+
</xsl:otherwise>
|
2105
|
+
</xsl:choose>
|
2106
|
+
</xsl:if> -->
|
2107
|
+
|
2108
|
+
|
2109
|
+
<!-- horizontal row separator -->
|
2110
|
+
|
2111
|
+
|
2112
|
+
<!-- fn processing -->
|
2113
|
+
<xsl:call-template name="fn_display"/>
|
2114
|
+
|
2115
|
+
</fo:table-cell>
|
2116
|
+
</fo:table-row>
|
2117
|
+
</fo:table-body>
|
2118
|
+
|
2119
|
+
</fo:table>
|
2120
|
+
</xsl:if>
|
1867
2121
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1868
2122
|
|
1869
2123
|
<xsl:variable name="cols-count">
|
@@ -1881,6 +2135,8 @@
|
|
1881
2135
|
</xsl:choose>
|
1882
2136
|
</xsl:variable>
|
1883
2137
|
|
2138
|
+
|
2139
|
+
|
1884
2140
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1885
2141
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1886
2142
|
</xsl:apply-templates>
|
@@ -1890,6 +2146,8 @@
|
|
1890
2146
|
</xsl:call-template>
|
1891
2147
|
|
1892
2148
|
<fo:table-body>
|
2149
|
+
|
2150
|
+
|
1893
2151
|
<xsl:apply-templates/>
|
1894
2152
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1895
2153
|
|
@@ -1916,6 +2174,11 @@
|
|
1916
2174
|
<xsl:attribute name="line-height">110%</xsl:attribute>
|
1917
2175
|
|
1918
2176
|
|
2177
|
+
|
2178
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2179
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
2180
|
+
</xsl:if> -->
|
2181
|
+
|
1919
2182
|
<xsl:apply-templates/>
|
1920
2183
|
</fo:table-row>
|
1921
2184
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -1937,6 +2200,8 @@
|
|
1937
2200
|
|
1938
2201
|
|
1939
2202
|
|
2203
|
+
|
2204
|
+
|
1940
2205
|
<xsl:if test="@colspan">
|
1941
2206
|
<xsl:attribute name="number-columns-spanned">
|
1942
2207
|
<xsl:value-of select="@colspan"/>
|
@@ -1947,10 +2212,22 @@
|
|
1947
2212
|
<xsl:value-of select="@rowspan"/>
|
1948
2213
|
</xsl:attribute>
|
1949
2214
|
</xsl:if>
|
2215
|
+
<xsl:call-template name="display-align"/>
|
1950
2216
|
<fo:block>
|
1951
2217
|
<xsl:apply-templates/>
|
1952
2218
|
</fo:block>
|
1953
2219
|
</fo:table-cell>
|
2220
|
+
</xsl:template><xsl:template name="display-align">
|
2221
|
+
<xsl:if test="@valign">
|
2222
|
+
<xsl:attribute name="display-align">
|
2223
|
+
<xsl:choose>
|
2224
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2225
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2226
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2227
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2228
|
+
</xsl:choose>
|
2229
|
+
</xsl:attribute>
|
2230
|
+
</xsl:if>
|
1954
2231
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
1955
2232
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
1956
2233
|
<xsl:attribute name="text-align">
|
@@ -1968,7 +2245,9 @@
|
|
1968
2245
|
<xsl:if test="ancestor::*[local-name() = 'tfoot']">
|
1969
2246
|
<xsl:attribute name="border-bottom">solid black 0</xsl:attribute>
|
1970
2247
|
</xsl:if>
|
1971
|
-
|
2248
|
+
|
2249
|
+
|
2250
|
+
|
1972
2251
|
|
1973
2252
|
|
1974
2253
|
|
@@ -1984,8 +2263,8 @@
|
|
1984
2263
|
<xsl:value-of select="@rowspan"/>
|
1985
2264
|
</xsl:attribute>
|
1986
2265
|
</xsl:if>
|
1987
|
-
<
|
1988
|
-
|
2266
|
+
<xsl:call-template name="display-align"/>
|
2267
|
+
<fo:block>
|
1989
2268
|
<xsl:apply-templates/>
|
1990
2269
|
</fo:block>
|
1991
2270
|
</fo:table-cell>
|
@@ -2001,16 +2280,19 @@
|
|
2001
2280
|
|
2002
2281
|
|
2003
2282
|
|
2283
|
+
|
2284
|
+
|
2004
2285
|
<fo:inline padding-right="2mm">
|
2005
2286
|
|
2006
2287
|
<xsl:attribute name="font-family">SimHei</xsl:attribute>
|
2007
2288
|
|
2008
2289
|
|
2009
2290
|
|
2010
|
-
|
2291
|
+
|
2011
2292
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2012
2293
|
|
2013
2294
|
</fo:inline>
|
2295
|
+
|
2014
2296
|
<xsl:apply-templates mode="process"/>
|
2015
2297
|
</fo:block>
|
2016
2298
|
|
@@ -2038,6 +2320,7 @@
|
|
2038
2320
|
|
2039
2321
|
|
2040
2322
|
|
2323
|
+
|
2041
2324
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
2042
2325
|
|
2043
2326
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -2049,12 +2332,15 @@
|
|
2049
2332
|
|
2050
2333
|
|
2051
2334
|
|
2335
|
+
|
2052
2336
|
<xsl:value-of select="@reference"/>
|
2053
2337
|
|
2338
|
+
|
2054
2339
|
</fo:inline>
|
2055
2340
|
<fo:inline>
|
2056
2341
|
|
2057
|
-
<xsl:apply-templates/>
|
2342
|
+
<!-- <xsl:apply-templates /> -->
|
2343
|
+
<xsl:copy-of select="./node()"/>
|
2058
2344
|
</fo:inline>
|
2059
2345
|
</fo:block>
|
2060
2346
|
</xsl:if>
|
@@ -2091,7 +2377,20 @@
|
|
2091
2377
|
<xsl:variable name="following_dl_colwidths">
|
2092
2378
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
2093
2379
|
<xsl:variable name="html-table">
|
2094
|
-
<xsl:variable name="
|
2380
|
+
<xsl:variable name="doc_ns">
|
2381
|
+
|
2382
|
+
</xsl:variable>
|
2383
|
+
<xsl:variable name="ns">
|
2384
|
+
<xsl:choose>
|
2385
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2386
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2387
|
+
</xsl:when>
|
2388
|
+
<xsl:otherwise>
|
2389
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2390
|
+
</xsl:otherwise>
|
2391
|
+
</xsl:choose>
|
2392
|
+
</xsl:variable>
|
2393
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2095
2394
|
<xsl:element name="{$ns}:table">
|
2096
2395
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2097
2396
|
<tbody>
|
@@ -2156,7 +2455,8 @@
|
|
2156
2455
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2157
2456
|
</xsl:if>
|
2158
2457
|
|
2159
|
-
<xsl:apply-templates/>
|
2458
|
+
<!-- <xsl:apply-templates /> -->
|
2459
|
+
<xsl:copy-of select="./node()"/>
|
2160
2460
|
</fo:block>
|
2161
2461
|
</fo:table-cell>
|
2162
2462
|
</fo:table-row>
|
@@ -2178,9 +2478,13 @@
|
|
2178
2478
|
|
2179
2479
|
|
2180
2480
|
|
2481
|
+
|
2482
|
+
|
2181
2483
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2182
2484
|
|
2485
|
+
|
2183
2486
|
<xsl:value-of select="@reference"/>
|
2487
|
+
|
2184
2488
|
</fo:basic-link>
|
2185
2489
|
</fo:inline>
|
2186
2490
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -2188,139 +2492,168 @@
|
|
2188
2492
|
<xsl:apply-templates/>
|
2189
2493
|
</fo:inline>
|
2190
2494
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2191
|
-
<
|
2192
|
-
|
2193
|
-
|
2194
|
-
|
2195
|
-
|
2196
|
-
|
2197
|
-
|
2198
|
-
|
2199
|
-
<xsl:choose>
|
2200
|
-
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2495
|
+
<fo:block-container margin-left="0mm">
|
2496
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2497
|
+
<xsl:attribute name="margin-left">
|
2498
|
+
<xsl:choose>
|
2499
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2500
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2501
|
+
</xsl:choose>
|
2502
|
+
</xsl:attribute>
|
2201
2503
|
|
2202
|
-
<
|
2203
|
-
|
2204
|
-
|
2205
|
-
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2206
|
-
|
2207
|
-
<xsl:variable name="title-where">
|
2208
|
-
<xsl:call-template name="getTitle">
|
2209
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2210
|
-
</xsl:call-template>
|
2211
|
-
</xsl:variable>
|
2212
|
-
<xsl:value-of select="$title-where"/>
|
2213
|
-
</fo:block>
|
2214
|
-
<fo:block>
|
2215
|
-
|
2216
|
-
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
|
2217
|
-
|
2218
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2219
|
-
—
|
2220
|
-
<xsl:text> </xsl:text>
|
2221
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2222
|
-
</fo:block>
|
2504
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2223
2505
|
|
2506
|
+
</xsl:if>
|
2507
|
+
<fo:block-container margin-left="0mm">
|
2508
|
+
|
2509
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
2224
2510
|
|
2225
|
-
|
2226
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2227
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
2228
|
-
|
2229
|
-
|
2230
|
-
|
2511
|
+
<xsl:variable name="key_iso">
|
2231
2512
|
|
2232
|
-
<xsl:
|
2233
|
-
|
2234
|
-
|
2235
|
-
<xsl:variable name="title-where">
|
2236
|
-
<xsl:call-template name="getTitle">
|
2237
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2238
|
-
</xsl:call-template>
|
2239
|
-
</xsl:variable>
|
2240
|
-
<xsl:value-of select="$title-where"/>
|
2241
|
-
</fo:block>
|
2242
|
-
</xsl:when>
|
2243
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2244
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2245
|
-
|
2246
|
-
|
2247
|
-
|
2248
|
-
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2249
|
-
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
|
2250
|
-
|
2251
|
-
<xsl:variable name="title-key">
|
2252
|
-
<xsl:call-template name="getTitle">
|
2253
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
2254
|
-
</xsl:call-template>
|
2255
|
-
</xsl:variable>
|
2256
|
-
<xsl:value-of select="$title-key"/>
|
2257
|
-
</fo:block>
|
2258
|
-
</xsl:when>
|
2259
|
-
</xsl:choose>
|
2260
|
-
|
2261
|
-
<!-- a few components -->
|
2262
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2263
|
-
<fo:block>
|
2264
|
-
|
2265
|
-
|
2513
|
+
<xsl:if test="$parent = 'figure' or $parent = 'formula'">true</xsl:if>
|
2514
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2515
|
+
</xsl:variable>
|
2266
2516
|
|
2517
|
+
<xsl:choose>
|
2518
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2519
|
+
|
2520
|
+
<fo:block text-align="left">
|
2521
|
+
|
2522
|
+
|
2523
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2524
|
+
|
2525
|
+
<xsl:variable name="title-where">
|
2526
|
+
<xsl:call-template name="getTitle">
|
2527
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2528
|
+
</xsl:call-template>
|
2529
|
+
</xsl:variable>
|
2530
|
+
<xsl:value-of select="$title-where"/>
|
2531
|
+
</fo:block>
|
2532
|
+
<fo:block>
|
2533
|
+
|
2534
|
+
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
|
2535
|
+
|
2536
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2537
|
+
—
|
2538
|
+
<xsl:text> </xsl:text>
|
2539
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2540
|
+
</fo:block>
|
2541
|
+
|
2542
|
+
|
2543
|
+
</xsl:when>
|
2544
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2545
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2546
|
+
|
2547
|
+
|
2548
|
+
|
2549
|
+
|
2550
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2551
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2552
|
+
|
2553
|
+
<xsl:variable name="title-where">
|
2554
|
+
<xsl:call-template name="getTitle">
|
2555
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2556
|
+
</xsl:call-template>
|
2557
|
+
</xsl:variable>
|
2558
|
+
<xsl:value-of select="$title-where"/>
|
2559
|
+
</fo:block>
|
2560
|
+
</xsl:when>
|
2561
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2562
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2563
|
+
|
2564
|
+
|
2565
|
+
|
2566
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2567
|
+
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
|
2568
|
+
|
2569
|
+
<xsl:variable name="title-key">
|
2570
|
+
<xsl:call-template name="getTitle">
|
2571
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2572
|
+
</xsl:call-template>
|
2573
|
+
</xsl:variable>
|
2574
|
+
<xsl:value-of select="$title-key"/>
|
2575
|
+
</fo:block>
|
2576
|
+
</xsl:when>
|
2577
|
+
</xsl:choose>
|
2267
2578
|
|
2268
|
-
|
2269
|
-
|
2270
|
-
|
2271
|
-
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2272
|
-
<xsl:if test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2273
|
-
<xsl:attribute name="margin-left">15mm</xsl:attribute>
|
2274
|
-
</xsl:if>
|
2275
|
-
|
2276
|
-
|
2277
|
-
|
2278
|
-
<fo:table width="95%" table-layout="fixed">
|
2579
|
+
<!-- a few components -->
|
2580
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2581
|
+
<fo:block>
|
2279
2582
|
|
2280
|
-
<xsl:attribute name="margin-left">-3.7mm</xsl:attribute>
|
2281
2583
|
|
2282
|
-
|
2283
|
-
|
2284
|
-
|
2285
|
-
|
2286
|
-
|
2287
|
-
<xsl:attribute name="
|
2584
|
+
|
2585
|
+
|
2586
|
+
<fo:block>
|
2587
|
+
|
2588
|
+
|
2589
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2590
|
+
<xsl:if test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2591
|
+
<xsl:attribute name="margin-left">15mm</xsl:attribute>
|
2592
|
+
</xsl:if>
|
2593
|
+
|
2594
|
+
|
2595
|
+
|
2596
|
+
<fo:table width="95%" table-layout="fixed">
|
2288
2597
|
|
2289
|
-
|
2290
|
-
|
2291
|
-
|
2292
|
-
|
2293
|
-
|
2294
|
-
|
2295
|
-
|
2296
|
-
|
2297
|
-
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2302
|
-
|
2303
|
-
|
2304
|
-
|
2305
|
-
|
2306
|
-
|
2307
|
-
|
2308
|
-
|
2309
|
-
|
2310
|
-
|
2311
|
-
|
2312
|
-
|
2313
|
-
|
2314
|
-
|
2315
|
-
|
2316
|
-
|
2317
|
-
|
2318
|
-
|
2319
|
-
|
2320
|
-
|
2321
|
-
|
2322
|
-
|
2323
|
-
|
2598
|
+
<xsl:attribute name="margin-left">-3.7mm</xsl:attribute>
|
2599
|
+
|
2600
|
+
<xsl:choose>
|
2601
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2602
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2603
|
+
</xsl:when>
|
2604
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2605
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2606
|
+
|
2607
|
+
</xsl:when>
|
2608
|
+
</xsl:choose>
|
2609
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2610
|
+
<xsl:variable name="html-table">
|
2611
|
+
<xsl:variable name="doc_ns">
|
2612
|
+
|
2613
|
+
</xsl:variable>
|
2614
|
+
<xsl:variable name="ns">
|
2615
|
+
<xsl:choose>
|
2616
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2617
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2618
|
+
</xsl:when>
|
2619
|
+
<xsl:otherwise>
|
2620
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2621
|
+
</xsl:otherwise>
|
2622
|
+
</xsl:choose>
|
2623
|
+
</xsl:variable>
|
2624
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2625
|
+
<xsl:element name="{$ns}:table">
|
2626
|
+
<tbody>
|
2627
|
+
<xsl:apply-templates mode="dl"/>
|
2628
|
+
</tbody>
|
2629
|
+
</xsl:element>
|
2630
|
+
</xsl:variable>
|
2631
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2632
|
+
<xsl:variable name="colwidths">
|
2633
|
+
<xsl:call-template name="calculate-column-widths">
|
2634
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2635
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2636
|
+
</xsl:call-template>
|
2637
|
+
</xsl:variable>
|
2638
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2639
|
+
<xsl:variable name="maxlength_dt">
|
2640
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2641
|
+
</xsl:variable>
|
2642
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2643
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2644
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2645
|
+
</xsl:call-template>
|
2646
|
+
<fo:table-body>
|
2647
|
+
<xsl:apply-templates>
|
2648
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2649
|
+
</xsl:apply-templates>
|
2650
|
+
</fo:table-body>
|
2651
|
+
</fo:table>
|
2652
|
+
</fo:block>
|
2653
|
+
</fo:block>
|
2654
|
+
</xsl:if>
|
2655
|
+
</fo:block-container>
|
2656
|
+
</fo:block-container>
|
2324
2657
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
2325
2658
|
<xsl:param name="colwidths"/>
|
2326
2659
|
<xsl:param name="maxlength_dt"/>
|
@@ -2417,6 +2750,7 @@
|
|
2417
2750
|
<xsl:param name="key_iso"/>
|
2418
2751
|
|
2419
2752
|
<fo:table-row>
|
2753
|
+
|
2420
2754
|
<fo:table-cell>
|
2421
2755
|
|
2422
2756
|
<fo:block margin-top="6pt">
|
@@ -2431,6 +2765,7 @@
|
|
2431
2765
|
|
2432
2766
|
|
2433
2767
|
|
2768
|
+
|
2434
2769
|
<xsl:apply-templates/>
|
2435
2770
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2436
2771
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2442,14 +2777,36 @@
|
|
2442
2777
|
<fo:table-cell>
|
2443
2778
|
<fo:block>
|
2444
2779
|
|
2445
|
-
|
2780
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2781
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
2782
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2783
|
+
</xsl:if>
|
2784
|
+
</xsl:if> -->
|
2446
2785
|
|
2447
2786
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2448
2787
|
|
2449
2788
|
</fo:block>
|
2450
2789
|
</fo:table-cell>
|
2451
2790
|
</fo:table-row>
|
2452
|
-
|
2791
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2792
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
2793
|
+
<fo:table-row>
|
2794
|
+
<fo:table-cell>
|
2795
|
+
<fo:block margin-top="6pt">
|
2796
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2797
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2798
|
+
</xsl:if>
|
2799
|
+
<xsl:text> </xsl:text>
|
2800
|
+
</fo:block>
|
2801
|
+
</fo:table-cell>
|
2802
|
+
<fo:table-cell>
|
2803
|
+
<fo:block>
|
2804
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2805
|
+
</fo:block>
|
2806
|
+
</fo:table-cell>
|
2807
|
+
</fo:table-row>
|
2808
|
+
</xsl:if>
|
2809
|
+
</xsl:if> -->
|
2453
2810
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2454
2811
|
<xsl:apply-templates/>
|
2455
2812
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -2474,6 +2831,31 @@
|
|
2474
2831
|
</fo:inline>
|
2475
2832
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2476
2833
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2834
|
+
<xsl:variable name="_font-size">
|
2835
|
+
|
2836
|
+
|
2837
|
+
10
|
2838
|
+
|
2839
|
+
|
2840
|
+
|
2841
|
+
|
2842
|
+
|
2843
|
+
|
2844
|
+
|
2845
|
+
|
2846
|
+
|
2847
|
+
|
2848
|
+
|
2849
|
+
</xsl:variable>
|
2850
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2851
|
+
<xsl:if test="$font-size != ''">
|
2852
|
+
<xsl:attribute name="font-size">
|
2853
|
+
<xsl:choose>
|
2854
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2855
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2856
|
+
</xsl:choose>
|
2857
|
+
</xsl:attribute>
|
2858
|
+
</xsl:if>
|
2477
2859
|
<xsl:apply-templates/>
|
2478
2860
|
</fo:inline>
|
2479
2861
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2799,11 +3181,24 @@
|
|
2799
3181
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2800
3182
|
<xsl:value-of select="substring($str, 2)"/>
|
2801
3183
|
</xsl:template><xsl:template match="mathml:math">
|
2802
|
-
<fo:inline font-family="
|
2803
|
-
<
|
2804
|
-
<xsl:
|
2805
|
-
</
|
3184
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3185
|
+
<xsl:variable name="mathml">
|
3186
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
3187
|
+
</xsl:variable>
|
3188
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
3189
|
+
<!-- <xsl:copy-of select="."/> -->
|
3190
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3191
|
+
</fo:instream-foreign-object>
|
2806
3192
|
</fo:inline>
|
3193
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3194
|
+
<xsl:copy>
|
3195
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3196
|
+
</xsl:copy>
|
3197
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
3198
|
+
<xsl:copy>
|
3199
|
+
<!-- replace start and end spaces to non-break space -->
|
3200
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3201
|
+
</xsl:copy>
|
2807
3202
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2808
3203
|
<xsl:variable name="target">
|
2809
3204
|
<xsl:choose>
|
@@ -2880,13 +3275,28 @@
|
|
2880
3275
|
<xsl:apply-templates/>
|
2881
3276
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2882
3277
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2883
|
-
|
3278
|
+
|
2884
3279
|
<xsl:apply-templates/>
|
2885
3280
|
</fo:basic-link>
|
2886
3281
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2887
|
-
<fo:block
|
2888
|
-
<xsl:
|
2889
|
-
|
3282
|
+
<fo:block-container margin-left="0mm">
|
3283
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3284
|
+
<xsl:attribute name="margin-left">
|
3285
|
+
<xsl:choose>
|
3286
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3287
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3288
|
+
</xsl:choose>
|
3289
|
+
</xsl:attribute>
|
3290
|
+
|
3291
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3292
|
+
|
3293
|
+
</xsl:if>
|
3294
|
+
<fo:block-container margin-left="0mm">
|
3295
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3296
|
+
<xsl:apply-templates/>
|
3297
|
+
</fo:block>
|
3298
|
+
</fo:block-container>
|
3299
|
+
</fo:block-container>
|
2890
3300
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2891
3301
|
<fo:inline>
|
2892
3302
|
<xsl:apply-templates/>
|
@@ -2954,7 +3364,9 @@
|
|
2954
3364
|
</xsl:choose>
|
2955
3365
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2956
3366
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2957
|
-
<xsl:
|
3367
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3368
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3369
|
+
</fo:inline>
|
2958
3370
|
<xsl:apply-templates/>
|
2959
3371
|
</fo:block>
|
2960
3372
|
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
|
@@ -3057,15 +3469,109 @@
|
|
3057
3469
|
|
3058
3470
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3059
3471
|
</fo:block>
|
3060
|
-
</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">
|
3472
|
+
</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">
|
3061
3473
|
<xsl:apply-templates mode="contents"/>
|
3062
3474
|
<xsl:text> </xsl:text>
|
3063
|
-
</xsl:template><xsl:template match="
|
3475
|
+
</xsl:template><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="bookmarks">
|
3476
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3477
|
+
<xsl:text> </xsl:text>
|
3478
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3064
3479
|
<xsl:value-of select="."/>
|
3065
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3480
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3481
|
+
<xsl:value-of select="."/>
|
3482
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3483
|
+
<xsl:apply-templates mode="contents"/>
|
3484
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3485
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3486
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3487
|
+
<xsl:apply-templates select="."/>
|
3488
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3489
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3490
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3491
|
+
<xsl:param name="contents"/>
|
3492
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3493
|
+
<fo:bookmark-tree>
|
3494
|
+
<xsl:choose>
|
3495
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3496
|
+
<xsl:choose>
|
3497
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3498
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3499
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3500
|
+
<fo:bookmark-title>
|
3501
|
+
<xsl:variable name="bookmark-title_">
|
3502
|
+
<xsl:call-template name="getLangVersion">
|
3503
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3504
|
+
</xsl:call-template>
|
3505
|
+
</xsl:variable>
|
3506
|
+
<xsl:choose>
|
3507
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3508
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3509
|
+
</xsl:when>
|
3510
|
+
<xsl:otherwise>
|
3511
|
+
<xsl:choose>
|
3512
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3513
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3514
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3515
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3516
|
+
</xsl:choose>
|
3517
|
+
</xsl:otherwise>
|
3518
|
+
</xsl:choose>
|
3519
|
+
</fo:bookmark-title>
|
3520
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3521
|
+
</fo:bookmark>
|
3522
|
+
|
3523
|
+
</xsl:for-each>
|
3524
|
+
</xsl:when>
|
3525
|
+
<xsl:otherwise>
|
3526
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3527
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3528
|
+
</xsl:for-each>
|
3529
|
+
</xsl:otherwise>
|
3530
|
+
</xsl:choose>
|
3531
|
+
</xsl:when>
|
3532
|
+
<xsl:otherwise>
|
3533
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3534
|
+
</xsl:otherwise>
|
3535
|
+
</xsl:choose>
|
3536
|
+
|
3537
|
+
|
3538
|
+
|
3539
|
+
|
3540
|
+
|
3541
|
+
|
3542
|
+
|
3543
|
+
|
3544
|
+
</fo:bookmark-tree>
|
3545
|
+
</xsl:if>
|
3546
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3547
|
+
<xsl:param name="lang"/>
|
3548
|
+
<xsl:choose>
|
3549
|
+
<xsl:when test="$lang = 'en'">
|
3550
|
+
|
3551
|
+
|
3552
|
+
</xsl:when>
|
3553
|
+
<xsl:when test="$lang = 'fr'">
|
3554
|
+
|
3555
|
+
|
3556
|
+
</xsl:when>
|
3557
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3558
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3559
|
+
</xsl:choose>
|
3560
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3561
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3562
|
+
<fo:bookmark-title>
|
3563
|
+
<xsl:if test="@section != ''">
|
3564
|
+
<xsl:value-of select="@section"/>
|
3565
|
+
<xsl:text> </xsl:text>
|
3566
|
+
</xsl:if>
|
3567
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3568
|
+
</fo:bookmark-title>
|
3569
|
+
<xsl:apply-templates mode="bookmark"/>
|
3570
|
+
</fo:bookmark>
|
3571
|
+
</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">
|
3066
3572
|
<xsl:if test="normalize-space() != ''">
|
3067
3573
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3068
|
-
|
3574
|
+
|
3069
3575
|
<xsl:apply-templates/>
|
3070
3576
|
</fo:block>
|
3071
3577
|
</xsl:if>
|
@@ -3120,7 +3626,7 @@
|
|
3120
3626
|
<xsl:apply-templates/>
|
3121
3627
|
</xsl:otherwise>
|
3122
3628
|
</xsl:choose>
|
3123
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3629
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3124
3630
|
<xsl:text> </xsl:text>
|
3125
3631
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
3126
3632
|
<xsl:copy>
|
@@ -3129,21 +3635,63 @@
|
|
3129
3635
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3130
3636
|
<xsl:text> </xsl:text>
|
3131
3637
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3132
|
-
|
3133
|
-
|
3134
|
-
|
3135
|
-
|
3136
|
-
|
3638
|
+
|
3639
|
+
<fo:block-container margin-left="0mm">
|
3640
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3641
|
+
<xsl:attribute name="margin-left">
|
3642
|
+
<xsl:choose>
|
3643
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3644
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3645
|
+
</xsl:choose>
|
3646
|
+
</xsl:attribute>
|
3647
|
+
|
3648
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3649
|
+
|
3650
|
+
</xsl:if>
|
3651
|
+
<fo:block-container margin-left="0mm">
|
3652
|
+
|
3653
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3654
|
+
<xsl:variable name="_font-size">
|
3655
|
+
|
3656
|
+
|
3657
|
+
9
|
3658
|
+
|
3659
|
+
|
3660
|
+
|
3661
|
+
|
3662
|
+
|
3663
|
+
|
3664
|
+
|
3665
|
+
|
3666
|
+
|
3667
|
+
|
3668
|
+
|
3669
|
+
</xsl:variable>
|
3670
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3671
|
+
<xsl:if test="$font-size != ''">
|
3672
|
+
<xsl:attribute name="font-size">
|
3673
|
+
<xsl:choose>
|
3674
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3675
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3676
|
+
</xsl:choose>
|
3677
|
+
</xsl:attribute>
|
3678
|
+
</xsl:if>
|
3679
|
+
<xsl:apply-templates/>
|
3680
|
+
</fo:block>
|
3681
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3682
|
+
|
3683
|
+
</fo:block-container>
|
3684
|
+
</fo:block-container>
|
3685
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
3137
3686
|
<xsl:variable name="text">
|
3138
3687
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
3139
3688
|
</xsl:variable>
|
3140
|
-
<xsl:call-template name="add-zero-spaces">
|
3689
|
+
<xsl:call-template name="add-zero-spaces-java">
|
3141
3690
|
<xsl:with-param name="text" select="$text"/>
|
3142
3691
|
</xsl:call-template>
|
3143
3692
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
3144
3693
|
<xsl:if test="normalize-space() != ''">
|
3145
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3146
|
-
|
3694
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3147
3695
|
<xsl:apply-templates/>
|
3148
3696
|
</fo:block>
|
3149
3697
|
</xsl:if>
|
@@ -3213,22 +3761,30 @@
|
|
3213
3761
|
</fo:block>
|
3214
3762
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3215
3763
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3764
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3765
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3766
|
+
</xsl:if>
|
3216
3767
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3217
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="
|
3768
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3769
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3770
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3771
|
+
</xsl:if>
|
3218
3772
|
<xsl:variable name="simple-table">
|
3219
3773
|
<xsl:call-template name="getSimpleTable"/>
|
3220
3774
|
</xsl:variable>
|
3221
3775
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3222
3776
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3223
|
-
<fo:table-column column-width="35mm"/>
|
3224
|
-
<fo:table-column column-width="115mm"/>
|
3777
|
+
<!-- <fo:table-column column-width="35mm"/>
|
3778
|
+
<fo:table-column column-width="115mm"/> -->
|
3779
|
+
<fo:table-column column-width="30%"/>
|
3780
|
+
<fo:table-column column-width="70%"/>
|
3225
3781
|
</xsl:if>
|
3226
3782
|
<xsl:apply-templates mode="requirement"/>
|
3227
3783
|
</fo:table>
|
3228
3784
|
<!-- fn processing -->
|
3229
3785
|
<xsl:if test=".//*[local-name() = 'fn']">
|
3230
3786
|
<xsl:for-each select="*[local-name() = 'tbody']">
|
3231
|
-
<fo:block font-size="90%" border-bottom="
|
3787
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
3232
3788
|
<xsl:call-template name="fn_display"/>
|
3233
3789
|
</fo:block>
|
3234
3790
|
</xsl:for-each>
|
@@ -3244,17 +3800,27 @@
|
|
3244
3800
|
<xsl:apply-templates mode="requirement"/>
|
3245
3801
|
</fo:table-body>
|
3246
3802
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3247
|
-
<fo:table-row>
|
3803
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3804
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3805
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3806
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3807
|
+
</xsl:if>
|
3808
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3809
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3810
|
+
</xsl:if>
|
3811
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3812
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3813
|
+
</xsl:if>
|
3248
3814
|
<xsl:apply-templates mode="requirement"/>
|
3249
3815
|
</fo:table-row>
|
3250
3816
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3251
|
-
<fo:table-cell text-align="{@align}">
|
3817
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3252
3818
|
<xsl:attribute name="text-align">
|
3253
3819
|
<xsl:choose>
|
3254
3820
|
<xsl:when test="@align">
|
3255
3821
|
<xsl:value-of select="@align"/>
|
3256
3822
|
</xsl:when>
|
3257
|
-
<xsl:otherwise>
|
3823
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3258
3824
|
</xsl:choose>
|
3259
3825
|
</xsl:attribute>
|
3260
3826
|
<xsl:if test="@colspan">
|
@@ -3267,22 +3833,27 @@
|
|
3267
3833
|
<xsl:value-of select="@rowspan"/>
|
3268
3834
|
</xsl:attribute>
|
3269
3835
|
</xsl:if>
|
3836
|
+
<xsl:call-template name="display-align"/>
|
3270
3837
|
|
3271
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3838
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3272
3839
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3273
3840
|
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
3274
3841
|
</xsl:if>
|
3275
3842
|
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
3276
3843
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3277
3844
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3278
|
-
</xsl:if>
|
3845
|
+
</xsl:if> -->
|
3279
3846
|
|
3280
3847
|
<fo:block>
|
3281
3848
|
<xsl:apply-templates/>
|
3282
3849
|
</fo:block>
|
3283
3850
|
</fo:table-cell>
|
3284
3851
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3285
|
-
<fo:table-cell text-align="{@align}">
|
3852
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3853
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3854
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3855
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
3856
|
+
</xsl:if>
|
3286
3857
|
<xsl:attribute name="text-align">
|
3287
3858
|
<xsl:choose>
|
3288
3859
|
<xsl:when test="@align">
|
@@ -3291,6 +3862,9 @@
|
|
3291
3862
|
<xsl:otherwise>left</xsl:otherwise>
|
3292
3863
|
</xsl:choose>
|
3293
3864
|
</xsl:attribute>
|
3865
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3866
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3867
|
+
</xsl:if>
|
3294
3868
|
<xsl:if test="@colspan">
|
3295
3869
|
<xsl:attribute name="number-columns-spanned">
|
3296
3870
|
<xsl:value-of select="@colspan"/>
|
@@ -3301,25 +3875,27 @@
|
|
3301
3875
|
<xsl:value-of select="@rowspan"/>
|
3302
3876
|
</xsl:attribute>
|
3303
3877
|
</xsl:if>
|
3878
|
+
<xsl:call-template name="display-align"/>
|
3304
3879
|
|
3305
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3880
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3306
3881
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
3307
|
-
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3308
|
-
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3882
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3883
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3309
3884
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3310
3885
|
</xsl:if>
|
3311
|
-
</xsl:if>
|
3886
|
+
</xsl:if> -->
|
3887
|
+
<!-- 2nd line and below -->
|
3312
3888
|
|
3313
3889
|
<fo:block>
|
3314
3890
|
<xsl:apply-templates/>
|
3315
3891
|
</fo:block>
|
3316
3892
|
</fo:table-cell>
|
3317
3893
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3318
|
-
<fo:block font-size="11pt" font-weight="bold"
|
3894
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3319
3895
|
<xsl:apply-templates/>
|
3320
3896
|
</fo:block>
|
3321
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3322
|
-
<fo:block margin-bottom="10pt"
|
3897
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3898
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
3323
3899
|
<xsl:apply-templates/>
|
3324
3900
|
</fo:block>
|
3325
3901
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
@@ -3341,12 +3917,13 @@
|
|
3341
3917
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3342
3918
|
|
3343
3919
|
<xsl:variable name="element">
|
3344
|
-
block
|
3920
|
+
block
|
3345
3921
|
|
3922
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3346
3923
|
</xsl:variable>
|
3347
3924
|
|
3348
3925
|
<xsl:choose>
|
3349
|
-
<xsl:when test="normalize-space($element)
|
3926
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3350
3927
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
3351
3928
|
<xsl:apply-templates/>
|
3352
3929
|
</fo:block>
|
@@ -3383,25 +3960,44 @@
|
|
3383
3960
|
</xsl:otherwise>
|
3384
3961
|
</xsl:choose>
|
3385
3962
|
|
3386
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3387
|
-
|
3963
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3964
|
+
|
3965
|
+
<xsl:variable name="element">
|
3966
|
+
block
|
3388
3967
|
|
3389
|
-
|
3390
|
-
|
3968
|
+
</xsl:variable>
|
3969
|
+
<xsl:choose>
|
3970
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3971
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3972
|
+
|
3973
|
+
<xsl:apply-templates/>
|
3974
|
+
</fo:block>
|
3975
|
+
</xsl:when>
|
3976
|
+
<xsl:otherwise>
|
3977
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3978
|
+
<xsl:apply-templates/>
|
3979
|
+
</fo:inline>
|
3980
|
+
</xsl:otherwise>
|
3981
|
+
</xsl:choose>
|
3391
3982
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3392
3983
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3393
3984
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3394
3985
|
<xsl:variable name="termsource_text">
|
3395
3986
|
<xsl:apply-templates/>
|
3396
3987
|
</xsl:variable>
|
3988
|
+
|
3397
3989
|
<xsl:choose>
|
3398
3990
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3399
3991
|
<xsl:apply-templates/>
|
3400
3992
|
</xsl:when>
|
3401
|
-
<xsl:otherwise>
|
3402
|
-
|
3403
|
-
|
3404
|
-
|
3993
|
+
<xsl:otherwise>
|
3994
|
+
|
3995
|
+
<xsl:text>[</xsl:text>
|
3996
|
+
|
3997
|
+
<xsl:apply-templates/>
|
3998
|
+
|
3999
|
+
<xsl:text>]</xsl:text>
|
4000
|
+
|
3405
4001
|
</xsl:otherwise>
|
3406
4002
|
</xsl:choose>
|
3407
4003
|
</fo:block>
|
@@ -3422,18 +4018,31 @@
|
|
3422
4018
|
<xsl:if test="normalize-space() != ''">
|
3423
4019
|
<xsl:value-of select="."/>
|
3424
4020
|
</xsl:if>
|
3425
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
4021
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
4022
|
+
<fo:block-container margin-left="0mm">
|
4023
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4024
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
4025
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
4026
|
+
</xsl:if>
|
4027
|
+
</xsl:if>
|
4028
|
+
|
4029
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
4030
|
+
|
4031
|
+
<fo:block-container margin-left="0mm">
|
3426
4032
|
|
3427
|
-
|
3428
|
-
|
3429
|
-
|
3430
|
-
|
3431
|
-
|
3432
|
-
|
3433
|
-
|
3434
|
-
|
3435
|
-
|
3436
|
-
|
4033
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
4034
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
4035
|
+
</fo:block>
|
4036
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4037
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
4038
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
4039
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
4040
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
4041
|
+
</fo:block>
|
4042
|
+
</xsl:if>
|
4043
|
+
|
4044
|
+
</fo:block-container>
|
4045
|
+
</fo:block-container>
|
3437
4046
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3438
4047
|
<xsl:if test="../*[local-name() = 'author']">
|
3439
4048
|
<xsl:text>, </xsl:text>
|
@@ -3461,6 +4070,7 @@
|
|
3461
4070
|
<xsl:if test="@type = 'inline'">
|
3462
4071
|
|
3463
4072
|
|
4073
|
+
|
3464
4074
|
</xsl:if>
|
3465
4075
|
|
3466
4076
|
|
@@ -3493,6 +4103,7 @@
|
|
3493
4103
|
|
3494
4104
|
|
3495
4105
|
|
4106
|
+
|
3496
4107
|
</xsl:variable>
|
3497
4108
|
|
3498
4109
|
<xsl:variable name="padding-right">
|
@@ -3588,6 +4199,7 @@
|
|
3588
4199
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3589
4200
|
<fo:block>
|
3590
4201
|
<xsl:call-template name="setId"/>
|
4202
|
+
|
3591
4203
|
<xsl:apply-templates/>
|
3592
4204
|
</fo:block>
|
3593
4205
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -3612,6 +4224,33 @@
|
|
3612
4224
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3613
4225
|
<!-- 0xA0 to space replacement -->
|
3614
4226
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4227
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4228
|
+
<xsl:choose>
|
4229
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
4230
|
+
<fo:block-container>
|
4231
|
+
<xsl:attribute name="margin-left">
|
4232
|
+
<xsl:choose>
|
4233
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4234
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4235
|
+
</xsl:choose>
|
4236
|
+
</xsl:attribute>
|
4237
|
+
|
4238
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
4239
|
+
|
4240
|
+
|
4241
|
+
<fo:block-container margin-left="0mm">
|
4242
|
+
<fo:block>
|
4243
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4244
|
+
</fo:block>
|
4245
|
+
</fo:block-container>
|
4246
|
+
</fo:block-container>
|
4247
|
+
</xsl:when>
|
4248
|
+
<xsl:otherwise>
|
4249
|
+
<fo:block>
|
4250
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4251
|
+
</fo:block>
|
4252
|
+
</xsl:otherwise>
|
4253
|
+
</xsl:choose>
|
3615
4254
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3616
4255
|
<!-- <row>
|
3617
4256
|
<date>05-07-2013</date>
|
@@ -3643,6 +4282,65 @@
|
|
3643
4282
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3644
4283
|
<fo:block><xsl:apply-templates/></fo:block>
|
3645
4284
|
</fo:table-cell>
|
4285
|
+
</xsl:template><xsl:template name="processBibitem">
|
4286
|
+
|
4287
|
+
|
4288
|
+
|
4289
|
+
|
4290
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4291
|
+
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
4292
|
+
<xsl:choose>
|
4293
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4294
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
4295
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4296
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4297
|
+
</xsl:if>
|
4298
|
+
<xsl:value-of select="$_doc_ident"/>
|
4299
|
+
</xsl:when>
|
4300
|
+
<xsl:otherwise>
|
4301
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4302
|
+
<xsl:if test="$type != ''">
|
4303
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4304
|
+
</xsl:if>
|
4305
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4306
|
+
</xsl:otherwise>
|
4307
|
+
</xsl:choose>
|
4308
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
4309
|
+
<xsl:choose>
|
4310
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
4311
|
+
<author>
|
4312
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4313
|
+
</author>
|
4314
|
+
</xsl:when>
|
4315
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
4316
|
+
<author>
|
4317
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4318
|
+
<xsl:text> </xsl:text>
|
4319
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
4320
|
+
</author>
|
4321
|
+
</xsl:when>
|
4322
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
4323
|
+
<author>
|
4324
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4325
|
+
<xsl:text> </xsl:text>
|
4326
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
4327
|
+
</author>
|
4328
|
+
</xsl:when>
|
4329
|
+
<xsl:otherwise>
|
4330
|
+
<xsl:apply-templates/>
|
4331
|
+
</xsl:otherwise>
|
4332
|
+
</xsl:choose>
|
4333
|
+
</xsl:template><xsl:template name="renderDate">
|
4334
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
4335
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
4336
|
+
</xsl:if>
|
4337
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
4338
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
4339
|
+
</xsl:if>
|
4340
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
4341
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
4342
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4343
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
3646
4344
|
</xsl:template><xsl:template name="convertDate">
|
3647
4345
|
<xsl:param name="date"/>
|
3648
4346
|
<xsl:param name="format" select="'short'"/>
|
@@ -3725,6 +4423,7 @@
|
|
3725
4423
|
|
3726
4424
|
|
3727
4425
|
|
4426
|
+
|
3728
4427
|
|
3729
4428
|
</xsl:variable>
|
3730
4429
|
<xsl:choose>
|
@@ -3741,6 +4440,7 @@
|
|
3741
4440
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
3742
4441
|
|
3743
4442
|
|
4443
|
+
|
3744
4444
|
</dc:creator>
|
3745
4445
|
<dc:description>
|
3746
4446
|
<xsl:variable name="abstract">
|
@@ -3750,6 +4450,7 @@
|
|
3750
4450
|
|
3751
4451
|
|
3752
4452
|
|
4453
|
+
|
3753
4454
|
</xsl:variable>
|
3754
4455
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3755
4456
|
</dc:description>
|
@@ -3850,6 +4551,7 @@
|
|
3850
4551
|
<xsl:value-of select="document('')//*/namespace::gb"/>
|
3851
4552
|
|
3852
4553
|
|
4554
|
+
|
3853
4555
|
</xsl:variable>
|
3854
4556
|
<xsl:if test="$documentNS != $XSLNS">
|
3855
4557
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3875,4 +4577,21 @@
|
|
3875
4577
|
</xsl:otherwise>
|
3876
4578
|
</xsl:choose>
|
3877
4579
|
</xsl:attribute>
|
4580
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4581
|
+
<xsl:param name="text"/>
|
4582
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4583
|
+
<xsl:if test="string-length($text) > 0">
|
4584
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4585
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4586
|
+
<xsl:if test="$char = '®'">
|
4587
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4588
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4589
|
+
</xsl:if>
|
4590
|
+
<xsl:value-of select="$char"/>
|
4591
|
+
</fo:inline>
|
4592
|
+
<xsl:call-template name="add-letter-spacing">
|
4593
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4594
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4595
|
+
</xsl:call-template>
|
4596
|
+
</xsl:if>
|
3878
4597
|
</xsl:template></xsl:stylesheet>
|