metanorma-ribose 1.7.8 → 1.7.12

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: 13c502cc2b485ec326c7754ec74c5b027b7784b1e4b93bc5fd57c8fab7149bc5
4
- data.tar.gz: c91633207ba8b86bea110f065170429a4ecb5b68a6772980b555938de961e028
3
+ metadata.gz: 9e0b6229851d20c86d189c1df2d6441f87934af1f07414d4be2faddb5ca27a3a
4
+ data.tar.gz: 4da9b81ce4236372255702f0d4faf45aff59a61d8d09a260bd36ee4aacc5c142
5
5
  SHA512:
6
- metadata.gz: 05e28341855a1f67a318dd4695c55e35e1de9722c64c6d65a7a80b6fe54f2cca44228ba4463d30d6f6667e7e1baaa701da0c185ae08d04b8e356092155221f85
7
- data.tar.gz: 928d5362fa061f59ce0c0f2eaaa51fc7c3bb26c0f4335f10649139260943a46c83be7a65b78d999d99935c3c98406f4deca7d184f74e52a92e91e5813552fcdd
6
+ metadata.gz: 3159d509a3311d6f0fcb3e408519aa38fc1825694b3c4e867965ee8ef64a7040357d1f0c895b615aa04f14be0a257333ee5389d0082604c91cd550c4e7cbb115
7
+ data.tar.gz: a199158310f45541c93c37b297253dfabbfae1e71663d2de664b62f6bc30534acffc9533fe4e5b0d23c0319920fb2db539392500c2c0f45f88dd7a2de321b19c
@@ -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>
@@ -1012,6 +1036,7 @@
1012
1036
  <ref name="svgmap"/>
1013
1037
  <ref name="inputform"/>
1014
1038
  <ref name="toc"/>
1039
+ <ref name="passthrough"/>
1015
1040
  </choice>
1016
1041
  </define>
1017
1042
  <define name="toc">
@@ -1019,6 +1044,14 @@
1019
1044
  <ref name="ul"/>
1020
1045
  </element>
1021
1046
  </define>
1047
+ <define name="passthrough">
1048
+ <element name="passthrough">
1049
+ <optional>
1050
+ <attribute name="formats"/>
1051
+ </optional>
1052
+ <text/>
1053
+ </element>
1054
+ </define>
1022
1055
  <define name="inputform">
1023
1056
  <element name="form">
1024
1057
  <attribute name="id">
@@ -1686,7 +1719,9 @@
1686
1719
  <zeroOrMore>
1687
1720
  <ref name="termgrammar"/>
1688
1721
  </zeroOrMore>
1689
- <ref name="definition"/>
1722
+ <oneOrMore>
1723
+ <ref name="termdefinition"/>
1724
+ </oneOrMore>
1690
1725
  <zeroOrMore>
1691
1726
  <ref name="termnote"/>
1692
1727
  </zeroOrMore>
@@ -1749,7 +1784,7 @@
1749
1784
  </oneOrMore>
1750
1785
  </element>
1751
1786
  </define>
1752
- <define name="definition">
1787
+ <define name="termdefinition">
1753
1788
  <element name="definition">
1754
1789
  <oneOrMore>
1755
1790
  <choice>
@@ -1758,6 +1793,9 @@
1758
1793
  <ref name="formula"/>
1759
1794
  </choice>
1760
1795
  </oneOrMore>
1796
+ <zeroOrMore>
1797
+ <ref name="termsource"/>
1798
+ </zeroOrMore>
1761
1799
  </element>
1762
1800
  </define>
1763
1801
  <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
 
@@ -1888,7 +1911,8 @@
1888
1911
  <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1889
1912
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1890
1913
 
1891
- </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>
1892
1916
 
1893
1917
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1894
1918
  <xsl:attribute name="margin-left">13mm</xsl:attribute>
@@ -2040,13 +2064,20 @@
2040
2064
 
2041
2065
  </xsl:attribute-set><xsl:attribute-set name="list-style">
2042
2066
 
