metanorma-ribose 1.7.7 → 1.7.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46f41ce9bfaae21b543ffc76f6383e750c0d43844578ae4957b05ba76de8ff20
4
- data.tar.gz: 974038aac8c2f67fd18842ff899c37ce667472dffc2c677cc8228fcabbe4ed1f
3
+ metadata.gz: 4423a7c71b556c5e8e1c55a7138d2ec726ce5cadf651399257673babd16c1028
4
+ data.tar.gz: 7ac8f96d06b7ab01133b964717a2adfc510c8b1244e269caffdd56877384652f
5
5
  SHA512:
6
- metadata.gz: 75a51cc6ac0b55c7fadd09ef7d708b0fb918eb34383621c7567d601668168648b258659b73ac89b526f2a1d8b38a8c12d3c360c3ad8ee41a11fe1b1bcdaa05a5
7
- data.tar.gz: 783720abf5092a4b2a423958fe8c2bc1744cf54a1390546b5b662d65e67f9e8e2ab9a6d1ab5170792d0ae52da32de8e6f856aae38f1f3f541784e1121a048a2a
6
+ metadata.gz: ea7bebb996a4954622ee386c1d0a597475f7cfc3740bbfea9d9751a9d543cbe7b00fbc56b99c533aea12c9102721148583813b34d7088c5cb2005cd03694fd0a
7
+ data.tar.gz: 172b38f36ae63cd1de5d4555ae1c4dd9ead53f0ae522976e392f79d6c4594fc22ef1645f70df71b228297005ec2bf7e6f7f637de5bf1202dec2dee808ecd24d6
@@ -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
- <attribute name="type">
162
- <choice>
163
- <value>roman</value>
164
- <value>alphabet</value>
165
- <value>arabic</value>
166
- <value>roman_upper</value>
167
- <value>alphabet_upper</value>
168
- </choice>
169
- </attribute>
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>
@@ -976,6 +990,16 @@
976
990
  <data type="boolean"/>
977
991
  </attribute>
978
992
  </optional>
993
+ <optional>
994
+ <attribute name="linkmention">
995
+ <data type="boolean"/>
996
+ </attribute>
997
+ </optional>
998
+ <optional>
999
+ <attribute name="linkref">
1000
+ <data type="boolean"/>
1001
+ </attribute>
1002
+ </optional>
979
1003
  <optional>
980
1004
  <element name="refterm">
981
1005
  <zeroOrMore>
@@ -1011,8 +1035,14 @@
1011
1035
  <ref name="imagemap"/>
1012
1036
  <ref name="svgmap"/>
1013
1037
  <ref name="inputform"/>
1038
+ <ref name="toc"/>
1014
1039
  </choice>
1015
1040
  </define>
1041
+ <define name="toc">
1042
+ <element name="toc">
1043
+ <ref name="ul"/>
1044
+ </element>
1045
+ </define>
1016
1046
  <define name="inputform">
1017
1047
  <element name="form">
1018
1048
  <attribute name="id">
@@ -1254,6 +1284,12 @@
1254
1284
  <optional>
1255
1285
  <attribute name="type"/>
1256
1286
  </optional>
1287
+ <optional>
1288
+ <attribute name="identifier"/>
1289
+ </optional>
1290
+ <optional>
1291
+ <attribute name="prefix"/>
1292
+ </optional>
1257
1293
  <text/>
1258
1294
  </define>
1259
1295
  <define name="ics">
@@ -1674,7 +1710,9 @@
1674
1710
  <zeroOrMore>
1675
1711
  <ref name="termgrammar"/>
1676
1712
  </zeroOrMore>
1677
- <ref name="definition"/>
1713
+ <oneOrMore>
1714
+ <ref name="termdefinition"/>
1715
+ </oneOrMore>
1678
1716
  <zeroOrMore>
1679
1717
  <ref name="termnote"/>
1680
1718
  </zeroOrMore>
@@ -1737,7 +1775,7 @@
1737
1775
  </oneOrMore>
1738
1776
  </element>
1739
1777
  </define>
1740
- <define name="definition">
1778
+ <define name="termdefinition">
1741
1779
  <element name="definition">
1742
1780
  <oneOrMore>
1743
1781
  <choice>
@@ -1746,6 +1784,9 @@
1746
1784
  <ref name="formula"/>
1747
1785
  </choice>
1748
1786
  </oneOrMore>
