metanorma-un 0.6.6 → 0.6.7

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: 0a5c20da9a001c0acd4087934cf4f9cbc82a2120c3d2f5b3e7a5d5d044faa5cb
4
- data.tar.gz: 4d454c978e7dd64bc99b623e7369f85c0217b77cca1e528de503fababdea145b
3
+ metadata.gz: 59c6e79a616205f11022dba3a8985a1b00c345ca517ce0fc8103ac3895d94db8
4
+ data.tar.gz: e57e915e2da43aad046607842a50910304f7abfec8c83fec4bbceb1cee16b092
5
5
  SHA512:
6
- metadata.gz: 83bff8b909f59c56c86e1d1a034a0e5d637e7897ebd9578fe7a9d9202a366f7b59607fea61cd297bdd7c8d63697ebbf0db3bd3de888b662a59a15fadf62ad6b9
7
- data.tar.gz: 8195c49d3f5ab27d550170f76f3047a0a48bc479f5f718a7482ca0a2c95f3e219b08463262be6c09056e0c7c6ba7e0d92975f4eb307797b1094ad8d06c5380fc
6
+ metadata.gz: cb17eba7c97f53e5ffbfd8a61539dc39fcfdafd244e94f0fbc3e4cd31612e6b92e89f4c16aff9ee556998d4fe3044489e73cab55ebb672bb2d2ba88d98e01acd
7
+ data.tar.gz: fa86c46d42de32648b54ebf6858d76309259d955d189acda2651dc5cf60c06d58dc8ea68bbcce297f8ee02e75d58077efaa65aaf7458c981b5a9fc660023514e
@@ -204,6 +204,18 @@
204
204
  </zeroOrMore>
205
205
  </element>
206
206
  </define>
207
+ <define name="dt">
208
+ <element name="dt">
209
+ <optional>
210
+ <attribute name="id">
211
+ <data type="ID"/>
212
+ </attribute>
213
+ </optional>
214
+ <zeroOrMore>
215
+ <ref name="TextElement"/>
216
+ </zeroOrMore>
217
+ </element>
218
+ </define>
207
219
  <define name="example">
208
220
  <element name="example">
209
221
  <attribute name="id">
@@ -899,7 +911,7 @@
899
911
  </include>
900
912
  <!-- end overrides -->
901
913
  <define name="docsubtype">
902
- <element name="docsubtype">
914
+ <element name="subdoctype">
903
915
  <ref name="DocumentSubtype"/>
904
916
  </element>
905
917
  </define>
@@ -954,6 +966,16 @@
954
966
  </define>
955
967
  <define name="concept">
956
968
  <element name="concept">
969
+ <optional>
970
+ <attribute name="ital">
971
+ <data type="boolean"/>
972
+ </attribute>
973
+ </optional>
974
+ <optional>
975
+ <attribute name="ref">
976
+ <data type="boolean"/>
977
+ </attribute>
978
+ </optional>
957
979
  <optional>
958
980
  <element name="refterm">
959
981
  <zeroOrMore>
@@ -998,6 +1020,9 @@
998
1020
  </attribute>
999
1021
  <attribute name="name"/>
1000
1022
  <attribute name="action"/>
1023
+ <optional>
1024
+ <attribute name="class"/>
1025
+ </optional>
1001
1026
  <zeroOrMore>
1002
1027
  <choice>
1003
1028
  <ref name="TextElement"/>
@@ -1490,26 +1515,26 @@
1490
1515
  <optional>
1491
1516
  <ref name="section-title"/>
1492
1517
  </optional>
1493
- <group>
1518
+ <choice>
1494
1519
  <choice>
1495
1520
  <group>
1496
- <zeroOrMore>
1521
+ <oneOrMore>
1497
1522
  <ref name="BasicBlock"/>
1498
- </zeroOrMore>
1523
+ </oneOrMore>
1499
1524
  <zeroOrMore>
1500
1525
  <ref name="note"/>
1501
1526
  </zeroOrMore>
1502
1527
  </group>
1503
1528
  <ref name="amend"/>
1504
1529
  </choice>
1505
- <zeroOrMore>
1530
+ <oneOrMore>
1506
1531
  <choice>
1507
1532
  <ref name="clause-subsection"/>
1508
1533
  <ref name="terms"/>
1509
1534
  <ref name="definitions"/>
1510
1535
  </choice>
1511
- </zeroOrMore>
1512
- </group>
1536
+ </oneOrMore>
1537
+ </choice>
1513
1538
  </define>
1514
1539
  <define name="Annex-Section">
1515
1540
  <optional>
@@ -1073,103 +1073,6 @@
1073
1073
  </xsl:template>
1074
1074
 
1075
1075
 