2043
- </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
2067
+ </xsl:attribute-set><xsl:attribute-set name="toc-style">
2068
+ <xsl:attribute name="line-height">135%</xsl:attribute>
2069
+ </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
2044
2070
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2045
2071
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
2046
2072
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
2047
2073
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
2048
2074
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
2049
- </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2075
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
2076
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
2077
+ <xsl:sort select="@displayorder" data-type="number"/>
2078
+ <xsl:apply-templates select="." mode="contents"/>
2079
+ </xsl:for-each>
2080
+ </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
2050
2081
  <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
2051
2082
 
2052
2083
  <!-- Normative references -->
@@ -2059,13 +2090,33 @@
2059
2090
  <!-- Bibliography -->
2060
2091
  <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
2061
2092
 
2062
- </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2093
+ </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2094
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2095
+ <xsl:sort select="@displayorder" data-type="number"/>
2096
+ <xsl:apply-templates select="." mode="contents"/>
2097
+ </xsl:for-each>
2098
+
2099
+ <xsl:for-each select="/*/*[local-name()='annex']">
2100
+ <xsl:sort select="@displayorder" data-type="number"/>
2101
+ <xsl:apply-templates select="." mode="contents"/>
2102
+ </xsl:for-each>
2103
+
2104
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2105
+ <xsl:sort select="@displayorder" data-type="number"/>
2106
+ <xsl:apply-templates select="." mode="contents"/>
2107
+ </xsl:for-each>
2108
+ </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
2063
2109
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
2064
2110
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
2065
2111
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
2066
2112
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
2067
2113
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
2068
- </xsl:template><xsl:template name="processMainSectionsDefault">
2114
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2115
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
2116
+ <xsl:sort select="@displayorder" data-type="number"/>
2117
+ <xsl:apply-templates select="."/>
2118
+ </xsl:for-each>
2119
+ </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
2069
2120
  <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
2070
2121
 
2071
2122
  <!-- Normative references -->
@@ -2077,6 +2128,22 @@
2077
2128
  <xsl:apply-templates select="/*/*[local-name()='annex']"/>
2078
2129
  <!-- Bibliography -->
2079
2130
  <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
2131
+ </xsl:template><xsl:template name="processMainSectionsDefault">
2132
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2133
+ <xsl:sort select="@displayorder" data-type="number"/>
2134
+ <xsl:apply-templates select="."/>
2135
+
2136
+ </xsl:for-each>
2137
+
2138
+ <xsl:for-each select="/*/*[local-name()='annex']">
2139
+ <xsl:sort select="@displayorder" data-type="number"/>
2140
+ <xsl:apply-templates select="."/>
2141
+ </xsl:for-each>
2142
+
2143
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
2144
+ <xsl:sort select="@displayorder" data-type="number"/>
2145
+ <xsl:apply-templates select="."/>
2146
+ </xsl:for-each>
2080
2147
  </xsl:template><xsl:template match="text()">
2081
2148
  <xsl:value-of select="."/>
2082
2149
  </xsl:template><xsl:template match="*[local-name()='br']">
@@ -2107,7 +2174,9 @@
2107
2174
 
2108
2175
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2109
2176
 
2110
-
2177
+
2178
+
2179
+
2111
2180
 
2112
2181
 
2113
2182
 
@@ -2231,6 +2300,8 @@
2231
2300
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2232
2301
  </xsl:if>
2233
2302
 
2303
+
2304
+
2234
2305
  <xsl:choose>
2235
2306
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2236
2307
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -2518,9 +2589,9 @@
2518
2589
  <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
2519
2590
  <xsl:with-param name="continued">true</xsl:with-param>
2520
2591
  </xsl:apply-templates>
2521
- <xsl:for-each select="ancestor::*[local-name()='table'][1]">
2522
- <xsl:call-template name="fn_name_display"/>
2523
- </xsl:for-each>
2592
+
2593
+
2594
+
2524
2595
 
2525
2596
  </fo:table-cell>
2526
2597
  </fo:table-row>
