metanorma-m3aawg 1.7.6 → 1.7.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/m3aawg/isodoc.rng +67 -16
- data/lib/asciidoctor/m3aawg/reqt.rng +15 -4
- data/lib/isodoc/m3aawg/m3aawg.policy.xsl +402 -64
- data/lib/isodoc/m3aawg/m3aawg.report.xsl +402 -64
- data/lib/metanorma/m3aawg/processor.rb +1 -2
- data/lib/metanorma/m3aawg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c22221721fd7f1d5d2bcfa0916606a836311a8d89d1c698cbffb52def53aa57
|
4
|
+
data.tar.gz: e94670e33058185bd681c67a1da16aa4c97dc9078fe6a1a7dbd1fa455f4f9085
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '058eda527fafac4a954b984bd25b4a6c7461289c45a3c89388a6eb557def3f88bd0a53a468b562dd2f5e7700eaa2f9cbf15c5e52c3667df38c9870d7fc545d46'
|
7
|
+
data.tar.gz: c59535c304c8f0296bea6145d2e78da35945c79de238f6b48eb90888b46d0f8b34803048ee2b23d3a121b05aa9347677a59e0a74c26f8cf3cf854405f1e32bb7
|
@@ -32,6 +32,18 @@
|
|
32
32
|
<ref name="DocumentType"/>
|
33
33
|
</element>
|
34
34
|
</define>
|
35
|
+
<define name="section-title">
|
36
|
+
<element name="title">
|
37
|
+
<zeroOrMore>
|
38
|
+
<ref name="TextElement"/>
|
39
|
+
</zeroOrMore>
|
40
|
+
</element>
|
41
|
+
<zeroOrMore>
|
42
|
+
<element name="variant-title">
|
43
|
+
<ref name="TypedTitleString"/>
|
44
|
+
</element>
|
45
|
+
</zeroOrMore>
|
46
|
+
</define>
|
35
47
|
<define name="hyperlink">
|
36
48
|
<element name="link">
|
37
49
|
<attribute name="target">
|
@@ -158,15 +170,17 @@
|
|
158
170
|
<data type="boolean"/>
|
159
171
|
</attribute>
|
160
172
|
</optional>
|
161
|
-
<
|
162
|
-
<
|
163
|
-
<
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
173
|
+
<optional>
|
174
|
+
<attribute name="type">
|
175
|
+
<choice>
|
176
|
+
<value>roman</value>
|
177
|
+
<value>alphabet</value>
|
178
|
+
<value>arabic</value>
|
179
|
+
<value>roman_upper</value>
|
180
|
+
<value>alphabet_upper</value>
|
181
|
+
</choice>
|
182
|
+
</attribute>
|
183
|
+
</optional>
|
170
184
|
<oneOrMore>
|
171
185
|
<ref name="li"/>
|
172
186
|
</oneOrMore>
|
@@ -204,6 +218,18 @@
|
|
204
218
|
</zeroOrMore>
|
205
219
|
</element>
|
206
220
|
</define>
|
221
|
+
<define name="dt">
|
222
|
+
<element name="dt">
|
223
|
+
<optional>
|
224
|
+
<attribute name="id">
|
225
|
+
<data type="ID"/>
|
226
|
+
</attribute>
|
227
|
+
</optional>
|
228
|
+
<zeroOrMore>
|
229
|
+
<ref name="TextElement"/>
|
230
|
+
</zeroOrMore>
|
231
|
+
</element>
|
232
|
+
</define>
|
207
233
|
<define name="example">
|
208
234
|
<element name="example">
|
209
235
|
<attribute name="id">
|
@@ -899,7 +925,7 @@
|
|
899
925
|
</include>
|
900
926
|
<!-- end overrides -->
|
901
927
|
<define name="docsubtype">
|
902
|
-
<element name="
|
928
|
+
<element name="subdoctype">
|
903
929
|
<ref name="DocumentSubtype"/>
|
904
930
|
</element>
|
905
931
|
</define>
|
@@ -954,6 +980,16 @@
|
|
954
980
|
</define>
|
955
981
|
<define name="concept">
|
956
982
|
<element name="concept">
|
983
|
+
<optional>
|
984
|
+
<attribute name="ital">
|
985
|
+
<data type="boolean"/>
|
986
|
+
</attribute>
|
987
|
+
</optional>
|
988
|
+
<optional>
|
989
|
+
<attribute name="ref">
|
990
|
+
<data type="boolean"/>
|
991
|
+
</attribute>
|
992
|
+
</optional>
|
957
993
|
<optional>
|
958
994
|
<element name="refterm">
|
959
995
|
<zeroOrMore>
|
@@ -989,8 +1025,14 @@
|
|
989
1025
|
<ref name="imagemap"/>
|
990
1026
|
<ref name="svgmap"/>
|
991
1027
|
<ref name="inputform"/>
|
1028
|
+
<ref name="toc"/>
|
992
1029
|
</choice>
|
993
1030
|
</define>
|
1031
|
+
<define name="toc">
|
1032
|
+
<element name="toc">
|
1033
|
+
<ref name="ul"/>
|
1034
|
+
</element>
|
1035
|
+
</define>
|
994
1036
|
<define name="inputform">
|
995
1037
|
<element name="form">
|
996
1038
|
<attribute name="id">
|
@@ -998,6 +1040,9 @@
|
|
998
1040
|
</attribute>
|
999
1041
|
<attribute name="name"/>
|
1000
1042
|
<attribute name="action"/>
|
1043
|
+
<optional>
|
1044
|
+
<attribute name="class"/>
|
1045
|
+
</optional>
|
1001
1046
|
<zeroOrMore>
|
1002
1047
|
<choice>
|
1003
1048
|
<ref name="TextElement"/>
|
@@ -1229,6 +1274,12 @@
|
|
1229
1274
|
<optional>
|
1230
1275
|
<attribute name="type"/>
|
1231
1276
|
</optional>
|
1277
|
+
<optional>
|
1278
|
+
<attribute name="identifier"/>
|
1279
|
+
</optional>
|
1280
|
+
<optional>
|
1281
|
+
<attribute name="prefix"/>
|
1282
|
+
</optional>
|
1232
1283
|
<text/>
|
1233
1284
|
</define>
|
1234
1285
|
<define name="ics">
|
@@ -1490,26 +1541,26 @@
|
|
1490
1541
|
<optional>
|
1491
1542
|
<ref name="section-title"/>
|
1492
1543
|
</optional>
|
1493
|
-
<
|
1544
|
+
<choice>
|
1494
1545
|
<choice>
|
1495
1546
|
<group>
|
1496
|
-
<
|
1547
|
+
<oneOrMore>
|
1497
1548
|
<ref name="BasicBlock"/>
|
1498
|
-
</
|
1549
|
+
</oneOrMore>
|
1499
1550
|
<zeroOrMore>
|
1500
1551
|
<ref name="note"/>
|
1501
1552
|
</zeroOrMore>
|
1502
1553
|
</group>
|
1503
1554
|
<ref name="amend"/>
|
1504
1555
|
</choice>
|
1505
|
-
<
|
1556
|
+
<oneOrMore>
|
1506
1557
|
<choice>
|
1507
1558
|
<ref name="clause-subsection"/>
|
1508
1559
|
<ref name="terms"/>
|
1509
1560
|
<ref name="definitions"/>
|
1510
1561
|
</choice>
|
1511
|
-
</
|
1512
|
-
</
|
1562
|
+
</oneOrMore>
|
1563
|
+
</choice>
|
1513
1564
|
</define>
|
1514
1565
|
<define name="Annex-Section">
|
1515
1566
|
<optional>
|
@@ -64,9 +64,9 @@
|
|
64
64
|
<optional>
|
65
65
|
<ref name="label"/>
|
66
66
|
</optional>
|
67
|
-
<
|
67
|
+
<zeroOrMore>
|
68
68
|
<ref name="subject"/>
|
69
|
-
</
|
69
|
+
</zeroOrMore>
|
70
70
|
<zeroOrMore>
|
71
71
|
<ref name="reqinherit"/>
|
72
72
|
</zeroOrMore>
|
@@ -80,6 +80,7 @@
|
|
80
80
|
<ref name="verification"/>
|
81
81
|
<ref name="import"/>
|
82
82
|
<ref name="description"/>
|
83
|
+
<ref name="component"/>
|
83
84
|
</choice>
|
84
85
|
</zeroOrMore>
|
85
86
|
<optional>
|
@@ -105,12 +106,16 @@
|
|
105
106
|
</define>
|
106
107
|
<define name="subject">
|
107
108
|
<element name="subject">
|
108
|
-
<
|
109
|
+
<oneOrMore>
|
110
|
+
<ref name="TextElement"/>
|
111
|
+
</oneOrMore>
|
109
112
|
</element>
|
110
113
|
</define>
|
111
114
|
<define name="reqinherit">
|
112
115
|
<element name="inherit">
|
113
|
-
<
|
116
|
+
<oneOrMore>
|
117
|
+
<ref name="TextElement"/>
|
118
|
+
</oneOrMore>
|
114
119
|
</element>
|
115
120
|
</define>
|
116
121
|
<define name="measurementtarget">
|
@@ -138,6 +143,12 @@
|
|
138
143
|
<ref name="RequirementSubpart"/>
|
139
144
|
</element>
|
140
145
|
</define>
|
146
|
+
<define name="component">
|
147
|
+
<element name="component">
|
148
|
+
<attribute name="class"/>
|
149
|
+
<ref name="RequirementSubpart"/>
|
150
|
+
</element>
|
151
|
+
</define>
|
141
152
|
<define name="reqt_references">
|
142
153
|
<element name="references">
|
143
154
|
<oneOrMore>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
|
40
40
|
<xsl:template match="/">
|
41
41
|
<xsl:call-template name="namespaceCheck"/>
|
42
|
-
<fo:root font-family="Garamond" font-size="12pt" xml:lang="{$lang}">
|
42
|
+
<fo:root font-family="EB Garamond 12" font-size="12pt" xml:lang="{$lang}">
|
43
43
|
<fo:layout-master-set>
|
44
44
|
|
45
45
|
<!-- cover page -->
|
@@ -114,7 +114,7 @@
|
|
114
114
|
</fo:block>
|
115
115
|
</fo:block-container>
|
116
116
|
</fo:static-content>
|
117
|
-
<fo:static-content flow-name="footer">
|
117
|
+
<fo:static-content flow-name="footer" role="artifact">
|
118
118
|
<fo:block-container height="31mm" font-size="10pt">
|
119
119
|
<fo:block text-align-last="justify" margin-top="2mm">
|
120
120
|
<fo:inline font-weight="bold">
|
@@ -173,7 +173,7 @@
|
|
173
173
|
</fo:inline>
|
174
174
|
</fo:block>
|
175
175
|
|
176
|
-
<fo:block font-size="22pt" margin-bottom="12pt">
|
176
|
+
<fo:block font-size="22pt" margin-bottom="12pt" role="H1">
|
177
177
|
<xsl:value-of select="$title-en"/>
|
178
178
|
</fo:block>
|
179
179
|
<!-- Version 1.0 -->
|
@@ -225,8 +225,8 @@
|
|
225
225
|
<xsl:with-param name="name" select="'title-toc'"/>
|
226
226
|
</xsl:call-template>
|
227
227
|
</xsl:variable>
|
228
|
-
<fo:block font-size="12pt" font-weight="bold" text-decoration="underline" margin-bottom="4pt"><xsl:value-of select="$title-toc"/></fo:block>
|
229
|
-
<fo:block font-size="10pt">
|
228
|
+
<fo:block font-size="12pt" font-weight="bold" text-decoration="underline" margin-bottom="4pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
|
229
|
+
<fo:block font-size="10pt" role="TOC">
|
230
230
|
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
231
231
|
<xsl:choose>
|
232
232
|
<xsl:when test="@section = ''">
|
@@ -235,7 +235,7 @@
|
|
235
235
|
<fo:table-body>
|
236
236
|
<fo:table-row height="6mm">
|
237
237
|
<fo:table-cell>
|
238
|
-
<fo:block text-align-last="justify">
|
238
|
+
<fo:block text-align-last="justify" role="TOCI">
|
239
239
|
<xsl:if test="@level = 1">
|
240
240
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
241
241
|
</xsl:if>
|
@@ -261,7 +261,7 @@
|
|
261
261
|
<fo:table-body>
|
262
262
|
<fo:table-row height="6mm">
|
263
263
|
<fo:table-cell>
|
264
|
-
<fo:block font-weight="bold">
|
264
|
+
<fo:block font-weight="bold" role="TOCI">
|
265
265
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
266
266
|
<xsl:choose>
|
267
267
|
<!-- <xsl:when test="@section = ''">
|
@@ -279,7 +279,7 @@
|
|
279
279
|
</fo:block>
|
280
280
|
</fo:table-cell>
|
281
281
|
<fo:table-cell>
|
282
|
-
<fo:block text-align-last="justify">
|
282
|
+
<fo:block text-align-last="justify" role="TOCI">
|
283
283
|
<xsl:if test="@level = 1">
|
284
284
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
285
285
|
</xsl:if>
|
@@ -447,7 +447,10 @@
|
|
447
447
|
<!-- ====== -->
|
448
448
|
|
449
449
|
<xsl:template match="m3d:boilerplate//m3d:title">
|
450
|
-
<
|
450
|
+
<xsl:variable name="level">
|
451
|
+
<xsl:call-template name="getLevel"/>
|
452
|
+
</xsl:variable>
|
453
|
+
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="15.5pt" keep-with-next="always" role="H{$level}">
|
451
454
|
<xsl:apply-templates/>
|
452
455
|
</fo:block>
|
453
456
|
</xsl:template>
|
@@ -463,8 +466,9 @@
|
|
463
466
|
<xsl:otherwise>12pt</xsl:otherwise>
|
464
467
|
</xsl:choose>
|
465
468
|
</xsl:variable>
|
466
|
-
<fo:block font-size="{$font-size}" text-align="center" margin-bottom="24pt" keep-with-next="always">
|
469
|
+
<fo:block font-size="{$font-size}" text-align="center" margin-bottom="24pt" keep-with-next="always" role="H1">
|
467
470
|
<xsl:apply-templates/>
|
471
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
468
472
|
</fo:block>
|
469
473
|
</xsl:template>
|
470
474
|
|
@@ -511,8 +515,10 @@
|
|
511
515
|
</xsl:choose>
|
512
516
|
</xsl:attribute>
|
513
517
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
518
|
+
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
514
519
|
|
515
520
|
<xsl:apply-templates/>
|
521
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
516
522
|
|
517
523
|
</xsl:element>
|
518
524
|
|
@@ -1066,13 +1072,14 @@
|
|
1066
1072
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1067
1073
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1068
1074
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
1075
|
+
<xsl:attribute name="role">Code</xsl:attribute>
|
1069
1076
|
|
1070
1077
|
|
1071
1078
|
|
1072
1079
|
|
1073
1080
|
|
1074
1081
|
|
1075
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1082
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
1076
1083
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1077
1084
|
|
1078
1085
|
|
@@ -1090,8 +1097,13 @@
|
|
1090
1097
|
|
1091
1098
|
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
1092
1099
|
|
1093
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1094
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1100
|
+
</xsl:attribute-set><xsl:attribute-set name="subject-style">
|
1101
|
+
</xsl:attribute-set><xsl:attribute-set name="inherit-style">
|
1102
|
+
</xsl:attribute-set><xsl:attribute-set name="description-style">
|
1103
|
+
</xsl:attribute-set><xsl:attribute-set name="specification-style">
|
1104
|
+
</xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
|
1105
|
+
</xsl:attribute-set><xsl:attribute-set name="verification-style">
|
1106
|
+
</xsl:attribute-set><xsl:attribute-set name="import-style">
|
1095
1107
|
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
1096
1108
|
|
1097
1109
|
|
@@ -1160,6 +1172,7 @@
|
|
1160
1172
|
|
1161
1173
|
|
1162
1174
|
|
1175
|
+
|
1163
1176
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1164
1177
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1165
1178
|
|
@@ -1179,7 +1192,9 @@
|
|
1179
1192
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1180
1193
|
|
1181
1194
|
|
1182
|
-
</xsl:attribute-set><xsl:
|
1195
|
+
</xsl:attribute-set><xsl:variable name="table-border_">
|
1196
|
+
|
1197
|
+
</xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
|
1183
1198
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1184
1199
|
|
1185
1200
|
|
@@ -1300,7 +1315,8 @@
|
|
1300
1315
|
|
1301
1316
|
|
1302
1317
|
|
1303
|
-
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1318
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1319
|
+
<xsl:attribute name="role">BlockQuote</xsl:attribute>
|
1304
1320
|
|
1305
1321
|
|
1306
1322
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1386,7 +1402,7 @@
|
|
1386
1402
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1387
1403
|
|
1388
1404
|
|
1389
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1405
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
1390
1406
|
|
1391
1407
|
|
1392
1408
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
@@ -1494,11 +1510,15 @@
|
|
1494
1510
|
<fo:block> </fo:block>
|
1495
1511
|
</xsl:if> -->
|
1496
1512
|
|
1513
|
+
|
1514
|
+
<!-- Display table's name before table as standalone block -->
|
1497
1515
|
<!-- $namespace = 'iso' or -->
|
1498
1516
|
|
1499
1517
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1500
1518
|
|
1501
|
-
|
1519
|
+
|
1520
|
+
|
1521
|
+
|
1502
1522
|
|
1503
1523
|
<xsl:call-template name="fn_name_display"/>
|
1504
1524
|
|
@@ -1569,6 +1589,12 @@
|
|
1569
1589
|
|
1570
1590
|
|
1571
1591
|
|
1592
|
+
|
1593
|
+
|
1594
|
+
|
1595
|
+
<!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
|
1596
|
+
|
1597
|
+
|
1572
1598
|
<xsl:variable name="table_width">
|
1573
1599
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1574
1600
|
100%
|
@@ -1587,6 +1613,7 @@
|
|
1587
1613
|
|
1588
1614
|
|
1589
1615
|
|
1616
|
+
|
1590
1617
|
|
1591
1618
|
|
1592
1619
|
|
@@ -1610,6 +1637,8 @@
|
|
1610
1637
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1611
1638
|
</xsl:if>
|
1612
1639
|
|
1640
|
+
|
1641
|
+
|
1613
1642
|
<xsl:choose>
|
1614
1643
|
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1615
1644
|
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
@@ -1897,9 +1926,9 @@
|
|
1897
1926
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1898
1927
|
<xsl:with-param name="continued">true</xsl:with-param>
|
1899
1928
|
</xsl:apply-templates>
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1929
|
+
|
1930
|
+
|
1931
|
+
|
1903
1932
|
|
1904
1933
|
</fo:table-cell>
|
1905
1934
|
</fo:table-row>
|
@@ -1981,7 +2010,11 @@
|
|
1981
2010
|
|
1982
2011
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1983
2012
|
|
1984
|
-
<xsl:
|
2013
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
2014
|
+
|
2015
|
+
</xsl:variable>
|
2016
|
+
|
2017
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
|
1985
2018
|
|
1986
2019
|
<xsl:variable name="cols-count">
|
1987
2020
|
<xsl:choose>
|
@@ -2010,6 +2043,8 @@
|
|
2010
2043
|
</xsl:choose>
|
2011
2044
|
</xsl:for-each>
|
2012
2045
|
|
2046
|
+
|
2047
|
+
|
2013
2048
|
<xsl:choose>
|
2014
2049
|
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2015
2050
|
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
@@ -2036,6 +2071,7 @@
|
|
2036
2071
|
|
2037
2072
|
|
2038
2073
|
|
2074
|
+
|
2039
2075
|
<!-- fn will be processed inside 'note' processing -->
|
2040
2076
|
|
2041
2077
|
|
@@ -2044,6 +2080,11 @@
|
|
2044
2080
|
|
2045
2081
|
|
2046
2082
|
|
2083
|
+
|
2084
|
+
|
2085
|
+
<!-- for BSI (not PAS) display Notes before footnotes -->
|
2086
|
+
|
2087
|
+
|
2047
2088
|
<!-- except gb -->
|
2048
2089
|
|
2049
2090
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
@@ -2069,6 +2110,10 @@
|
|
2069
2110
|
<!-- fn processing -->
|
2070
2111
|
<xsl:call-template name="fn_display"/>
|
2071
2112
|
|
2113
|
+
|
2114
|
+
<!-- for PAS display Notes after footnotes -->
|
2115
|
+
|
2116
|
+
|
2072
2117
|
</fo:table-cell>
|
2073
2118
|
</fo:table-row>
|
2074
2119
|
</fo:table-body>
|
@@ -2110,6 +2155,19 @@
|
|
2110
2155
|
|
2111
2156
|
</fo:table-body>
|
2112
2157
|
|
2158
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
|
2159
|
+
<xsl:choose>
|
2160
|
+
<xsl:when test="substring-after(., '—') != ''">
|
2161
|
+
<xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
|
2162
|
+
</xsl:when>
|
2163
|
+
<xsl:otherwise>
|
2164
|
+
<xsl:value-of select="."/>
|
2165
|
+
</xsl:otherwise>
|
2166
|
+
</xsl:choose>
|
2167
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
|
2168
|
+
<xsl:apply-templates mode="presentation_name"/>
|
2169
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
|
2170
|
+
<xsl:apply-templates select="."/>
|
2113
2171
|
</xsl:template><xsl:template match="*[local-name()='tr']">
|
2114
2172
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
2115
2173
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
@@ -2122,10 +2180,13 @@
|
|
2122
2180
|
|
2123
2181
|
|
2124
2182
|
|
2183
|
+
|
2184
|
+
|
2125
2185
|
</xsl:if>
|
2126
2186
|
<xsl:if test="$parent-name = 'tfoot'">
|
2127
2187
|
|
2128
2188
|
|
2189
|
+
|
2129
2190
|
</xsl:if>
|
2130
2191
|
|
2131
2192
|
|
@@ -2135,6 +2196,8 @@
|
|
2135
2196
|
|
2136
2197
|
|
2137
2198
|
|
2199
|
+
|
2200
|
+
|
2138
2201
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
2139
2202
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
2140
2203
|
</xsl:if> -->
|
@@ -2254,8 +2317,13 @@
|
|
2254
2317
|
|
2255
2318
|
|
2256
2319
|
|
2320
|
+
|
2321
|
+
<!-- Table's note name (NOTE, for example) -->
|
2322
|
+
|
2257
2323
|
<fo:inline padding-right="2mm">
|
2258
2324
|
|
2325
|
+
|
2326
|
+
|
2259
2327
|
|
2260
2328
|
|
2261
2329
|
|
@@ -2263,6 +2331,8 @@
|
|
2263
2331
|
|
2264
2332
|
</fo:inline>
|
2265
2333
|
|
2334
|
+
|
2335
|
+
|
2266
2336
|
<xsl:apply-templates mode="process"/>
|
2267
2337
|
</fo:block>
|
2268
2338
|
|
@@ -2270,18 +2340,18 @@
|
|
2270
2340
|
<xsl:apply-templates/>
|
2271
2341
|
</xsl:template><xsl:template name="fn_display">
|
2272
2342
|
<xsl:variable name="references">
|
2343
|
+
|
2273
2344
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
2274
|
-
<
|
2275
|
-
|
2276
|
-
|
2277
|
-
<xsl:apply-templates/>
|
2278
|
-
</fn>
|
2345
|
+
<xsl:call-template name="create_fn"/>
|
2279
2346
|
</xsl:for-each>
|
2280
2347
|
</xsl:variable>
|
2348
|
+
|
2281
2349
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
2282
2350
|
<xsl:variable name="reference" select="@reference"/>
|
2283
2351
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
2284
2352
|
<fo:block margin-bottom="12pt">
|
2353
|
+
|
2354
|
+
|
2285
2355
|
|
2286
2356
|
|
2287
2357
|
|
@@ -2301,6 +2371,7 @@
|
|
2301
2371
|
<xsl:value-of select="@reference"/>
|
2302
2372
|
|
2303
2373
|
|
2374
|
+
|
2304
2375
|
</fo:inline>
|
2305
2376
|
<fo:inline>
|
2306
2377
|
|
@@ -2310,6 +2381,12 @@
|
|
2310
2381
|
</fo:block>
|
2311
2382
|
</xsl:if>
|
2312
2383
|
</xsl:for-each>
|
2384
|
+
</xsl:template><xsl:template name="create_fn">
|
2385
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2386
|
+
|
2387
|
+
|
2388
|
+
<xsl:apply-templates/>
|
2389
|
+
</fn>
|
2313
2390
|
</xsl:template><xsl:template name="fn_name_display">
|
2314
2391
|
<!-- <xsl:variable name="references">
|
2315
2392
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
@@ -2450,6 +2527,7 @@
|
|
2450
2527
|
|
2451
2528
|
<xsl:value-of select="@reference"/>
|
2452
2529
|
|
2530
|
+
|
2453
2531
|
</fo:basic-link>
|
2454
2532
|
</fo:inline>
|
2455
2533
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -3293,16 +3371,68 @@
|
|
3293
3371
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3294
3372
|
</xsl:call-template>
|
3295
3373
|
|
3374
|
+
|
3375
|
+
|
3296
3376
|
<xsl:variable name="mathml">
|
3297
3377
|
<xsl:apply-templates select="." mode="mathml"/>
|
3298
3378
|
</xsl:variable>
|
3299
3379
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3300
3380
|
|
3301
3381
|
|
3382
|
+
<xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
|
3383
|
+
<xsl:variable name="comment_text_">
|
3384
|
+
<xsl:choose>
|
3385
|
+
<xsl:when test="normalize-space($comment_text_following) != ''">
|
3386
|
+
<xsl:value-of select="$comment_text_following"/>
|
3387
|
+
</xsl:when>
|
3388
|
+
<xsl:otherwise>
|
3389
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
3390
|
+
</xsl:otherwise>
|
3391
|
+
</xsl:choose>
|
3392
|
+
</xsl:variable>
|
3393
|
+
<xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
|
3394
|
+
|
3395
|
+
<xsl:if test="normalize-space($comment_text) != ''">
|
3396
|
+
<!-- put Mathin Alternate Text -->
|
3397
|
+
<xsl:attribute name="fox:alt-text">
|
3398
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
|
3399
|
+
</xsl:attribute>
|
3400
|
+
</xsl:if>
|
3401
|
+
|
3402
|
+
<xsl:variable name="mathml_content">
|
3403
|
+
<xsl:apply-templates select="." mode="mathml_actual_text"/>
|
3404
|
+
</xsl:variable>
|
3405
|
+
<!-- put MathML in Actual Text -->
|
3406
|
+
<xsl:attribute name="fox:actual-text">
|
3407
|
+
<xsl:value-of select="$mathml_content"/>
|
3408
|
+
</xsl:attribute>
|
3409
|
+
|
3410
|
+
|
3302
3411
|
<!-- <xsl:copy-of select="."/> -->
|
3303
3412
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3304
3413
|
</fo:instream-foreign-object>
|
3305
3414
|
</fo:inline>
|
3415
|
+
</xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
|
3416
|
+
<!-- <xsl:text>a+b</xsl:text> -->
|
3417
|
+
<xsl:text><</xsl:text>
|
3418
|
+
<xsl:value-of select="local-name()"/>
|
3419
|
+
<xsl:if test="local-name() = 'math'">
|
3420
|
+
<xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
|
3421
|
+
</xsl:if>
|
3422
|
+
<xsl:for-each select="@*">
|
3423
|
+
<xsl:text> </xsl:text>
|
3424
|
+
<xsl:value-of select="local-name()"/>
|
3425
|
+
<xsl:text>="</xsl:text>
|
3426
|
+
<xsl:value-of select="."/>
|
3427
|
+
<xsl:text>"</xsl:text>
|
3428
|
+
</xsl:for-each>
|
3429
|
+
<xsl:text>></xsl:text>
|
3430
|
+
<xsl:apply-templates mode="mathml_actual_text"/>
|
3431
|
+
<xsl:text></</xsl:text>
|
3432
|
+
<xsl:value-of select="local-name()"/>
|
3433
|
+
<xsl:text>></xsl:text>
|
3434
|
+
</xsl:template><xsl:template match="text()" mode="mathml_actual_text">
|
3435
|
+
<xsl:value-of select="normalize-space()"/>
|
3306
3436
|
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3307
3437
|
<xsl:copy>
|
3308
3438
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
@@ -3312,19 +3442,6 @@
|
|
3312
3442
|
<!-- replace start and end spaces to non-break space -->
|
3313
3443
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3314
3444
|
</xsl:copy>
|
3315
|
-
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
3316
|
-
<xsl:copy>
|
3317
|
-
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3318
|
-
</xsl:copy>
|
3319
|
-
<xsl:choose>
|
3320
|
-
<!-- if in msub, then don't add space -->
|
3321
|
-
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
3322
|
-
<!-- if next char in digit, don't add space -->
|
3323
|
-
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
3324
|
-
<xsl:otherwise>
|
3325
|
-
<mathml:mspace width="0.5ex"/>
|
3326
|
-
</xsl:otherwise>
|
3327
|
-
</xsl:choose>
|
3328
3445
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3329
3446
|
<xsl:variable name="target">
|
3330
3447
|
<xsl:choose>
|
@@ -3377,7 +3494,10 @@
|
|
3377
3494
|
</fo:block>
|
3378
3495
|
<xsl:apply-templates/>
|
3379
3496
|
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
3380
|
-
<
|
3497
|
+
<xsl:variable name="level">
|
3498
|
+
<xsl:call-template name="getLevel"/>
|
3499
|
+
</xsl:variable>
|
3500
|
+
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
3381
3501
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
3382
3502
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
3383
3503
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -3412,9 +3532,10 @@
|
|
3412
3532
|
|
3413
3533
|
</xsl:variable>
|
3414
3534
|
|
3535
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
3415
3536
|
<xsl:choose>
|
3416
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
3417
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
3537
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
3538
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
3418
3539
|
</xsl:choose>
|
3419
3540
|
<xsl:apply-templates/>
|
3420
3541
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
@@ -3458,6 +3579,7 @@
|
|
3458
3579
|
|
3459
3580
|
|
3460
3581
|
|
3582
|
+
|
3461
3583
|
<fo:block-container margin-left="0mm">
|
3462
3584
|
|
3463
3585
|
|
@@ -3563,7 +3685,10 @@
|
|
3563
3685
|
</fo:block>
|
3564
3686
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
3565
3687
|
<xsl:if test="normalize-space() != ''">
|
3566
|
-
<
|
3688
|
+
<xsl:variable name="level">
|
3689
|
+
<xsl:call-template name="getLevelTermName"/>
|
3690
|
+
</xsl:variable>
|
3691
|
+
<fo:inline role="H{$level}">
|
3567
3692
|
<xsl:apply-templates/>
|
3568
3693
|
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
3569
3694
|
<xsl:text>.</xsl:text>
|
@@ -3636,7 +3761,24 @@
|
|
3636
3761
|
</fo:instream-foreign-object>
|
3637
3762
|
</xsl:when>
|
3638
3763
|
<xsl:otherwise>
|
3639
|
-
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"
|
3764
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
3765
|
+
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
3766
|
+
|
3767
|
+
<xsl:variable name="img_src">
|
3768
|
+
<xsl:choose>
|
3769
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
3770
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
3771
|
+
</xsl:choose>
|
3772
|
+
</xsl:variable>
|
3773
|
+
|
3774
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
|
3775
|
+
<xsl:if test="number($scale) < 100">
|
3776
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
3777
|
+
</xsl:if>
|
3778
|
+
|
3779
|
+
</xsl:if>
|
3780
|
+
|
3781
|
+
</fo:external-graphic>
|
3640
3782
|
</xsl:otherwise>
|
3641
3783
|
</xsl:choose>
|
3642
3784
|
|
@@ -3807,11 +3949,13 @@
|
|
3807
3949
|
<xsl:attribute name="width">100%</xsl:attribute>
|
3808
3950
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
3809
3951
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3952
|
+
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
3953
|
+
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
3810
3954
|
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
3811
3955
|
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
3812
3956
|
<!-- effective height / width = 1.48, 1.4 - with title -->
|
3813
|
-
<xsl:if test="
|
3814
|
-
<xsl:variable name="width" select="((
|
3957
|
+
<xsl:if test="$svg_height > ($svg_width * 1.4)"> <!-- for images with big height -->
|
3958
|
+
<xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
|
3815
3959
|
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
3816
3960
|
</xsl:if>
|
3817
3961
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -3828,6 +3972,23 @@
|
|
3828
3972
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
3829
3973
|
<xsl:value-of select="."/>
|
3830
3974
|
</xsl:attribute>
|
3975
|
+
</xsl:template><xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
3976
|
+
<xsl:copy>
|
3977
|
+
<xsl:apply-templates select="@*" mode="svg_update"/>
|
3978
|
+
<xsl:variable name="viewbox">
|
3979
|
+
<xsl:call-template name="split">
|
3980
|
+
<xsl:with-param name="pText" select="@viewBox"/>
|
3981
|
+
<xsl:with-param name="sep" select="' '"/>
|
3982
|
+
</xsl:call-template>
|
3983
|
+
</xsl:variable>
|
3984
|
+
<xsl:attribute name="width">
|
3985
|
+
<xsl:value-of select="round(xalan:nodeset($viewbox)//item[3])"/>
|
3986
|
+
</xsl:attribute>
|
3987
|
+
<xsl:attribute name="height">
|
3988
|
+
<xsl:value-of select="round(xalan:nodeset($viewbox)//item[4])"/>
|
3989
|
+
</xsl:attribute>
|
3990
|
+
<xsl:apply-templates mode="svg_update"/>
|
3991
|
+
</xsl:copy>
|
3831
3992
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
3832
3993
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
3833
3994
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4158,6 +4319,7 @@
|
|
4158
4319
|
</xsl:when>
|
4159
4320
|
<xsl:otherwise>
|
4160
4321
|
<xsl:apply-templates/>
|
4322
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
4161
4323
|
</xsl:otherwise>
|
4162
4324
|
</xsl:choose>
|
4163
4325
|
</fo:block>
|
@@ -4298,14 +4460,6 @@
|
|
4298
4460
|
<fo:block>
|
4299
4461
|
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
4300
4462
|
</fo:block>
|
4301
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4302
|
-
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
4303
|
-
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4304
|
-
</fo:block>
|
4305
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
4306
|
-
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
4307
|
-
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
4308
|
-
</fo:block>
|
4309
4463
|
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
4310
4464
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
4311
4465
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -4322,6 +4476,38 @@
|
|
4322
4476
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
4323
4477
|
<xsl:apply-templates/>
|
4324
4478
|
</fo:block>
|
4479
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4480
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
4481
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4482
|
+
</fo:block>
|
4483
|
+
</xsl:template><xsl:template match="*[local-name() = 'subject']">
|
4484
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
4485
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4486
|
+
</fo:block>
|
4487
|
+
</xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
4488
|
+
<fo:block xsl:use-attribute-sets="inherit-style">
|
4489
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
4490
|
+
</fo:block>
|
4491
|
+
</xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
4492
|
+
<fo:block xsl:use-attribute-sets="description-style">
|
4493
|
+
<xsl:apply-templates/>
|
4494
|
+
</fo:block>
|
4495
|
+
</xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
4496
|
+
<fo:block xsl:use-attribute-sets="specification-style">
|
4497
|
+
<xsl:apply-templates/>
|
4498
|
+
</fo:block>
|
4499
|
+
</xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
4500
|
+
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
4501
|
+
<xsl:apply-templates/>
|
4502
|
+
</fo:block>
|
4503
|
+
</xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
4504
|
+
<fo:block xsl:use-attribute-sets="verification-style">
|
4505
|
+
<xsl:apply-templates/>
|
4506
|
+
</fo:block>
|
4507
|
+
</xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
4508
|
+
<fo:block xsl:use-attribute-sets="import-style">
|
4509
|
+
<xsl:apply-templates/>
|
4510
|
+
</fo:block>
|
4325
4511
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4326
4512
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
4327
4513
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -4473,7 +4659,19 @@
|
|
4473
4659
|
</fo:inline>
|
4474
4660
|
</xsl:if>
|
4475
4661
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
4476
|
-
<
|
4662
|
+
<xsl:variable name="element">inline
|
4663
|
+
|
4664
|
+
</xsl:variable>
|
4665
|
+
<xsl:choose>
|
4666
|
+
<xsl:when test="contains($element, 'block')">
|
4667
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
4668
|
+
<xsl:apply-templates/>
|
4669
|
+
</fo:block>
|
4670
|
+
</xsl:when>
|
4671
|
+
<xsl:otherwise>
|
4672
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4673
|
+
</xsl:otherwise>
|
4674
|
+
</xsl:choose>
|
4477
4675
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
4478
4676
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4479
4677
|
|
@@ -4651,9 +4849,10 @@
|
|
4651
4849
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
4652
4850
|
|
4653
4851
|
</xsl:if>
|
4654
|
-
|
4852
|
+
|
4853
|
+
|
4854
|
+
|
4655
4855
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4656
|
-
|
4657
4856
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4658
4857
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
4659
4858
|
</xsl:if>
|
@@ -4661,6 +4860,7 @@
|
|
4661
4860
|
|
4662
4861
|
|
4663
4862
|
|
4863
|
+
|
4664
4864
|
</xsl:if>
|
4665
4865
|
|
4666
4866
|
<xsl:apply-templates/>
|
@@ -5044,7 +5244,6 @@
|
|
5044
5244
|
</xsl:template><xsl:template name="processBibitem">
|
5045
5245
|
|
5046
5246
|
|
5047
|
-
<!-- end BIPM bibitem processing-->
|
5048
5247
|
|
5049
5248
|
|
5050
5249
|
|
@@ -5174,6 +5373,9 @@
|
|
5174
5373
|
<fo:block-container border="1pt solid black" width="50%">
|
5175
5374
|
<fo:block> </fo:block>
|
5176
5375
|
</fo:block-container>
|
5376
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5377
|
+
<fo:inline padding-right="5mm"> </fo:inline>
|
5378
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5177
5379
|
</xsl:template><xsl:template name="convertDate">
|
5178
5380
|
<xsl:param name="date"/>
|
5179
5381
|
<xsl:param name="format" select="'short'"/>
|
@@ -5412,6 +5614,26 @@
|
|
5412
5614
|
<xsl:value-of select="$level"/>
|
5413
5615
|
</xsl:otherwise>
|
5414
5616
|
</xsl:choose>
|
5617
|
+
</xsl:template><xsl:template name="getLevelTermName">
|
5618
|
+
<xsl:choose>
|
5619
|
+
<xsl:when test="normalize-space(../@depth) != ''">
|
5620
|
+
<xsl:value-of select="../@depth"/>
|
5621
|
+
</xsl:when>
|
5622
|
+
<xsl:otherwise>
|
5623
|
+
<xsl:variable name="title_level_">
|
5624
|
+
<xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
|
5625
|
+
<xsl:call-template name="getLevel"/>
|
5626
|
+
</xsl:for-each>
|
5627
|
+
</xsl:variable>
|
5628
|
+
<xsl:variable name="title_level" select="normalize-space($title_level_)"/>
|
5629
|
+
<xsl:choose>
|
5630
|
+
<xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
|
5631
|
+
<xsl:otherwise>
|
5632
|
+
<xsl:call-template name="getLevel"/>
|
5633
|
+
</xsl:otherwise>
|
5634
|
+
</xsl:choose>
|
5635
|
+
</xsl:otherwise>
|
5636
|
+
</xsl:choose>
|
5415
5637
|
</xsl:template><xsl:template name="split">
|
5416
5638
|
<xsl:param name="pText" select="."/>
|
5417
5639
|
<xsl:param name="sep" select="','"/>
|
@@ -5509,20 +5731,40 @@
|
|
5509
5731
|
</xsl:call-template>
|
5510
5732
|
</xsl:if>
|
5511
5733
|
</xsl:template><xsl:template name="getLocalizedString">
|
5512
|
-
<xsl:param name="key"/>
|
5734
|
+
<xsl:param name="key"/>
|
5735
|
+
<xsl:param name="formatted">false</xsl:param>
|
5513
5736
|
|
5514
5737
|
<xsl:variable name="curr_lang">
|
5515
5738
|
<xsl:call-template name="getLang"/>
|
5516
5739
|
</xsl:variable>
|
5517
5740
|
|
5518
|
-
<xsl:variable name="data_value"
|
5741
|
+
<xsl:variable name="data_value">
|
5742
|
+
<xsl:choose>
|
5743
|
+
<xsl:when test="$formatted = 'true'">
|
5744
|
+
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5745
|
+
</xsl:when>
|
5746
|
+
<xsl:otherwise>
|
5747
|
+
<xsl:value-of select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
5748
|
+
</xsl:otherwise>
|
5749
|
+
</xsl:choose>
|
5750
|
+
</xsl:variable>
|
5519
5751
|
|
5520
5752
|
<xsl:choose>
|
5521
|
-
<xsl:when test="$data_value != ''">
|
5522
|
-
<xsl:
|
5753
|
+
<xsl:when test="normalize-space($data_value) != ''">
|
5754
|
+
<xsl:choose>
|
5755
|
+
<xsl:when test="$formatted = 'true'"><xsl:copy-of select="$data_value"/></xsl:when>
|
5756
|
+
<xsl:otherwise><xsl:value-of select="$data_value"/></xsl:otherwise>
|
5757
|
+
</xsl:choose>
|
5523
5758
|
</xsl:when>
|
5524
5759
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5525
|
-
<xsl:
|
5760
|
+
<xsl:choose>
|
5761
|
+
<xsl:when test="$formatted = 'true'">
|
5762
|
+
<xsl:apply-templates select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5763
|
+
</xsl:when>
|
5764
|
+
<xsl:otherwise>
|
5765
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5766
|
+
</xsl:otherwise>
|
5767
|
+
</xsl:choose>
|
5526
5768
|
</xsl:when>
|
5527
5769
|
<xsl:otherwise>
|
5528
5770
|
<xsl:variable name="key_">
|
@@ -5533,7 +5775,7 @@
|
|
5533
5775
|
<xsl:value-of select="$key_"/>
|
5534
5776
|
</xsl:otherwise>
|
5535
5777
|
</xsl:choose>
|
5536
|
-
|
5778
|
+
|
5537
5779
|
</xsl:template><xsl:template name="setTrackChangesStyles">
|
5538
5780
|
<xsl:param name="isAdded"/>
|
5539
5781
|
<xsl:param name="isDeleted"/>
|
@@ -5584,4 +5826,100 @@
|
|
5584
5826
|
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
5585
5827
|
</xsl:choose>
|
5586
5828
|
</xsl:attribute>
|
5829
|
+
</xsl:template><xsl:template name="number-to-words">
|
5830
|
+
<xsl:param name="number"/>
|
5831
|
+
<xsl:param name="first"/>
|
5832
|
+
<xsl:if test="$number != ''">
|
5833
|
+
<xsl:variable name="words">
|
5834
|
+
<words>
|
5835
|
+
<word cardinal="1">One-</word>
|
5836
|
+
<word ordinal="1">First </word>
|
5837
|
+
<word cardinal="2">Two-</word>
|
5838
|
+
<word ordinal="2">Second </word>
|
5839
|
+
<word cardinal="3">Three-</word>
|
5840
|
+
<word ordinal="3">Third </word>
|
5841
|
+
<word cardinal="4">Four-</word>
|
5842
|
+
<word ordinal="4">Fourth </word>
|
5843
|
+
<word cardinal="5">Five-</word>
|
5844
|
+
<word ordinal="5">Fifth </word>
|
5845
|
+
<word cardinal="6">Six-</word>
|
5846
|
+
<word ordinal="6">Sixth </word>
|
5847
|
+
<word cardinal="7">Seven-</word>
|
5848
|
+
<word ordinal="7">Seventh </word>
|
5849
|
+
<word cardinal="8">Eight-</word>
|
5850
|
+
<word ordinal="8">Eighth </word>
|
5851
|
+
<word cardinal="9">Nine-</word>
|
5852
|
+
<word ordinal="9">Ninth </word>
|
5853
|
+
<word ordinal="10">Tenth </word>
|
5854
|
+
<word ordinal="11">Eleventh </word>
|
5855
|
+
<word ordinal="12">Twelfth </word>
|
5856
|
+
<word ordinal="13">Thirteenth </word>
|
5857
|
+
<word ordinal="14">Fourteenth </word>
|
5858
|
+
<word ordinal="15">Fifteenth </word>
|
5859
|
+
<word ordinal="16">Sixteenth </word>
|
5860
|
+
<word ordinal="17">Seventeenth </word>
|
5861
|
+
<word ordinal="18">Eighteenth </word>
|
5862
|
+
<word ordinal="19">Nineteenth </word>
|
5863
|
+
<word cardinal="20">Twenty-</word>
|
5864
|
+
<word ordinal="20">Twentieth </word>
|
5865
|
+
<word cardinal="30">Thirty-</word>
|
5866
|
+
<word ordinal="30">Thirtieth </word>
|
5867
|
+
<word cardinal="40">Forty-</word>
|
5868
|
+
<word ordinal="40">Fortieth </word>
|
5869
|
+
<word cardinal="50">Fifty-</word>
|
5870
|
+
<word ordinal="50">Fiftieth </word>
|
5871
|
+
<word cardinal="60">Sixty-</word>
|
5872
|
+
<word ordinal="60">Sixtieth </word>
|
5873
|
+
<word cardinal="70">Seventy-</word>
|
5874
|
+
<word ordinal="70">Seventieth </word>
|
5875
|
+
<word cardinal="80">Eighty-</word>
|
5876
|
+
<word ordinal="80">Eightieth </word>
|
5877
|
+
<word cardinal="90">Ninety-</word>
|
5878
|
+
<word ordinal="90">Ninetieth </word>
|
5879
|
+
<word cardinal="100">Hundred-</word>
|
5880
|
+
<word ordinal="100">Hundredth </word>
|
5881
|
+
</words>
|
5882
|
+
</xsl:variable>
|
5883
|
+
|
5884
|
+
<xsl:variable name="ordinal" select="xalan:nodeset($words)//word[@ordinal = $number]/text()"/>
|
5885
|
+
|
5886
|
+
<xsl:variable name="value">
|
5887
|
+
<xsl:choose>
|
5888
|
+
<xsl:when test="$ordinal != ''">
|
5889
|
+
<xsl:value-of select="$ordinal"/>
|
5890
|
+
</xsl:when>
|
5891
|
+
<xsl:otherwise>
|
5892
|
+
<xsl:choose>
|
5893
|
+
<xsl:when test="$number < 100">
|
5894
|
+
<xsl:variable name="decade" select="concat(substring($number,1,1), '0')"/>
|
5895
|
+
<xsl:variable name="digit" select="substring($number,2)"/>
|
5896
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $decade]/text()"/>
|
5897
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@ordinal = $digit]/text()"/>
|
5898
|
+
</xsl:when>
|
5899
|
+
<xsl:otherwise>
|
5900
|
+
<!-- more 100 -->
|
5901
|
+
<xsl:variable name="hundred" select="substring($number,1,1)"/>
|
5902
|
+
<xsl:variable name="digits" select="number(substring($number,2))"/>
|
5903
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $hundred]/text()"/>
|
5904
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = '100']/text()"/>
|
5905
|
+
<xsl:call-template name="number-to-words">
|
5906
|
+
<xsl:with-param name="number" select="$digits"/>
|
5907
|
+
</xsl:call-template>
|
5908
|
+
</xsl:otherwise>
|
5909
|
+
</xsl:choose>
|
5910
|
+
</xsl:otherwise>
|
5911
|
+
</xsl:choose>
|
5912
|
+
</xsl:variable>
|
5913
|
+
<xsl:choose>
|
5914
|
+
<xsl:when test="$first = 'true'">
|
5915
|
+
<xsl:variable name="value_lc" select="java:toLowerCase(java:java.lang.String.new($value))"/>
|
5916
|
+
<xsl:call-template name="capitalize">
|
5917
|
+
<xsl:with-param name="str" select="$value_lc"/>
|
5918
|
+
</xsl:call-template>
|
5919
|
+
</xsl:when>
|
5920
|
+
<xsl:otherwise>
|
5921
|
+
<xsl:value-of select="$value"/>
|
5922
|
+
</xsl:otherwise>
|
5923
|
+
</xsl:choose>
|
5924
|
+
</xsl:if>
|
5587
5925
|
</xsl:template></xsl:stylesheet>
|