1076
- <xsl:template name="number-to-words">
1077
- <xsl:param name="number"/>
1078
- <xsl:param name="first"/>
1079
- <xsl:if test="$number != ''">
1080
- <xsl:variable name="words">
1081
- <words>
1082
- <word cardinal="1">one-</word>
1083
- <word ordinal="1">first </word>
1084
- <word cardinal="2">two-</word>
1085
- <word ordinal="2">second </word>
1086
- <word cardinal="3">three-</word>
1087
- <word ordinal="3">third </word>
1088
- <word cardinal="4">four-</word>
1089
- <word ordinal="4">fourth </word>
1090
- <word cardinal="5">five-</word>
1091
- <word ordinal="5">fifth </word>
1092
- <word cardinal="6">six-</word>
1093
- <word ordinal="6">sixth </word>
1094
- <word cardinal="7">seven-</word>
1095
- <word ordinal="7">seventh </word>
1096
- <word cardinal="8">eight-</word>
1097
- <word ordinal="8">eighth </word>
1098
- <word cardinal="9">nine-</word>
1099
- <word ordinal="9">ninth </word>
1100
- <word ordinal="10">tenth </word>
1101
- <word ordinal="11">eleventh </word>
1102
- <word ordinal="12">twelfth </word>
1103
- <word ordinal="13">thirteenth </word>
1104
- <word ordinal="14">fourteenth </word>
1105
- <word ordinal="15">fifteenth </word>
1106
- <word ordinal="16">sixteenth </word>
1107
- <word ordinal="17">seventeenth </word>
1108
- <word ordinal="18">eighteenth </word>
1109
- <word ordinal="19">nineteenth </word>
1110
- <word cardinal="20">twenty-</word>
1111
- <word ordinal="20">twentieth </word>
1112
- <word cardinal="30">thirty-</word>
1113
- <word ordinal="30">thirtieth </word>
1114
- <word cardinal="40">forty-</word>
1115
- <word ordinal="40">fortieth </word>
1116
- <word cardinal="50">fifty-</word>
1117
- <word ordinal="50">fiftieth </word>
1118
- <word cardinal="60">sixty-</word>
1119
- <word ordinal="60">sixtieth </word>
1120
- <word cardinal="70">seventy-</word>
1121
- <word ordinal="70">seventieth </word>
1122
- <word cardinal="80">eighty-</word>
1123
- <word ordinal="80">eightieth </word>
1124
- <word cardinal="90">ninety-</word>
1125
- <word ordinal="90">ninetieth </word>
1126
- <word cardinal="100">hundred-</word>
1127
- <word ordinal="100">hundredth </word>
1128
- </words>
1129
- </xsl:variable>
1130
-
1131
- <xsl:variable name="ordinal" select="xalan:nodeset($words)//word[@ordinal = $number]/text()"/>
1132
-
1133
- <xsl:variable name="value">
1134
- <xsl:choose>
1135
- <xsl:when test="$ordinal != ''">
1136
- <xsl:value-of select="$ordinal"/>
1137
- </xsl:when>
1138
- <xsl:otherwise>
1139
- <xsl:choose>
1140
- <xsl:when test="$number &lt; 100">
1141
- <xsl:variable name="decade" select="concat(substring($number,1,1), '0')"/>
1142
- <xsl:variable name="digit" select="substring($number,2)"/>
1143
- <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $decade]/text()"/>
1144
- <xsl:value-of select="xalan:nodeset($words)//word[@ordinal = $digit]/text()"/>
1145
- </xsl:when>
1146
- <xsl:otherwise>
1147
- <!-- more 100 -->
1148
- <xsl:variable name="hundred" select="substring($number,1,1)"/>
1149
- <xsl:variable name="digits" select="number(substring($number,2))"/>
1150
- <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $hundred]/text()"/>
1151
- <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = '100']/text()"/>
1152
- <xsl:call-template name="number-to-words">
1153
- <xsl:with-param name="number" select="$digits"/>
1154
- </xsl:call-template>
1155
- </xsl:otherwise>
1156
- </xsl:choose>
1157
- </xsl:otherwise>
1158
- </xsl:choose>
1159
- </xsl:variable>
1160
- <xsl:choose>
1161
- <xsl:when test="$first = 'true'">
1162
- <xsl:call-template name="capitalize">
1163
- <xsl:with-param name="str" select="$value"/>
1164
- </xsl:call-template>
1165
- </xsl:when>
1166
- <xsl:otherwise>
1167
- <xsl:value-of select="$value"/>
1168
- </xsl:otherwise>
1169
- </xsl:choose>
1170
- </xsl:if>
1171
- </xsl:template>
1172
-
1173
1076
  <!-- convert YYYY-MM-DD to (Month YYYY) -->
1174
1077
  <xsl:template name="formatDate">
1175
1078
  <xsl:param name="date"/>
@@ -2325,6 +2228,7 @@
2325
2228
 
2326
2229
 
2327
2230
 
2231
+
2328
2232
  <!-- fn will be processed inside 'note' processing -->
2329
2233
 
2330
2234
 
@@ -2333,6 +2237,10 @@
2333
2237
 
2334
2238
 
2335
2239
 
2240
+
2241
+ <!-- for BSI (not PAS) display Notes before footnotes -->
2242
+
2243
+
2336
2244
  <!-- except gb -->
2337
2245
 
2338
2246
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
@@ -2358,6 +2266,10 @@
2358
2266
  <!-- fn processing -->
2359
2267
  <xsl:call-template name="fn_display"/>