@@ -2602,7 +2673,11 @@
2602
2673
 
2603
2674
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2604
2675
 
2605
- <xsl:if test="$isNoteOrFnExist = 'true'">
2676
+ <xsl:variable name="isNoteOrFnExistShowAfterTable">
2677
+
2678
+ </xsl:variable>
2679
+
2680
+ <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
2606
2681
 
2607
2682
  <xsl:variable name="cols-count">
2608
2683
  <xsl:choose>
@@ -2745,6 +2820,19 @@
2745
2820
 
2746
2821
  </fo:table-body>
2747
2822
 
2823
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
2824
+ <xsl:choose>
2825
+ <xsl:when test="substring-after(., '—') != ''">
2826
+ <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
2827
+ </xsl:when>
2828
+ <xsl:otherwise>
2829
+ <xsl:value-of select="."/>
2830
+ </xsl:otherwise>
2831
+ </xsl:choose>
2832
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
2833
+ <xsl:apply-templates mode="presentation_name"/>
2834
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
2835
+ <xsl:apply-templates select="."/>
2748
2836
  </xsl:template><xsl:template match="*[local-name()='tr']">
2749
2837
  <xsl:variable name="parent-name" select="local-name(..)"/>
2750
2838
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
@@ -2940,14 +3028,12 @@
2940
3028
  <xsl:apply-templates/>
2941
3029
  </xsl:template><xsl:template name="fn_display">
2942
3030
  <xsl:variable name="references">
3031
+
2943
3032
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
2944
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2945
-
2946
-
2947
- <xsl:apply-templates/>
2948
- </fn>
3033
+ <xsl:call-template name="create_fn"/>
2949
3034
  </xsl:for-each>
2950
3035
  </xsl:variable>
3036
+
2951
3037
  <xsl:for-each select="xalan:nodeset($references)//fn">
2952
3038
  <xsl:variable name="reference" select="@reference"/>
2953
3039
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
@@ -2981,6 +3067,12 @@
2981
3067
  </fo:block>
2982
3068
  </xsl:if>
2983
3069
  </xsl:for-each>
3070
+ </xsl:template><xsl:template name="create_fn">
3071
+ <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
3072
+
3073
+
3074
+ <xsl:apply-templates/>
3075
+ </fn>
2984
3076
  </xsl:template><xsl:template name="fn_name_display">
2985
3077
  <!-- <xsl:variable name="references">
2986
3078
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
@@ -3976,16 +4068,68 @@
3976
4068
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3977
4069
  </xsl:call-template>
3978
4070
 
4071
+
4072
+
3979
4073
  <xsl:variable name="mathml">
3980
4074
  <xsl:apply-templates select="." mode="mathml"/>
3981
4075
  </xsl:variable>
3982
4076
  <fo:instream-foreign-object fox:alt-text="Math">
3983
4077
 
3984
4078
 
4079
+ <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
4080
+ <xsl:variable name="comment_text_">
4081
+ <xsl:choose>
4082
+ <xsl:when test="normalize-space($comment_text_following) != ''">
4083
+ <xsl:value-of select="$comment_text_following"/>
4084
+ </xsl:when>
4085
+ <xsl:otherwise>
4086
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
4087
+ </xsl:otherwise>
4088
+ </xsl:choose>
4089
+ </xsl:variable>
4090
+ <xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
4091
+
4092
+ <xsl:if test="normalize-space($comment_text) != ''">
4093
+ <!-- put Mathin Alternate Text -->
4094
+ <xsl:attribute name="fox:alt-text">
4095
+ <xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
4096
+ </xsl:attribute>
4097
+ </xsl:if>
4098
+
4099
+ <xsl:variable name="mathml_content">
4100
+ <xsl:apply-templates select="." mode="mathml_actual_text"/>
4101
+ </xsl:variable>
4102
+ <!-- put MathML in Actual Text -->
4103
+ <xsl:attribute name="fox:actual-text">
4104
+ <xsl:value-of select="$mathml_content"/>
4105
+ </xsl:attribute>
4106
+
4107
+
3985
4108
  <!-- <xsl:copy-of select="."/> -->