1787
+ <zeroOrMore>
1788
+ <ref name="termsource"/>
1789
+ </zeroOrMore>
1749
1790
  </element>
1750
1791
  </define>
1751
1792
  <define name="termnote">
@@ -64,9 +64,9 @@
64
64
  <optional>
65
65
  <ref name="label"/>
66
66
  </optional>
67
- <optional>
67
+ <zeroOrMore>
68
68
  <ref name="subject"/>
69
- </optional>
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
- <text/>
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
- <text/>
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>
@@ -628,6 +628,12 @@ ul > li p:first-child {
628
628
  ul > li:first-child {
629
629
  margin-top: 1em; }
630
630
 
631
+ ul ul > li:first-child {
632
+ margin-top: 0; }
633
+
634
+ ol ul > li:first-child {
635
+ margin-top: 0; }
636
+
631
637
  #toc-list ul {
632
638
  margin-bottom: 0.25em; }
633
639
 
@@ -297,6 +297,13 @@ ul>li:first-child {
297
297
  margin-top: 1em;
298
298
  }
299
299
 
300
+ ul ul > li:first-child {
301
+ margin-top: 0;
302
+ }
303
+ ol ul > li:first-child {
304
+ margin-top: 0;
305
+ }
306
+
300
307
  #toc-list ul {
301
308
  margin-bottom: 0.25em;
302
309
  }
@@ -397,7 +397,7 @@
397
397
  <xsl:if test="string-length($title) &gt; 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
- <!-- <fo:block-container absolute-position="fixed" left="13mm" top="15mm"> -->
417
- <fo:block font-size="27pt" font-weight="bold" color="black" margin-left="-15mm" margin-bottom="13mm">
418
- <xsl:call-template name="getLocalizedString">
419
- <xsl:with-param name="key">table_of_contents</xsl:with-param>
420
- </xsl:call-template>
421
- </fo:block>
422
- <!-- </fo:block-container> -->
423
-
424
- <fo:block-container margin-left="32mm" margin-right="-17mm">
425
- <fo:block-container margin-left="0mm" margin-right="0mm">
426
- <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
427
- <fo:block font-size="13pt">
428
- <xsl:if test="@level = 1">
429
- <xsl:if test="preceding-sibling::item[@display = 'true' and @level = 1]">
430
- <xsl:attribute name="space-before">16pt</xsl:attribute>
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:attribute name="space-after">4pt</xsl:attribute>
433
- <xsl:attribute name="font-weight">bold</xsl:attribute>
434
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
435
- <xsl:attribute name="color">black</xsl:attribute>
436
- </xsl:if>
437
- <xsl:if test="@level = 2">
438
- <xsl:attribute name="margin-left">16.5mm</xsl:attribute>
439
- <xsl:attribute name="space-before">4pt</xsl:attribute>
440
- <xsl:attribute name="space-after">5pt</xsl:attribute>
441
- </xsl:if>
442
- <fo:block text-align-last="justify">
443
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
444
- <xsl:value-of select="@section"/>
445
- <xsl:text> </xsl:text>
446
- <xsl:apply-templates select="title"/>
447
- <xsl:text>  </xsl:text>
448
- <fo:inline>
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
- </fo:block>
455
- </xsl:for-each>
456
+ </xsl:for-each>
457
+ </fo:block-container>
456
458
  </fo:block-container>
457
- </fo:block-container>
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
- <fo:block text-align="center" font-weight="normal" margin-top="4pt">
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
- <fo:block font-weight="normal" text-align="center">
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
- <fo:block font-weight="normal" padding-top="2mm" margin-bottom="6pt">
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
- <fo:block font-weight="bold" color="black" font-size="{$font-size}" keep-with-next="always"> <!-- 600 - semibold -->
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="requirement-subject-style">
1668
- </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
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:attribute-set name="table-name-style">
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>&#xA0;</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
- <xsl:for-each select="ancestor::*[local-name()='table'][1]">
2511
- <xsl:call-template name="fn_name_display"/>
2512
- </xsl:for-each>
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:if test="$isNoteOrFnExist = 'true'">
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']">
@@ -2658,6 +2703,7 @@
2658
2703
 
2659
2704
 
2660
2705
 
2706
+
2661
2707
  <!-- for BSI (not PAS) display Notes before footnotes -->
2662
2708
 
2663
2709
 
@@ -2731,6 +2777,19 @@
2731
2777
 