2360
2268
 
2269
+
2270
+ <!-- for PAS display Notes after footnotes -->
2271
+
2272
+
2361
2273
  </fo:table-cell>
2362
2274
  </fo:table-row>
2363
2275
  </fo:table-body>
@@ -2415,6 +2327,7 @@
2415
2327
  <xsl:if test="$parent-name = 'tfoot'">
2416
2328
 
2417
2329
 
2330
+
2418
2331
  </xsl:if>
2419
2332
 
2420
2333
 
@@ -2565,8 +2478,13 @@
2565
2478
 
2566
2479
 
2567
2480
 
2481
+
2482
+ <!-- Table's note name (NOTE, for example) -->
2483
+
2568
2484
  <fo:inline padding-right="2mm">
2569
2485
 
2486
+
2487
+
2570
2488
 
2571
2489
 
2572
2490
  <xsl:if test="@type = 'source' or @type = 'abbreviation'">
@@ -2584,6 +2502,8 @@
2584
2502
 
2585
2503
  </fo:inline>
2586
2504
 
2505
+
2506
+
2587
2507
  <xsl:apply-templates mode="process"/>
2588
2508
  </fo:block>
2589
2509
 
@@ -2603,6 +2523,8 @@
2603
2523
  <xsl:variable name="reference" select="@reference"/>
2604
2524
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
2605
2525
  <fo:block margin-bottom="12pt">
2526
+
2527
+
2606
2528
 
2607
2529
 
2608
2530
 
@@ -2622,6 +2544,7 @@
2622
2544
  <xsl:value-of select="@reference"/>
2623
2545
 
2624
2546
 
2547
+
2625
2548
  </fo:inline>
2626
2549
  <fo:inline>
2627
2550
 
@@ -2771,6 +2694,7 @@
2771
2694
 
2772
2695
  <xsl:value-of select="@reference"/>
2773
2696
 
2697
+
2774
2698
  </fo:basic-link>
2775
2699
  </fo:inline>
2776
2700
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
@@ -3774,6 +3698,7 @@
3774
3698
 
3775
3699
 
3776
3700
 
3701
+
3777
3702
  <fo:block-container margin-left="0mm">
3778
3703
 
3779
3704
 
@@ -4979,9 +4904,10 @@
4979
4904
 
4980
4905
 
4981
4906
  </xsl:if>
4982
-
4907
+
4908
+
4909
+
4983
4910
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4984
-
4985
4911
  <xsl:if test="normalize-space(@citeas) = ''">
4986
4912
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
4987
4913
  </xsl:if>
@@ -4989,6 +4915,7 @@
4989
4915
 
4990
4916
 
4991
4917
 
4918
+
4992
4919
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
4993
4920
 
4994
4921
  </xsl:if>
@@ -5914,4 +5841,100 @@
5914
5841
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
5915
5842
  </xsl:choose>
5916
5843
  </xsl:attribute>