3986
4109
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
3987
4110
  </fo:instream-foreign-object>
3988
4111
  </fo:inline>
4112
+ </xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
4113
+ <!-- <xsl:text>a+b</xsl:text> -->
4114
+ <xsl:text>&lt;</xsl:text>
4115
+ <xsl:value-of select="local-name()"/>
4116
+ <xsl:if test="local-name() = 'math'">
4117
+ <xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
4118
+ </xsl:if>
4119
+ <xsl:for-each select="@*">
4120
+ <xsl:text> </xsl:text>
4121
+ <xsl:value-of select="local-name()"/>
4122
+ <xsl:text>="</xsl:text>
4123
+ <xsl:value-of select="."/>
4124
+ <xsl:text>"</xsl:text>
4125
+ </xsl:for-each>
4126
+ <xsl:text>&gt;</xsl:text>
4127
+ <xsl:apply-templates mode="mathml_actual_text"/>
4128
+ <xsl:text>&lt;/</xsl:text>
4129
+ <xsl:value-of select="local-name()"/>
4130
+ <xsl:text>&gt;</xsl:text>
4131
+ </xsl:template><xsl:template match="text()" mode="mathml_actual_text">
4132
+ <xsl:value-of select="normalize-space()"/>
3989
4133
  </xsl:template><xsl:template match="@*|node()" mode="mathml">
3990
4134
  <xsl:copy>
3991
4135
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
@@ -3995,19 +4139,6 @@
3995
4139
  <!-- replace start and end spaces to non-break space -->
3996
4140
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
3997
4141
  </xsl:copy>
3998
- </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
3999
- <xsl:copy>
4000
- <xsl:apply-templates select="@*|node()" mode="mathml"/>
4001
- </xsl:copy>
4002
- <xsl:choose>
4003
- <!-- if in msub, then don't add space -->
4004
- <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
4005
- <!-- if next char in digit, don't add space -->
4006
- <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
4007
- <xsl:otherwise>
4008
- <mathml:mspace width="0.5ex"/>
4009
- </xsl:otherwise>
4010
- </xsl:choose>
4011
4142
  </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">
4012
4143
  <xsl:variable name="target">
4013
4144
  <xsl:choose>
@@ -4066,7 +4197,10 @@
4066
4197
  </fo:block>
4067
4198
  <xsl:apply-templates/>
4068
4199
  </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
4069
- <fo:inline><xsl:apply-templates/></fo:inline>
4200
+ <xsl:variable name="level">
4201
+ <xsl:call-template name="getLevel"/>
4202
+ </xsl:variable>
4203
+ <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
4070
4204
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
4071
4205
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
4072
4206
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -4101,9 +4235,10 @@
4101
4235
 
4102
4236
  </xsl:variable>
4103
4237
 
4238
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
4104
4239
  <xsl:choose>
4105
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
4106
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
4240
+ <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>
4241
+ <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>
4107
4242
  </xsl:choose>
4108
4243
  <xsl:apply-templates/>
4109
4244
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
@@ -4256,7 +4391,10 @@
4256
4391
  </fo:block>
4257
4392
  </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
4258
4393
  <xsl:if test="normalize-space() != ''">
4259
- <fo:inline>
4394
+ <xsl:variable name="level">
4395
+ <xsl:call-template name="getLevelTermName"/>
4396
+ </xsl:variable>
4397
+ <fo:inline role="H{$level}">
4260
4398
  <xsl:apply-templates/>
4261
4399
  <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
4262
4400
  <xsl:text>.</xsl:text>
@@ -4566,6 +4704,13 @@
4566
4704
  </xsl:attribute>
4567
4705
  <xsl:apply-templates mode="svg_update"/>
4568
4706
  </xsl:copy>