2732
2778
  </fo:table-body>
2733
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="."/>
2734
2793
  </xsl:template><xsl:template match="*[local-name()='tr']">
2735
2794
  <xsl:variable name="parent-name" select="local-name(..)"/>
2736
2795
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
@@ -2743,9 +2802,11 @@
2743
2802
 
2744
2803
 
2745
2804
 
2746
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2747
- <xsl:attribute name="color">black</xsl:attribute>
2748
-
2805
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2806
+ <xsl:attribute name="color">black</xsl:attribute>
2807
+
2808
+
2809
+
2749
2810
  </xsl:if>
2750
2811
  <xsl:if test="$parent-name = 'tfoot'">
2751
2812
 
@@ -2772,6 +2833,8 @@
2772
2833
 
2773
2834
 
2774
2835
 
2836
+
2837
+
2775
2838
  <!-- <xsl:if test="$namespace = 'bipm'">
2776
2839
  <xsl:attribute name="height">8mm</xsl:attribute>
2777
2840
  </xsl:if> -->
@@ -2922,14 +2985,12 @@
2922
2985
  <xsl:apply-templates/>
2923
2986
  </xsl:template><xsl:template name="fn_display">
2924
2987
  <xsl:variable name="references">
2988
+
2925
2989
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
2926
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2927
-
2928
-
2929
- <xsl:apply-templates/>
2930
- </fn>
2990
+ <xsl:call-template name="create_fn"/>
2931
2991
  </xsl:for-each>
2932
2992
  </xsl:variable>
2993
+
2933
2994
  <xsl:for-each select="xalan:nodeset($references)//fn">
2934
2995
  <xsl:variable name="reference" select="@reference"/>
2935
2996
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
@@ -2963,6 +3024,12 @@
2963
3024
  </fo:block>
2964
3025
  </xsl:if>
2965
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>
2966
3033
  </xsl:template><xsl:template name="fn_name_display">
2967
3034
  <!-- <xsl:variable name="references">
2968
3035
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
@@ -3958,16 +4025,68 @@
3958
4025
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3959
4026
  </xsl:call-template>
3960
4027
 
4028
+
4029
+
3961
4030
  <xsl:variable name="mathml">
3962
4031
  <xsl:apply-templates select="." mode="mathml"/>
3963
4032
  </xsl:variable>
3964
4033
  <fo:instream-foreign-object fox:alt-text="Math">
3965
4034
 
3966
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
+
3967
4065
  <!-- <xsl:copy-of select="."/> -->
3968
4066
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
3969
4067
  </fo:instream-foreign-object>
3970
4068
  </fo:inline>
4069
+ </xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
4070
+ <!-- <xsl:text>a+b</xsl:text> -->
4071
+ <xsl:text>&lt;</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>&gt;</xsl:text>
4084
+ <xsl:apply-templates mode="mathml_actual_text"/>
4085
+ <xsl:text>&lt;/</xsl:text>
4086
+ <xsl:value-of select="local-name()"/>
4087
+ <xsl:text>&gt;</xsl:text>
4088
+ </xsl:template><xsl:template match="text()" mode="mathml_actual_text">
4089
+ <xsl:value-of select="normalize-space()"/>
3971
4090
  </xsl:template><xsl:template match="@*|node()" mode="mathml">
3972
4091
  <xsl:copy>
3973
4092
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
@@ -3977,19 +4096,6 @@
3977
4096
  <!-- replace start and end spaces to non-break space -->
3978
4097
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
3979
4098
  </xsl:copy>
3980
- </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
3981
- <xsl:copy>
3982
- <xsl:apply-templates select="@*|node()" mode="mathml"/>
3983
- </xsl:copy>
3984
- <xsl:choose>
3985
- <!-- if in msub, then don't add space -->
3986
- <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
3987
- <!-- if next char in digit, don't add space -->
3988
- <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
3989
- <xsl:otherwise>
3990
- <mathml:mspace width="0.5ex"/>
3991
- </xsl:otherwise>
3992
- </xsl:choose>
3993
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">
3994
4100
  <xsl:variable name="target">
3995
4101
  <xsl:choose>
@@ -4048,7 +4154,10 @@
4048
4154
  </fo:block>
4049
4155
  <xsl:apply-templates/>
4050
4156
  </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