5844
+ </xsl:template><xsl:template name="number-to-words">
5845
+ <xsl:param name="number"/>
5846
+ <xsl:param name="first"/>
5847
+ <xsl:if test="$number != ''">
5848
+ <xsl:variable name="words">
5849
+ <words>
5850
+ <word cardinal="1">One-</word>
5851
+ <word ordinal="1">First </word>
5852
+ <word cardinal="2">Two-</word>
5853
+ <word ordinal="2">Second </word>
5854
+ <word cardinal="3">Three-</word>
5855
+ <word ordinal="3">Third </word>
5856
+ <word cardinal="4">Four-</word>
5857
+ <word ordinal="4">Fourth </word>
5858
+ <word cardinal="5">Five-</word>
5859
+ <word ordinal="5">Fifth </word>
5860
+ <word cardinal="6">Six-</word>
5861
+ <word ordinal="6">Sixth </word>
5862
+ <word cardinal="7">Seven-</word>
5863
+ <word ordinal="7">Seventh </word>
5864
+ <word cardinal="8">Eight-</word>
5865
+ <word ordinal="8">Eighth </word>
5866
+ <word cardinal="9">Nine-</word>
5867
+ <word ordinal="9">Ninth </word>
5868
+ <word ordinal="10">Tenth </word>
5869
+ <word ordinal="11">Eleventh </word>
5870
+ <word ordinal="12">Twelfth </word>
5871
+ <word ordinal="13">Thirteenth </word>
5872
+ <word ordinal="14">Fourteenth </word>
5873
+ <word ordinal="15">Fifteenth </word>
5874
+ <word ordinal="16">Sixteenth </word>
5875
+ <word ordinal="17">Seventeenth </word>
5876
+ <word ordinal="18">Eighteenth </word>
5877
+ <word ordinal="19">Nineteenth </word>
5878
+ <word cardinal="20">Twenty-</word>
5879
+ <word ordinal="20">Twentieth </word>
5880
+ <word cardinal="30">Thirty-</word>
5881
+ <word ordinal="30">Thirtieth </word>
5882
+ <word cardinal="40">Forty-</word>
5883
+ <word ordinal="40">Fortieth </word>
5884
+ <word cardinal="50">Fifty-</word>
5885
+ <word ordinal="50">Fiftieth </word>
5886
+ <word cardinal="60">Sixty-</word>
5887
+ <word ordinal="60">Sixtieth </word>
5888
+ <word cardinal="70">Seventy-</word>
5889
+ <word ordinal="70">Seventieth </word>
5890
+ <word cardinal="80">Eighty-</word>
5891
+ <word ordinal="80">Eightieth </word>
5892
+ <word cardinal="90">Ninety-</word>
5893
+ <word ordinal="90">Ninetieth </word>
5894
+ <word cardinal="100">Hundred-</word>
5895
+ <word ordinal="100">Hundredth </word>
5896
+ </words>
5897
+ </xsl:variable>
5898
+
5899
+ <xsl:variable name="ordinal" select="xalan:nodeset($words)//word[@ordinal = $number]/text()"/>
5900
+
5901
+ <xsl:variable name="value">
5902
+ <xsl:choose>
5903
+ <xsl:when test="$ordinal != ''">
5904
+ <xsl:value-of select="$ordinal"/>
5905
+ </xsl:when>
5906
+ <xsl:otherwise>
5907
+ <xsl:choose>
5908
+ <xsl:when test="$number &lt; 100">
5909
+ <xsl:variable name="decade" select="concat(substring($number,1,1), '0')"/>
5910
+ <xsl:variable name="digit" select="substring($number,2)"/>
5911
+ <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $decade]/text()"/>
5912
+ <xsl:value-of select="xalan:nodeset($words)//word[@ordinal = $digit]/text()"/>
5913
+ </xsl:when>
5914
+ <xsl:otherwise>
5915
+ <!-- more 100 -->
5916
+ <xsl:variable name="hundred" select="substring($number,1,1)"/>
5917
+ <xsl:variable name="digits" select="number(substring($number,2))"/>
5918
+ <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $hundred]/text()"/>
5919
+ <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = '100']/text()"/>
5920
+ <xsl:call-template name="number-to-words">
5921
+ <xsl:with-param name="number" select="$digits"/>
5922
+ </xsl:call-template>
5923
+ </xsl:otherwise>
5924
+ </xsl:choose>
5925
+ </xsl:otherwise>
5926
+ </xsl:choose>
5927
+ </xsl:variable>
5928
+ <xsl:choose>
5929
+ <xsl:when test="$first = 'true'">
5930
+ <xsl:variable name="value_lc" select="java:toLowerCase(java:java.lang.String.new($value))"/>
5931
+ <xsl:call-template name="capitalize">
5932
+ <xsl:with-param name="str" select="$value_lc"/>
5933
+ </xsl:call-template>
5934
+ </xsl:when>
5935
+ <xsl:otherwise>
5936
+ <xsl:value-of select="$value"/>
5937
+ </xsl:otherwise>
5938
+ </xsl:choose>
5939
+ </xsl:if>
5917
5940
  </xsl:template></xsl:stylesheet>
@@ -1073,103 +1073,6 @@
1073
1073
  </xsl:template>
1074
1074
 
1075
1075
 
1076
- <xsl:template name="number-to-words">
1077
- <xsl:param name="number"/>
1078
- <xsl:param name="first"/>
1079
- <xsl:if test="$number != ''">
1080
- <xsl:variable name="words">
1081
- <words>
1082
- <word cardinal="1">one-</word>
1083
- <word ordinal="1">first </word>
1084
- <word cardinal="2">two-</word>
1085
- <word ordinal="2">second </word>
1086
- <word cardinal="3">three-</word>
1087
- <word ordinal="3">third </word>
1088
- <word cardinal="4">four-</word>
1089
- <word ordinal="4">fourth </word>
1090
- <word cardinal="5">five-</word>
1091
- <word ordinal="5">fifth </word>
1092
- <word cardinal="6">six-</word>
1093
- <word ordinal="6">sixth </word>
1094
- <word cardinal="7">seven-</word>
1095
- <word ordinal="7">seventh </word>
1096
- <word cardinal="8">eight-</word>
1097
- <word ordinal="8">eighth </word>
1098
- <word cardinal="9">nine-</word>
1099
- <word ordinal="9">ninth </word>
1100
- <word ordinal="10">tenth </word>
1101
- <word ordinal="11">eleventh </word>
1102
- <word ordinal="12">twelfth </word>
1103
- <word ordinal="13">thirteenth </word>
1104
- <word ordinal="14">fourteenth </word>
1105
- <word ordinal="15">fifteenth </word>
1106
- <word ordinal="16">sixteenth </word>
1107
- <word ordinal="17">seventeenth </word>
1108
- <word ordinal="18">eighteenth </word>
1109
- <word ordinal="19">nineteenth </word>
1110
- <word cardinal="20">twenty-</word>
1111
- <word ordinal="20">twentieth </word>
1112
- <word cardinal="30">thirty-</word>
1113
- <word ordinal="30">thirtieth </word>
1114
- <word cardinal="40">forty-</word>
1115
- <word ordinal="40">fortieth </word>
1116
- <word cardinal="50">fifty-</word>
1117
- <word ordinal="50">fiftieth </word>
1118
- <word cardinal="60">sixty-</word>
1119
- <word ordinal="60">sixtieth </word>
1120
- <word cardinal="70">seventy-</word>
1121
- <word ordinal="70">seventieth </word>
1122
- <word cardinal="80">eighty-</word>
1123
- <word ordinal="80">eightieth </word>
1124
- <word cardinal="90">ninety-</word>
1125
- <word ordinal="90">ninetieth </word>
1126
- <word cardinal="100">hundred-</word>
1127
- <word ordinal="100">hundredth </word>
1128
- </words>
1129
- </xsl:variable>
1130
-
1131
- <xsl:variable name="ordinal" select="xalan:nodeset($words)//word[@ordinal = $number]/text()"/>
1132
-
1133
- <xsl:variable name="value">
1134
- <xsl:choose>
1135
- <xsl:when test="$ordinal != ''">
1136
- <xsl:value-of select="$ordinal"/>
1137
- </xsl:when>
1138
- <xsl:otherwise>
1139
- <xsl:choose>
1140
- <xsl:when test="$number &lt; 100">
1141
- <xsl:variable name="decade" select="concat(substring($number,1,1), '0')"/>
1142
- <xsl:variable name="digit" select="substring($number,2)"/>
1143
- <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $decade]/text()"/>
1144
- <xsl:value-of select="xalan:nodeset($words)//word[@ordinal = $digit]/text()"/>
1145
- </xsl:when>
1146
- <xsl:otherwise>
1147
- <!-- more 100 -->
1148
- <xsl:variable name="hundred" select="substring($number,1,1)"/>
1149
- <xsl:variable name="digits" select="number(substring($number,2))"/>
1150
- <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $hundred]/text()"/>
1151
- <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = '100']/text()"/>
1152
- <xsl:call-template name="number-to-words">
1153
- <xsl:with-param name="number" select="$digits"/>
1154
- </xsl:call-template>
1155
- </xsl:otherwise>
1156
- </xsl:choose>
1157
- </xsl:otherwise>
1158
- </xsl:choose>
1159
- </xsl:variable>
1160
- <xsl:choose>
1161
- <xsl:when test="$first = 'true'">
1162
- <xsl:call-template name="capitalize">
1163
- <xsl:with-param name="str" select="$value"/>
1164
- </xsl:call-template>
1165
- </xsl:when>
1166
- <xsl:otherwise>
1167
- <xsl:value-of select="$value"/>
1168
- </xsl:otherwise>
1169
- </xsl:choose>
1170
- </xsl:if>
1171
- </xsl:template>
1172
-
1173
1076
  <!-- convert YYYY-MM-DD to (Month YYYY) -->
1174
1077
  <xsl:template name="formatDate">
1175
1078
  <xsl:param name="date"/>
@@ -2325,6 +2228,7 @@
2325
2228
 
2326
2229
 
2327
2230
 
2231
+
2328
2232
  <!-- fn will be processed inside 'note' processing -->
2329
2233
 
2330
2234
 
@@ -2333,6 +2237,10 @@
2333
2237
 
2334
2238
 
2335
2239
 
2240
+
2241
+ <!-- for BSI (not PAS) display Notes before footnotes -->
2242
+
2243
+
2336
2244
  <!-- except gb -->
2337
2245
 
2338
2246
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
@@ -2358,6 +2266,10 @@
2358
2266
  <!-- fn processing -->
2359
2267
  <xsl:call-template name="fn_display"/>
2360
2268
 
2269
+
2270
+ <!-- for PAS display Notes after footnotes -->
2271
+
2272
+
2361
2273
  </fo:table-cell>
2362
2274
  </fo:table-row>
2363
2275
  </fo:table-body>
@@ -2415,6 +2327,7 @@
2415
2327
  <xsl:if test="$parent-name = 'tfoot'">
2416
2328
 
2417
2329
 
2330
+
2418
2331
  </xsl:if>
2419
2332
 
2420
2333
 
@@ -2565,8 +2478,13 @@
2565
2478
 
2566
2479
 
2567
2480
 
2481
+
2482
+ <!-- Table's note name (NOTE, for example) -->
2483
+
2568
2484
  <fo:inline padding-right="2mm">
2569
2485
 
2486
+
2487
+
2570
2488
 
2571
2489
 
2572
2490
  <xsl:if test="@type = 'source' or @type = 'abbreviation'">
@@ -2584,6 +2502,8 @@
2584
2502
 
2585
2503
  </fo:inline>
2586
2504
 
2505
+
2506
+
2587
2507
  <xsl:apply-templates mode="process"/>
2588
2508
  </fo:block>
2589
2509
 
@@ -2603,6 +2523,8 @@
2603
2523
  <xsl:variable name="reference" select="@reference"/>
2604
2524
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
2605
2525
  <fo:block margin-bottom="12pt">
2526
+
2527
+
2606
2528
 
2607
2529
 
2608
2530
 
@@ -2622,6 +2544,7 @@
2622
2544
  <xsl:value-of select="@reference"/>
2623
2545
 
2624
2546
 
2547
+
2625
2548
  </fo:inline>
2626
2549
  <fo:inline>
2627
2550
 
@@ -2771,6 +2694,7 @@
2771
2694
 
2772
2695
  <xsl:value-of select="@reference"/>
2773
2696
 
2697
+
2774
2698
  </fo:basic-link>
2775
2699
  </fo:inline>
2776
2700
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
@@ -3774,6 +3698,7 @@
3774
3698
 
3775
3699
 
3776
3700
 
3701
+
3777
3702
  <fo:block-container margin-left="0mm">
3778
3703
 
3779
3704
 
@@ -4979,9 +4904,10 @@
4979
4904
 
4980
4905
 
4981
4906
  </xsl:if>
4982
-
4907
+
4908
+
4909
+
4983
4910
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4984
-
4985
4911
  <xsl:if test="normalize-space(@citeas) = ''">
4986
4912
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
4987
4913
  </xsl:if>
@@ -4989,6 +4915,7 @@
4989
4915
 
4990
4916
 
4991
4917
 
4918
+
4992
4919
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
4993
4920
 
4994
4921
  </xsl:if>
@@ -5914,4 +5841,100 @@
5914
5841
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
5915
5842
  </xsl:choose>
5916
5843
  </xsl:attribute>
5844
+ </xsl:template><xsl:template name="number-to-words">
5845
+ <xsl:param name="number"/>
5846
+ <xsl:param name="first"/>
5847
+ <xsl:if test="$number != ''">
5848
+ <xsl:variable name="words">
5849
+ <words>
5850
+ <word cardinal="1">One-</word>
5851
+ <word ordinal="1">First </word>
5852
+ <word cardinal="2">Two-</word>
5853
+ <word ordinal="2">Second </word>
5854
+ <word cardinal="3">Three-</word>
5855
+ <word ordinal="3">Third </word>
5856
+ <word cardinal="4">Four-</word>
5857
+ <word ordinal="4">Fourth </word>
5858
+ <word cardinal="5">Five-</word>
5859
+ <word ordinal="5">Fifth </word>
5860
+ <word cardinal="6">Six-</word>
5861
+ <word ordinal="6">Sixth </word>
5862
+ <word cardinal="7">Seven-</word>
5863
+ <word ordinal="7">Seventh </word>
5864
+ <word cardinal="8">Eight-</word>
5865
+ <word ordinal="8">Eighth </word>
5866
+ <word cardinal="9">Nine-</word>
5867
+ <word ordinal="9">Ninth </word>
5868
+ <word ordinal="10">Tenth </word>
5869
+ <word ordinal="11">Eleventh </word>
5870
+ <word ordinal="12">Twelfth </word>
5871
+ <word ordinal="13">Thirteenth </word>
5872
+ <word ordinal="14">Fourteenth </word>
5873
+ <word ordinal="15">Fifteenth </word>
5874
+ <word ordinal="16">Sixteenth </word>
5875
+ <word ordinal="17">Seventeenth </word>
5876
+ <word ordinal="18">Eighteenth </word>
5877
+ <word ordinal="19">Nineteenth </word>
5878
+ <word cardinal="20">Twenty-</word>
5879
+ <word ordinal="20">Twentieth </word>
5880
+ <word cardinal="30">Thirty-</word>
5881
+ <word ordinal="30">Thirtieth </word>
5882
+ <word cardinal="40">Forty-</word>
5883
+ <word ordinal="40">Fortieth </word>
5884
+ <word cardinal="50">Fifty-</word>
5885
+ <word ordinal="50">Fiftieth </word>
5886
+ <word cardinal="60">Sixty-</word>
5887
+ <word ordinal="60">Sixtieth </word>
5888
+ <word cardinal="70">Seventy-</word>
5889
+ <word ordinal="70">Seventieth </word>
5890
+ <word cardinal="80">Eighty-</word>
5891
+ <word ordinal="80">Eightieth </word>
5892
+ <word cardinal="90">Ninety-</word>
5893
+ <word ordinal="90">Ninetieth </word>
5894
+ <word cardinal="100">Hundred-</word>
5895
+ <word ordinal="100">Hundredth </word>
5896
+ </words>
5897
+ </xsl:variable>
5898
+
5899
+ <xsl:variable name="ordinal" select="xalan:nodeset($words)//word[@ordinal = $number]/text()"/>
5900
+
5901
+ <xsl:variable name="value">
5902
+ <xsl:choose>
5903
+ <xsl:when test="$ordinal != ''">
5904
+ <xsl:value-of select="$ordinal"/>
5905
+ </xsl:when>
5906
+ <xsl:otherwise>
5907
+ <xsl:choose>
5908
+ <xsl:when test="$number &lt; 100">
5909
+ <xsl:variable name="decade" select="concat(substring($number,1,1), '0')"/>
5910
+ <xsl:variable name="digit" select="substring($number,2)"/>
5911
+ <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $decade]/text()"/>
5912
+ <xsl:value-of select="xalan:nodeset($words)//word[@ordinal = $digit]/text()"/>
5913
+ </xsl:when>
5914
+ <xsl:otherwise>
5915
+ <!-- more 100 -->
5916
+ <xsl:variable name="hundred" select="substring($number,1,1)"/>
5917
+ <xsl:variable name="digits" select="number(substring($number,2))"/>
5918
+ <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $hundred]/text()"/>
5919
+ <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = '100']/text()"/>
5920
+ <xsl:call-template name="number-to-words">
5921
+ <xsl:with-param name="number" select="$digits"/>
5922
+ </xsl:call-template>
5923
+ </xsl:otherwise>
5924
+ </xsl:choose>
5925
+ </xsl:otherwise>
5926
+ </xsl:choose>
5927
+ </xsl:variable>
5928
+ <xsl:choose>
5929
+ <xsl:when test="$first = 'true'">
5930
+ <xsl:variable name="value_lc" select="java:toLowerCase(java:java.lang.String.new($value))"/>
5931
+ <xsl:call-template name="capitalize">
5932
+ <xsl:with-param name="str" select="$value_lc"/>
5933
+ </xsl:call-template>
5934
+ </xsl:when>
5935
+ <xsl:otherwise>
5936
+ <xsl:value-of select="$value"/>
5937
+ </xsl:otherwise>
5938
+ </xsl:choose>
5939
+ </xsl:if>
5917
5940
  </xsl:template></xsl:stylesheet>
@@ -2190,6 +2190,7 @@
2190
2190
 
2191
2191
 
2192
2192
 
2193
+
2193
2194
  <!-- fn will be processed inside 'note' processing -->
2194
2195
 
2195
2196
 
@@ -2198,6 +2199,10 @@
2198
2199
 
2199
2200
 
2200
2201
 
2202
+
2203
+ <!-- for BSI (not PAS) display Notes before footnotes -->
2204
+
2205
+
2201
2206
  <!-- except gb -->
2202
2207
 
2203
2208
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
@@ -2223,6 +2228,10 @@
2223
2228
  <!-- fn processing -->
2224
2229
  <xsl:call-template name="fn_display"/>
2225
2230
 
2231
+
2232
+ <!-- for PAS display Notes after footnotes -->
2233
+
2234
+
2226
2235
  </fo:table-cell>
2227
2236
  </fo:table-row>
2228
2237
  </fo:table-body>
@@ -2280,6 +2289,7 @@
2280
2289
  <xsl:if test="$parent-name = 'tfoot'">
2281
2290
 
2282
2291
 
2292
+
2283
2293
  </xsl:if>
2284
2294
 
2285
2295
 
@@ -2430,8 +2440,13 @@
2430
2440
 
2431
2441
 
2432
2442
 
2443
+
2444
+ <!-- Table's note name (NOTE, for example) -->
2445
+
2433
2446
  <fo:inline padding-right="2mm">
2434
2447
 
2448
+
2449
+
2435
2450
 
2436
2451
 
2437
2452
  <xsl:if test="@type = 'source' or @type = 'abbreviation'">
@@ -2449,6 +2464,8 @@
2449
2464
 
2450
2465
  </fo:inline>
2451
2466
 
2467
+
2468
+
2452
2469
  <xsl:apply-templates mode="process"/>
2453
2470
  </fo:block>
2454
2471
 
@@ -2468,6 +2485,8 @@
2468
2485
  <xsl:variable name="reference" select="@reference"/>
2469
2486
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
2470
2487
  <fo:block margin-bottom="12pt">
2488
+
2489
+
2471
2490
 
2472
2491
 
2473
2492
 
@@ -2487,6 +2506,7 @@
2487
2506
  <xsl:value-of select="@reference"/>
2488
2507
 
2489
2508
 
2509
+
2490
2510
  </fo:inline>
2491
2511
  <fo:inline>
2492
2512
 
@@ -2636,6 +2656,7 @@
2636
2656
 
2637
2657
  <xsl:value-of select="@reference"/>
2638
2658
 
2659
+
2639
2660
  </fo:basic-link>
2640
2661
  </fo:inline>
2641
2662
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
@@ -3643,6 +3664,7 @@
3643
3664
 
3644
3665
 
3645
3666
 
3667
+
3646
3668
  <fo:block-container margin-left="0mm">
3647
3669
 
3648
3670
 
@@ -4853,9 +4875,10 @@
4853
4875
 
4854
4876
 
4855
4877
  </xsl:if>
4856
-
4878
+
4879
+
4880
+
4857
4881
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4858
-
4859
4882
  <xsl:if test="normalize-space(@citeas) = ''">
4860
4883
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
4861
4884
  </xsl:if>
@@ -4863,6 +4886,7 @@
4863
4886
 
4864
4887
 
4865
4888
 
4889
+
4866
4890
  </xsl:if>
4867
4891
 
4868
4892
  <xsl:apply-templates/>
@@ -5788,4 +5812,100 @@
5788
5812
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
5789
5813
  </xsl:choose>
5790
5814
  </xsl:attribute>
5815
+ </xsl:template><xsl:template name="number-to-words">
5816
+ <xsl:param name="number"/>
5817
+ <xsl:param name="first"/>
5818
+ <xsl:if test="$number != ''">
5819
+ <xsl:variable name="words">
5820
+ <words>
5821
+ <word cardinal="1">One-</word>
5822
+ <word ordinal="1">First </word>
5823
+ <word cardinal="2">Two-</word>
5824
+ <word ordinal="2">Second </word>
5825
+ <word cardinal="3">Three-</word>
5826
+ <word ordinal="3">Third </word>
5827
+ <word cardinal="4">Four-</word>
5828
+ <word ordinal="4">Fourth </word>
5829
+ <word cardinal="5">Five-</word>
5830
+ <word ordinal="5">Fifth </word>
5831
+ <word cardinal="6">Six-</word>
5832
+ <word ordinal="6">Sixth </word>
5833
+ <word cardinal="7">Seven-</word>
5834
+ <word ordinal="7">Seventh </word>
5835
+ <word cardinal="8">Eight-</word>
5836
+ <word ordinal="8">Eighth </word>
5837
+ <word cardinal="9">Nine-</word>
5838
+ <word ordinal="9">Ninth </word>
5839
+ <word ordinal="10">Tenth </word>
5840
+ <word ordinal="11">Eleventh </word>
5841
+ <word ordinal="12">Twelfth </word>
5842
+ <word ordinal="13">Thirteenth </word>
5843
+ <word ordinal="14">Fourteenth </word>
5844
+ <word ordinal="15">Fifteenth </word>
5845
+ <word ordinal="16">Sixteenth </word>
5846
+ <word ordinal="17">Seventeenth </word>
5847
+ <word ordinal="18">Eighteenth </word>
5848
+ <word ordinal="19">Nineteenth </word>
5849
+ <word cardinal="20">Twenty-</word>
5850
+ <word ordinal="20">Twentieth </word>
5851
+ <word cardinal="30">Thirty-</word>
5852
+ <word ordinal="30">Thirtieth </word>
5853
+ <word cardinal="40">Forty-</word>
5854
+ <word ordinal="40">Fortieth </word>
5855
+ <word cardinal="50">Fifty-</word>
5856
+ <word ordinal="50">Fiftieth </word>
5857
+ <word cardinal="60">Sixty-</word>
5858
+ <word ordinal="60">Sixtieth </word>
5859
+ <word cardinal="70">Seventy-</word>
5860
+ <word ordinal="70">Seventieth </word>
5861
+ <word cardinal="80">Eighty-</word>
5862
+ <word ordinal="80">Eightieth </word>
5863
+ <word cardinal="90">Ninety-</word>
5864
+ <word ordinal="90">Ninetieth </word>
5865
+ <word cardinal="100">Hundred-</word>
5866
+ <word ordinal="100">Hundredth </word>
5867
+ </words>
5868
+ </xsl:variable>
5869
+
5870
+ <xsl:variable name="ordinal" select="xalan:nodeset($words)//word[@ordinal = $number]/text()"/>
5871
+
5872
+ <xsl:variable name="value">
5873
+ <xsl:choose>
5874
+ <xsl:when test="$ordinal != ''">
5875
+ <xsl:value-of select="$ordinal"/>
5876
+ </xsl:when>
5877
+ <xsl:otherwise>
5878
+ <xsl:choose>
5879
+ <xsl:when test="$number &lt; 100">
5880
+ <xsl:variable name="decade" select="concat(substring($number,1,1), '0')"/>
5881
+ <xsl:variable name="digit" select="substring($number,2)"/>
5882
+ <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $decade]/text()"/>
5883
+ <xsl:value-of select="xalan:nodeset($words)//word[@ordinal = $digit]/text()"/>
5884
+ </xsl:when>
5885
+ <xsl:otherwise>
5886
+ <!-- more 100 -->
5887
+ <xsl:variable name="hundred" select="substring($number,1,1)"/>
5888
+ <xsl:variable name="digits" select="number(substring($number,2))"/>
5889
+ <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $hundred]/text()"/>
5890
+ <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = '100']/text()"/>
5891
+ <xsl:call-template name="number-to-words">
5892
+ <xsl:with-param name="number" select="$digits"/>
5893
+ </xsl:call-template>
5894
+ </xsl:otherwise>
5895
+ </xsl:choose>
5896
+ </xsl:otherwise>
5897
+ </xsl:choose>
5898
+ </xsl:variable>
5899
+ <xsl:choose>
5900
+ <xsl:when test="$first = 'true'">
5901
+ <xsl:variable name="value_lc" select="java:toLowerCase(java:java.lang.String.new($value))"/>
5902
+ <xsl:call-template name="capitalize">
5903
+ <xsl:with-param name="str" select="$value_lc"/>
5904
+ </xsl:call-template>
5905
+ </xsl:when>
5906
+ <xsl:otherwise>
5907
+ <xsl:value-of select="$value"/>
5908
+ </xsl:otherwise>
5909
+ </xsl:choose>
5910
+ </xsl:if>
5791
5911
  </xsl:template></xsl:stylesheet>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.6.6".freeze
3
+ VERSION = "0.6.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
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-05 00:00:00.000000000 Z
11
+ date: 2021-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639