4707
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
4708
+ <xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
4709
+ <xsl:for-each select="*[local-name() = 'svg']">
4710
+ <xsl:call-template name="image_svg">
4711
+ <xsl:with-param name="name" select="$name"/>
4712
+ </xsl:call-template>
4713
+ </xsl:for-each>
4569
4714
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
4570
4715
  <xsl:variable name="svg_content" select="document(@src)"/>
4571
4716
  <xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
@@ -4670,7 +4815,7 @@
4670
4815
  </fo:basic-link>
4671
4816
  </fo:block>
4672
4817
  </fo:block-container>
4673
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4818
+ </xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4674
4819
  <xsl:apply-templates mode="contents"/>
4675
4820
  <xsl:text> </xsl:text>
4676
4821
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
@@ -4896,6 +5041,7 @@
4896
5041
  </xsl:when>
4897
5042
  <xsl:otherwise>
4898
5043
  <xsl:apply-templates/>
5044
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
4899
5045
  </xsl:otherwise>
4900
5046
  </xsl:choose>
4901
5047
  </fo:block>
@@ -5036,14 +5182,6 @@
5036
5182
  <fo:block>
5037
5183
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
5038
5184
  </fo:block>
5039
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
5040
- <fo:block xsl:use-attribute-sets="requirement-subject-style">
5041
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
5042
- </fo:block>
5043
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
5044
- <fo:block xsl:use-attribute-sets="requirement-inherit-style">
5045
- <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
5046
- </fo:block>
5047
5185
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
5048
5186
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
5049
5187
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -5060,6 +5198,38 @@
5060
5198
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
5061
5199
  <xsl:apply-templates/>
5062
5200
  </fo:block>
5201
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
5202
+ <fo:block xsl:use-attribute-sets="subject-style">
5203
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
5204
+ </fo:block>
5205
+ </xsl:template><xsl:template match="*[local-name() = 'subject']">
5206
+ <fo:block xsl:use-attribute-sets="subject-style">
5207
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
5208
+ </fo:block>
5209
+ </xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
5210
+ <fo:block xsl:use-attribute-sets="inherit-style">
5211
+ <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
5212
+ </fo:block>
5213
+ </xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
5214
+ <fo:block xsl:use-attribute-sets="description-style">
5215
+ <xsl:apply-templates/>
5216
+ </fo:block>
5217
+ </xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
5218
+ <fo:block xsl:use-attribute-sets="specification-style">
5219
+ <xsl:apply-templates/>
5220
+ </fo:block>
5221
+ </xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
5222
+ <fo:block xsl:use-attribute-sets="measurement-target-style">
5223
+ <xsl:apply-templates/>
5224
+ </fo:block>
5225
+ </xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
5226
+ <fo:block xsl:use-attribute-sets="verification-style">
5227
+ <xsl:apply-templates/>
5228
+ </fo:block>
5229
+ </xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
5230
+ <fo:block xsl:use-attribute-sets="import-style">
5231
+ <xsl:apply-templates/>
5232
+ </fo:block>
5063
5233
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
5064
5234
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
5065
5235
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
@@ -5211,7 +5381,19 @@
5211
5381
  </fo:inline>
5212
5382
  </xsl:if>
5213
5383
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
5214
- <fo:inline><xsl:apply-templates/></fo:inline>
5384
+ <xsl:variable name="element">inline
5385
+
5386
+ </xsl:variable>
5387
+ <xsl:choose>
5388
+ <xsl:when test="contains($element, 'block')">
5389
+ <fo:block xsl:use-attribute-sets="example-p-style">
5390
+ <xsl:apply-templates/>
5391
+ </fo:block>
5392
+ </xsl:when>
5393
+ <xsl:otherwise>
5394
+ <fo:inline><xsl:apply-templates/></fo:inline>
5395
+ </xsl:otherwise>
5396
+ </xsl:choose>
5215
5397
  </xsl:template><xsl:template match="*[local-name() = 'example']">
5216
5398
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
5217
5399
 
@@ -5319,14 +5501,15 @@
5319
5501
  </xsl:if>
5320
5502
  </xsl:template><xsl:variable name="localized.source">
5321
5503
  <xsl:call-template name="getLocalizedString">