4051
- <fo:inline><xsl:apply-templates/></fo:inline>
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>
4052
4161
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
4053
4162
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
4054
4163
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -4083,9 +4192,10 @@
4083
4192
 
4084
4193
  </xsl:variable>
4085
4194
 
4195
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
4086
4196
  <xsl:choose>
4087
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
4088
- <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>
4089
4199
  </xsl:choose>
4090
4200
  <xsl:apply-templates/>
4091
4201
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
@@ -4238,7 +4348,10 @@
4238
4348
  </fo:block>
4239
4349
  </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
4240
4350
  <xsl:if test="normalize-space() != ''">
4241
- <fo:inline>
4351
+ <xsl:variable name="level">
4352
+ <xsl:call-template name="getLevelTermName"/>
4353
+ </xsl:variable>
4354
+ <fo:inline role="H{$level}">
4242
4355
  <xsl:apply-templates/>
4243
4356
  <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
4244
4357
  <xsl:text>.</xsl:text>
@@ -4320,7 +4433,24 @@
4320
4433
  </fo:instream-foreign-object>
4321
4434
  </xsl:when>
4322
4435
  <xsl:otherwise>
4323
- <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) &lt; 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>
4324
4454
  </xsl:otherwise>
4325
4455
  </xsl:choose>
4326
4456
 
@@ -4491,11 +4621,13 @@
4491
4621
  <xsl:attribute name="width">100%</xsl:attribute>
4492
4622
  <xsl:attribute name="content-height">100%</xsl:attribute>
4493
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"/>
4494
4626
  <!-- effective height 297 - 27.4 - 13 = 256.6 -->
4495
4627
  <!-- effective width 210 - 12.5 - 25 = 172.5 -->
4496
4628
  <!-- effective height / width = 1.48, 1.4 - with title -->
4497
- <xsl:if test="@height &gt; (@width * 1.4)"> <!-- for images with big height -->
4498
- <xsl:variable name="width" select="((@width * 1.4) div @height) * 100"/>
4629
+ <xsl:if test="$svg_height &gt; ($svg_width * 1.4)"> <!-- for images with big height -->
4630
+ <xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
4499
4631
  <xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
4500
4632
  </xsl:if>
4501
4633
  <xsl:attribute name="scaling">uniform</xsl:attribute>
@@ -4512,6 +4644,23 @@
4512
4644
  <xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
4513
4645
  <xsl:value-of select="."/>
4514
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>
4515
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">
4516
4665
  <xsl:variable name="svg_content" select="document(@src)"/>
4517
4666
  <xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
@@ -4842,6 +4991,7 @@
4842
4991
  </xsl:when>
4843
4992
  <xsl:otherwise>
4844
4993
  <xsl:apply-templates/>
4994
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
4845
4995
  </xsl:otherwise>
4846
4996
  </xsl:choose>
4847
4997
  </fo:block>
@@ -4982,14 +5132,6 @@
4982
5132
  <fo:block>
4983
5133
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
4984
5134
  </fo:block>
4985
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
4986
- <fo:block xsl:use-attribute-sets="requirement-subject-style">
4987
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4988
- </fo:block>
4989
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
4990
- <fo:block xsl:use-attribute-sets="requirement-inherit-style">
4991
- <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
4992
- </fo:block>
4993
5135
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
4994
5136
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
4995
5137
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -5006,6 +5148,38 @@
5006
5148
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
5007
5149
  <xsl:apply-templates/>
5008
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>
5009
5183
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
5010
5184
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
5011
5185
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
@@ -5157,7 +5331,19 @@
5157
5331
  </fo:inline>
5158
5332
  </xsl:if>
5159
5333
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
5160
- <fo:inline><xsl:apply-templates/></fo:inline>
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>
5161
5347
  </xsl:template><xsl:template match="*[local-name() = 'example']">
5162
5348
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
5163
5349
 
@@ -5703,6 +5889,7 @@
5703
5889
  </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
5704
5890
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
5705
5891
  <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
5892
+
5706
5893
  <xsl:apply-templates/>
5707
5894
  </fo:block>
5708
5895
  </xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
@@ -5742,7 +5929,6 @@
5742
5929
  </xsl:template><xsl:template name="processBibitem">
5743
5930
 
5744
5931
 
5745
- <!-- end BIPM bibitem processing-->
5746
5932
 
5747
5933
 
5748
5934
 
@@ -5872,6 +6058,9 @@
5872
6058
  <fo:block-container border="1pt solid black" width="50%">
