metanorma-gb 1.5.2 → 1.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/gb/basicdoc.rng +23 -0
- data/lib/asciidoctor/gb/front_id.rb +1 -1
- data/lib/asciidoctor/gb/gbstandard.rng +7 -0
- data/lib/asciidoctor/gb/isodoc.rng +124 -15
- data/lib/asciidoctor/gb/isostandard.rng +8 -1
- data/lib/isodoc/gb/gb.recommendation.xsl +931 -234
- 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 +1 -1
- data/lib/isodoc/gb/html/htmlstyle.css +1 -1
- data/lib/isodoc/gb/html/wordstyle.css +0 -1
- data/lib/isodoc/gb/html/wordstyle.scss +0 -1
- data/lib/metanorma/gb/version.rb +1 -1
- data/metanorma-gb.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0ddd7149d38c5ea3e20a2be7eca774fd274891f44f5d4befd9be899ab68c0ae
|
4
|
+
data.tar.gz: a158e33d9f29bf574705aa57aa13b03c2055048ab193af8f57340d09a7f3e920
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 339ea8375c4197f3a2c52028bfe6cb04215fd5217623af47235c78fa6ba48888c3e6ef2942794341aad2193703ad502d14692c9a53564440b1cb592ce72db526
|
7
|
+
data.tar.gz: bb89373f177df01eb5fb7ec90ef2b3fe2ada866182a43dbc1bf50c041b15beb0311c5b30be80227b52389e8a32b489e92a87945692fdf0fe598dd8528acd0c2e
|
@@ -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>
|
@@ -45,7 +45,7 @@ module Asciidoctor
|
|
45
45
|
if node.attr("docstage") && node.attr("docstage").to_i < 60
|
46
46
|
abbr = IsoDoc::Gb::Metadata.new("en", "Latn", @i18n).
|
47
47
|
status_abbrev(node.attr("docstage"), nil, node.attr("iteration"),
|
48
|
-
node.attr("draft"), node
|
48
|
+
node.attr("draft"), doctype(node))
|
49
49
|
dn = "/#{abbr} #{dn}" # prefixes added in cleanup
|
50
50
|
else
|
51
51
|
dn += "-#{node.attr("copyright-year")}" if node.attr("copyright-year")
|
@@ -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"/>
|
@@ -43,7 +43,9 @@
|
|
43
43
|
<define name="xref">
|
44
44
|
<element name="xref">
|
45
45
|
<attribute name="target">
|
46
|
-
<data type="
|
46
|
+
<data type="string">
|
47
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
48
|
+
</data>
|
47
49
|
</attribute>
|
48
50
|
<optional>
|
49
51
|
<attribute name="type">
|
@@ -61,6 +63,11 @@
|
|
61
63
|
</choice>
|
62
64
|
</attribute>
|
63
65
|
</optional>
|
66
|
+
<optional>
|
67
|
+
<attribute name="droploc">
|
68
|
+
<data type="boolean"/>
|
69
|
+
</attribute>
|
70
|
+
</optional>
|
64
71
|
<text/>
|
65
72
|
</element>
|
66
73
|
</define>
|
@@ -578,6 +585,8 @@
|
|
578
585
|
<ref name="ol"/>
|
579
586
|
<ref name="dl"/>
|
580
587
|
<ref name="formula"/>
|
588
|
+
<ref name="quote"/>
|
589
|
+
<ref name="sourcecode"/>
|
581
590
|
</choice>
|
582
591
|
</oneOrMore>
|
583
592
|
</element>
|
@@ -661,6 +670,16 @@
|
|
661
670
|
</choice>
|
662
671
|
</attribute>
|
663
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>
|
664
683
|
<choice>
|
665
684
|
<zeroOrMore>
|
666
685
|
<choice>
|
@@ -697,6 +716,16 @@
|
|
697
716
|
</choice>
|
698
717
|
</attribute>
|
699
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>
|
700
729
|
<choice>
|
701
730
|
<zeroOrMore>
|
702
731
|
<choice>
|
@@ -834,6 +863,13 @@
|
|
834
863
|
</define>
|
835
864
|
<define name="standard-document">
|
836
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>
|
837
873
|
<ref name="bibdata"/>
|
838
874
|
<optional>
|
839
875
|
<ref name="boilerplate"/>
|
@@ -855,7 +891,7 @@
|
|
855
891
|
<oneOrMore>
|
856
892
|
<choice>
|
857
893
|
<ref name="content"/>
|
858
|
-
<ref name="
|
894
|
+
<ref name="abstract"/>
|
859
895
|
<ref name="foreword"/>
|
860
896
|
<ref name="introduction"/>
|
861
897
|
<ref name="acknowledgements"/>
|
@@ -1049,14 +1085,17 @@
|
|
1049
1085
|
<ref name="section-title"/>
|
1050
1086
|
</optional>
|
1051
1087
|
<group>
|
1052
|
-
<
|
1053
|
-
<
|
1054
|
-
<
|
1055
|
-
|
1056
|
-
|
1057
|
-
<
|
1058
|
-
|
1059
|
-
|
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>
|
1060
1099
|
<zeroOrMore>
|
1061
1100
|
<choice>
|
1062
1101
|
<ref name="clause-subsection"/>
|
@@ -1453,11 +1492,6 @@
|
|
1453
1492
|
</optional>
|
1454
1493
|
</element>
|
1455
1494
|
</define>
|
1456
|
-
<define name="preface_abstract">
|
1457
|
-
<element name="abstract">
|
1458
|
-
<ref name="Basic-Section"/>
|
1459
|
-
</element>
|
1460
|
-
</define>
|
1461
1495
|
<define name="term-clause">
|
1462
1496
|
<element name="clause">
|
1463
1497
|
<optional>
|
@@ -1507,4 +1541,79 @@
|
|
1507
1541
|
<ref name="CitationType"/>
|
1508
1542
|
</element>
|
1509
1543
|
</define>
|
1544
|
+
<define name="amend">
|
1545
|
+
<element name="amend">
|
1546
|
+
<optional>
|
1547
|
+
<attribute name="id">
|
1548
|
+
<data type="ID"/>
|
1549
|
+
</attribute>
|
1550
|
+
</optional>
|
1551
|
+
<attribute name="change">
|
1552
|
+
<choice>
|
1553
|
+
<value>add</value>
|
1554
|
+
<value>modify</value>
|
1555
|
+
<value>delete</value>
|
1556
|
+
</choice>
|
1557
|
+
</attribute>
|
1558
|
+
<optional>
|
1559
|
+
<attribute name="path"/>
|
1560
|
+
</optional>
|
1561
|
+
<optional>
|
1562
|
+
<attribute name="path_end"/>
|
1563
|
+
</optional>
|
1564
|
+
<optional>
|
1565
|
+
<attribute name="title"/>
|
1566
|
+
</optional>
|
1567
|
+
<optional>
|
1568
|
+
<element name="location">
|
1569
|
+
<zeroOrMore>
|
1570
|
+
<ref name="locality"/>
|
1571
|
+
</zeroOrMore>
|
1572
|
+
</element>
|
1573
|
+
</optional>
|
1574
|
+
<zeroOrMore>
|
1575
|
+
<ref name="autonumber"/>
|
1576
|
+
</zeroOrMore>
|
1577
|
+
<optional>
|
1578
|
+
<element name="description">
|
1579
|
+
<zeroOrMore>
|
1580
|
+
<ref name="BasicBlock"/>
|
1581
|
+
</zeroOrMore>
|
1582
|
+
</element>
|
1583
|
+
</optional>
|
1584
|
+
<optional>
|
1585
|
+
<element name="newcontent">
|
1586
|
+
<zeroOrMore>
|
1587
|
+
<ref name="BasicBlock"/>
|
1588
|
+
</zeroOrMore>
|
1589
|
+
</element>
|
1590
|
+
</optional>
|
1591
|
+
<optional>
|
1592
|
+
<element name="description">
|
1593
|
+
<zeroOrMore>
|
1594
|
+
<ref name="BasicBlock"/>
|
1595
|
+
</zeroOrMore>
|
1596
|
+
</element>
|
1597
|
+
</optional>
|
1598
|
+
</element>
|
1599
|
+
</define>
|
1600
|
+
<define name="autonumber">
|
1601
|
+
<element name="autonumber">
|
1602
|
+
<attribute name="type">
|
1603
|
+
<choice>
|
1604
|
+
<value>requirement</value>
|
1605
|
+
<value>recommendation</value>
|
1606
|
+
<value>permission</value>
|
1607
|
+
<value>table</value>
|
1608
|
+
<value>figure</value>
|
1609
|
+
<value>admonition</value>
|
1610
|
+
<value>formula</value>
|
1611
|
+
<value>sourcecode</value>
|
1612
|
+
<value>example</value>
|
1613
|
+
<value>note</value>
|
1614
|
+
</choice>
|
1615
|
+
</attribute>
|
1616
|
+
<text/>
|
1617
|
+
</element>
|
1618
|
+
</define>
|
1510
1619
|
</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
|
|
@@ -1397,20 +1455,20 @@
|
|
1397
1455
|
|
1398
1456
|
|
1399
1457
|
|
1458
|
+
</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">
|
1400
1459
|
|
1401
1460
|
|
1402
|
-
|
1461
|
+
|
1462
|
+
<xsl:attribute name="font-family">SimHei</xsl:attribute>
|
1403
1463
|
|
1404
1464
|
|
1405
1465
|
|
1406
|
-
<xsl:attribute name="font-family">SimHei</xsl:attribute>
|
1407
1466
|
|
1408
1467
|
|
1409
1468
|
|
1410
1469
|
|
1411
1470
|
|
1412
1471
|
|
1413
|
-
|
1414
1472
|
|
1415
1473
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1416
1474
|
|
@@ -1436,6 +1494,8 @@
|
|
1436
1494
|
|
1437
1495
|
|
1438
1496
|
|
1497
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1498
|
+
|
1439
1499
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1440
1500
|
|
1441
1501
|
|
@@ -1464,6 +1524,7 @@
|
|
1464
1524
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1465
1525
|
|
1466
1526
|
|
1527
|
+
|
1467
1528
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1468
1529
|
|
1469
1530
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1471,6 +1532,7 @@
|
|
1471
1532
|
|
1472
1533
|
|
1473
1534
|
|
1535
|
+
|
1474
1536
|
|
1475
1537
|
<xsl:attribute name="font-family">SimHei</xsl:attribute>
|
1476
1538
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -1514,14 +1576,16 @@
|
|
1514
1576
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1515
1577
|
|
1516
1578
|
|
1517
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1518
|
-
|
1579
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1580
|
+
|
1519
1581
|
|
1520
1582
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1521
1583
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1522
1584
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1523
1585
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1524
1586
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1587
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1588
|
+
|
1525
1589
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1526
1590
|
|
1527
1591
|
<xsl:attribute name="padding-left">7.4mm</xsl:attribute>
|
@@ -1587,6 +1651,10 @@
|
|
1587
1651
|
|
1588
1652
|
|
1589
1653
|
|
1654
|
+
|
1655
|
+
|
1656
|
+
<!-- $namespace = 'iso' or -->
|
1657
|
+
|
1590
1658
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1591
1659
|
|
1592
1660
|
|
@@ -1622,6 +1690,7 @@
|
|
1622
1690
|
<xsl:with-param name="table" select="$simple-table"/>
|
1623
1691
|
</xsl:call-template>
|
1624
1692
|
</xsl:variable>
|
1693
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1625
1694
|
|
1626
1695
|
<!-- <xsl:variable name="colwidths2">
|
1627
1696
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1642,7 +1711,15 @@
|
|
1642
1711
|
|
1643
1712
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1644
1713
|
|
1714
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1715
|
+
|
1716
|
+
|
1717
|
+
|
1718
|
+
|
1719
|
+
|
1720
|
+
|
1645
1721
|
|
1722
|
+
|
1646
1723
|
|
1647
1724
|
|
1648
1725
|
|
@@ -1650,20 +1727,36 @@
|
|
1650
1727
|
|
1651
1728
|
|
1652
1729
|
|
1653
|
-
<
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1730
|
+
<xsl:variable name="table_attributes">
|
1731
|
+
<attribute name="table-layout">fixed</attribute>
|
1732
|
+
<attribute name="width">100%</attribute>
|
1733
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1734
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1658
1735
|
|
1659
1736
|
|
1660
1737
|
|
1661
1738
|
|
1739
|
+
|
1740
|
+
|
1741
|
+
|
1662
1742
|
|
1663
|
-
|
1743
|
+
|
1664
1744
|
|
1745
|
+
</xsl:variable>
|
1746
|
+
|
1747
|
+
|
1748
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1665
1749
|
|
1750
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1751
|
+
<xsl:attribute name="{@name}">
|
1752
|
+
<xsl:value-of select="."/>
|
1753
|
+
</xsl:attribute>
|
1754
|
+
</xsl:for-each>
|
1666
1755
|
|
1756
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1757
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1758
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1759
|
+
</xsl:if>
|
1667
1760
|
|
1668
1761
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1669
1762
|
<xsl:choose>
|
@@ -1687,6 +1780,33 @@
|
|
1687
1780
|
|
1688
1781
|
</fo:table>
|
1689
1782
|
|
1783
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1784
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1785
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1786
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1787
|
+
</xsl:call-template>
|
1788
|
+
</xsl:for-each>
|
1789
|
+
|
1790
|
+
<!-- insert footer as table -->
|
1791
|
+
<!-- <fo:table>
|
1792
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1793
|
+
<xsl:attribute name="{@name}">
|
1794
|
+
<xsl:value-of select="."/>
|
1795
|
+
</xsl:attribute>
|
1796
|
+
</xsl:for-each>
|
1797
|
+
|
1798
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1799
|
+
<xsl:choose>
|
1800
|
+
<xsl:when test=". = 1 or . = 0">
|
1801
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1802
|
+
</xsl:when>
|
1803
|
+
<xsl:otherwise>
|
1804
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1805
|
+
</xsl:otherwise>
|
1806
|
+
</xsl:choose>
|
1807
|
+
</xsl:for-each>
|
1808
|
+
</fo:table>-->
|
1809
|
+
|
1690
1810
|
|
1691
1811
|
<xsl:apply-templates select="*[local-name()='note']" mode="process"/>
|
1692
1812
|
|
@@ -1697,8 +1817,9 @@
|
|
1697
1817
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1698
1818
|
<xsl:if test="normalize-space() != ''">
|
1699
1819
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1700
|
-
|
1701
|
-
|
1820
|
+
|
1821
|
+
<xsl:apply-templates/>
|
1822
|
+
</fo:block>
|
1702
1823
|
</xsl:if>
|
1703
1824
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1704
1825
|
<xsl:param name="table-row"/>
|
@@ -1752,6 +1873,13 @@
|
|
1752
1873
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1753
1874
|
<xsl:variable name="td_text">
|
1754
1875
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1876
|
+
|
1877
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1878
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1879
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1880
|
+
</xsl:for-each>
|
1881
|
+
</xsl:if> -->
|
1882
|
+
|
1755
1883
|
</xsl:variable>
|
1756
1884
|
<xsl:variable name="words">
|
1757
1885
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1811,13 +1939,31 @@
|
|
1811
1939
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1812
1940
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1813
1941
|
<xsl:value-of select="@target"/>
|
1942
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1943
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1944
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1814
1945
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1815
1946
|
<xsl:param name="cols-count"/>
|
1816
1947
|
<!-- font-weight="bold" -->
|
1817
|
-
<fo:table-header>
|
1948
|
+
<fo:table-header>
|
1818
1949
|
|
1819
1950
|
<xsl:apply-templates/>
|
1820
1951
|
</fo:table-header>
|
1952
|
+
</xsl:template><xsl:template name="table-header-title">
|
1953
|
+
<xsl:param name="cols-count"/>
|
1954
|
+
<!-- row for title -->
|
1955
|
+
<fo:table-row>
|
1956
|
+
<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">
|
1957
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1958
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1959
|
+
<xsl:call-template name="fn_name_display"/>
|
1960
|
+
</xsl:for-each>
|
1961
|
+
<fo:block text-align="right" font-style="italic">
|
1962
|
+
<xsl:text> </xsl:text>
|
1963
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1964
|
+
</fo:block>
|
1965
|
+
</fo:table-cell>
|
1966
|
+
</fo:table-row>
|
1821
1967
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1822
1968
|
<fo:table-body>
|
1823
1969
|
<xsl:apply-templates/>
|
@@ -1825,6 +1971,13 @@
|
|
1825
1971
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1826
1972
|
<xsl:apply-templates/>
|
1827
1973
|
</xsl:template><xsl:template name="insertTableFooter">
|
1974
|
+
<xsl:param name="cols-count"/>
|
1975
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1976
|
+
<fo:table-footer>
|
1977
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1978
|
+
</fo:table-footer>
|
1979
|
+
</xsl:if>
|
1980
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1828
1981
|
<xsl:param name="cols-count"/>
|
1829
1982
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1830
1983
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1848,7 +2001,11 @@
|
|
1848
2001
|
<!-- fn will be processed inside 'note' processing -->
|
1849
2002
|
|
1850
2003
|
|
1851
|
-
|
2004
|
+
|
2005
|
+
<!-- except gb and bipm -->
|
2006
|
+
|
2007
|
+
|
2008
|
+
|
1852
2009
|
|
1853
2010
|
|
1854
2011
|
<!-- horizontal row separator -->
|
@@ -1864,6 +2021,84 @@
|
|
1864
2021
|
</fo:table-footer>
|
1865
2022
|
|
1866
2023
|
</xsl:if>
|
2024
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2025
|
+
<xsl:param name="table_attributes"/>
|
2026
|
+
<xsl:param name="colwidths"/>
|
2027
|
+
|
2028
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2029
|
+
|
2030
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2031
|
+
|
2032
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
2033
|
+
|
2034
|
+
<fo:table keep-with-previous="always">
|
2035
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2036
|
+
<xsl:choose>
|
2037
|
+
<xsl:when test="@name = 'border-top'">
|
2038
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
2039
|
+
</xsl:when>
|
2040
|
+
<xsl:when test="@name = 'border'">
|
2041
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2042
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
2043
|
+
</xsl:when>
|
2044
|
+
<xsl:otherwise>
|
2045
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2046
|
+
</xsl:otherwise>
|
2047
|
+
</xsl:choose>
|
2048
|
+
</xsl:for-each>
|
2049
|
+
|
2050
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2051
|
+
<xsl:choose>
|
2052
|
+
<xsl:when test=". = 1 or . = 0">
|
2053
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2054
|
+
</xsl:when>
|
2055
|
+
<xsl:otherwise>
|
2056
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2057
|
+
</xsl:otherwise>
|
2058
|
+
</xsl:choose>
|
2059
|
+
</xsl:for-each>
|
2060
|
+
|
2061
|
+
<fo:table-body>
|
2062
|
+
<fo:table-row>
|
2063
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
2064
|
+
|
2065
|
+
<xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
|
2066
|
+
|
2067
|
+
|
2068
|
+
|
2069
|
+
<!-- fn will be processed inside 'note' processing -->
|
2070
|
+
|
2071
|
+
|
2072
|
+
|
2073
|
+
<!-- except gb and bipm -->
|
2074
|
+
|
2075
|
+
|
2076
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2077
|
+
<xsl:choose>
|
2078
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2079
|
+
show Note under table in preface (ex. abstract) sections
|
2080
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2081
|
+
</xsl:when>
|
2082
|
+
<xsl:otherwise>
|
2083
|
+
empty, because notes show at page side in main sections
|
2084
|
+
<fo:block/>
|
2085
|
+
</xsl:otherwise>
|
2086
|
+
</xsl:choose>
|
2087
|
+
</xsl:if> -->
|
2088
|
+
|
2089
|
+
|
2090
|
+
<!-- horizontal row separator -->
|
2091
|
+
|
2092
|
+
|
2093
|
+
<!-- fn processing -->
|
2094
|
+
<xsl:call-template name="fn_display"/>
|
2095
|
+
|
2096
|
+
</fo:table-cell>
|
2097
|
+
</fo:table-row>
|
2098
|
+
</fo:table-body>
|
2099
|
+
|
2100
|
+
</fo:table>
|
2101
|
+
</xsl:if>
|
1867
2102
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1868
2103
|
|
1869
2104
|
<xsl:variable name="cols-count">
|
@@ -1881,6 +2116,8 @@
|
|
1881
2116
|
</xsl:choose>
|
1882
2117
|
</xsl:variable>
|
1883
2118
|
|
2119
|
+
|
2120
|
+
|
1884
2121
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1885
2122
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1886
2123
|
</xsl:apply-templates>
|
@@ -1890,6 +2127,8 @@
|
|
1890
2127
|
</xsl:call-template>
|
1891
2128
|
|
1892
2129
|
<fo:table-body>
|
2130
|
+
|
2131
|
+
|
1893
2132
|
<xsl:apply-templates/>
|
1894
2133
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1895
2134
|
|
@@ -1916,6 +2155,8 @@
|
|
1916
2155
|
<xsl:attribute name="line-height">110%</xsl:attribute>
|
1917
2156
|
|
1918
2157
|
|
2158
|
+
|
2159
|
+
|
1919
2160
|
<xsl:apply-templates/>
|
1920
2161
|
</fo:table-row>
|
1921
2162
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -1937,6 +2178,8 @@
|
|
1937
2178
|
|
1938
2179
|
|
1939
2180
|
|
2181
|
+
|
2182
|
+
|
1940
2183
|
<xsl:if test="@colspan">
|
1941
2184
|
<xsl:attribute name="number-columns-spanned">
|
1942
2185
|
<xsl:value-of select="@colspan"/>
|
@@ -1947,10 +2190,22 @@
|
|
1947
2190
|
<xsl:value-of select="@rowspan"/>
|
1948
2191
|
</xsl:attribute>
|
1949
2192
|
</xsl:if>
|
2193
|
+
<xsl:call-template name="display-align"/>
|
1950
2194
|
<fo:block>
|
1951
2195
|
<xsl:apply-templates/>
|
1952
2196
|
</fo:block>
|
1953
2197
|
</fo:table-cell>
|
2198
|
+
</xsl:template><xsl:template name="display-align">
|
2199
|
+
<xsl:if test="@valign">
|
2200
|
+
<xsl:attribute name="display-align">
|
2201
|
+
<xsl:choose>
|
2202
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2203
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2204
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2205
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2206
|
+
</xsl:choose>
|
2207
|
+
</xsl:attribute>
|
2208
|
+
</xsl:if>
|
1954
2209
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
1955
2210
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
1956
2211
|
<xsl:attribute name="text-align">
|
@@ -1968,7 +2223,9 @@
|
|
1968
2223
|
<xsl:if test="ancestor::*[local-name() = 'tfoot']">
|
1969
2224
|
<xsl:attribute name="border-bottom">solid black 0</xsl:attribute>
|
1970
2225
|
</xsl:if>
|
1971
|
-
|
2226
|
+
|
2227
|
+
|
2228
|
+
|
1972
2229
|
|
1973
2230
|
|
1974
2231
|
|
@@ -1984,8 +2241,8 @@
|
|
1984
2241
|
<xsl:value-of select="@rowspan"/>
|
1985
2242
|
</xsl:attribute>
|
1986
2243
|
</xsl:if>
|
1987
|
-
<
|
1988
|
-
|
2244
|
+
<xsl:call-template name="display-align"/>
|
2245
|
+
<fo:block>
|
1989
2246
|
<xsl:apply-templates/>
|
1990
2247
|
</fo:block>
|
1991
2248
|
</fo:table-cell>
|
@@ -2001,16 +2258,19 @@
|
|
2001
2258
|
|
2002
2259
|
|
2003
2260
|
|
2261
|
+
|
2262
|
+
|
2004
2263
|
<fo:inline padding-right="2mm">
|
2005
2264
|
|
2006
2265
|
<xsl:attribute name="font-family">SimHei</xsl:attribute>
|
2007
2266
|
|
2008
2267
|
|
2009
2268
|
|
2010
|
-
|
2269
|
+
|
2011
2270
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2012
2271
|
|
2013
2272
|
</fo:inline>
|
2273
|
+
|
2014
2274
|
<xsl:apply-templates mode="process"/>
|
2015
2275
|
</fo:block>
|
2016
2276
|
|
@@ -2038,6 +2298,7 @@
|
|
2038
2298
|
|
2039
2299
|
|
2040
2300
|
|
2301
|
+
|
2041
2302
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
2042
2303
|
|
2043
2304
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -2049,12 +2310,15 @@
|
|
2049
2310
|
|
2050
2311
|
|
2051
2312
|
|
2313
|
+
|
2052
2314
|
<xsl:value-of select="@reference"/>
|
2053
2315
|
|
2316
|
+
|
2054
2317
|
</fo:inline>
|
2055
2318
|
<fo:inline>
|
2056
2319
|
|
2057
|
-
<xsl:apply-templates/>
|
2320
|
+
<!-- <xsl:apply-templates /> -->
|
2321
|
+
<xsl:copy-of select="./node()"/>
|
2058
2322
|
</fo:inline>
|
2059
2323
|
</fo:block>
|
2060
2324
|
</xsl:if>
|
@@ -2091,7 +2355,20 @@
|
|
2091
2355
|
<xsl:variable name="following_dl_colwidths">
|
2092
2356
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
2093
2357
|
<xsl:variable name="html-table">
|
2094
|
-
<xsl:variable name="
|
2358
|
+
<xsl:variable name="doc_ns">
|
2359
|
+
|
2360
|
+
</xsl:variable>
|
2361
|
+
<xsl:variable name="ns">
|
2362
|
+
<xsl:choose>
|
2363
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2364
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2365
|
+
</xsl:when>
|
2366
|
+
<xsl:otherwise>
|
2367
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2368
|
+
</xsl:otherwise>
|
2369
|
+
</xsl:choose>
|
2370
|
+
</xsl:variable>
|
2371
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2095
2372
|
<xsl:element name="{$ns}:table">
|
2096
2373
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2097
2374
|
<tbody>
|
@@ -2156,7 +2433,8 @@
|
|
2156
2433
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2157
2434
|
</xsl:if>
|
2158
2435
|
|
2159
|
-
<xsl:apply-templates/>
|
2436
|
+
<!-- <xsl:apply-templates /> -->
|
2437
|
+
<xsl:copy-of select="./node()"/>
|
2160
2438
|
</fo:block>
|
2161
2439
|
</fo:table-cell>
|
2162
2440
|
</fo:table-row>
|
@@ -2178,9 +2456,13 @@
|
|
2178
2456
|
|
2179
2457
|
|
2180
2458
|
|
2459
|
+
|
2460
|
+
|
2181
2461
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2182
2462
|
|
2463
|
+
|
2183
2464
|
<xsl:value-of select="@reference"/>
|
2465
|
+
|
2184
2466
|
</fo:basic-link>
|
2185
2467
|
</fo:inline>
|
2186
2468
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -2188,139 +2470,168 @@
|
|
2188
2470
|
<xsl:apply-templates/>
|
2189
2471
|
</fo:inline>
|
2190
2472
|
</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 -->
|
2473
|
+
<fo:block-container margin-left="0mm">
|
2474
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2475
|
+
<xsl:attribute name="margin-left">
|
2476
|
+
<xsl:choose>
|
2477
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2478
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2479
|
+
</xsl:choose>
|
2480
|
+
</xsl:attribute>
|
2201
2481
|
|
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>
|
2482
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2223
2483
|
|
2484
|
+
</xsl:if>
|
2485
|
+
<fo:block-container margin-left="0mm">
|
2486
|
+
|
2487
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
2224
2488
|
|
2225
|
-
|
2226
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2227
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
2228
|
-
|
2229
|
-
|
2230
|
-
|
2231
|
-
|
2232
|
-
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2233
|
-
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
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>
|
2489
|
+
<xsl:variable name="key_iso">
|
2250
2490
|
|
2251
|
-
|
2252
|
-
|
2253
|
-
|
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
|
-
|
2266
|
-
|
2491
|
+
<xsl:if test="$parent = 'figure' or $parent = 'formula'">true</xsl:if>
|
2492
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2493
|
+
</xsl:variable>
|
2267
2494
|
|
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">
|
2495
|
+
<xsl:choose>
|
2496
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2279
2497
|
|
2280
|
-
<
|
2498
|
+
<fo:block text-align="left">
|
2499
|
+
|
2500
|
+
|
2501
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2502
|
+
|
2503
|
+
<xsl:variable name="title-where">
|
2504
|
+
<xsl:call-template name="getTitle">
|
2505
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2506
|
+
</xsl:call-template>
|
2507
|
+
</xsl:variable>
|
2508
|
+
<xsl:value-of select="$title-where"/>
|
2509
|
+
</fo:block>
|
2510
|
+
<fo:block>
|
2511
|
+
|
2512
|
+
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
|
2513
|
+
|
2514
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2515
|
+
—
|
2516
|
+
<xsl:text> </xsl:text>
|
2517
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2518
|
+
</fo:block>
|
2281
2519
|
|
2282
|
-
|
2283
|
-
|
2284
|
-
|
2285
|
-
|
2286
|
-
|
2287
|
-
|
2520
|
+
|
2521
|
+
</xsl:when>
|
2522
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2523
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2524
|
+
|
2525
|
+
|
2526
|
+
|
2527
|
+
|
2528
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2529
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2530
|
+
|
2531
|
+
<xsl:variable name="title-where">
|
2532
|
+
<xsl:call-template name="getTitle">
|
2533
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2534
|
+
</xsl:call-template>
|
2535
|
+
</xsl:variable>
|
2536
|
+
<xsl:value-of select="$title-where"/>
|
2537
|
+
</fo:block>
|
2538
|
+
</xsl:when>
|
2539
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2540
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2541
|
+
|
2542
|
+
|
2543
|
+
|
2544
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2545
|
+
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
|
2546
|
+
|
2547
|
+
<xsl:variable name="title-key">
|
2548
|
+
<xsl:call-template name="getTitle">
|
2549
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2550
|
+
</xsl:call-template>
|
2551
|
+
</xsl:variable>
|
2552
|
+
<xsl:value-of select="$title-key"/>
|
2553
|
+
</fo:block>
|
2554
|
+
</xsl:when>
|
2555
|
+
</xsl:choose>
|
2556
|
+
|
2557
|
+
<!-- a few components -->
|
2558
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2559
|
+
<fo:block>
|
2560
|
+
|
2561
|
+
|
2562
|
+
|
2563
|
+
|
2564
|
+
<fo:block>
|
2565
|
+
|
2566
|
+
|
2567
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2568
|
+
<xsl:if test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2569
|
+
<xsl:attribute name="margin-left">15mm</xsl:attribute>
|
2570
|
+
</xsl:if>
|
2571
|
+
|
2572
|
+
|
2573
|
+
|
2574
|
+
<fo:table width="95%" table-layout="fixed">
|
2288
2575
|
|
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
|
-
|
2576
|
+
<xsl:attribute name="margin-left">-3.7mm</xsl:attribute>
|
2577
|
+
|
2578
|
+
<xsl:choose>
|
2579
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2580
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2581
|
+
</xsl:when>
|
2582
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2583
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2584
|
+
|
2585
|
+
</xsl:when>
|
2586
|
+
</xsl:choose>
|
2587
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2588
|
+
<xsl:variable name="html-table">
|
2589
|
+
<xsl:variable name="doc_ns">
|
2590
|
+
|
2591
|
+
</xsl:variable>
|
2592
|
+
<xsl:variable name="ns">
|
2593
|
+
<xsl:choose>
|
2594
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2595
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2596
|
+
</xsl:when>
|
2597
|
+
<xsl:otherwise>
|
2598
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2599
|
+
</xsl:otherwise>
|
2600
|
+
</xsl:choose>
|
2601
|
+
</xsl:variable>
|
2602
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2603
|
+
<xsl:element name="{$ns}:table">
|
2604
|
+
<tbody>
|
2605
|
+
<xsl:apply-templates mode="dl"/>
|
2606
|
+
</tbody>
|
2607
|
+
</xsl:element>
|
2608
|
+
</xsl:variable>
|
2609
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2610
|
+
<xsl:variable name="colwidths">
|
2611
|
+
<xsl:call-template name="calculate-column-widths">
|
2612
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2613
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2614
|
+
</xsl:call-template>
|
2615
|
+
</xsl:variable>
|
2616
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2617
|
+
<xsl:variable name="maxlength_dt">
|
2618
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2619
|
+
</xsl:variable>
|
2620
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2621
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2622
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2623
|
+
</xsl:call-template>
|
2624
|
+
<fo:table-body>
|
2625
|
+
<xsl:apply-templates>
|
2626
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2627
|
+
</xsl:apply-templates>
|
2628
|
+
</fo:table-body>
|
2629
|
+
</fo:table>
|
2630
|
+
</fo:block>
|
2631
|
+
</fo:block>
|
2632
|
+
</xsl:if>
|
2633
|
+
</fo:block-container>
|
2634
|
+
</fo:block-container>
|
2324
2635
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
2325
2636
|
<xsl:param name="colwidths"/>
|
2326
2637
|
<xsl:param name="maxlength_dt"/>
|
@@ -2417,6 +2728,7 @@
|
|
2417
2728
|
<xsl:param name="key_iso"/>
|
2418
2729
|
|
2419
2730
|
<fo:table-row>
|
2731
|
+
|
2420
2732
|
<fo:table-cell>
|
2421
2733
|
|
2422
2734
|
<fo:block margin-top="6pt">
|
@@ -2431,6 +2743,7 @@
|
|
2431
2743
|
|
2432
2744
|
|
2433
2745
|
|
2746
|
+
|
2434
2747
|
<xsl:apply-templates/>
|
2435
2748
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2436
2749
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2442,14 +2755,36 @@
|
|
2442
2755
|
<fo:table-cell>
|
2443
2756
|
<fo:block>
|
2444
2757
|
|
2445
|
-
|
2758
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2759
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
2760
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2761
|
+
</xsl:if>
|
2762
|
+
</xsl:if> -->
|
2446
2763
|
|
2447
2764
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2448
2765
|
|
2449
2766
|
</fo:block>
|
2450
2767
|
</fo:table-cell>
|
2451
2768
|
</fo:table-row>
|
2452
|
-
|
2769
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2770
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
2771
|
+
<fo:table-row>
|
2772
|
+
<fo:table-cell>
|
2773
|
+
<fo:block margin-top="6pt">
|
2774
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2775
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2776
|
+
</xsl:if>
|
2777
|
+
<xsl:text> </xsl:text>
|
2778
|
+
</fo:block>
|
2779
|
+
</fo:table-cell>
|
2780
|
+
<fo:table-cell>
|
2781
|
+
<fo:block>
|
2782
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2783
|
+
</fo:block>
|
2784
|
+
</fo:table-cell>
|
2785
|
+
</fo:table-row>
|
2786
|
+
</xsl:if>
|
2787
|
+
</xsl:if> -->
|
2453
2788
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2454
2789
|
<xsl:apply-templates/>
|
2455
2790
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -2474,6 +2809,31 @@
|
|
2474
2809
|
</fo:inline>
|
2475
2810
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2476
2811
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2812
|
+
<xsl:variable name="_font-size">
|
2813
|
+
|
2814
|
+
|
2815
|
+
10
|
2816
|
+
|
2817
|
+
|
2818
|
+
|
2819
|
+
|
2820
|
+
|
2821
|
+
|
2822
|
+
|
2823
|
+
|
2824
|
+
|
2825
|
+
|
2826
|
+
|
2827
|
+
</xsl:variable>
|
2828
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2829
|
+
<xsl:if test="$font-size != ''">
|
2830
|
+
<xsl:attribute name="font-size">
|
2831
|
+
<xsl:choose>
|
2832
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2833
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2834
|
+
</xsl:choose>
|
2835
|
+
</xsl:attribute>
|
2836
|
+
</xsl:if>
|
2477
2837
|
<xsl:apply-templates/>
|
2478
2838
|
</fo:inline>
|
2479
2839
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2799,11 +3159,24 @@
|
|
2799
3159
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2800
3160
|
<xsl:value-of select="substring($str, 2)"/>
|
2801
3161
|
</xsl:template><xsl:template match="mathml:math">
|
2802
|
-
<fo:inline font-family="
|
2803
|
-
<
|
2804
|
-
<xsl:
|
2805
|
-
</
|
3162
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3163
|
+
<xsl:variable name="mathml">
|
3164
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
3165
|
+
</xsl:variable>
|
3166
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
3167
|
+
<!-- <xsl:copy-of select="."/> -->
|
3168
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3169
|
+
</fo:instream-foreign-object>
|
2806
3170
|
</fo:inline>
|
3171
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3172
|
+
<xsl:copy>
|
3173
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3174
|
+
</xsl:copy>
|
3175
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
3176
|
+
<xsl:copy>
|
3177
|
+
<!-- replace start and end spaces to non-break space -->
|
3178
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3179
|
+
</xsl:copy>
|
2807
3180
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2808
3181
|
<xsl:variable name="target">
|
2809
3182
|
<xsl:choose>
|
@@ -2880,13 +3253,28 @@
|
|
2880
3253
|
<xsl:apply-templates/>
|
2881
3254
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2882
3255
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2883
|
-
|
3256
|
+
|
2884
3257
|
<xsl:apply-templates/>
|
2885
3258
|
</fo:basic-link>
|
2886
3259
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2887
|
-
<fo:block
|
2888
|
-
<xsl:
|
2889
|
-
|
3260
|
+
<fo:block-container margin-left="0mm">
|
3261
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3262
|
+
<xsl:attribute name="margin-left">
|
3263
|
+
<xsl:choose>
|
3264
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3265
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3266
|
+
</xsl:choose>
|
3267
|
+
</xsl:attribute>
|
3268
|
+
|
3269
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3270
|
+
|
3271
|
+
</xsl:if>
|
3272
|
+
<fo:block-container margin-left="0mm">
|
3273
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3274
|
+
<xsl:apply-templates/>
|
3275
|
+
</fo:block>
|
3276
|
+
</fo:block-container>
|
3277
|
+
</fo:block-container>
|
2890
3278
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2891
3279
|
<fo:inline>
|
2892
3280
|
<xsl:apply-templates/>
|
@@ -2954,7 +3342,9 @@
|
|
2954
3342
|
</xsl:choose>
|
2955
3343
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2956
3344
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2957
|
-
<xsl:
|
3345
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3346
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3347
|
+
</fo:inline>
|
2958
3348
|
<xsl:apply-templates/>
|
2959
3349
|
</fo:block>
|
2960
3350
|
</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 +3447,109 @@
|
|
3057
3447
|
|
3058
3448
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3059
3449
|
</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">
|
3450
|
+
</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
3451
|
<xsl:apply-templates mode="contents"/>
|
3062
3452
|
<xsl:text> </xsl:text>
|
3063
|
-
</xsl:template><xsl:template match="
|
3453
|
+
</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">
|
3454
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3455
|
+
<xsl:text> </xsl:text>
|
3456
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3457
|
+
<xsl:value-of select="."/>
|
3458
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3064
3459
|
<xsl:value-of select="."/>
|
3065
|
-
</xsl:template><xsl:template match="
|
3460
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3461
|
+
<xsl:apply-templates mode="contents"/>
|
3462
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3463
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3464
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3465
|
+
<xsl:apply-templates select="."/>
|
3466
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3467
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3468
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3469
|
+
<xsl:param name="contents"/>
|
3470
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3471
|
+
<fo:bookmark-tree>
|
3472
|
+
<xsl:choose>
|
3473
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3474
|
+
<xsl:choose>
|
3475
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3476
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3477
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3478
|
+
<fo:bookmark-title>
|
3479
|
+
<xsl:variable name="bookmark-title_">
|
3480
|
+
<xsl:call-template name="getLangVersion">
|
3481
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3482
|
+
</xsl:call-template>
|
3483
|
+
</xsl:variable>
|
3484
|
+
<xsl:choose>
|
3485
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3486
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3487
|
+
</xsl:when>
|
3488
|
+
<xsl:otherwise>
|
3489
|
+
<xsl:choose>
|
3490
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3491
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3492
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3493
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3494
|
+
</xsl:choose>
|
3495
|
+
</xsl:otherwise>
|
3496
|
+
</xsl:choose>
|
3497
|
+
</fo:bookmark-title>
|
3498
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3499
|
+
</fo:bookmark>
|
3500
|
+
|
3501
|
+
</xsl:for-each>
|
3502
|
+
</xsl:when>
|
3503
|
+
<xsl:otherwise>
|
3504
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3505
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3506
|
+
</xsl:for-each>
|
3507
|
+
</xsl:otherwise>
|
3508
|
+
</xsl:choose>
|
3509
|
+
</xsl:when>
|
3510
|
+
<xsl:otherwise>
|
3511
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3512
|
+
</xsl:otherwise>
|
3513
|
+
</xsl:choose>
|
3514
|
+
|
3515
|
+
|
3516
|
+
|
3517
|
+
|
3518
|
+
|
3519
|
+
|
3520
|
+
|
3521
|
+
|
3522
|
+
</fo:bookmark-tree>
|
3523
|
+
</xsl:if>
|
3524
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3525
|
+
<xsl:param name="lang"/>
|
3526
|
+
<xsl:choose>
|
3527
|
+
<xsl:when test="$lang = 'en'">
|
3528
|
+
|
3529
|
+
|
3530
|
+
</xsl:when>
|
3531
|
+
<xsl:when test="$lang = 'fr'">
|
3532
|
+
|
3533
|
+
|
3534
|
+
</xsl:when>
|
3535
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3536
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3537
|
+
</xsl:choose>
|
3538
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3539
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3540
|
+
<fo:bookmark-title>
|
3541
|
+
<xsl:if test="@section != ''">
|
3542
|
+
<xsl:value-of select="@section"/>
|
3543
|
+
<xsl:text> </xsl:text>
|
3544
|
+
</xsl:if>
|
3545
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3546
|
+
</fo:bookmark-title>
|
3547
|
+
<xsl:apply-templates mode="bookmark"/>
|
3548
|
+
</fo:bookmark>
|
3549
|
+
</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
3550
|
<xsl:if test="normalize-space() != ''">
|
3067
3551
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3068
|
-
|
3552
|
+
|
3069
3553
|
<xsl:apply-templates/>
|
3070
3554
|
</fo:block>
|
3071
3555
|
</xsl:if>
|
@@ -3120,7 +3604,7 @@
|
|
3120
3604
|
<xsl:apply-templates/>
|
3121
3605
|
</xsl:otherwise>
|
3122
3606
|
</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">
|
3607
|
+
</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
3608
|
<xsl:text> </xsl:text>
|
3125
3609
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
3126
3610
|
<xsl:copy>
|
@@ -3129,21 +3613,63 @@
|
|
3129
3613
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3130
3614
|
<xsl:text> </xsl:text>
|
3131
3615
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3132
|
-
|
3133
|
-
|
3134
|
-
|
3135
|
-
|
3136
|
-
|
3616
|
+
|
3617
|
+
<fo:block-container margin-left="0mm">
|
3618
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3619
|
+
<xsl:attribute name="margin-left">
|
3620
|
+
<xsl:choose>
|
3621
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3622
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3623
|
+
</xsl:choose>
|
3624
|
+
</xsl:attribute>
|
3625
|
+
|
3626
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3627
|
+
|
3628
|
+
</xsl:if>
|
3629
|
+
<fo:block-container margin-left="0mm">
|
3630
|
+
|
3631
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3632
|
+
<xsl:variable name="_font-size">
|
3633
|
+
|
3634
|
+
|
3635
|
+
9
|
3636
|
+
|
3637
|
+
|
3638
|
+
|
3639
|
+
|
3640
|
+
|
3641
|
+
|
3642
|
+
|
3643
|
+
|
3644
|
+
|
3645
|
+
|
3646
|
+
|
3647
|
+
</xsl:variable>
|
3648
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3649
|
+
<xsl:if test="$font-size != ''">
|
3650
|
+
<xsl:attribute name="font-size">
|
3651
|
+
<xsl:choose>
|
3652
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3653
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3654
|
+
</xsl:choose>
|
3655
|
+
</xsl:attribute>
|
3656
|
+
</xsl:if>
|
3657
|
+
<xsl:apply-templates/>
|
3658
|
+
</fo:block>
|
3659
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3660
|
+
|
3661
|
+
</fo:block-container>
|
3662
|
+
</fo:block-container>
|
3663
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
3137
3664
|
<xsl:variable name="text">
|
3138
3665
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
3139
3666
|
</xsl:variable>
|
3140
|
-
<xsl:call-template name="add-zero-spaces">
|
3667
|
+
<xsl:call-template name="add-zero-spaces-java">
|
3141
3668
|
<xsl:with-param name="text" select="$text"/>
|
3142
3669
|
</xsl:call-template>
|
3143
3670
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
3144
3671
|
<xsl:if test="normalize-space() != ''">
|
3145
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3146
|
-
|
3672
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3147
3673
|
<xsl:apply-templates/>
|
3148
3674
|
</fo:block>
|
3149
3675
|
</xsl:if>
|
@@ -3213,22 +3739,30 @@
|
|
3213
3739
|
</fo:block>
|
3214
3740
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3215
3741
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3742
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3743
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3744
|
+
</xsl:if>
|
3216
3745
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3217
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="
|
3746
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3747
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3748
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3749
|
+
</xsl:if>
|
3218
3750
|
<xsl:variable name="simple-table">
|
3219
3751
|
<xsl:call-template name="getSimpleTable"/>
|
3220
3752
|
</xsl:variable>
|
3221
3753
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3222
3754
|
<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"/>
|
3755
|
+
<!-- <fo:table-column column-width="35mm"/>
|
3756
|
+
<fo:table-column column-width="115mm"/> -->
|
3757
|
+
<fo:table-column column-width="30%"/>
|
3758
|
+
<fo:table-column column-width="70%"/>
|
3225
3759
|
</xsl:if>
|
3226
3760
|
<xsl:apply-templates mode="requirement"/>
|
3227
3761
|
</fo:table>
|
3228
3762
|
<!-- fn processing -->
|
3229
3763
|
<xsl:if test=".//*[local-name() = 'fn']">
|
3230
3764
|
<xsl:for-each select="*[local-name() = 'tbody']">
|
3231
|
-
<fo:block font-size="90%" border-bottom="
|
3765
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
3232
3766
|
<xsl:call-template name="fn_display"/>
|
3233
3767
|
</fo:block>
|
3234
3768
|
</xsl:for-each>
|
@@ -3244,17 +3778,27 @@
|
|
3244
3778
|
<xsl:apply-templates mode="requirement"/>
|
3245
3779
|
</fo:table-body>
|
3246
3780
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3247
|
-
<fo:table-row>
|
3781
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3782
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3783
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3784
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3785
|
+
</xsl:if>
|
3786
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3787
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3788
|
+
</xsl:if>
|
3789
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3790
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3791
|
+
</xsl:if>
|
3248
3792
|
<xsl:apply-templates mode="requirement"/>
|
3249
3793
|
</fo:table-row>
|
3250
3794
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3251
|
-
<fo:table-cell text-align="{@align}">
|
3795
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3252
3796
|
<xsl:attribute name="text-align">
|
3253
3797
|
<xsl:choose>
|
3254
3798
|
<xsl:when test="@align">
|
3255
3799
|
<xsl:value-of select="@align"/>
|
3256
3800
|
</xsl:when>
|
3257
|
-
<xsl:otherwise>
|
3801
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3258
3802
|
</xsl:choose>
|
3259
3803
|
</xsl:attribute>
|
3260
3804
|
<xsl:if test="@colspan">
|
@@ -3267,22 +3811,27 @@
|
|
3267
3811
|
<xsl:value-of select="@rowspan"/>
|
3268
3812
|
</xsl:attribute>
|
3269
3813
|
</xsl:if>
|
3814
|
+
<xsl:call-template name="display-align"/>
|
3270
3815
|
|
3271
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3816
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3272
3817
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3273
3818
|
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
3274
3819
|
</xsl:if>
|
3275
3820
|
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
3276
3821
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3277
3822
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3278
|
-
</xsl:if>
|
3823
|
+
</xsl:if> -->
|
3279
3824
|
|
3280
3825
|
<fo:block>
|
3281
3826
|
<xsl:apply-templates/>
|
3282
3827
|
</fo:block>
|
3283
3828
|
</fo:table-cell>
|
3284
3829
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3285
|
-
<fo:table-cell text-align="{@align}">
|
3830
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3831
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3832
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3833
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
3834
|
+
</xsl:if>
|
3286
3835
|
<xsl:attribute name="text-align">
|
3287
3836
|
<xsl:choose>
|
3288
3837
|
<xsl:when test="@align">
|
@@ -3291,6 +3840,9 @@
|
|
3291
3840
|
<xsl:otherwise>left</xsl:otherwise>
|
3292
3841
|
</xsl:choose>
|
3293
3842
|
</xsl:attribute>
|
3843
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3844
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3845
|
+
</xsl:if>
|
3294
3846
|
<xsl:if test="@colspan">
|
3295
3847
|
<xsl:attribute name="number-columns-spanned">
|
3296
3848
|
<xsl:value-of select="@colspan"/>
|
@@ -3301,25 +3853,27 @@
|
|
3301
3853
|
<xsl:value-of select="@rowspan"/>
|
3302
3854
|
</xsl:attribute>
|
3303
3855
|
</xsl:if>
|
3856
|
+
<xsl:call-template name="display-align"/>
|
3304
3857
|
|
3305
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3858
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3306
3859
|
<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'])">
|
3860
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3861
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3309
3862
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3310
3863
|
</xsl:if>
|
3311
|
-
</xsl:if>
|
3864
|
+
</xsl:if> -->
|
3865
|
+
<!-- 2nd line and below -->
|
3312
3866
|
|
3313
3867
|
<fo:block>
|
3314
3868
|
<xsl:apply-templates/>
|
3315
3869
|
</fo:block>
|
3316
3870
|
</fo:table-cell>
|
3317
3871
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3318
|
-
<fo:block font-size="11pt" font-weight="bold"
|
3872
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3319
3873
|
<xsl:apply-templates/>
|
3320
3874
|
</fo:block>
|
3321
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3322
|
-
<fo:block margin-bottom="10pt"
|
3875
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3876
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
3323
3877
|
<xsl:apply-templates/>
|
3324
3878
|
</fo:block>
|
3325
3879
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
@@ -3341,12 +3895,13 @@
|
|
3341
3895
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3342
3896
|
|
3343
3897
|
<xsl:variable name="element">
|
3344
|
-
block
|
3898
|
+
block
|
3345
3899
|
|
3900
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3346
3901
|
</xsl:variable>
|
3347
3902
|
|
3348
3903
|
<xsl:choose>
|
3349
|
-
<xsl:when test="normalize-space($element)
|
3904
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3350
3905
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
3351
3906
|
<xsl:apply-templates/>
|
3352
3907
|
</fo:block>
|
@@ -3383,25 +3938,44 @@
|
|
3383
3938
|
</xsl:otherwise>
|
3384
3939
|
</xsl:choose>
|
3385
3940
|
|
3386
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3387
|
-
|
3941
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3942
|
+
|
3943
|
+
<xsl:variable name="element">
|
3944
|
+
block
|
3388
3945
|
|
3389
|
-
|
3390
|
-
|
3946
|
+
</xsl:variable>
|
3947
|
+
<xsl:choose>
|
3948
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3949
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3950
|
+
|
3951
|
+
<xsl:apply-templates/>
|
3952
|
+
</fo:block>
|
3953
|
+
</xsl:when>
|
3954
|
+
<xsl:otherwise>
|
3955
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3956
|
+
<xsl:apply-templates/>
|
3957
|
+
</fo:inline>
|
3958
|
+
</xsl:otherwise>
|
3959
|
+
</xsl:choose>
|
3391
3960
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3392
3961
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3393
3962
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3394
3963
|
<xsl:variable name="termsource_text">
|
3395
3964
|
<xsl:apply-templates/>
|
3396
3965
|
</xsl:variable>
|
3966
|
+
|
3397
3967
|
<xsl:choose>
|
3398
3968
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3399
3969
|
<xsl:apply-templates/>
|
3400
3970
|
</xsl:when>
|
3401
|
-
<xsl:otherwise>
|
3402
|
-
|
3403
|
-
|
3404
|
-
|
3971
|
+
<xsl:otherwise>
|
3972
|
+
|
3973
|
+
<xsl:text>[</xsl:text>
|
3974
|
+
|
3975
|
+
<xsl:apply-templates/>
|
3976
|
+
|
3977
|
+
<xsl:text>]</xsl:text>
|
3978
|
+
|
3405
3979
|
</xsl:otherwise>
|
3406
3980
|
</xsl:choose>
|
3407
3981
|
</fo:block>
|
@@ -3422,18 +3996,31 @@
|
|
3422
3996
|
<xsl:if test="normalize-space() != ''">
|
3423
3997
|
<xsl:value-of select="."/>
|
3424
3998
|
</xsl:if>
|
3425
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3999
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
4000
|
+
<fo:block-container margin-left="0mm">
|
4001
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4002
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
4003
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
4004
|
+
</xsl:if>
|
4005
|
+
</xsl:if>
|
4006
|
+
|
4007
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
4008
|
+
|
4009
|
+
<fo:block-container margin-left="0mm">
|
3426
4010
|
|
3427
|
-
|
3428
|
-
|
3429
|
-
|
3430
|
-
|
3431
|
-
|
3432
|
-
|
3433
|
-
|
3434
|
-
|
3435
|
-
|
3436
|
-
|
4011
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
4012
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
4013
|
+
</fo:block>
|
4014
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4015
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
4016
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
4017
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
4018
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
4019
|
+
</fo:block>
|
4020
|
+
</xsl:if>
|
4021
|
+
|
4022
|
+
</fo:block-container>
|
4023
|
+
</fo:block-container>
|
3437
4024
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3438
4025
|
<xsl:if test="../*[local-name() = 'author']">
|
3439
4026
|
<xsl:text>, </xsl:text>
|
@@ -3461,6 +4048,7 @@
|
|
3461
4048
|
<xsl:if test="@type = 'inline'">
|
3462
4049
|
|
3463
4050
|
|
4051
|
+
|
3464
4052
|
</xsl:if>
|
3465
4053
|
|
3466
4054
|
|
@@ -3493,6 +4081,7 @@
|
|
3493
4081
|
|
3494
4082
|
|
3495
4083
|
|
4084
|
+
|
3496
4085
|
</xsl:variable>
|
3497
4086
|
|
3498
4087
|
<xsl:variable name="padding-right">
|
@@ -3588,6 +4177,7 @@
|
|
3588
4177
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3589
4178
|
<fo:block>
|
3590
4179
|
<xsl:call-template name="setId"/>
|
4180
|
+
|
3591
4181
|
<xsl:apply-templates/>
|
3592
4182
|
</fo:block>
|
3593
4183
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -3612,6 +4202,33 @@
|
|
3612
4202
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3613
4203
|
<!-- 0xA0 to space replacement -->
|
3614
4204
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4205
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4206
|
+
<xsl:choose>
|
4207
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
4208
|
+
<fo:block-container>
|
4209
|
+
<xsl:attribute name="margin-left">
|
4210
|
+
<xsl:choose>
|
4211
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4212
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4213
|
+
</xsl:choose>
|
4214
|
+
</xsl:attribute>
|
4215
|
+
|
4216
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
4217
|
+
|
4218
|
+
|
4219
|
+
<fo:block-container margin-left="0mm">
|
4220
|
+
<fo:block>
|
4221
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4222
|
+
</fo:block>
|
4223
|
+
</fo:block-container>
|
4224
|
+
</fo:block-container>
|
4225
|
+
</xsl:when>
|
4226
|
+
<xsl:otherwise>
|
4227
|
+
<fo:block>
|
4228
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4229
|
+
</fo:block>
|
4230
|
+
</xsl:otherwise>
|
4231
|
+
</xsl:choose>
|
3615
4232
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3616
4233
|
<!-- <row>
|
3617
4234
|
<date>05-07-2013</date>
|
@@ -3643,6 +4260,65 @@
|
|
3643
4260
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3644
4261
|
<fo:block><xsl:apply-templates/></fo:block>
|
3645
4262
|
</fo:table-cell>
|
4263
|
+
</xsl:template><xsl:template name="processBibitem">
|
4264
|
+
|
4265
|
+
|
4266
|
+
|
4267
|
+
|
4268
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4269
|
+
<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')]"/>
|
4270
|
+
<xsl:choose>
|
4271
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4272
|
+
<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"/>
|
4273
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4274
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4275
|
+
</xsl:if>
|
4276
|
+
<xsl:value-of select="$_doc_ident"/>
|
4277
|
+
</xsl:when>
|
4278
|
+
<xsl:otherwise>
|
4279
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4280
|
+
<xsl:if test="$type != ''">
|
4281
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4282
|
+
</xsl:if>
|
4283
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4284
|
+
</xsl:otherwise>
|
4285
|
+
</xsl:choose>
|
4286
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
4287
|
+
<xsl:choose>
|
4288
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
4289
|
+
<author>
|
4290
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4291
|
+
</author>
|
4292
|
+
</xsl:when>
|
4293
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
4294
|
+
<author>
|
4295
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4296
|
+
<xsl:text> </xsl:text>
|
4297
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
4298
|
+
</author>
|
4299
|
+
</xsl:when>
|
4300
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
4301
|
+
<author>
|
4302
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4303
|
+
<xsl:text> </xsl:text>
|
4304
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
4305
|
+
</author>
|
4306
|
+
</xsl:when>
|
4307
|
+
<xsl:otherwise>
|
4308
|
+
<xsl:apply-templates/>
|
4309
|
+
</xsl:otherwise>
|
4310
|
+
</xsl:choose>
|
4311
|
+
</xsl:template><xsl:template name="renderDate">
|
4312
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
4313
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
4314
|
+
</xsl:if>
|
4315
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
4316
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
4317
|
+
</xsl:if>
|
4318
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
4319
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
4320
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4321
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
3646
4322
|
</xsl:template><xsl:template name="convertDate">
|
3647
4323
|
<xsl:param name="date"/>
|
3648
4324
|
<xsl:param name="format" select="'short'"/>
|
@@ -3725,6 +4401,7 @@
|
|
3725
4401
|
|
3726
4402
|
|
3727
4403
|
|
4404
|
+
|
3728
4405
|
|
3729
4406
|
</xsl:variable>
|
3730
4407
|
<xsl:choose>
|
@@ -3741,6 +4418,7 @@
|
|
3741
4418
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
3742
4419
|
|
3743
4420
|
|
4421
|
+
|
3744
4422
|
</dc:creator>
|
3745
4423
|
<dc:description>
|
3746
4424
|
<xsl:variable name="abstract">
|
@@ -3750,6 +4428,7 @@
|
|
3750
4428
|
|
3751
4429
|
|
3752
4430
|
|
4431
|
+
|
3753
4432
|
</xsl:variable>
|
3754
4433
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3755
4434
|
</dc:description>
|
@@ -3850,6 +4529,7 @@
|
|
3850
4529
|
<xsl:value-of select="document('')//*/namespace::gb"/>
|
3851
4530
|
|
3852
4531
|
|
4532
|
+
|
3853
4533
|
</xsl:variable>
|
3854
4534
|
<xsl:if test="$documentNS != $XSLNS">
|
3855
4535
|
<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 +4555,21 @@
|
|
3875
4555
|
</xsl:otherwise>
|
3876
4556
|
</xsl:choose>
|
3877
4557
|
</xsl:attribute>
|
4558
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4559
|
+
<xsl:param name="text"/>
|
4560
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4561
|
+
<xsl:if test="string-length($text) > 0">
|
4562
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4563
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4564
|
+
<xsl:if test="$char = '®'">
|
4565
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4566
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4567
|
+
</xsl:if>
|
4568
|
+
<xsl:value-of select="$char"/>
|
4569
|
+
</fo:inline>
|
4570
|
+
<xsl:call-template name="add-letter-spacing">
|
4571
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4572
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4573
|
+
</xsl:call-template>
|
4574
|
+
</xsl:if>
|
3878
4575
|
</xsl:template></xsl:stylesheet>
|