5322
- <xsl:with-param name="key">source</xsl:with-param>
5323
- </xsl:call-template>
5504
+ <xsl:with-param name="key">source</xsl:with-param>
5505
+ </xsl:call-template>
5324
5506
  </xsl:variable><xsl:template match="*[local-name() = 'origin']">
5325
5507
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
5326
5508
  <xsl:if test="normalize-space(@citeas) = ''">
5327
5509
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
5328
5510
  </xsl:if>
5329
5511
 
5512
+
5330
5513
  <fo:inline>
5331
5514
 
5332
5515
 
@@ -5335,6 +5518,7 @@
5335
5518
 
5336
5519
 
5337
5520
 
5521
+
5338
5522
  <xsl:value-of select="$localized.source"/>
5339
5523
  <xsl:text>: </xsl:text>
5340
5524
 
@@ -5346,6 +5530,7 @@
5346
5530
  <fo:inline xsl:use-attribute-sets="origin-style">
5347
5531
  <xsl:apply-templates/>
5348
5532
  </fo:inline>
5533
+
5349
5534
  </fo:basic-link>
5350
5535
  </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
5351
5536
  <fo:inline><xsl:apply-templates/></fo:inline>
@@ -5412,6 +5597,9 @@
5412
5597
 
5413
5598
  </xsl:if>
5414
5599
 
5600
+ <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
5601
+ <xsl:variable name="text" select="normalize-space()"/>
5602
+
5415
5603
 
5416
5604
 
5417
5605
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -5424,7 +5612,9 @@
5424
5612
 
5425
5613
 
5426
5614
  </xsl:if>
5427
-
5615
+
5616
+
5617
+
5428
5618
  <xsl:apply-templates/>
5429
5619
  </fo:basic-link>
5430
5620
 
@@ -5757,6 +5947,7 @@
5757
5947
  </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
5758
5948
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
5759
5949
  <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
5950
+
5760
5951
  <xsl:apply-templates/>
5761
5952
  </fo:block>
5762
5953
  </xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
@@ -5796,7 +5987,6 @@
5796
5987
  </xsl:template><xsl:template name="processBibitem">
5797
5988
 
5798
5989
 
5799
- <!-- end BIPM bibitem processing-->
5800
5990
 
5801
5991
 
5802
5992
 
@@ -5926,6 +6116,97 @@
5926
6116
  <fo:block-container border="1pt solid black" width="50%">
5927
6117
  <fo:block> </fo:block>
5928
6118
  </fo:block-container>