5873
6059
  <fo:block> </fo:block>
5874
6060
  </fo:block-container>
6061
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
6062
+ <fo:inline padding-right="5mm"> </fo:inline>
6063
+ <fo:inline><xsl:apply-templates/></fo:inline>
5875
6064
  </xsl:template><xsl:template name="convertDate">
5876
6065
  <xsl:param name="date"/>
5877
6066
  <xsl:param name="format" select="'short'"/>
@@ -6110,6 +6299,26 @@
6110
6299
  <xsl:value-of select="$level"/>
6111
6300
  </xsl:otherwise>
6112
6301
  </xsl:choose>
6302
+ </xsl:template><xsl:template name="getLevelTermName">
6303
+ <xsl:choose>
6304
+ <xsl:when test="normalize-space(../@depth) != ''">
6305
+ <xsl:value-of select="../@depth"/>
6306
+ </xsl:when>
6307
+ <xsl:otherwise>
6308
+ <xsl:variable name="title_level_">
6309
+ <xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
6310
+ <xsl:call-template name="getLevel"/>
6311
+ </xsl:for-each>
6312
+ </xsl:variable>
6313
+ <xsl:variable name="title_level" select="normalize-space($title_level_)"/>
6314
+ <xsl:choose>
6315
+ <xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
6316
+ <xsl:otherwise>
6317
+ <xsl:call-template name="getLevel"/>
6318
+ </xsl:otherwise>
6319
+ </xsl:choose>
6320
+ </xsl:otherwise>
6321
+ </xsl:choose>
6113
6322
  </xsl:template><xsl:template name="split">
6114
6323
  <xsl:param name="pText" select="."/>
6115
6324
  <xsl:param name="sep" select="','"/>
@@ -6207,20 +6416,40 @@
6207
6416
  </xsl:call-template>
6208
6417
  </xsl:if>
6209
6418
  </xsl:template><xsl:template name="getLocalizedString">
6210
- <xsl:param name="key"/>
6419
+ <xsl:param name="key"/>
6420
+ <xsl:param name="formatted">false</xsl:param>
6211
6421
 
6212
6422
  <xsl:variable name="curr_lang">
6213
6423
  <xsl:call-template name="getLang"/>
6214
6424
  </xsl:variable>
6215
6425
 
6216
- <xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
6426
+ <xsl:variable name="data_value">
6427
+ <xsl:choose>
6428
+ <xsl:when test="$formatted = 'true'">
6429
+ <xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
6430
+ </xsl:when>
6431
+ <xsl:otherwise>
6432
+ <xsl:value-of select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
6433
+ </xsl:otherwise>
6434
+ </xsl:choose>
6435
+ </xsl:variable>
6217
6436
 
6218
6437
  <xsl:choose>
6219
- <xsl:when test="$data_value != ''">
6220
- <xsl:value-of select="$data_value"/>
6438
+ <xsl:when test="normalize-space($data_value) != ''">
6439
+ <xsl:choose>
6440
+ <xsl:when test="$formatted = 'true'"><xsl:copy-of select="$data_value"/></xsl:when>
6441
+ <xsl:otherwise><xsl:value-of select="$data_value"/></xsl:otherwise>
6442
+ </xsl:choose>
6221
6443
  </xsl:when>
6222
6444
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
6223
- <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
6445
+ <xsl:choose>
6446
+ <xsl:when test="$formatted = 'true'">
6447
+ <xsl:apply-templates select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
6448
+ </xsl:when>
6449
+ <xsl:otherwise>
6450
+ <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
6451
+ </xsl:otherwise>
6452
+ </xsl:choose>
6224
6453
  </xsl:when>
6225
6454
  <xsl:otherwise>
6226
6455
  <xsl:variable name="key_">
@@ -6231,7 +6460,7 @@
6231
6460
  <xsl:value-of select="$key_"/>
6232
6461
  </xsl:otherwise>
6233
6462
  </xsl:choose>
6234
-
6463
+
6235
6464
  </xsl:template><xsl:template name="setTrackChangesStyles">
6236
6465
  <xsl:param name="isAdded"/>
6237
6466
  <xsl:param name="isDeleted"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "1.7.7".freeze
3
+ VERSION = "1.7.11".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ribose
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.7
4
+ version: 1.7.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-19 00:00:00.000000000 Z
11
+ date: 2021-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic