metanorma-ribose 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/ribose/isodoc.rng +67 -16
- data/lib/asciidoctor/ribose/reqt.rng +15 -4
- data/lib/isodoc/ribose/ribose.standard.xsl +463 -115
- data/lib/metanorma/ribose/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: 0ef596b5a39002271360480b7fe72428622f287897ee30a74cafe2ec21bd9044
|
4
|
+
data.tar.gz: b3ad1bdeeacec3faf30a3f6a6f96f2dc65bd5866fcf84319da29db0edb20d14e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1905e2a9d7fe40aa447af402505200d72de9b4639e9daf9ff7b730faca33d2d98216d78727660234de3ca960742c82668ffc581fb9c52e5d442dd2f57ea9f78b
|
7
|
+
data.tar.gz: c3daed1a3d6dd5387f01d926f677f590ae32917aebb4d67f07e3a857cba626270594ec7b6cfec26eba5f9bb071b171c2d12e85f87ef41f0f1f6faf1ebb2cd04e
|
@@ -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>
|
@@ -397,7 +397,7 @@
|
|
397
397
|
<xsl:if test="string-length($title) > 80">
|
398
398
|
<xsl:attribute name="margin-right">-30mm</xsl:attribute>
|
399
399
|
</xsl:if>
|
400
|
-
<fo:block font-size="27pt" font-weight="bold">
|
400
|
+
<fo:block font-size="27pt" font-weight="bold" role="H1">
|
401
401
|
<xsl:apply-templates select="/rsd:rsd-standard/rsd:bibdata/rsd:title[@language = $lang]" mode="cover_page"/>
|
402
402
|
</fo:block>
|
403
403
|
<fo:block space-before="9pt" font-size="16.8pt" font-weight="600">
|
@@ -413,49 +413,50 @@
|
|
413
413
|
<xsl:call-template name="insertHeaderFooter"/>
|
414
414
|
<fo:flow flow-name="xsl-region-body">
|
415
415
|
<xsl:if test="xalan:nodeset($contents)//item[@display = 'true']">
|
416
|
-
|
417
|
-
<fo:block
|
418
|
-
<
|
419
|
-
<xsl:
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
<fo:block-container margin-left="
|
426
|
-
<
|
427
|
-
<
|
428
|
-
<
|
429
|
-
<xsl:if test="
|
430
|
-
<xsl:
|
416
|
+
<fo:block role="TOC">
|
417
|
+
<!-- <fo:block-container absolute-position="fixed" left="13mm" top="15mm"> -->
|
418
|
+
<fo:block font-size="27pt" font-weight="bold" color="black" margin-left="-15mm" margin-bottom="13mm" role="H1">
|
419
|
+
<xsl:call-template name="getLocalizedString">
|
420
|
+
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
421
|
+
</xsl:call-template>
|
422
|
+
</fo:block>
|
423
|
+
<!-- </fo:block-container> -->
|
424
|
+
|
425
|
+
<fo:block-container margin-left="32mm" margin-right="-17mm">
|
426
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
427
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
428
|
+
<fo:block font-size="13pt" role="TOCI">
|
429
|
+
<xsl:if test="@level = 1">
|
430
|
+
<xsl:if test="preceding-sibling::item[@display = 'true' and @level = 1]">
|
431
|
+
<xsl:attribute name="space-before">16pt</xsl:attribute>
|
432
|
+
</xsl:if>
|
433
|
+
<xsl:attribute name="space-after">4pt</xsl:attribute>
|
434
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
435
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
436
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
431
437
|
</xsl:if>
|
432
|
-
<xsl:
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
<fo:leader leader-pattern="rule" rule-thickness="0.2mm"/>
|
450
|
-
<fo:inline padding-left="2mm"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
451
|
-
</fo:inline>
|
452
|
-
</fo:basic-link>
|
438
|
+
<xsl:if test="@level = 2">
|
439
|
+
<xsl:attribute name="margin-left">16.5mm</xsl:attribute>
|
440
|
+
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
441
|
+
<xsl:attribute name="space-after">5pt</xsl:attribute>
|
442
|
+
</xsl:if>
|
443
|
+
<fo:block text-align-last="justify">
|
444
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
445
|
+
<xsl:value-of select="@section"/>
|
446
|
+
<xsl:text> </xsl:text>
|
447
|
+
<xsl:apply-templates select="title"/>
|
448
|
+
<xsl:text> </xsl:text>
|
449
|
+
<fo:inline>
|
450
|
+
<fo:leader leader-pattern="rule" rule-thickness="0.2mm"/>
|
451
|
+
<fo:inline padding-left="2mm"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
452
|
+
</fo:inline>
|
453
|
+
</fo:basic-link>
|
454
|
+
</fo:block>
|
453
455
|
</fo:block>
|
454
|
-
</
|
455
|
-
</
|
456
|
+
</xsl:for-each>
|
457
|
+
</fo:block-container>
|
456
458
|
</fo:block-container>
|
457
|
-
</fo:block
|
458
|
-
|
459
|
+
</fo:block>
|
459
460
|
<fo:block break-after="page"/>
|
460
461
|
</xsl:if>
|
461
462
|
<fo:block margin-bottom="12pt"> </fo:block>
|
@@ -591,7 +592,10 @@
|
|
591
592
|
</xsl:template>
|
592
593
|
|
593
594
|
<xsl:template match="rsd:license-statement//rsd:title">
|
594
|
-
<
|
595
|
+
<xsl:variable name="level">
|
596
|
+
<xsl:call-template name="getLevel"/>
|
597
|
+
</xsl:variable>
|
598
|
+
<fo:block text-align="center" font-weight="normal" margin-top="4pt" role="H{$level}">
|
595
599
|
<xsl:apply-templates/>
|
596
600
|
</fo:block>
|
597
601
|
</xsl:template>
|
@@ -614,7 +618,10 @@
|
|
614
618
|
</xsl:template>
|
615
619
|
|
616
620
|
<xsl:template match="rsd:copyright-statement//rsd:title">
|
617
|
-
<
|
621
|
+
<xsl:variable name="level">
|
622
|
+
<xsl:call-template name="getLevel"/>
|
623
|
+
</xsl:variable>
|
624
|
+
<fo:block font-weight="normal" text-align="center" role="H{$level}">
|
618
625
|
<xsl:apply-templates/>
|
619
626
|
</fo:block>
|
620
627
|
</xsl:template>
|
@@ -638,7 +645,10 @@
|
|
638
645
|
</xsl:template>
|
639
646
|
|
640
647
|
<xsl:template match="rsd:legal-statement//rsd:title">
|
641
|
-
<
|
648
|
+
<xsl:variable name="level">
|
649
|
+
<xsl:call-template name="getLevel"/>
|
650
|
+
</xsl:variable>
|
651
|
+
<fo:block font-weight="normal" padding-top="2mm" margin-bottom="6pt" role="H{$level}">
|
642
652
|
<xsl:apply-templates/>
|
643
653
|
</fo:block>
|
644
654
|
</xsl:template>
|
@@ -728,6 +738,7 @@
|
|
728
738
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
729
739
|
<xsl:attribute name="color"><xsl:value-of select="$color"/></xsl:attribute>
|
730
740
|
<xsl:attribute name="line-height">125%</xsl:attribute>
|
741
|
+
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
731
742
|
|
732
743
|
<xsl:choose>
|
733
744
|
<xsl:when test="$level = 1">
|
@@ -746,6 +757,7 @@
|
|
746
757
|
<fo:table-cell>
|
747
758
|
<fo:block>
|
748
759
|
<xsl:call-template name="extractTitle"/> <!-- section title -->
|
760
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
749
761
|
</fo:block>
|
750
762
|
</fo:table-cell>
|
751
763
|
</fo:table-row>
|
@@ -756,6 +768,7 @@
|
|
756
768
|
</xsl:when>
|
757
769
|
<xsl:otherwise>
|
758
770
|
<xsl:apply-templates/>
|
771
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
759
772
|
</xsl:otherwise>
|
760
773
|
</xsl:choose>
|
761
774
|
|
@@ -1080,7 +1093,10 @@
|
|
1080
1093
|
<xsl:otherwise>12pt</xsl:otherwise>
|
1081
1094
|
</xsl:choose>
|
1082
1095
|
</xsl:variable>
|
1083
|
-
<
|
1096
|
+
<xsl:variable name="levelTerm">
|
1097
|
+
<xsl:call-template name="getLevelTermName"/>
|
1098
|
+
</xsl:variable>
|
1099
|
+
<fo:block font-weight="bold" color="black" font-size="{$font-size}" keep-with-next="always" role="H{$levelTerm}"> <!-- 600 - semibold -->
|
1084
1100
|
<xsl:if test="preceding-sibling::*[1][self::rsd:name]">
|
1085
1101
|
<xsl:attribute name="space-before">11mm</xsl:attribute>
|
1086
1102
|
<fo:inline padding-right="1mm">
|
@@ -1130,7 +1146,7 @@
|
|
1130
1146
|
<fo:table-header>
|
1131
1147
|
<fo:table-row>
|
1132
1148
|
<fo:table-cell text-align="left">
|
1133
|
-
<fo:block margin-left="-15mm"> <!-- Bibliography section title -->
|
1149
|
+
<fo:block margin-left="-15mm" role="H1"> <!-- Bibliography section title -->
|
1134
1150
|
<xsl:attribute name="font-size">22pt</xsl:attribute>
|
1135
1151
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1136
1152
|
<xsl:attribute name="margin-bottom">16pt</xsl:attribute>
|
@@ -1266,28 +1282,28 @@
|
|
1266
1282
|
<xsl:variable name="top_top">-25.75</xsl:variable>
|
1267
1283
|
<xsl:variable name="top_bottom">194</xsl:variable>
|
1268
1284
|
<!-- Yellow -->
|
1269
|
-
<fo:static-content flow-name="header-LT-yellow">
|
1285
|
+
<fo:static-content flow-name="header-LT-yellow" role="artifact">
|
1270
1286
|
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_top}mm" font-size="0">
|
1271
1287
|
<fo:block>
|
1272
1288
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-yellow-left))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1273
1289
|
</fo:block>
|
1274
1290
|
</fo:block-container>
|
1275
1291
|
</fo:static-content>
|
1276
|
-
<fo:static-content flow-name="header-RT-yellow">
|
1292
|
+
<fo:static-content flow-name="header-RT-yellow" role="artifact">
|
1277
1293
|
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_top}mm" font-size="0">
|
1278
1294
|
<fo:block>
|
1279
1295
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-yellow-right))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1280
1296
|
</fo:block>
|
1281
1297
|
</fo:block-container>
|
1282
1298
|
</fo:static-content>
|
1283
|
-
<fo:static-content flow-name="header-LB-yellow">
|
1299
|
+
<fo:static-content flow-name="header-LB-yellow" role="artifact">
|
1284
1300
|
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_bottom}mm" font-size="0">
|
1285
1301
|
<fo:block>
|
1286
1302
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-yellow-left))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1287
1303
|
</fo:block>
|
1288
1304
|
</fo:block-container>
|
1289
1305
|
</fo:static-content>
|
1290
|
-
<fo:static-content flow-name="header-RB-yellow">
|
1306
|
+
<fo:static-content flow-name="header-RB-yellow" role="artifact">
|
1291
1307
|
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_bottom}mm" font-size="0">
|
1292
1308
|
<fo:block>
|
1293
1309
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-yellow-right))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
@@ -1295,28 +1311,28 @@
|
|
1295
1311
|
</fo:block-container>
|
1296
1312
|
</fo:static-content>
|
1297
1313
|
<!-- Blue -->
|
1298
|
-
<fo:static-content flow-name="header-LT-blue">
|
1314
|
+
<fo:static-content flow-name="header-LT-blue" role="artifact">
|
1299
1315
|
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_top}mm" font-size="0">
|
1300
1316
|
<fo:block>
|
1301
1317
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-blue-left))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1302
1318
|
</fo:block>
|
1303
1319
|
</fo:block-container>
|
1304
1320
|
</fo:static-content>
|
1305
|
-
<fo:static-content flow-name="header-RT-blue">
|
1321
|
+
<fo:static-content flow-name="header-RT-blue" role="artifact">
|
1306
1322
|
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_top}mm" font-size="0">
|
1307
1323
|
<fo:block>
|
1308
1324
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-blue-right))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1309
1325
|
</fo:block>
|
1310
1326
|
</fo:block-container>
|
1311
1327
|
</fo:static-content>
|
1312
|
-
<fo:static-content flow-name="header-LB-blue">
|
1328
|
+
<fo:static-content flow-name="header-LB-blue" role="artifact">
|
1313
1329
|
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_bottom}mm" font-size="0">
|
1314
1330
|
<fo:block>
|
1315
1331
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-blue-left))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1316
1332
|
</fo:block>
|
1317
1333
|
</fo:block-container>
|
1318
1334
|
</fo:static-content>
|
1319
|
-
<fo:static-content flow-name="header-RB-blue">
|
1335
|
+
<fo:static-content flow-name="header-RB-blue" role="artifact">
|
1320
1336
|
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_bottom}mm" font-size="0">
|
1321
1337
|
<fo:block>
|
1322
1338
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-blue-right))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
@@ -1324,28 +1340,28 @@
|
|
1324
1340
|
</fo:block-container>
|
1325
1341
|
</fo:static-content>
|
1326
1342
|
<!-- Orange -->
|
1327
|
-
<fo:static-content flow-name="header-LT-orange">
|
1343
|
+
<fo:static-content flow-name="header-LT-orange" role="artifact">
|
1328
1344
|
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_top}mm" font-size="0">
|
1329
1345
|
<fo:block>
|
1330
1346
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-orange-left))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1331
1347
|
</fo:block>
|
1332
1348
|
</fo:block-container>
|
1333
1349
|
</fo:static-content>
|
1334
|
-
<fo:static-content flow-name="header-RT-orange">
|
1350
|
+
<fo:static-content flow-name="header-RT-orange" role="artifact">
|
1335
1351
|
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_top}mm" font-size="0">
|
1336
1352
|
<fo:block>
|
1337
1353
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-orange-right))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1338
1354
|
</fo:block>
|
1339
1355
|
</fo:block-container>
|
1340
1356
|
</fo:static-content>
|
1341
|
-
<fo:static-content flow-name="header-LB-orange">
|
1357
|
+
<fo:static-content flow-name="header-LB-orange" role="artifact">
|
1342
1358
|
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_bottom}mm" font-size="0">
|
1343
1359
|
<fo:block>
|
1344
1360
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-orange-left))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1345
1361
|
</fo:block>
|
1346
1362
|
</fo:block-container>
|
1347
1363
|
</fo:static-content>
|
1348
|
-
<fo:static-content flow-name="header-RB-orange">
|
1364
|
+
<fo:static-content flow-name="header-RB-orange" role="artifact">
|
1349
1365
|
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_bottom}mm" font-size="0">
|
1350
1366
|
<fo:block>
|
1351
1367
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-orange-right))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
@@ -1365,7 +1381,7 @@
|
|
1365
1381
|
<xsl:with-param name="str" select="/rsd:rsd-standard/rsd:bibdata/rsd:ext/rsd:doctype"/>
|
1366
1382
|
</xsl:call-template>
|
1367
1383
|
</xsl:variable>
|
1368
|
-
<fo:static-content flow-name="footer-odd">
|
1384
|
+
<fo:static-content flow-name="footer-odd" role="artifact">
|
1369
1385
|
<fo:block-container font-size="8pt" height="100%" color="black">
|
1370
1386
|
<fo:block text-align-last="justify" margin-right="1mm">
|
1371
1387
|
<fo:inline padding-right="11mm"><fo:page-number/></fo:inline>
|
@@ -1377,7 +1393,7 @@
|
|
1377
1393
|
</fo:block>
|
1378
1394
|
</fo:block-container>
|
1379
1395
|
</fo:static-content>
|
1380
|
-
<fo:static-content flow-name="footer-even">
|
1396
|
+
<fo:static-content flow-name="footer-even" role="artifact">
|
1381
1397
|
<fo:block-container font-size="8pt" height="100%" color="black">
|
1382
1398
|
<fo:block text-align-last="justify" margin-right="1mm">
|
1383
1399
|
<fo:inline padding-right="11mm"><fo:page-number/></fo:inline>
|
@@ -1638,6 +1654,7 @@
|
|
1638
1654
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1639
1655
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1640
1656
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
1657
|
+
<xsl:attribute name="role">Code</xsl:attribute>
|
1641
1658
|
|
1642
1659
|
|
1643
1660
|
<xsl:attribute name="font-family">Source Code Pro</xsl:attribute>
|
@@ -1664,8 +1681,13 @@
|
|
1664
1681
|
|
1665
1682
|
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
1666
1683
|
|
1667
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1668
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1684
|
+
</xsl:attribute-set><xsl:attribute-set name="subject-style">
|
1685
|
+
</xsl:attribute-set><xsl:attribute-set name="inherit-style">
|
1686
|
+
</xsl:attribute-set><xsl:attribute-set name="description-style">
|
1687
|
+
</xsl:attribute-set><xsl:attribute-set name="specification-style">
|
1688
|
+
</xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
|
1689
|
+
</xsl:attribute-set><xsl:attribute-set name="verification-style">
|
1690
|
+
</xsl:attribute-set><xsl:attribute-set name="import-style">
|
1669
1691
|
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
1670
1692
|
|
1671
1693
|
|
@@ -1734,6 +1756,7 @@
|
|
1734
1756
|
|
1735
1757
|
|
1736
1758
|
|
1759
|
+
|
1737
1760
|
|
1738
1761
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
1739
1762
|
|
@@ -1752,7 +1775,9 @@
|
|
1752
1775
|
<xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
|
1753
1776
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
1754
1777
|
|
1755
|
-
</xsl:attribute-set><xsl:
|
1778
|
+
</xsl:attribute-set><xsl:variable name="table-border_">
|
1779
|
+
|
1780
|
+
</xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
|
1756
1781
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1757
1782
|
|
1758
1783
|
|
@@ -1886,7 +1911,8 @@
|
|
1886
1911
|
<xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
|
1887
1912
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
1888
1913
|
|
1889
|
-
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1914
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1915
|
+
<xsl:attribute name="role">BlockQuote</xsl:attribute>
|
1890
1916
|
|
1891
1917
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1892
1918
|
<xsl:attribute name="margin-left">13mm</xsl:attribute>
|
@@ -2099,11 +2125,15 @@
|
|
2099
2125
|
<fo:block> </fo:block>
|
2100
2126
|
</xsl:if> -->
|
2101
2127
|
|
2128
|
+
|
2129
|
+
<!-- Display table's name before table as standalone block -->
|
2102
2130
|
<!-- $namespace = 'iso' or -->
|
2103
2131
|
|
2104
2132
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2105
2133
|
|
2106
|
-
|
2134
|
+
|
2135
|
+
|
2136
|
+
|
2107
2137
|
|
2108
2138
|
|
2109
2139
|
|
@@ -2176,6 +2206,12 @@
|
|
2176
2206
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2177
2207
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2178
2208
|
|
2209
|
+
|
2210
|
+
|
2211
|
+
|
2212
|
+
<!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
|
2213
|
+
|
2214
|
+
|
2179
2215
|
<xsl:variable name="table_width">
|
2180
2216
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
2181
2217
|
100%
|
@@ -2194,6 +2230,7 @@
|
|
2194
2230
|
|
2195
2231
|
|
2196
2232
|
|
2233
|
+
|
2197
2234
|
|
2198
2235
|
|
2199
2236
|
|
@@ -2220,6 +2257,8 @@
|
|
2220
2257
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2221
2258
|
</xsl:if>
|
2222
2259
|
|
2260
|
+
|
2261
|
+
|
2223
2262
|
<xsl:choose>
|
2224
2263
|
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2225
2264
|
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
@@ -2507,9 +2546,9 @@
|
|
2507
2546
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
2508
2547
|
<xsl:with-param name="continued">true</xsl:with-param>
|
2509
2548
|
</xsl:apply-templates>
|
2510
|
-
|
2511
|
-
|
2512
|
-
|
2549
|
+
|
2550
|
+
|
2551
|
+
|
2513
2552
|
|
2514
2553
|
</fo:table-cell>
|
2515
2554
|
</fo:table-row>
|
@@ -2591,7 +2630,11 @@
|
|
2591
2630
|
|
2592
2631
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2593
2632
|
|
2594
|
-
<xsl:
|
2633
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
2634
|
+
|
2635
|
+
</xsl:variable>
|
2636
|
+
|
2637
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
|
2595
2638
|
|
2596
2639
|
<xsl:variable name="cols-count">
|
2597
2640
|
<xsl:choose>
|
@@ -2620,6 +2663,8 @@
|
|
2620
2663
|
</xsl:choose>
|
2621
2664
|
</xsl:for-each>
|
2622
2665
|
|
2666
|
+
|
2667
|
+
|
2623
2668
|
<xsl:choose>
|
2624
2669
|
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2625
2670
|
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
@@ -2646,6 +2691,7 @@
|
|
2646
2691
|
|
2647
2692
|
|
2648
2693
|
|
2694
|
+
|
2649
2695
|
<!-- fn will be processed inside 'note' processing -->
|
2650
2696
|
|
2651
2697
|
|
@@ -2656,6 +2702,11 @@
|
|
2656
2702
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
2657
2703
|
|
2658
2704
|
|
2705
|
+
|
2706
|
+
|
2707
|
+
<!-- for BSI (not PAS) display Notes before footnotes -->
|
2708
|
+
|
2709
|
+
|
2659
2710
|
<!-- except gb -->
|
2660
2711
|
|
2661
2712
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
@@ -2681,6 +2732,10 @@
|
|
2681
2732
|
<!-- fn processing -->
|
2682
2733
|
<xsl:call-template name="fn_display"/>
|
2683
2734
|
|
2735
|
+
|
2736
|
+
<!-- for PAS display Notes after footnotes -->
|
2737
|
+
|
2738
|
+
|
2684
2739
|
</fo:table-cell>
|
2685
2740
|
</fo:table-row>
|
2686
2741
|
</fo:table-body>
|
@@ -2722,6 +2777,19 @@
|
|
2722
2777
|
|
2723
2778
|
</fo:table-body>
|
2724
2779
|
|
2780
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
|
2781
|
+
<xsl:choose>
|
2782
|
+
<xsl:when test="substring-after(., '—') != ''">
|
2783
|
+
<xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
|
2784
|
+
</xsl:when>
|
2785
|
+
<xsl:otherwise>
|
2786
|
+
<xsl:value-of select="."/>
|
2787
|
+
</xsl:otherwise>
|
2788
|
+
</xsl:choose>
|
2789
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
|
2790
|
+
<xsl:apply-templates mode="presentation_name"/>
|
2791
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
|
2792
|
+
<xsl:apply-templates select="."/>
|
2725
2793
|
</xsl:template><xsl:template match="*[local-name()='tr']">
|
2726
2794
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
2727
2795
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
@@ -2734,13 +2802,16 @@
|
|
2734
2802
|
|
2735
2803
|
|
2736
2804
|
|
2737
|
-
|
2738
|
-
|
2739
|
-
|
2805
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
2806
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
2807
|
+
|
2808
|
+
|
2809
|
+
|
2740
2810
|
</xsl:if>
|
2741
2811
|
<xsl:if test="$parent-name = 'tfoot'">
|
2742
2812
|
|
2743
2813
|
|
2814
|
+
|
2744
2815
|
</xsl:if>
|
2745
2816
|
|
2746
2817
|
|
@@ -2762,6 +2833,8 @@
|
|
2762
2833
|
|
2763
2834
|
|
2764
2835
|
|
2836
|
+
|
2837
|
+
|
2765
2838
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
2766
2839
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
2767
2840
|
</xsl:if> -->
|
@@ -2886,11 +2959,16 @@
|
|
2886
2959
|
|
2887
2960
|
|
2888
2961
|
|
2962
|
+
|
2889
2963
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
2890
2964
|
|
2891
2965
|
|
2966
|
+
<!-- Table's note name (NOTE, for example) -->
|
2967
|
+
|
2892
2968
|
<fo:inline padding-right="2mm">
|
2893
2969
|
|
2970
|
+
|
2971
|
+
|
2894
2972
|
|
2895
2973
|
|
2896
2974
|
|
@@ -2898,6 +2976,8 @@
|
|
2898
2976
|
|
2899
2977
|
</fo:inline>
|
2900
2978
|
|
2979
|
+
|
2980
|
+
|
2901
2981
|
<xsl:apply-templates mode="process"/>
|
2902
2982
|
</fo:block>
|
2903
2983
|
|
@@ -2905,18 +2985,18 @@
|
|
2905
2985
|
<xsl:apply-templates/>
|
2906
2986
|
</xsl:template><xsl:template name="fn_display">
|
2907
2987
|
<xsl:variable name="references">
|
2988
|
+
|
2908
2989
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
2909
|
-
<
|
2910
|
-
|
2911
|
-
|
2912
|
-
<xsl:apply-templates/>
|
2913
|
-
</fn>
|
2990
|
+
<xsl:call-template name="create_fn"/>
|
2914
2991
|
</xsl:for-each>
|
2915
2992
|
</xsl:variable>
|
2993
|
+
|
2916
2994
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
2917
2995
|
<xsl:variable name="reference" select="@reference"/>
|
2918
2996
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
2919
2997
|
<fo:block margin-bottom="12pt">
|
2998
|
+
|
2999
|
+
|
2920
3000
|
|
2921
3001
|
|
2922
3002
|
|
@@ -2934,6 +3014,7 @@
|
|
2934
3014
|
<xsl:value-of select="@reference"/>
|
2935
3015
|
|
2936
3016
|
|
3017
|
+
|
2937
3018
|
</fo:inline>
|
2938
3019
|
<fo:inline>
|
2939
3020
|
|
@@ -2943,6 +3024,12 @@
|
|
2943
3024
|
</fo:block>
|
2944
3025
|
</xsl:if>
|
2945
3026
|
</xsl:for-each>
|
3027
|
+
</xsl:template><xsl:template name="create_fn">
|
3028
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
3029
|
+
|
3030
|
+
|
3031
|
+
<xsl:apply-templates/>
|
3032
|
+
</fn>
|
2946
3033
|
</xsl:template><xsl:template name="fn_name_display">
|
2947
3034
|
<!-- <xsl:variable name="references">
|
2948
3035
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
@@ -3087,6 +3174,7 @@
|
|
3087
3174
|
|
3088
3175
|
<xsl:value-of select="@reference"/>
|
3089
3176
|
|
3177
|
+
|
3090
3178
|
</fo:basic-link>
|
3091
3179
|
</fo:inline>
|
3092
3180
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -3937,16 +4025,68 @@
|
|
3937
4025
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3938
4026
|
</xsl:call-template>
|
3939
4027
|
|
4028
|
+
|
4029
|
+
|
3940
4030
|
<xsl:variable name="mathml">
|
3941
4031
|
<xsl:apply-templates select="." mode="mathml"/>
|
3942
4032
|
</xsl:variable>
|
3943
4033
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3944
4034
|
|
3945
4035
|
|
4036
|
+
<xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
|
4037
|
+
<xsl:variable name="comment_text_">
|
4038
|
+
<xsl:choose>
|
4039
|
+
<xsl:when test="normalize-space($comment_text_following) != ''">
|
4040
|
+
<xsl:value-of select="$comment_text_following"/>
|
4041
|
+
</xsl:when>
|
4042
|
+
<xsl:otherwise>
|
4043
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
4044
|
+
</xsl:otherwise>
|
4045
|
+
</xsl:choose>
|
4046
|
+
</xsl:variable>
|
4047
|
+
<xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
|
4048
|
+
|
4049
|
+
<xsl:if test="normalize-space($comment_text) != ''">
|
4050
|
+
<!-- put Mathin Alternate Text -->
|
4051
|
+
<xsl:attribute name="fox:alt-text">
|
4052
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
|
4053
|
+
</xsl:attribute>
|
4054
|
+
</xsl:if>
|
4055
|
+
|
4056
|
+
<xsl:variable name="mathml_content">
|
4057
|
+
<xsl:apply-templates select="." mode="mathml_actual_text"/>
|
4058
|
+
</xsl:variable>
|
4059
|
+
<!-- put MathML in Actual Text -->
|
4060
|
+
<xsl:attribute name="fox:actual-text">
|
4061
|
+
<xsl:value-of select="$mathml_content"/>
|
4062
|
+
</xsl:attribute>
|
4063
|
+
|
4064
|
+
|
3946
4065
|
<!-- <xsl:copy-of select="."/> -->
|
3947
4066
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3948
4067
|
</fo:instream-foreign-object>
|
3949
4068
|
</fo:inline>
|
4069
|
+
</xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
|
4070
|
+
<!-- <xsl:text>a+b</xsl:text> -->
|
4071
|
+
<xsl:text><</xsl:text>
|
4072
|
+
<xsl:value-of select="local-name()"/>
|
4073
|
+
<xsl:if test="local-name() = 'math'">
|
4074
|
+
<xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
|
4075
|
+
</xsl:if>
|
4076
|
+
<xsl:for-each select="@*">
|
4077
|
+
<xsl:text> </xsl:text>
|
4078
|
+
<xsl:value-of select="local-name()"/>
|
4079
|
+
<xsl:text>="</xsl:text>
|
4080
|
+
<xsl:value-of select="."/>
|
4081
|
+
<xsl:text>"</xsl:text>
|
4082
|
+
</xsl:for-each>
|
4083
|
+
<xsl:text>></xsl:text>
|
4084
|
+
<xsl:apply-templates mode="mathml_actual_text"/>
|
4085
|
+
<xsl:text></</xsl:text>
|
4086
|
+
<xsl:value-of select="local-name()"/>
|
4087
|
+
<xsl:text>></xsl:text>
|
4088
|
+
</xsl:template><xsl:template match="text()" mode="mathml_actual_text">
|
4089
|
+
<xsl:value-of select="normalize-space()"/>
|
3950
4090
|
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3951
4091
|
<xsl:copy>
|
3952
4092
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
@@ -3956,19 +4096,6 @@
|
|
3956
4096
|
<!-- replace start and end spaces to non-break space -->
|
3957
4097
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3958
4098
|
</xsl:copy>
|
3959
|
-
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
3960
|
-
<xsl:copy>
|
3961
|
-
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3962
|
-
</xsl:copy>
|
3963
|
-
<xsl:choose>
|
3964
|
-
<!-- if in msub, then don't add space -->
|
3965
|
-
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
3966
|
-
<!-- if next char in digit, don't add space -->
|
3967
|
-
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
3968
|
-
<xsl:otherwise>
|
3969
|
-
<mathml:mspace width="0.5ex"/>
|
3970
|
-
</xsl:otherwise>
|
3971
|
-
</xsl:choose>
|
3972
4099
|
</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">
|
3973
4100
|
<xsl:variable name="target">
|
3974
4101
|
<xsl:choose>
|
@@ -4027,7 +4154,10 @@
|
|
4027
4154
|
</fo:block>
|
4028
4155
|
<xsl:apply-templates/>
|
4029
4156
|
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
4030
|
-
<
|
4157
|
+
<xsl:variable name="level">
|
4158
|
+
<xsl:call-template name="getLevel"/>
|
4159
|
+
</xsl:variable>
|
4160
|
+
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
4031
4161
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
4032
4162
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
4033
4163
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -4062,9 +4192,10 @@
|
|
4062
4192
|
|
4063
4193
|
</xsl:variable>
|
4064
4194
|
|
4195
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
4065
4196
|
<xsl:choose>
|
4066
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
4067
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
4197
|
+
<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>
|
4198
|
+
<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>
|
4068
4199
|
</xsl:choose>
|
4069
4200
|
<xsl:apply-templates/>
|
4070
4201
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
@@ -4113,6 +4244,7 @@
|
|
4113
4244
|
</xsl:if>
|
4114
4245
|
|
4115
4246
|
|
4247
|
+
|
4116
4248
|
<fo:block-container margin-left="0mm">
|
4117
4249
|
|
4118
4250
|
|
@@ -4216,7 +4348,10 @@
|
|
4216
4348
|
</fo:block>
|
4217
4349
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
4218
4350
|
<xsl:if test="normalize-space() != ''">
|
4219
|
-
<
|
4351
|
+
<xsl:variable name="level">
|
4352
|
+
<xsl:call-template name="getLevelTermName"/>
|
4353
|
+
</xsl:variable>
|
4354
|
+
<fo:inline role="H{$level}">
|
4220
4355
|
<xsl:apply-templates/>
|
4221
4356
|
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
4222
4357
|
<xsl:text>.</xsl:text>
|
@@ -4298,7 +4433,24 @@
|
|
4298
4433
|
</fo:instream-foreign-object>
|
4299
4434
|
</xsl:when>
|
4300
4435
|
<xsl:otherwise>
|
4301
|
-
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"
|
4436
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
4437
|
+
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
4438
|
+
|
4439
|
+
<xsl:variable name="img_src">
|
4440
|
+
<xsl:choose>
|
4441
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
4442
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
4443
|
+
</xsl:choose>
|
4444
|
+
</xsl:variable>
|
4445
|
+
|
4446
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
|
4447
|
+
<xsl:if test="number($scale) < 100">
|
4448
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
4449
|
+
</xsl:if>
|
4450
|
+
|
4451
|
+
</xsl:if>
|
4452
|
+
|
4453
|
+
</fo:external-graphic>
|
4302
4454
|
</xsl:otherwise>
|
4303
4455
|
</xsl:choose>
|
4304
4456
|
|
@@ -4469,11 +4621,13 @@
|
|
4469
4621
|
<xsl:attribute name="width">100%</xsl:attribute>
|
4470
4622
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
4471
4623
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4624
|
+
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
4625
|
+
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
4472
4626
|
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
4473
4627
|
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
4474
4628
|
<!-- effective height / width = 1.48, 1.4 - with title -->
|
4475
|
-
<xsl:if test="
|
4476
|
-
<xsl:variable name="width" select="((
|
4629
|
+
<xsl:if test="$svg_height > ($svg_width * 1.4)"> <!-- for images with big height -->
|
4630
|
+
<xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
|
4477
4631
|
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
4478
4632
|
</xsl:if>
|
4479
4633
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -4490,6 +4644,23 @@
|
|
4490
4644
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
4491
4645
|
<xsl:value-of select="."/>
|
4492
4646
|
</xsl:attribute>
|
4647
|
+
</xsl:template><xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
4648
|
+
<xsl:copy>
|
4649
|
+
<xsl:apply-templates select="@*" mode="svg_update"/>
|
4650
|
+
<xsl:variable name="viewbox">
|
4651
|
+
<xsl:call-template name="split">
|
4652
|
+
<xsl:with-param name="pText" select="@viewBox"/>
|
4653
|
+
<xsl:with-param name="sep" select="' '"/>
|
4654
|
+
</xsl:call-template>
|
4655
|
+
</xsl:variable>
|
4656
|
+
<xsl:attribute name="width">
|
4657
|
+
<xsl:value-of select="round(xalan:nodeset($viewbox)//item[3])"/>
|
4658
|
+
</xsl:attribute>
|
4659
|
+
<xsl:attribute name="height">
|
4660
|
+
<xsl:value-of select="round(xalan:nodeset($viewbox)//item[4])"/>
|
4661
|
+
</xsl:attribute>
|
4662
|
+
<xsl:apply-templates mode="svg_update"/>
|
4663
|
+
</xsl:copy>
|
4493
4664
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
4494
4665
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
4495
4666
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4820,6 +4991,7 @@
|
|
4820
4991
|
</xsl:when>
|
4821
4992
|
<xsl:otherwise>
|
4822
4993
|
<xsl:apply-templates/>
|
4994
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
4823
4995
|
</xsl:otherwise>
|
4824
4996
|
</xsl:choose>
|
4825
4997
|
</fo:block>
|
@@ -4960,14 +5132,6 @@
|
|
4960
5132
|
<fo:block>
|
4961
5133
|
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
4962
5134
|
</fo:block>
|
4963
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4964
|
-
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
4965
|
-
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4966
|
-
</fo:block>
|
4967
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
4968
|
-
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
4969
|
-
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
4970
|
-
</fo:block>
|
4971
5135
|
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
4972
5136
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
4973
5137
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -4984,6 +5148,38 @@
|
|
4984
5148
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
4985
5149
|
<xsl:apply-templates/>
|
4986
5150
|
</fo:block>
|
5151
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
5152
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
5153
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
5154
|
+
</fo:block>
|
5155
|
+
</xsl:template><xsl:template match="*[local-name() = 'subject']">
|
5156
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
5157
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
5158
|
+
</fo:block>
|
5159
|
+
</xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
5160
|
+
<fo:block xsl:use-attribute-sets="inherit-style">
|
5161
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
5162
|
+
</fo:block>
|
5163
|
+
</xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
5164
|
+
<fo:block xsl:use-attribute-sets="description-style">
|
5165
|
+
<xsl:apply-templates/>
|
5166
|
+
</fo:block>
|
5167
|
+
</xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
5168
|
+
<fo:block xsl:use-attribute-sets="specification-style">
|
5169
|
+
<xsl:apply-templates/>
|
5170
|
+
</fo:block>
|
5171
|
+
</xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
5172
|
+
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
5173
|
+
<xsl:apply-templates/>
|
5174
|
+
</fo:block>
|
5175
|
+
</xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
5176
|
+
<fo:block xsl:use-attribute-sets="verification-style">
|
5177
|
+
<xsl:apply-templates/>
|
5178
|
+
</fo:block>
|
5179
|
+
</xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
5180
|
+
<fo:block xsl:use-attribute-sets="import-style">
|
5181
|
+
<xsl:apply-templates/>
|
5182
|
+
</fo:block>
|
4987
5183
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4988
5184
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
4989
5185
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -5135,7 +5331,19 @@
|
|
5135
5331
|
</fo:inline>
|
5136
5332
|
</xsl:if>
|
5137
5333
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
5138
|
-
<
|
5334
|
+
<xsl:variable name="element">inline
|
5335
|
+
|
5336
|
+
</xsl:variable>
|
5337
|
+
<xsl:choose>
|
5338
|
+
<xsl:when test="contains($element, 'block')">
|
5339
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
5340
|
+
<xsl:apply-templates/>
|
5341
|
+
</fo:block>
|
5342
|
+
</xsl:when>
|
5343
|
+
<xsl:otherwise>
|
5344
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5345
|
+
</xsl:otherwise>
|
5346
|
+
</xsl:choose>
|
5139
5347
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
5140
5348
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
5141
5349
|
|
@@ -5335,9 +5543,10 @@
|
|
5335
5543
|
|
5336
5544
|
|
5337
5545
|
</xsl:if>
|
5338
|
-
|
5546
|
+
|
5547
|
+
|
5548
|
+
|
5339
5549
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5340
|
-
|
5341
5550
|
<xsl:if test="normalize-space(@citeas) = ''">
|
5342
5551
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
5343
5552
|
</xsl:if>
|
@@ -5345,6 +5554,7 @@
|
|
5345
5554
|
|
5346
5555
|
|
5347
5556
|
|
5557
|
+
|
5348
5558
|
</xsl:if>
|
5349
5559
|
|
5350
5560
|
<xsl:apply-templates/>
|
@@ -5718,7 +5928,6 @@
|
|
5718
5928
|
</xsl:template><xsl:template name="processBibitem">
|
5719
5929
|
|
5720
5930
|
|
5721
|
-
<!-- end BIPM bibitem processing-->
|
5722
5931
|
|
5723
5932
|
|
5724
5933
|
|
@@ -5848,6 +6057,9 @@
|
|
5848
6057
|
<fo:block-container border="1pt solid black" width="50%">
|
5849
6058
|
<fo:block> </fo:block>
|
5850
6059
|
</fo:block-container>
|
6060
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
6061
|
+
<fo:inline padding-right="5mm"> </fo:inline>
|
6062
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5851
6063
|
</xsl:template><xsl:template name="convertDate">
|
5852
6064
|
<xsl:param name="date"/>
|
5853
6065
|
<xsl:param name="format" select="'short'"/>
|
@@ -6086,6 +6298,26 @@
|
|
6086
6298
|
<xsl:value-of select="$level"/>
|
6087
6299
|
</xsl:otherwise>
|
6088
6300
|
</xsl:choose>
|
6301
|
+
</xsl:template><xsl:template name="getLevelTermName">
|
6302
|
+
<xsl:choose>
|
6303
|
+
<xsl:when test="normalize-space(../@depth) != ''">
|
6304
|
+
<xsl:value-of select="../@depth"/>
|
6305
|
+
</xsl:when>
|
6306
|
+
<xsl:otherwise>
|
6307
|
+
<xsl:variable name="title_level_">
|
6308
|
+
<xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
|
6309
|
+
<xsl:call-template name="getLevel"/>
|
6310
|
+
</xsl:for-each>
|
6311
|
+
</xsl:variable>
|
6312
|
+
<xsl:variable name="title_level" select="normalize-space($title_level_)"/>
|
6313
|
+
<xsl:choose>
|
6314
|
+
<xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
|
6315
|
+
<xsl:otherwise>
|
6316
|
+
<xsl:call-template name="getLevel"/>
|
6317
|
+
</xsl:otherwise>
|
6318
|
+
</xsl:choose>
|
6319
|
+
</xsl:otherwise>
|
6320
|
+
</xsl:choose>
|
6089
6321
|
</xsl:template><xsl:template name="split">
|
6090
6322
|
<xsl:param name="pText" select="."/>
|
6091
6323
|
<xsl:param name="sep" select="','"/>
|
@@ -6183,20 +6415,40 @@
|
|
6183
6415
|
</xsl:call-template>
|
6184
6416
|
</xsl:if>
|
6185
6417
|
</xsl:template><xsl:template name="getLocalizedString">
|
6186
|
-
<xsl:param name="key"/>
|
6418
|
+
<xsl:param name="key"/>
|
6419
|
+
<xsl:param name="formatted">false</xsl:param>
|
6187
6420
|
|
6188
6421
|
<xsl:variable name="curr_lang">
|
6189
6422
|
<xsl:call-template name="getLang"/>
|
6190
6423
|
</xsl:variable>
|
6191
6424
|
|
6192
|
-
<xsl:variable name="data_value"
|
6425
|
+
<xsl:variable name="data_value">
|
6426
|
+
<xsl:choose>
|
6427
|
+
<xsl:when test="$formatted = 'true'">
|
6428
|
+
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
6429
|
+
</xsl:when>
|
6430
|
+
<xsl:otherwise>
|
6431
|
+
<xsl:value-of select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
6432
|
+
</xsl:otherwise>
|
6433
|
+
</xsl:choose>
|
6434
|
+
</xsl:variable>
|
6193
6435
|
|
6194
6436
|
<xsl:choose>
|
6195
|
-
<xsl:when test="$data_value != ''">
|
6196
|
-
<xsl:
|
6437
|
+
<xsl:when test="normalize-space($data_value) != ''">
|
6438
|
+
<xsl:choose>
|
6439
|
+
<xsl:when test="$formatted = 'true'"><xsl:copy-of select="$data_value"/></xsl:when>
|
6440
|
+
<xsl:otherwise><xsl:value-of select="$data_value"/></xsl:otherwise>
|
6441
|
+
</xsl:choose>
|
6197
6442
|
</xsl:when>
|
6198
6443
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
6199
|
-
<xsl:
|
6444
|
+
<xsl:choose>
|
6445
|
+
<xsl:when test="$formatted = 'true'">
|
6446
|
+
<xsl:apply-templates select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
6447
|
+
</xsl:when>
|
6448
|
+
<xsl:otherwise>
|
6449
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
6450
|
+
</xsl:otherwise>
|
6451
|
+
</xsl:choose>
|
6200
6452
|
</xsl:when>
|
6201
6453
|
<xsl:otherwise>
|
6202
6454
|
<xsl:variable name="key_">
|
@@ -6207,7 +6459,7 @@
|
|
6207
6459
|
<xsl:value-of select="$key_"/>
|
6208
6460
|
</xsl:otherwise>
|
6209
6461
|
</xsl:choose>
|
6210
|
-
|
6462
|
+
|
6211
6463
|
</xsl:template><xsl:template name="setTrackChangesStyles">
|
6212
6464
|
<xsl:param name="isAdded"/>
|
6213
6465
|
<xsl:param name="isDeleted"/>
|
@@ -6258,4 +6510,100 @@
|
|
6258
6510
|
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
6259
6511
|
</xsl:choose>
|
6260
6512
|
</xsl:attribute>
|
6513
|
+
</xsl:template><xsl:template name="number-to-words">
|
6514
|
+
<xsl:param name="number"/>
|
6515
|
+
<xsl:param name="first"/>
|
6516
|
+
<xsl:if test="$number != ''">
|
6517
|
+
<xsl:variable name="words">
|
6518
|
+
<words>
|
6519
|
+
<word cardinal="1">One-</word>
|
6520
|
+
<word ordinal="1">First </word>
|
6521
|
+
<word cardinal="2">Two-</word>
|
6522
|
+
<word ordinal="2">Second </word>
|
6523
|
+
<word cardinal="3">Three-</word>
|
6524
|
+
<word ordinal="3">Third </word>
|
6525
|
+
<word cardinal="4">Four-</word>
|
6526
|
+
<word ordinal="4">Fourth </word>
|
6527
|
+
<word cardinal="5">Five-</word>
|
6528
|
+
<word ordinal="5">Fifth </word>
|
6529
|
+
<word cardinal="6">Six-</word>
|
6530
|
+
<word ordinal="6">Sixth </word>
|
6531
|
+
<word cardinal="7">Seven-</word>
|
6532
|
+
<word ordinal="7">Seventh </word>
|
6533
|
+
<word cardinal="8">Eight-</word>
|
6534
|
+
<word ordinal="8">Eighth </word>
|
6535
|
+
<word cardinal="9">Nine-</word>
|
6536
|
+
<word ordinal="9">Ninth </word>
|
6537
|
+
<word ordinal="10">Tenth </word>
|
6538
|
+
<word ordinal="11">Eleventh </word>
|
6539
|
+
<word ordinal="12">Twelfth </word>
|
6540
|
+
<word ordinal="13">Thirteenth </word>
|
6541
|
+
<word ordinal="14">Fourteenth </word>
|
6542
|
+
<word ordinal="15">Fifteenth </word>
|
6543
|
+
<word ordinal="16">Sixteenth </word>
|
6544
|
+
<word ordinal="17">Seventeenth </word>
|
6545
|
+
<word ordinal="18">Eighteenth </word>
|
6546
|
+
<word ordinal="19">Nineteenth </word>
|
6547
|
+
<word cardinal="20">Twenty-</word>
|
6548
|
+
<word ordinal="20">Twentieth </word>
|
6549
|
+
<word cardinal="30">Thirty-</word>
|
6550
|
+
<word ordinal="30">Thirtieth </word>
|
6551
|
+
<word cardinal="40">Forty-</word>
|
6552
|
+
<word ordinal="40">Fortieth </word>
|
6553
|
+
<word cardinal="50">Fifty-</word>
|
6554
|
+
<word ordinal="50">Fiftieth </word>
|
6555
|
+
<word cardinal="60">Sixty-</word>
|
6556
|
+
<word ordinal="60">Sixtieth </word>
|
6557
|
+
<word cardinal="70">Seventy-</word>
|
6558
|
+
<word ordinal="70">Seventieth </word>
|
6559
|
+
<word cardinal="80">Eighty-</word>
|
6560
|
+
<word ordinal="80">Eightieth </word>
|
6561
|
+
<word cardinal="90">Ninety-</word>
|
6562
|
+
<word ordinal="90">Ninetieth </word>
|
6563
|
+
<word cardinal="100">Hundred-</word>
|
6564
|
+
<word ordinal="100">Hundredth </word>
|
6565
|
+
</words>
|
6566
|
+
</xsl:variable>
|
6567
|
+
|
6568
|
+
<xsl:variable name="ordinal" select="xalan:nodeset($words)//word[@ordinal = $number]/text()"/>
|
6569
|
+
|
6570
|
+
<xsl:variable name="value">
|
6571
|
+
<xsl:choose>
|
6572
|
+
<xsl:when test="$ordinal != ''">
|
6573
|
+
<xsl:value-of select="$ordinal"/>
|
6574
|
+
</xsl:when>
|
6575
|
+
<xsl:otherwise>
|
6576
|
+
<xsl:choose>
|
6577
|
+
<xsl:when test="$number < 100">
|
6578
|
+
<xsl:variable name="decade" select="concat(substring($number,1,1), '0')"/>
|
6579
|
+
<xsl:variable name="digit" select="substring($number,2)"/>
|
6580
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $decade]/text()"/>
|
6581
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@ordinal = $digit]/text()"/>
|
6582
|
+
</xsl:when>
|
6583
|
+
<xsl:otherwise>
|
6584
|
+
<!-- more 100 -->
|
6585
|
+
<xsl:variable name="hundred" select="substring($number,1,1)"/>
|
6586
|
+
<xsl:variable name="digits" select="number(substring($number,2))"/>
|
6587
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $hundred]/text()"/>
|
6588
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = '100']/text()"/>
|
6589
|
+
<xsl:call-template name="number-to-words">
|
6590
|
+
<xsl:with-param name="number" select="$digits"/>
|
6591
|
+
</xsl:call-template>
|
6592
|
+
</xsl:otherwise>
|
6593
|
+
</xsl:choose>
|
6594
|
+
</xsl:otherwise>
|
6595
|
+
</xsl:choose>
|
6596
|
+
</xsl:variable>
|
6597
|
+
<xsl:choose>
|
6598
|
+
<xsl:when test="$first = 'true'">
|
6599
|
+
<xsl:variable name="value_lc" select="java:toLowerCase(java:java.lang.String.new($value))"/>
|
6600
|
+
<xsl:call-template name="capitalize">
|
6601
|
+
<xsl:with-param name="str" select="$value_lc"/>
|
6602
|
+
</xsl:call-template>
|
6603
|
+
</xsl:when>
|
6604
|
+
<xsl:otherwise>
|
6605
|
+
<xsl:value-of select="$value"/>
|
6606
|
+
</xsl:otherwise>
|
6607
|
+
</xsl:choose>
|
6608
|
+
</xsl:if>
|
6261
6609
|
</xsl:template></xsl:stylesheet>
|