6119
+ </xsl:template><xsl:template match="*[local-name() = 'toc']">
6120
+ <xsl:param name="colwidths"/>
6121
+ <xsl:variable name="colwidths_">
6122
+ <xsl:choose>
6123
+ <xsl:when test="not($colwidths)">
6124
+ <xsl:variable name="toc_table_simple">
6125
+ <tbody>
6126
+ <xsl:apply-templates mode="toc_table_width"/>
6127
+ </tbody>
6128
+ </xsl:variable>
6129
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
6130
+ <xsl:call-template name="calculate-column-widths">
6131
+ <xsl:with-param name="cols-count" select="$cols-count"/>
6132
+ <xsl:with-param name="table" select="$toc_table_simple"/>
6133
+ </xsl:call-template>
6134
+ </xsl:when>
6135
+ <xsl:otherwise>
6136
+ <xsl:copy-of select="$colwidths"/>
6137
+ </xsl:otherwise>
6138
+ </xsl:choose>
6139
+ </xsl:variable>
6140
+ <fo:block role="TOCI" space-after="16pt">
6141
+ <fo:table width="100%" table-layout="fixed">
6142
+ <xsl:for-each select="xalan:nodeset($colwidths_)/column">
6143
+ <fo:table-column column-width="proportional-column-width({.})"/>
6144
+ </xsl:for-each>
6145
+ <fo:table-body>
6146
+ <xsl:apply-templates/>
6147
+ </fo:table-body>
6148
+ </fo:table>
6149
+ </fo:block>
6150
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
6151
+ <fo:table-row min-height="5mm">
6152
+ <xsl:apply-templates/>
6153
+ </fo:table-row>
6154
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
6155
+ <xsl:apply-templates/>
6156
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
6157
+ <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
6158
+ <xsl:variable name="target" select="@target"/>
6159
+ <xsl:for-each select="*[local-name() = 'tab']">
6160
+ <xsl:variable name="current_id" select="generate-id()"/>
6161
+ <fo:table-cell>
6162
+ <fo:block>
6163
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
6164
+ <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
6165
+ <xsl:choose>
6166
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
6167
+ <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
6168
+ </xsl:choose>
6169
+ </xsl:for-each>
6170
+ </fo:basic-link>
6171
+ </fo:block>
6172
+ </fo:table-cell>
6173
+ </xsl:for-each>
6174
+ <!-- last column - for page numbers -->
6175
+ <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
6176
+ <fo:block>
6177
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
6178
+ <fo:page-number-citation ref-id="{$target}"/>
6179
+ </fo:basic-link>
6180
+ </fo:block>
6181
+ </fo:table-cell>
6182
+ </xsl:template><xsl:template match="*" mode="toc_table_width">
6183
+ <xsl:apply-templates mode="toc_table_width"/>
6184
+ </xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
6185
+ <tr>
6186
+ <xsl:apply-templates mode="toc_table_width"/>
6187
+ </tr>
6188
+ </xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
6189
+ <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
6190
+ <xsl:for-each select="*[local-name() = 'tab']">
6191
+ <xsl:variable name="current_id" select="generate-id()"/>
6192
+ <td>
6193
+ <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
6194
+ <xsl:copy-of select="."/>
6195
+ </xsl:for-each>
6196
+ </td>
6197
+ </xsl:for-each>
6198
+ <td>333</td> <!-- page number, just for fill -->
6199
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
6200
+ <fo:inline padding-right="5mm"> </fo:inline>
6201
+ <fo:inline><xsl:apply-templates/></fo:inline>
6202
+ </xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
6203
+ <fo:inline padding-right="2.5mm" baseline-shift="5%">
6204
+ <fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
6205
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
6206
+ <rect x="0" y="0" width="2" height="2" fill="black"/>
6207
+ </svg>
6208
+ </fo:instream-foreign-object>
6209
+ </fo:inline>
5929
6210
  </xsl:template><xsl:template name="convertDate">
5930
6211
  <xsl:param name="date"/>
5931
6212
  <xsl:param name="format" select="'short'"/>
@@ -6164,6 +6445,26 @@
6164
6445
  <xsl:value-of select="$level"/>
6165
6446
  </xsl:otherwise>
6166
6447
  </xsl:choose>
6448
+ </xsl:template><xsl:template name="getLevelTermName">
6449
+ <xsl:choose>
6450
+ <xsl:when test="normalize-space(../@depth) != ''">
6451
+ <xsl:value-of select="../@depth"/>
6452
+ </xsl:when>
6453
+ <xsl:otherwise>
6454
+ <xsl:variable name="title_level_">
6455
+ <xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
6456
+ <xsl:call-template name="getLevel"/>
6457
+ </xsl:for-each>
6458
+ </xsl:variable>
6459
+ <xsl:variable name="title_level" select="normalize-space($title_level_)"/>
6460
+ <xsl:choose>
6461
+ <xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
6462
+ <xsl:otherwise>
6463
+ <xsl:call-template name="getLevel"/>
6464
+ </xsl:otherwise>
6465
+ </xsl:choose>
6466
+ </xsl:otherwise>
6467
+ </xsl:choose>
6167
6468
  </xsl:template><xsl:template name="split">
6168
6469
  <xsl:param name="pText" select="."/>
6169
6470
  <xsl:param name="sep" select="','"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "1.7.8".freeze
3
+ VERSION = "1.7.12".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.8
4
+ version: 1.7.12
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-08-02 00:00:00.000000000 Z
11
+ date: 2021-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic