metanorma-ogc 1.5.4.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +4 -32
  3. data/.gitignore +11 -0
  4. data/Gemfile +0 -1
  5. data/lib/isodoc/ogc/base_convert.rb +1 -1
  6. data/lib/isodoc/ogc/biblio.rb +7 -6
  7. data/lib/isodoc/ogc/html/html_ogc_titlepage.html +6 -0
  8. data/lib/isodoc/ogc/html/htmlstyle.css +49 -28
  9. data/lib/isodoc/ogc/html/htmlstyle.scss +19 -11
  10. data/lib/isodoc/ogc/html/word_ogc_titlepage.html +6 -1
  11. data/lib/isodoc/ogc/html/word_ogc_titlepage_wp.html +6 -1
  12. data/lib/isodoc/ogc/html/wordstyle.css +30 -18
  13. data/lib/isodoc/ogc/html/wordstyle.scss +30 -18
  14. data/lib/isodoc/ogc/html/wordstyle_wp.css +22 -12
  15. data/lib/isodoc/ogc/html/wordstyle_wp.scss +22 -12
  16. data/lib/isodoc/ogc/metadata.rb +4 -0
  17. data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +1677 -1309
  18. data/lib/isodoc/ogc/ogc.best-practice.xsl +1677 -1309
  19. data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +1677 -1309
  20. data/lib/isodoc/ogc/ogc.community-practice.xsl +1677 -1309
  21. data/lib/isodoc/ogc/ogc.community-standard.xsl +1677 -1309
  22. data/lib/isodoc/ogc/ogc.discussion-paper.xsl +1677 -1309
  23. data/lib/isodoc/ogc/ogc.engineering-report.xsl +1677 -1309
  24. data/lib/isodoc/ogc/ogc.other.xsl +1677 -1309
  25. data/lib/isodoc/ogc/ogc.policy.xsl +1677 -1309
  26. data/lib/isodoc/ogc/ogc.reference-model.xsl +1677 -1309
  27. data/lib/isodoc/ogc/ogc.release-notes.xsl +1677 -1309
  28. data/lib/isodoc/ogc/ogc.standard.xsl +1677 -1309
  29. data/lib/isodoc/ogc/ogc.test-suite.xsl +1677 -1309
  30. data/lib/isodoc/ogc/ogc.user-guide.xsl +1677 -1309
  31. data/lib/isodoc/ogc/ogc.white-paper.xsl +1655 -1303
  32. data/lib/isodoc/ogc/presentation_xml_convert.rb +35 -18
  33. data/lib/isodoc/ogc/reqt.rb +17 -3
  34. data/lib/{asciidoctor → metanorma}/ogc/basicdoc.rng +0 -0
  35. data/lib/{asciidoctor → metanorma}/ogc/biblio.rng +2 -2
  36. data/lib/{asciidoctor → metanorma}/ogc/boilerplate.xml +0 -0
  37. data/lib/{asciidoctor → metanorma}/ogc/cleanup.rb +54 -10
  38. data/lib/{asciidoctor → metanorma}/ogc/converter.rb +13 -3
  39. data/lib/{asciidoctor → metanorma}/ogc/front.rb +15 -3
  40. data/lib/{asciidoctor → metanorma}/ogc/isodoc.rng +104 -3
  41. data/lib/{asciidoctor → metanorma}/ogc/ogc.rng +0 -0
  42. data/lib/{asciidoctor → metanorma}/ogc/reqt.rng +0 -0
  43. data/lib/{asciidoctor → metanorma}/ogc/validate.rb +39 -1
  44. data/lib/metanorma/ogc/version.rb +1 -1
  45. data/lib/metanorma/ogc.rb +1 -0
  46. data/lib/metanorma-ogc.rb +0 -1
  47. data/metanorma-ogc.gemspec +1 -1
  48. metadata +14 -15
  49. data/lib/asciidoctor/ogc.rb +0 -6
@@ -9,8 +9,6 @@
9
9
 
10
10
  <xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
11
11
 
12
- <xsl:variable name="pageWidth" select="215.9"/>
13
- <xsl:variable name="pageHeight" select="279.4"/>
14
12
  <xsl:variable name="marginLeftRight1" select="35"/>
15
13
  <xsl:variable name="marginLeftRight2" select="17"/>
16
14
  <xsl:variable name="marginTop" select="16.5"/>
@@ -154,7 +152,7 @@
154
152
 
155
153
  <xsl:template match="/">
156
154
  <xsl:call-template name="namespaceCheck"/>
157
- <fo:root font-family="Lato, STIX Two Math, Source Han Sans" font-size="11pt" color="{$color_main}" xml:lang="{$lang}">
155
+ <fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
158
156
  <fo:layout-master-set>
159
157
  <!-- Cover page -->
160
158
  <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
@@ -323,12 +321,35 @@
323
321
  <fo:inline font-weight="bold">Publication Date: </fo:inline>
324
322
  <xsl:value-of select="/ogc:ogc-standard/ogc:bibdata/ogc:date[@type = 'published']/ogc:on"/>
325
323
  </fo:block>
326
- <fo:block margin-bottom="12pt">
327
- <fo:inline font-weight="bold">Editor: </fo:inline>
328
- <xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
329
- <xsl:value-of select="."/>
330
- <xsl:if test="position() != last()">, </xsl:if>
331
- </xsl:for-each>
324
+
325
+ <fo:block margin-bottom="12pt">
326
+ <xsl:if test="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='author']/ogc:person/ogc:name/ogc:completename">
327
+ <fo:block>
328
+ <fo:inline font-weight="bold">Author: </fo:inline>
329
+ <xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='author']/ogc:person/ogc:name/ogc:completename">
330
+ <xsl:value-of select="."/>
331
+ <xsl:if test="position() != last()">, </xsl:if>
332
+ </xsl:for-each>
333
+ </fo:block>
334
+ </xsl:if>
335
+ <xsl:if test="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
336
+ <fo:block>
337
+ <fo:inline font-weight="bold">Editor: </fo:inline>
338
+ <xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='editor']/ogc:person/ogc:name/ogc:completename">
339
+ <xsl:value-of select="."/>
340
+ <xsl:if test="position() != last()">, </xsl:if>
341
+ </xsl:for-each>
342
+ </fo:block>
343
+ </xsl:if>
344
+ <xsl:if test="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='contributor']/ogc:person/ogc:name/ogc:completename">
345
+ <fo:block>
346
+ <fo:inline font-weight="bold">Contributor: </fo:inline>
347
+ <xsl:for-each select="/ogc:ogc-standard/ogc:bibdata/ogc:contributor[ogc:role/@type='contributor']/ogc:person/ogc:name/ogc:completename">
348
+ <xsl:value-of select="."/>
349
+ <xsl:if test="position() != last()">, </xsl:if>
350
+ </xsl:for-each>
351
+ </fo:block>
352
+ </xsl:if>
332
353
  </fo:block>
333
354
  </fo:block>
334
355
 
@@ -767,9 +788,6 @@
767
788
  <!-- ============================= -->
768
789
  <!-- CONTENTS -->
769
790
  <!-- ============================= -->
770
- <xsl:template match="node()" mode="contents">
771
- <xsl:apply-templates mode="contents"/>
772
- </xsl:template>
773
791
 
774
792
  <!-- element with title -->
775
793
  <xsl:template match="*[ogc:title]" mode="contents">
@@ -844,46 +862,11 @@
844
862
  </fo:block>
845
863
  </xsl:template>
846
864
 
847
- <xsl:template match="ogc:license-statement | ogc:feedback-statement | ogc:copyright-statement">
848
- <fo:block font-size="8pt" line-height="125%">
849
- <xsl:apply-templates/>
850
- </fo:block>
851
- </xsl:template>
852
-
853
- <xsl:template match="ogc:license-statement//ogc:title">
854
- <xsl:variable name="level">
855
- <xsl:call-template name="getLevel"/>
856
- </xsl:variable>
857
- <fo:block font-weight="bold" color="{$color_blue}" role="H{$level}">
858
- <xsl:apply-templates/>
859
- </fo:block>
860
- </xsl:template>
861
-
862
- <xsl:template match="ogc:copyright-statement//ogc:title">
863
- <xsl:variable name="level">
864
- <xsl:call-template name="getLevel"/>
865
- </xsl:variable>
866
- <fo:block font-weight="bold" color="{$color_blue}" margin-top="24pt" role="H{$level}">
867
- <xsl:apply-templates/>
868
- </fo:block>
869
- </xsl:template>
870
-
871
- <xsl:template match="ogc:license-statement//ogc:p | ogc:feedback-statement//ogc:p | ogc:copyright-statement//ogc:p">
872
- <fo:block margin-top="6pt">
873
- <xsl:apply-templates/>
874
- </fo:block>
875
- </xsl:template>
876
-
877
- <xsl:template match="ogc:legal-statement">
878
- <fo:block font-size="8pt">
879
- <xsl:apply-templates/>
880
- </fo:block>
881
- </xsl:template>
882
-
883
- <xsl:template match="ogc:legal-statement//ogc:title">
865
+ <xsl:template match="ogc:legal-statement//ogc:title" priority="2">
884
866
  <xsl:variable name="level">
885
867
  <xsl:call-template name="getLevel"/>
886
868
  </xsl:variable>
869
+ <!-- inline title -->
887
870
  <fo:inline font-weight="bold" role="H{$level}">
888
871
  <xsl:apply-templates/><xsl:text>: </xsl:text>
889
872
  </fo:inline>
@@ -895,8 +878,8 @@
895
878
  </xsl:call-template>
896
879
  </xsl:template>
897
880
 
898
-
899
- <xsl:template match="ogc:legal-statement//ogc:p">
881
+
882
+ <xsl:template match="ogc:legal-statement//ogc:p" priority="2">
900
883
  <fo:inline>
901
884
  <xsl:apply-templates/>
902
885
  </fo:inline>
@@ -917,13 +900,7 @@
917
900
  <!-- title -->
918
901
  <!-- ====== -->
919
902
 
920
- <xsl:template match="ogc:annex2/ogc:title">
921
- <fo:block font-size="12pt" text-align="center" margin-bottom="12pt" keep-with-next="always">
922
- <xsl:apply-templates/>
923
- </fo:block>
924
- </xsl:template>
925
-
926
- <xsl:template match="ogc:title">
903
+ <xsl:template match="ogc:title" name="title">
927
904
 
928
905
  <xsl:variable name="level">
929
906
  <xsl:call-template name="getLevel"/>
@@ -947,7 +924,6 @@
947
924
  </xsl:choose>
948
925
  </xsl:variable>
949
926
 
950
-
951
927
  <xsl:variable name="element-name">
952
928
  <xsl:choose>
953
929
  <xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
@@ -977,10 +953,6 @@
977
953
  <fo:table-cell>
978
954
  <fo:block space-before="36pt">
979
955
  <xsl:variable name="title">
980
- <!-- <xsl:call-template name="extractTitle"/> -->
981
- <!-- <xsl:for-each select="..">
982
- <xsl:call-template name="getName"/>
983
- </xsl:for-each> -->
984
956
  <xsl:choose>
985
957
  <xsl:when test="*[local-name() = 'tab']">
986
958
  <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
@@ -1044,7 +1016,7 @@
1044
1016
  <!-- ====== -->
1045
1017
  <!-- ====== -->
1046
1018
 
1047
- <xsl:template match="ogc:p">
1019
+ <xsl:template match="ogc:p" name="paragraph">
1048
1020
  <xsl:param name="inline" select="'false'"/>
1049
1021
  <xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
1050
1022
  <xsl:variable name="element-name">
@@ -1096,46 +1068,6 @@
1096
1068
  </fo:block>
1097
1069
  </xsl:template>
1098
1070
 
1099
-
1100
-
1101
- <xsl:template match="ogc:bibitem">
1102
- <fo:block id="{@id}" margin-bottom="12pt" start-indent="25mm" text-indent="-25mm" line-height="115%">
1103
- <xsl:if test=".//ogc:fn">
1104
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
1105
- </xsl:if>
1106
- <xsl:call-template name="processBibitem"/>
1107
- </fo:block>
1108
- </xsl:template>
1109
-
1110
-
1111
- <xsl:template match="ogc:bibitem/ogc:note" priority="2">
1112
- <fo:footnote>
1113
- <xsl:variable name="number">
1114
- <xsl:choose>
1115
- <xsl:when test="ancestor::ogc:references[preceding-sibling::ogc:references]">
1116
- <xsl:number level="any" count="ogc:references[preceding-sibling::ogc:references]//ogc:bibitem/ogc:note"/>
1117
- </xsl:when>
1118
- <xsl:otherwise>
1119
- <xsl:number level="any" count="ogc:bibitem/ogc:note"/>
1120
- </xsl:otherwise>
1121
- </xsl:choose>
1122
- </xsl:variable>
1123
- <fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super"> <!-- 60% baseline-shift="35%" -->
1124
- <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
1125
- <xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
1126
- </fo:basic-link>
1127
- </fo:inline>
1128
- <fo:footnote-body>
1129
- <fo:block font-size="10pt" margin-bottom="12pt" start-indent="0pt">
1130
- <fo:inline id="{generate-id()}" keep-with-next.within-line="always" font-size="60%" vertical-align="super"><!-- baseline-shift="30%" padding-right="9mm" alignment-baseline="hanging" -->
1131
- <xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
1132
- </fo:inline>
1133
- <xsl:apply-templates/>
1134
- </fo:block>
1135
- </fo:footnote-body>
1136
- </fo:footnote>
1137
- </xsl:template>
1138
-
1139
1071
 
1140
1072
 
1141
1073
  <xsl:template match="ogc:ul | ogc:ol" mode="ul_ol">
@@ -1173,13 +1105,10 @@
1173
1105
  <fo:list-item id="{@id}">
1174
1106
  <fo:list-item-label end-indent="label-end()">
1175
1107
  <fo:block>
1176
- <xsl:if test="local-name(..) = 'ul'">
1177
- <xsl:attribute name="color">
1178
- <xsl:value-of select="$color_design"/>
1179
- </xsl:attribute>
1180
- </xsl:if>
1181
1108
  <xsl:choose>
1182
- <xsl:when test="local-name(..) = 'ul'">•</xsl:when> <!-- &#x2014; dash -->
1109
+ <xsl:when test="local-name(..) = 'ul'">
1110
+ <xsl:call-template name="setULLabel"/>
1111
+ </xsl:when>
1183
1112
  <xsl:otherwise> <!-- for ordered lists -->
1184
1113
  <xsl:choose>
1185
1114
  <xsl:when test="../@class = 'steps'">
@@ -1230,8 +1159,8 @@
1230
1159
  <fo:list-item-label><fo:block/></fo:list-item-label>
1231
1160
  <fo:list-item-body>
1232
1161
  <fo:block>
1233
- <xsl:apply-templates select="ogc:name" mode="presentation"/>
1234
- <xsl:apply-templates/>
1162
+ <xsl:apply-templates select="ogc:name"/>
1163
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
1235
1164
  </fo:block>
1236
1165
  </fo:list-item-body>
1237
1166
  </fo:list-item>
@@ -1242,22 +1171,40 @@
1242
1171
  <xsl:call-template name="getLevelTermName"/>
1243
1172
  </xsl:variable>
1244
1173
  <fo:block space-before="36pt" margin-bottom="10pt" keep-with-next="always" role="H{$levelTerm}">
1245
- <fo:block color="{$color_blue}" keep-with-next="always">
1246
- <fo:inline font-size="18pt" padding-right="1mm"><xsl:apply-templates/></fo:inline>
1247
- <xsl:apply-templates select="../ogc:preferred | ../ogc:deprecated | ../ogc:admitted" mode="term_name"/>
1248
- </fo:block>
1249
- <xsl:call-template name="insertOrangeHorizontalLine"/>
1174
+ <fo:list-block color="{$color_blue}" keep-with-next="always" provisional-distance-between-starts="{string-length()*3}mm">
1175
+ <fo:list-item>
1176
+ <fo:list-item-label end-indent="label-end()">
1177
+ <fo:block><fo:inline font-size="18pt" padding-right="1mm"><xsl:apply-templates/></fo:inline></fo:block>
1178
+ </fo:list-item-label>
1179
+ <fo:list-item-body start-indent="body-start()">
1180
+ <fo:block>
1181
+ <xsl:apply-templates select="../ogc:preferred | ../ogc:deprecated | ../ogc:admitted" mode="term_name"/>
1182
+ </fo:block>
1183
+ </fo:list-item-body>
1184
+ </fo:list-item>
1185
+ </fo:list-block>
1186
+ <xsl:call-template name="insertShortHorizontalLine"/>
1250
1187
  </fo:block>
1251
1188
  </xsl:template>
1252
1189
 
1253
1190
  <xsl:template match="ogc:preferred | ogc:deprecated | ogc:admitted" priority="2"/>
1254
1191
 
1255
- <xsl:template match="ogc:preferred" mode="term_name">
1192
+ <!-- first preferred displays on the same line as term/name -->
1193
+ <xsl:template match="ogc:preferred[not(preceding-sibling::ogc:preferred)]" mode="term_name" priority="2">
1256
1194
  <fo:inline font-size="18pt" padding-right="3mm"><xsl:call-template name="setStyle_preferred"/><xsl:apply-templates/></fo:inline>
1257
1195
  <fo:inline padding-right="2mm"> </fo:inline>
1258
1196
  </xsl:template>
1259
1197
 
1260
- <xsl:template match="ogc:deprecated | ogc:admitted" mode="term_name">
1198
+ <xsl:template match="ogc:preferred | ogc:deprecated | ogc:admitted" mode="term_name">
1199
+ <xsl:choose>
1200
+ <xsl:when test="preceding-sibling::*[self::ogc:preferred or self::deprecated or self::admitted]">
1201
+ <fo:block space-before="6pt"><xsl:call-template name="displayTerm"/></fo:block> <!-- block wrapper -->
1202
+ </xsl:when>
1203
+ <xsl:otherwise><xsl:call-template name="displayTerm"/></xsl:otherwise>
1204
+ </xsl:choose>
1205
+ </xsl:template>
1206
+
1207
+ <xsl:template name="displayTerm">
1261
1208
  <fo:inline font-size="18pt" padding-right="3mm"><xsl:apply-templates/></fo:inline>
1262
1209
  <fo:inline font-size="11pt" padding="1mm" padding-bottom="0.5mm" baseline-shift="25%">
1263
1210
  <xsl:variable name="kind" select="local-name()"/>
@@ -1272,69 +1219,13 @@
1272
1219
  <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($kind))"/>
1273
1220
  </xsl:call-template>
1274
1221
  </fo:inline>
1275
- <fo:inline padding-right="2mm"> </fo:inline>
1222
+ <xsl:if test="following-sibling::*[self::ogc:preferred or self::deprecated or self::admitted]">
1223
+ <fo:inline padding-right="2mm"> </fo:inline>
1224
+ </xsl:if>
1276
1225
  </xsl:template>
1277
1226
 
1278
- <!-- [position() &gt; 1] -->
1279
- <xsl:template match="ogc:references[not(@normative='true')]">
1280
- <fo:block break-after="page"/>
1281
- <fo:block id="{@id}" line-height="120%">
1282
- <xsl:apply-templates/>
1283
- </fo:block>
1284
- </xsl:template>
1285
-
1286
- <xsl:template match="ogc:annex//ogc:references">
1287
- <fo:block id="{@id}">
1288
- <xsl:apply-templates/>
1289
- </fo:block>
1290
- </xsl:template>
1291
-
1292
- <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
1293
- <xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem">
1294
- <fo:list-block id="{@id}" margin-bottom="12pt" provisional-distance-between-starts="13mm">
1295
- <fo:list-item>
1296
- <fo:list-item-label end-indent="label-end()">
1297
- <fo:block>
1298
- <fo:inline>
1299
- <xsl:number format="1."/>
1300
- </fo:inline>
1301
- </fo:block>
1302
- </fo:list-item-label>
1303
- <fo:list-item-body start-indent="body-start()">
1304
- <fo:block>
1305
- <xsl:call-template name="processBibitem"/>
1306
- </fo:block>
1307
- </fo:list-item-body>
1308
- </fo:list-item>
1309
- </fo:list-block>
1310
- </xsl:template>
1311
1227
 
1312
-
1313
- <xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem" mode="contents"/>
1314
1228
 
1315
- <xsl:template match="ogc:bibitem/ogc:title">
1316
- <fo:inline font-style="italic">
1317
- <xsl:apply-templates/>
1318
- </fo:inline>
1319
- </xsl:template>
1320
-
1321
-
1322
- <xsl:template match="ogc:admonition">
1323
- <fo:block-container border="0.5pt solid rgb(79, 129, 189)" color="rgb(79, 129, 189)" margin-left="16mm" margin-right="16mm" margin-bottom="12pt">
1324
- <fo:block-container margin-left="0mm" margin-right="0mm" padding="2mm" padding-top="3mm">
1325
- <fo:block font-size="11pt" margin-bottom="6pt" font-weight="bold" font-style="italic" text-align="center">
1326
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
1327
- </fo:block>
1328
- <fo:block font-style="italic">
1329
- <xsl:apply-templates/>
1330
- </fo:block>
1331
- </fo:block-container>
1332
- </fo:block-container>
1333
-
1334
-
1335
- </xsl:template>
1336
-
1337
-
1338
1229
  <xsl:template match="ogc:formula/ogc:stem">
1339
1230
  <fo:block margin-top="6pt" margin-bottom="12pt">
1340
1231
  <fo:table table-layout="fixed" width="100%">
@@ -1349,7 +1240,7 @@
1349
1240
  </fo:table-cell>
1350
1241
  <fo:table-cell display-align="center">
1351
1242
  <fo:block text-align="right">
1352
- <xsl:apply-templates select="../ogc:name" mode="presentation"/>
1243
+ <xsl:apply-templates select="../ogc:name" mode="formula_number"/>
1353
1244
  </fo:block>
1354
1245
  </fo:table-cell>
1355
1246
  </fo:table-row>
@@ -1368,21 +1259,16 @@
1368
1259
  <xsl:template match="ogc:figure" priority="2">
1369
1260
  <fo:block-container id="{@id}" margin-top="12pt" margin-bottom="12pt">
1370
1261
  <fo:block>
1371
- <xsl:apply-templates/>
1262
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
1372
1263
  </fo:block>
1373
1264
  <xsl:call-template name="fn_display_figure"/>
1374
1265
  <xsl:for-each select="ogc:note">
1375
1266
  <xsl:call-template name="note"/>
1376
1267
  </xsl:for-each>
1377
- <xsl:apply-templates select="ogc:name" mode="presentation"/>
1268
+ <xsl:apply-templates select="ogc:name"/>
1378
1269
  </fo:block-container>
1379
1270
  </xsl:template>
1380
1271
 
1381
- <xsl:template match="ogc:pagebreak">
1382
- <fo:block break-after="page"/>
1383
- <fo:block> </fo:block>
1384
- <fo:block break-after="page"/>
1385
- </xsl:template>
1386
1272
 
1387
1273
  <xsl:template name="insertHeaderFooter">
1388
1274
  <xsl:param name="color" select="$color_blue"/>
@@ -1609,7 +1495,7 @@
1609
1495
  </xsl:if>
1610
1496
 
1611
1497
  </fo:block>
1612
- <xsl:call-template name="insertOrangeHorizontalLine"/>
1498
+ <xsl:call-template name="insertShortHorizontalLine"/>
1613
1499
  </fo:block>
1614
1500
  </xsl:template>
1615
1501
 
@@ -1674,7 +1560,7 @@
1674
1560
  </xsl:choose>
1675
1561
  </xsl:template>
1676
1562
 
1677
- <xsl:template name="insertOrangeHorizontalLine">
1563
+ <xsl:template name="insertShortHorizontalLine">
1678
1564
  <fo:block-container width="12.7mm" border-top="1pt solid {$color_design}" margin-top="3mm">
1679
1565
  <fo:block font-size="1pt"> </fo:block>
1680
1566
  </fo:block-container>
@@ -1688,29 +1574,23 @@
1688
1574
  </fo:static-content>
1689
1575
  </xsl:template>
1690
1576
 
1691
- <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
1692
-
1693
- <title-annex lang="en">Annex </title-annex>
1694
- <title-annex lang="fr">Annexe </title-annex>
1695
-
1696
- <title-annex lang="zh">Annex </title-annex>
1697
-
1698
-
1577
+ <xsl:variable name="pageWidth_">
1578
+ 215.9
1579
+ </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
1580
+ 279.4
1581
+ </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="titles_">
1699
1582
 
1700
1583
  <title-edition lang="en">
1701
1584
 
1702
-
1703
- <xsl:text>Version</xsl:text>
1704
-
1585
+ <xsl:text>Version</xsl:text>
1586
+
1705
1587
  </title-edition>
1706
1588
 
1707
1589
  <title-edition lang="fr">
1708
-
1709
- <xsl:text>Édition </xsl:text>
1710
-
1590
+ <xsl:text>Édition </xsl:text>
1711
1591
  </title-edition>
1712
1592
 
1713
-
1593
+ <!-- These titles of Table of contents renders different than determined in localized-strings -->
1714
1594
  <title-toc lang="en">
1715
1595
 
1716
1596
  <xsl:text>Contents</xsl:text>
@@ -1719,24 +1599,13 @@
1719
1599
 
1720
1600
  </title-toc>
1721
1601
  <title-toc lang="fr">
1602
+ <xsl:text>Sommaire</xsl:text>
1603
+ </title-toc>
1604
+ <title-toc lang="zh">
1722
1605
 
1723
- <xsl:text>Sommaire</xsl:text>
1724
-
1725
-
1726
- </title-toc>
1727
-
1728
- <title-toc lang="zh">Contents</title-toc>
1729
-
1730
-
1731
-
1732
- <title-page lang="en">Page</title-page>
1733
- <title-page lang="fr">Page</title-page>
1734
-
1735
- <title-key lang="en">Key</title-key>
1736
- <title-key lang="fr">Légende</title-key>
1737
-
1738
- <title-where lang="en">where</title-where>
1739
- <title-where lang="fr">où</title-where>
1606
+ <xsl:text>Contents</xsl:text>
1607
+
1608
+ </title-toc>
1740
1609
 
1741
1610
  <title-descriptors lang="en">Descriptors</title-descriptors>
1742
1611
 
@@ -1752,32 +1621,9 @@
1752
1621
  </title-part>
1753
1622
  <title-part lang="zh">第 # 部分:</title-part>
1754
1623
 
1755
- <title-subpart lang="en">
1756
-
1757
- </title-subpart>
1758
- <title-subpart lang="fr">
1759
-
1760
- </title-subpart>
1761
-
1762
- <title-modified lang="en">modified</title-modified>
1763
- <title-modified lang="fr">modifiée</title-modified>
1764
-
1765
- <title-modified lang="zh">modified</title-modified>
1766
-
1767
-
1768
-
1769
- <title-source lang="en">
1770
-
1771
-
1772
- <xsl:text>Source</xsl:text>
1773
-
1774
- </title-source>
1775
-
1776
- <title-keywords lang="en">Keywords</title-keywords>
1624
+ <title-subpart lang="en">Sub-part #</title-subpart>
1625
+ <title-subpart lang="fr">Partie de sub #</title-subpart>
1777
1626
 
1778
- <title-deprecated lang="en">DEPRECATED</title-deprecated>
1779
- <title-deprecated lang="fr">DEPRECATED</title-deprecated>
1780
-
1781
1627
  <title-list-tables lang="en">List of Tables</title-list-tables>
1782
1628
 
1783
1629
  <title-list-figures lang="en">List of Figures</title-list-figures>
@@ -1786,41 +1632,12 @@
1786
1632
 
1787
1633
  <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
1788
1634
 
1789
- <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
1790
-
1791
- <title-abstract lang="en">Abstract</title-abstract>
1792
-
1793
1635
  <title-summary lang="en">Summary</title-summary>
1794
1636
 
1795
- <title-in lang="en">in </title-in>
1796
-
1797
- <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
1798
- <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
1799
-
1800
- <title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
1801
- <title-completion-date lang="zh">本稿完成日期</title-completion-date>
1802
-
1803
- <title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
1804
- <title-issuance-date lang="zh"># 发布</title-issuance-date>
1805
-
1806
- <title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
1807
- <title-implementation-date lang="zh"># 实施</title-implementation-date>
1808
-
1809
- <title-obligation-normative lang="en">normative</title-obligation-normative>
1810
- <title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
1811
-
1812
- <title-caution lang="en">CAUTION</title-caution>
1813
- <title-caution lang="zh">注意</title-caution>
1814
-
1815
- <title-warning lang="en">WARNING</title-warning>
1816
- <title-warning lang="zh">警告</title-warning>
1817
-
1818
- <title-amendment lang="en">AMENDMENT</title-amendment>
1819
-
1820
1637
  <title-continued lang="en">(continued)</title-continued>
1821
1638
  <title-continued lang="fr">(continué)</title-continued>
1822
1639
 
1823
- </xsl:variable><xsl:variable name="bibdata">
1640
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
1824
1641
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1825
1642
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
1826
1643
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
@@ -1849,15 +1666,106 @@
1849
1666
  </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
1850
1667
 
1851
1668
 
1669
+
1670
+
1671
+
1672
+
1673
+
1674
+
1675
+
1676
+
1677
+
1678
+
1679
+
1680
+ <xsl:attribute name="font-family">Lato, STIX Two Math, Source Han Sans</xsl:attribute>
1681
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1682
+ <xsl:attribute name="color"><xsl:value-of select="$color_main"/></xsl:attribute>
1683
+
1684
+
1685
+
1686
+
1687
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-style">
1688
+
1689
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
1690
+ <xsl:attribute name="line-height">125%</xsl:attribute>
1691
+
1692
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
1693
+
1694
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1695
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1696
+ <xsl:attribute name="margin-top">24pt</xsl:attribute>
1697
+
1698
+
1699
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-p-style">
1700
+
1701
+
1702
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1703
+
1704
+
1705
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-style">
1706
+
1707
+
1708
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
1709
+ <xsl:attribute name="line-height">125%</xsl:attribute>
1710
+
1711
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-title-style">
1712
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1713
+
1714
+
1715
+
1716
+
1717
+
1718
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1719
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1720
+
1721
+
1722
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-p-style">
1723
+
1724
+
1725
+
1726
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1727
+
1728
+
1729
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-style">
1730
+
1731
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
1732
+
1733
+
1734
+
1735
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-title-style">
1736
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1737
+
1738
+
1739
+
1740
+
1741
+
1742
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-p-style">
1743
+
1744
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-style">
1745
+
1746
+
1747
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
1748
+ <xsl:attribute name="line-height">125%</xsl:attribute>
1749
+
1750
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-title-style">
1751
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1752
+
1753
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-p-style">
1754
+
1755
+
1756
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1757
+
1852
1758
  </xsl:attribute-set><xsl:attribute-set name="link-style">
1853
1759
 
1854
1760
 
1855
1761
 
1856
1762
 
1857
- <!-- <xsl:attribute name="color">rgb(33, 55, 92)</xsl:attribute> -->
1858
1763
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1859
1764
 
1860
1765
 
1766
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
1767
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1768
+
1861
1769
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1862
1770
  <xsl:attribute name="white-space">pre</xsl:attribute>
1863
1771
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1867,6 +1775,11 @@
1867
1775
 
1868
1776
 
1869
1777
 
1778
+
1779
+
1780
+
1781
+
1782
+
1870
1783
 
1871
1784
 
1872
1785
  <xsl:attribute name="font-family">Fira Code</xsl:attribute>
@@ -1875,6 +1788,8 @@
1875
1788
 
1876
1789
 
1877
1790
 
1791
+
1792
+
1878
1793
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
1879
1794
 
1880
1795
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
@@ -1959,6 +1874,7 @@
1959
1874
 
1960
1875
 
1961
1876
 
1877
+
1962
1878
 
1963
1879
  <xsl:attribute name="margin-top">10pt</xsl:attribute>
1964
1880
  <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
@@ -1972,7 +1888,9 @@
1972
1888
 
1973
1889
 
1974
1890
 
1891
+
1975
1892
  </xsl:attribute-set><xsl:attribute-set name="example-name-style">
1893
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1976
1894
 
1977
1895
 
1978
1896
 
@@ -1984,7 +1902,6 @@
1984
1902
 
1985
1903
 
1986
1904
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1987
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1988
1905
 
1989
1906
 
1990
1907
 
@@ -2002,6 +1919,7 @@
2002
1919
 
2003
1920
 
2004
1921
 
1922
+
2005
1923
 
2006
1924
  <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
2007
1925
 
@@ -2020,9 +1938,62 @@
2020
1938
 
2021
1939
  </xsl:attribute-set><xsl:variable name="table-border_">
2022
1940
 
2023
- </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
2024
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
2025
-
1941
+ </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
1942
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1943
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1944
+
1945
+
1946
+
1947
+
1948
+
1949
+
1950
+
1951
+
1952
+
1953
+
1954
+
1955
+
1956
+
1957
+
1958
+
1959
+
1960
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
1961
+
1962
+
1963
+
1964
+
1965
+
1966
+
1967
+ </xsl:attribute-set><xsl:attribute-set name="table-style">
1968
+ <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
1969
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
1970
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1971
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1972
+
1973
+
1974
+
1975
+
1976
+
1977
+
1978
+
1979
+
1980
+
1981
+
1982
+
1983
+
1984
+
1985
+
1986
+
1987
+
1988
+
1989
+
1990
+
1991
+
1992
+
1993
+
1994
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1995
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1996
+
2026
1997
 
2027
1998
 
2028
1999
 
@@ -2042,7 +2013,164 @@
2042
2013
 
2043
2014
 
2044
2015
 
2016
+ </xsl:attribute-set><xsl:attribute-set name="table-row-style">
2017
+ <xsl:attribute name="min-height">4mm</xsl:attribute>
2018
+
2019
+
2020
+
2021
+ <xsl:attribute name="min-height">8.5mm</xsl:attribute>
2022
+
2023
+
2024
+ </xsl:attribute-set><xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
2025
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2026
+
2027
+
2028
+
2029
+
2030
+
2031
+
2032
+
2033
+ <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
2034
+ <xsl:attribute name="color">white</xsl:attribute>
2035
+
2036
+
2037
+
2038
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
2039
+
2040
+
2041
+
2042
+ </xsl:attribute-set><xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
2043
+
2044
+ </xsl:attribute-set><xsl:attribute-set name="table-header-cell-style">
2045
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2046
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2047
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
2048
+ <xsl:attribute name="display-align">center</xsl:attribute>
2049
+
2050
+
2051
+
2052
+
2053
+
2054
+
2055
+
2056
+
2057
+
2058
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2059
+
2060
+
2061
+
2062
+
2063
+
2064
+ </xsl:attribute-set><xsl:attribute-set name="table-cell-style">
2065
+ <xsl:attribute name="display-align">center</xsl:attribute>
2066
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2067
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
2068
+
2069
+
2070
+
2071
+
2072
+
2073
+
2074
+
2075
+
2076
+
2077
+ <xsl:attribute name="border">solid 0pt white</xsl:attribute>
2078
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2079
+ <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
2080
+
2081
+
2082
+
2083
+
2084
+
2045
2085
  </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
2086
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2087
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
2088
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
2089
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2090
+
2091
+
2092
+
2093
+
2094
+
2095
+
2096
+
2097
+
2098
+
2099
+
2100
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2101
+
2102
+
2103
+ </xsl:attribute-set><xsl:attribute-set name="table-note-style">
2104
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2105
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2106
+
2107
+
2108
+
2109
+
2110
+
2111
+
2112
+
2113
+
2114
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
2115
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2116
+
2117
+
2118
+
2119
+
2120
+
2121
+
2122
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
2123
+ <xsl:attribute name="font-size">80%</xsl:attribute>
2124
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
2125
+
2126
+
2127
+
2128
+
2129
+
2130
+
2131
+
2132
+
2133
+
2134
+
2135
+
2136
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2137
+
2138
+
2139
+ </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
2140
+ <xsl:attribute name="text-indent">0</xsl:attribute>
2141
+ <xsl:attribute name="start-indent">0</xsl:attribute>
2142
+
2143
+
2144
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-body-style">
2145
+
2146
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-number-style">
2147
+ <xsl:attribute name="font-size">80%</xsl:attribute>
2148
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
2149
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2150
+
2151
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-body-style">
2152
+ <xsl:attribute name="text-align">justify</xsl:attribute>
2153
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2154
+
2155
+ </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
2156
+
2157
+ <xsl:attribute name="min-height">8.5mm</xsl:attribute>
2158
+
2159
+
2160
+ </xsl:attribute-set><xsl:attribute-set name="dt-style">
2161
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
2162
+
2163
+
2164
+
2165
+
2166
+
2167
+
2168
+
2169
+
2170
+
2171
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
2172
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2173
+
2046
2174
 
2047
2175
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
2048
2176
 
@@ -2114,6 +2242,7 @@
2114
2242
 
2115
2243
 
2116
2244
  </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
2245
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
2117
2246
 
2118
2247
 
2119
2248
 
@@ -2185,6 +2314,11 @@
2185
2314
 
2186
2315
 
2187
2316
 
2317
+ </xsl:attribute-set><xsl:attribute-set name="termsource-text-style">
2318
+
2319
+
2320
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
2321
+
2188
2322
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
2189
2323
 
2190
2324
 
@@ -2193,6 +2327,8 @@
2193
2327
 
2194
2328
  </xsl:attribute-set><xsl:attribute-set name="term-style">
2195
2329
 
2330
+ </xsl:attribute-set><xsl:attribute-set name="figure-style">
2331
+
2196
2332
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
2197
2333
 
2198
2334
 
@@ -2301,6 +2437,19 @@
2301
2437
 
2302
2438
  </xsl:attribute-set><xsl:attribute-set name="toc-style">
2303
2439
  <xsl:attribute name="line-height">135%</xsl:attribute>
2440
+ </xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
2441
+ <xsl:attribute name="font-size">80%</xsl:attribute>
2442
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2443
+
2444
+
2445
+
2446
+
2447
+
2448
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2449
+
2450
+
2451
+
2452
+
2304
2453
  </xsl:attribute-set><xsl:attribute-set name="fn-style">
2305
2454
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2306
2455
  </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
@@ -2343,22 +2492,226 @@
2343
2492
 
2344
2493
 
2345
2494
 
2346
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2347
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2348
- <xsl:attribute name="color"><xsl:value-of select="$color_main"/></xsl:attribute>
2349
- <xsl:attribute name="line-height">124%</xsl:attribute>
2350
- <xsl:attribute name="text-align">justify</xsl:attribute>
2495
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2496
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2497
+ <xsl:attribute name="color"><xsl:value-of select="$color_main"/></xsl:attribute>
2498
+ <xsl:attribute name="line-height">124%</xsl:attribute>
2499
+ <xsl:attribute name="text-align">justify</xsl:attribute>
2500
+
2501
+
2502
+
2503
+
2504
+
2505
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
2506
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
2507
+
2508
+
2509
+
2510
+
2511
+
2512
+
2513
+
2514
+
2515
+
2516
+
2517
+
2518
+
2519
+
2520
+
2521
+ <xsl:attribute name="font-size">60%</xsl:attribute>
2522
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2523
+
2524
+
2525
+
2526
+
2527
+ </xsl:attribute-set><xsl:attribute-set name="admonition-style">
2528
+
2529
+
2530
+
2531
+
2532
+
2533
+
2534
+
2535
+
2536
+
2537
+
2538
+
2539
+ <xsl:attribute name="border">0.5pt solid rgb(79, 129, 189)</xsl:attribute>
2540
+ <xsl:attribute name="color">rgb(79, 129, 189)</xsl:attribute>
2541
+ <xsl:attribute name="margin-left">16mm</xsl:attribute>
2542
+ <xsl:attribute name="margin-right">16mm</xsl:attribute>
2543
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2544
+
2545
+
2546
+
2547
+
2548
+ </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
2549
+
2550
+
2551
+
2552
+
2553
+
2554
+
2555
+
2556
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2557
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2558
+ <xsl:attribute name="padding">2mm</xsl:attribute>
2559
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
2560
+
2561
+
2562
+
2563
+
2564
+ </xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
2565
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2566
+
2567
+
2568
+
2569
+
2570
+
2571
+
2572
+
2573
+
2574
+
2575
+
2576
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2577
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2578
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2579
+ <xsl:attribute name="font-style">italic</xsl:attribute>
2580
+ <xsl:attribute name="text-align">center</xsl:attribute>
2581
+
2582
+
2583
+
2584
+
2585
+ </xsl:attribute-set><xsl:attribute-set name="admonition-p-style">
2586
+
2587
+
2588
+
2589
+
2590
+
2591
+
2592
+
2593
+
2594
+ <xsl:attribute name="font-style">italic</xsl:attribute>
2595
+
2596
+
2597
+
2598
+
2599
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
2600
+
2601
+
2602
+
2603
+
2604
+
2605
+
2606
+
2607
+
2608
+
2609
+
2610
+
2611
+
2612
+
2613
+
2614
+
2615
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2616
+ <xsl:attribute name="start-indent">25mm</xsl:attribute>
2617
+ <xsl:attribute name="text-indent">-25mm</xsl:attribute>
2618
+ <xsl:attribute name="line-height">115%</xsl:attribute>
2619
+
2620
+
2621
+
2622
+
2623
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-style">
2624
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
2625
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2626
+
2627
+
2628
+
2629
+
2630
+
2631
+
2632
+
2633
+
2634
+
2635
+
2636
+ <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
2637
+
2638
+
2639
+
2640
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
2641
+
2642
+
2643
+
2644
+
2645
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-style">
2646
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
2647
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2648
+
2649
+
2650
+
2651
+
2652
+
2653
+
2654
+
2655
+
2656
+
2657
+
2658
+ <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
2659
+
2660
+
2661
+
2662
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
2663
+
2664
+
2665
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
2666
+
2667
+
2668
+
2669
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
2670
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2671
+ <xsl:attribute name="font-size">65%</xsl:attribute>
2672
+
2673
+
2674
+
2675
+
2676
+
2677
+
2678
+
2679
+
2680
+
2681
+
2682
+
2683
+
2684
+
2685
+
2686
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2687
+
2688
+
2689
+
2690
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
2691
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
2692
+
2693
+
2694
+
2695
+
2696
+
2697
+
2698
+
2351
2699
 
2352
2700
 
2353
2701
 
2354
2702
 
2355
2703
 
2356
- </xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
2357
- <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
2358
2704
 
2359
2705
 
2706
+ <xsl:attribute name="font-size">60%</xsl:attribute>
2707
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2708
+
2360
2709
 
2361
2710
 
2711
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
2712
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2713
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2714
+ <xsl:attribute name="start-indent">0pt</xsl:attribute>
2362
2715
 
2363
2716
 
2364
2717
 
@@ -2369,36 +2722,18 @@
2369
2722
 
2370
2723
 
2371
2724
 
2372
- <xsl:attribute name="font-size">60%</xsl:attribute>
2373
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2374
2725
 
2726
+ </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
2375
2727
 
2376
2728
 
2377
2729
 
2378
- </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">
2379
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2380
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
2381
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
2382
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
2383
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
2384
- </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
2730
+ <xsl:attribute name="line-height">120%</xsl:attribute>
2731
+
2732
+ </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:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
2385
2733
  <xsl:for-each select="/*/*[local-name()='preface']/*">
2386
2734
  <xsl:sort select="@displayorder" data-type="number"/>
2387
2735
  <xsl:apply-templates select="." mode="contents"/>
2388
2736
  </xsl:for-each>
2389
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
2390
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
2391
-
2392
- <!-- Normative references -->
2393
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]" mode="contents"/>
2394
- <!-- Terms and definitions -->
2395
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
2396
- <!-- Another main sections -->
2397
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
2398
- <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
2399
- <!-- Bibliography -->
2400
- <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"/>
2401
-
2402
2737
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2403
2738
 
2404
2739
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
@@ -2415,29 +2750,11 @@
2415
2750
  <xsl:sort select="@displayorder" data-type="number"/>
2416
2751
  <xsl:apply-templates select="." mode="contents"/>
2417
2752
  </xsl:for-each>
2418
- </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
2419
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
2420
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
2421
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
2422
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
2423
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
2424
2753
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2425
2754
  <xsl:for-each select="/*/*[local-name()='preface']/*">
2426
2755
  <xsl:sort select="@displayorder" data-type="number"/>
2427
2756
  <xsl:apply-templates select="."/>
2428
2757
  </xsl:for-each>
2429
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
2430
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
2431
-
2432
- <!-- Normative references -->
2433
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
2434
- <!-- Terms and definitions -->
2435
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
2436
- <!-- Another main sections -->
2437
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
2438
- <xsl:apply-templates select="/*/*[local-name()='annex']"/>
2439
- <!-- Bibliography -->
2440
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
2441
2758
  </xsl:template><xsl:template name="processMainSectionsDefault">
2442
2759
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2443
2760
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -2458,6 +2775,86 @@
2458
2775
  <xsl:value-of select="."/>
2459
2776
  </xsl:template><xsl:template match="*[local-name()='br']">
2460
2777
  <xsl:value-of select="$linebreak"/>
2778
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
2779
+ <fo:block xsl:use-attribute-sets="copyright-statement-style">
2780
+ <xsl:apply-templates/>
2781
+ </fo:block>
2782
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
2783
+
2784
+ <xsl:variable name="level">
2785
+ <xsl:call-template name="getLevel"/>
2786
+ </xsl:variable>
2787
+ <fo:block role="H{$level}" xsl:use-attribute-sets="copyright-statement-title-style">
2788
+ <xsl:apply-templates/>
2789
+ </fo:block>
2790
+
2791
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
2792
+
2793
+
2794
+ <fo:block xsl:use-attribute-sets="copyright-statement-p-style">
2795
+
2796
+
2797
+
2798
+
2799
+
2800
+ <xsl:apply-templates/>
2801
+ </fo:block>
2802
+
2803
+
2804
+ </xsl:template><xsl:template match="*[local-name()='license-statement']">
2805
+ <fo:block xsl:use-attribute-sets="license-statement-style">
2806
+ <xsl:apply-templates/>
2807
+ </fo:block>
2808
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
2809
+
2810
+ <xsl:variable name="level">
2811
+ <xsl:call-template name="getLevel"/>
2812
+ </xsl:variable>
2813
+ <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
2814
+ <xsl:apply-templates/>
2815
+ </fo:block>
2816
+
2817
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
2818
+
2819
+ <fo:block xsl:use-attribute-sets="license-statement-p-style">
2820
+
2821
+
2822
+
2823
+
2824
+
2825
+ <xsl:apply-templates/>
2826
+ </fo:block>
2827
+
2828
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']">
2829
+ <fo:block xsl:use-attribute-sets="legal-statement-style">
2830
+ <xsl:apply-templates/>
2831
+ </fo:block>
2832
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
2833
+
2834
+ <!-- process in the template 'title' -->
2835
+ <xsl:call-template name="title"/>
2836
+
2837
+
2838
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
2839
+
2840
+ <!-- process in the template 'paragraph' -->
2841
+ <xsl:call-template name="paragraph"/>
2842
+
2843
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']">
2844
+ <fo:block xsl:use-attribute-sets="feedback-statement-style">
2845
+ <xsl:apply-templates/>
2846
+ </fo:block>
2847
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
2848
+
2849
+ <!-- process in the template 'title' -->
2850
+ <xsl:call-template name="title"/>
2851
+
2852
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
2853
+
2854
+ <fo:block xsl:use-attribute-sets="feedback-statement-p-style">
2855
+ <xsl:apply-templates/>
2856
+ </fo:block>
2857
+
2461
2858
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
2462
2859
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
2463
2860
  <xsl:call-template name="add-zero-spaces-java"/>
@@ -2476,43 +2873,19 @@
2476
2873
  <xsl:call-template name="getSimpleTable"/>
2477
2874
  </xsl:variable>
2478
2875
 
2479
- <!-- <xsl:if test="$namespace = 'bipm'">
2480
- <fo:block>&#xA0;</fo:block>
2481
- </xsl:if> -->
2482
-
2483
2876
 
2484
2877
  <!-- Display table's name before table as standalone block -->
2485
2878
  <!-- $namespace = 'iso' or -->
2486
2879
 
2487
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2488
-
2489
-
2490
-
2491
-
2880
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
2881
+
2492
2882
 
2493
- <xsl:call-template name="fn_name_display"/>
2494
2883
 
2884
+ <xsl:call-template name="table_name_fn_display"/>
2495
2885
 
2496
2886
 
2497
2887
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
2498
2888
 
2499
- <!-- <xsl:variable name="cols-count">
2500
- <xsl:choose>
2501
- <xsl:when test="*[local-name()='thead']">
2502
- <xsl:call-template name="calculate-columns-numbers">
2503
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
2504
- </xsl:call-template>
2505
- </xsl:when>
2506
- <xsl:otherwise>
2507
- <xsl:call-template name="calculate-columns-numbers">
2508
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
2509
- </xsl:call-template>
2510
- </xsl:otherwise>
2511
- </xsl:choose>
2512
- </xsl:variable> -->
2513
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
2514
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
2515
-
2516
2889
  <xsl:variable name="colwidths">
2517
2890
  <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
2518
2891
  <xsl:call-template name="calculate-column-widths">
@@ -2523,17 +2896,8 @@
2523
2896
  </xsl:variable>
2524
2897
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2525
2898
 
2526
- <!-- <xsl:variable name="colwidths2">
2527
- <xsl:call-template name="calculate-column-widths">
2528
- <xsl:with-param name="cols-count" select="$cols-count"/>
2529
- </xsl:call-template>
2530
- </xsl:variable> -->
2531
-
2532
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
2533
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
2534
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
2535
2899
 
2536
- <xsl:variable name="margin-left">
2900
+ <xsl:variable name="margin-side">
2537
2901
  <xsl:choose>
2538
2902
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
2539
2903
  <xsl:otherwise>0</xsl:otherwise>
@@ -2541,20 +2905,20 @@
2541
2905
  </xsl:variable>
2542
2906
 
2543
2907
 
2544
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
2908
+ <fo:block-container xsl:use-attribute-sets="table-container-style">
2909
+
2545
2910
 
2911
+
2546
2912
 
2913
+
2547
2914
 
2548
-
2549
-
2550
-
2915
+
2551
2916
 
2552
2917
 
2553
2918
 
2554
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2555
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2556
- <xsl:attribute name="space-after">12pt</xsl:attribute>
2557
-
2919
+
2920
+
2921
+
2558
2922
 
2559
2923
  <xsl:if test="ancestor::*[local-name()='sections']">
2560
2924
  <xsl:attribute name="font-size">9pt</xsl:attribute>
@@ -2562,58 +2926,49 @@
2562
2926
 
2563
2927
 
2564
2928
 
2565
-
2566
-
2567
-
2568
-
2569
-
2570
-
2571
-
2929
+ <!-- end table block-container attributes -->
2572
2930
 
2573
2931
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
2574
2932
 
2575
2933
 
2934
+ <xsl:variable name="table_width_default">100%</xsl:variable>
2576
2935
  <xsl:variable name="table_width">
2577
2936
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
2578
2937
 
2579
-
2580
-
2581
- <xsl:choose>
2582
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
2583
- <xsl:otherwise>100%</xsl:otherwise>
2584
- </xsl:choose>
2585
-
2938
+ <xsl:choose>
2939
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
2940
+ <xsl:otherwise><xsl:value-of select="$table_width_default"/></xsl:otherwise>
2941
+ </xsl:choose>
2942
+
2586
2943
  </xsl:variable>
2587
2944
 
2945
+
2588
2946
  <xsl:variable name="table_attributes">
2589
- <attribute name="table-layout">fixed</attribute>
2590
- <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
2591
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
2592
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
2593
-
2594
-
2595
-
2596
-
2597
-
2598
-
2599
-
2600
-
2601
- <attribute name="margin-left">0mm</attribute>
2602
- <attribute name="margin-right">0mm</attribute>
2603
-
2604
-
2605
-
2606
-
2607
-
2608
-
2609
-
2947
+
2948
+ <xsl:element name="table_attributes" use-attribute-sets="table-style">
2949
+ <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
2950
+
2951
+
2952
+
2953
+
2954
+
2955
+
2956
+
2957
+
2958
+
2959
+
2960
+
2961
+
2962
+
2963
+
2964
+ </xsl:element>
2610
2965
  </xsl:variable>
2611
2966
 
2612
2967
 
2613
- <fo:table id="{@id}" table-omit-footer-at-break="true">
2968
+ <fo:table id="{@id}">
2614
2969
 
2615
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2616
- <xsl:attribute name="{@name}">
2970
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2971
+ <xsl:attribute name="{local-name()}">
2617
2972
  <xsl:value-of select="."/>
2618
2973
  </xsl:attribute>
2619
2974
  </xsl:for-each>
@@ -2624,7 +2979,6 @@
2624
2979
  </xsl:if>
2625
2980
 
2626
2981
 
2627
-
2628
2982
  <xsl:choose>
2629
2983
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2630
2984
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -2650,7 +3004,7 @@
2650
3004
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2651
3005
  </xsl:when>
2652
3006
  <xsl:otherwise>
2653
- <xsl:apply-templates/>
3007
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer and note that renders separaterely -->
2654
3008
  </xsl:otherwise>
2655
3009
  </xsl:choose>
2656
3010
 
@@ -2665,25 +3019,6 @@
2665
3019
  </xsl:call-template>
2666
3020
  </xsl:for-each>
2667
3021
 
2668
- <!-- insert footer as table -->
2669
- <!-- <fo:table>
2670
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
2671
- <xsl:attribute name="{@name}">
2672
- <xsl:value-of select="."/>
2673
- </xsl:attribute>
2674
- </xsl:for-each>
2675
-
2676
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2677
- <xsl:choose>
2678
- <xsl:when test=". = 1 or . = 0">
2679
- <fo:table-column column-width="proportional-column-width(2)"/>
2680
- </xsl:when>
2681
- <xsl:otherwise>
2682
- <fo:table-column column-width="proportional-column-width({.})"/>
2683
- </xsl:otherwise>
2684
- </xsl:choose>
2685
- </xsl:for-each>
2686
- </fo:table>-->
2687
3022
 
2688
3023
 
2689
3024
 
@@ -2741,18 +3076,17 @@
2741
3076
  </xsl:otherwise>
2742
3077
  </xsl:choose>
2743
3078
 
2744
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
3079
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
2745
3080
  <xsl:param name="continued"/>
2746
3081
  <xsl:if test="normalize-space() != ''">
2747
3082
  <fo:block xsl:use-attribute-sets="table-name-style">
2748
-
3083
+
2749
3084
 
2750
3085
 
2751
3086
 
2752
3087
 
2753
3088
  <xsl:choose>
2754
3089
  <xsl:when test="$continued = 'true'">
2755
- <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
2756
3090
 
2757
3091
  </xsl:when>
2758
3092
  <xsl:otherwise>
@@ -2815,13 +3149,6 @@
2815
3149
  <xsl:for-each select="xalan:nodeset($table)/*/tr">
2816
3150
  <xsl:variable name="td_text">
2817
3151
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
2818
-
2819
- <!-- <xsl:if test="$namespace = 'bipm'">
2820
- <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
2821
- <word><xsl:value-of select="normalize-space(.)"/></word>
2822
- </xsl:for-each>
2823
- </xsl:if> -->
2824
-
2825
3152
  </xsl:variable>
2826
3153
  <xsl:variable name="words">
2827
3154
  <xsl:variable name="string_with_added_zerospaces">
@@ -2858,7 +3185,6 @@
2858
3185
  </xsl:otherwise>
2859
3186
  </xsl:choose>
2860
3187
  </xsl:variable>
2861
-
2862
3188
 
2863
3189
  <column>
2864
3190
  <xsl:for-each select="xalan:nodeset($widths)//width">
@@ -2892,9 +3218,8 @@
2892
3218
 
2893
3219
  <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
2894
3220
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2895
- </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
3221
+ </xsl:template><xsl:template match="*[local-name()='thead']">
2896
3222
  <xsl:param name="cols-count"/>
2897
- <!-- font-weight="bold" -->
2898
3223
  <fo:table-header>
2899
3224
 
2900
3225
 
@@ -2906,87 +3231,26 @@
2906
3231
  <fo:table-row>
2907
3232
  <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
2908
3233
 
2909
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
3234
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
2910
3235
  <xsl:with-param name="continued">true</xsl:with-param>
2911
3236
  </xsl:apply-templates>
2912
3237
 
2913
3238
 
2914
3239
 
2915
-
2916
3240
  </fo:table-cell>
2917
3241
  </fo:table-row>
2918
3242
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
2919
3243
  <fo:table-body>
2920
3244
  <xsl:apply-templates/>
2921
3245
  </fo:table-body>
2922
- </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
3246
+ </xsl:template><xsl:template match="*[local-name()='tfoot']">
2923
3247
  <xsl:apply-templates/>
2924
3248
  </xsl:template><xsl:template name="insertTableFooter">
2925
3249
  <xsl:param name="cols-count"/>
2926
3250
  <xsl:if test="../*[local-name()='tfoot']">
2927
3251
  <fo:table-footer>
2928
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2929
- </fo:table-footer>
2930
- </xsl:if>
2931
- </xsl:template><xsl:template name="insertTableFooter2">
2932
- <xsl:param name="cols-count"/>
2933
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2934
- <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
2935
-
2936
- <fo:table-footer>
2937
-
2938
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2939
-
2940
- <!-- if there are note(s) or fn(s) then create footer row -->
2941
- <xsl:if test="$isNoteOrFnExist = 'true'">
2942
-
2943
-
2944
-
2945
- <fo:table-row>
2946
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2947
-
2948
-
2949
-
2950
- <!-- fn will be processed inside 'note' processing -->
2951
-
2952
-
2953
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2954
-
2955
-
2956
-
2957
-
2958
-
2959
- <!-- except gb -->
2960
-
2961
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2962
-
2963
-
2964
- <!-- show Note under table in preface (ex. abstract) sections -->
2965
- <!-- empty, because notes show at page side in main sections -->
2966
- <!-- <xsl:if test="$namespace = 'bipm'">
2967
- <xsl:choose>
2968
- <xsl:when test="ancestor::*[local-name()='preface']">
2969
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2970
- </xsl:when>
2971
- <xsl:otherwise>
2972
- <fo:block/>
2973
- </xsl:otherwise>
2974
- </xsl:choose>
2975
- </xsl:if> -->
2976
-
2977
-
2978
- <!-- horizontal row separator -->
2979
-
2980
-
2981
- <!-- fn processing -->
2982
- <xsl:call-template name="fn_display"/>
2983
-
2984
- </fo:table-cell>
2985
- </fo:table-row>
2986
-
2987
- </xsl:if>
3252
+ <xsl:apply-templates select="../*[local-name()='tfoot']"/>
2988
3253
  </fo:table-footer>
2989
-
2990
3254
  </xsl:if>
2991
3255
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
2992
3256
  <xsl:param name="table_attributes"/>
@@ -3013,17 +3277,18 @@
3013
3277
  </xsl:variable>
3014
3278
 
3015
3279
  <fo:table keep-with-previous="always">
3016
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
3280
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
3281
+ <xsl:variable name="name" select="local-name()"/>
3017
3282
  <xsl:choose>
3018
- <xsl:when test="@name = 'border-top'">
3019
- <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
3283
+ <xsl:when test="$name = 'border-top'">
3284
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
3020
3285
  </xsl:when>
3021
- <xsl:when test="@name = 'border'">
3022
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
3286
+ <xsl:when test="$name = 'border'">
3287
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3023
3288
  <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
3024
3289
  </xsl:when>
3025
3290
  <xsl:otherwise>
3026
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
3291
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3027
3292
  </xsl:otherwise>
3028
3293
  </xsl:choose>
3029
3294
  </xsl:for-each>
@@ -3052,19 +3317,15 @@
3052
3317
 
3053
3318
  <fo:table-body>
3054
3319
  <fo:table-row>
3055
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
3320
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
3056
3321
 
3057
3322
 
3323
+
3058
3324
 
3059
3325
 
3060
3326
  <!-- fn will be processed inside 'note' processing -->
3061
3327
 
3062
3328
 
3063
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3064
-
3065
-
3066
-
3067
-
3068
3329
 
3069
3330
 
3070
3331
 
@@ -3072,31 +3333,17 @@
3072
3333
  <!-- for BSI (not PAS) display Notes before footnotes -->
3073
3334
 
3074
3335
 
3075
- <!-- except gb -->
3076
-
3077
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3078
-
3336
+ <!-- except gb and bsi -->
3079
3337
 
3080
- <!-- <xsl:if test="$namespace = 'bipm'">
3081
- <xsl:choose>
3082
- <xsl:when test="ancestor::*[local-name()='preface']">
3083
- show Note under table in preface (ex. abstract) sections
3084
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3085
- </xsl:when>
3086
- <xsl:otherwise>
3087
- empty, because notes show at page side in main sections
3088
- <fo:block/>
3089
- </xsl:otherwise>
3090
- </xsl:choose>
3091
- </xsl:if> -->
3338
+ <xsl:apply-templates select="../*[local-name()='note']"/>
3339
+
3092
3340
 
3093
3341
 
3094
3342
  <!-- horizontal row separator -->
3095
3343
 
3096
3344
 
3097
3345
  <!-- fn processing -->
3098
- <xsl:call-template name="fn_display"/>
3099
-
3346
+ <xsl:call-template name="table_fn_display"/>
3100
3347
 
3101
3348
  <!-- for PAS display Notes after footnotes -->
3102
3349
 
@@ -3126,7 +3373,7 @@
3126
3373
 
3127
3374
 
3128
3375
 
3129
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
3376
+ <xsl:apply-templates select="../*[local-name()='thead']">
3130
3377
  <xsl:with-param name="cols-count" select="$cols-count"/>
3131
3378
  </xsl:apply-templates>
3132
3379
 
@@ -3138,92 +3385,62 @@
3138
3385
 
3139
3386
 
3140
3387
  <xsl:apply-templates/>
3141
- <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
3142
-
3388
+
3143
3389
  </fo:table-body>
3144
3390
 
3145
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
3146
- <xsl:choose>
3147
- <xsl:when test="substring-after(., '—') != ''">
3148
- <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
3149
- </xsl:when>
3150
- <xsl:otherwise>
3151
- <xsl:value-of select="."/>
3152
- </xsl:otherwise>
3153
- </xsl:choose>
3154
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
3155
- <xsl:apply-templates mode="presentation_name"/>
3156
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
3157
- <xsl:apply-templates select="."/>
3158
- </xsl:template><xsl:template match="*[local-name()='tr']">
3159
- <xsl:variable name="parent-name" select="local-name(..)"/>
3160
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
3161
- <fo:table-row min-height="4mm">
3162
- <xsl:if test="$parent-name = 'thead'">
3163
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3164
-
3165
-
3166
-
3167
-
3168
-
3169
-
3170
-
3171
-
3172
- </xsl:if>
3173
- <xsl:if test="$parent-name = 'tfoot'">
3174
-
3175
-
3176
-
3177
- </xsl:if>
3178
-
3179
-
3180
-
3181
- <xsl:attribute name="min-height">8.5mm</xsl:attribute>
3182
- <xsl:if test="$parent-name = 'thead'">
3183
- <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
3184
- <xsl:attribute name="color">white</xsl:attribute>
3185
- </xsl:if>
3186
- <xsl:if test="$parent-name = 'tbody'">
3187
- <xsl:variable name="number"><xsl:number/></xsl:variable>
3188
- <xsl:if test="$number mod 2 = 0">
3189
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3190
- </xsl:if>
3191
- </xsl:if>
3192
-
3193
-
3194
-
3195
-
3196
-
3197
-
3198
-
3199
-
3200
- <!-- <xsl:if test="$namespace = 'bipm'">
3201
- <xsl:attribute name="height">8mm</xsl:attribute>
3202
- </xsl:if> -->
3203
-
3391
+ </xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
3392
+ <fo:table-row xsl:use-attribute-sets="table-header-row-style">
3393
+
3394
+
3395
+
3396
+
3397
+
3398
+
3399
+
3400
+ <xsl:call-template name="setTableRowAttributes"/>
3401
+
3204
3402
  <xsl:apply-templates/>
3205
3403
  </fo:table-row>
3206
- </xsl:template><xsl:template match="*[local-name()='th']">
3207
- <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
3208
- <xsl:attribute name="text-align">
3209
- <xsl:choose>
3210
- <xsl:when test="@align">
3211
- <xsl:call-template name="setAlignment"/>
3212
- <!-- <xsl:value-of select="@align"/> -->
3213
- </xsl:when>
3214
- <xsl:otherwise>center</xsl:otherwise>
3215
- </xsl:choose>
3216
- </xsl:attribute>
3404
+ </xsl:template><xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
3405
+ <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
3217
3406
 
3407
+ <xsl:call-template name="setTableRowAttributes"/>
3408
+ <xsl:apply-templates/>
3409
+ </fo:table-row>
3410
+ </xsl:template><xsl:template match="*[local-name()='tr']">
3411
+ <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3412
+
3218
3413
 
3414
+ <xsl:variable name="number"><xsl:number/></xsl:variable>
3415
+ <xsl:if test="$number mod 2 = 0">
3416
+ <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3417
+ </xsl:if>
3219
3418
 
3419
+
3220
3420
 
3421
+
3422
+ <xsl:call-template name="setTableRowAttributes"/>
3423
+ <xsl:apply-templates/>
3424
+ </fo:table-row>
3425
+ </xsl:template><xsl:template name="setTableRowAttributes">
3426
+
3427
+
3428
+
3429
+
3430
+
3431
+
3432
+
3433
+
3434
+ </xsl:template><xsl:template match="*[local-name()='th']">
3435
+ <fo:table-cell xsl:use-attribute-sets="table-header-cell-style"> <!-- text-align="{@align}" -->
3436
+ <xsl:call-template name="setTextAlignment">
3437
+ <xsl:with-param name="default">center</xsl:with-param>
3438
+ </xsl:call-template>
3221
3439
 
3222
-
3223
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3224
3440
 
3225
3441
 
3226
3442
 
3443
+
3227
3444
 
3228
3445
 
3229
3446
 
@@ -3232,21 +3449,25 @@
3232
3449
  <xsl:if test="$lang = 'ar'">
3233
3450
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3234
3451
  </xsl:if>
3235
- <xsl:if test="@colspan">
3236
- <xsl:attribute name="number-columns-spanned">
3237
- <xsl:value-of select="@colspan"/>
3238
- </xsl:attribute>
3239
- </xsl:if>
3240
- <xsl:if test="@rowspan">
3241
- <xsl:attribute name="number-rows-spanned">
3242
- <xsl:value-of select="@rowspan"/>
3243
- </xsl:attribute>
3244
- </xsl:if>
3245
- <xsl:call-template name="display-align"/>
3452
+
3453
+ <xsl:call-template name="setTableCellAttributes"/>
3454
+
3246
3455
  <fo:block>
3247
3456
  <xsl:apply-templates/>
3248
3457
  </fo:block>
3249
3458
  </fo:table-cell>
3459
+ </xsl:template><xsl:template name="setTableCellAttributes">
3460
+ <xsl:if test="@colspan">
3461
+ <xsl:attribute name="number-columns-spanned">
3462
+ <xsl:value-of select="@colspan"/>
3463
+ </xsl:attribute>
3464
+ </xsl:if>
3465
+ <xsl:if test="@rowspan">
3466
+ <xsl:attribute name="number-rows-spanned">
3467
+ <xsl:value-of select="@rowspan"/>
3468
+ </xsl:attribute>
3469
+ </xsl:if>
3470
+ <xsl:call-template name="display-align"/>
3250
3471
  </xsl:template><xsl:template name="display-align">
3251
3472
  <xsl:if test="@valign">
3252
3473
  <xsl:attribute name="display-align">
@@ -3259,62 +3480,56 @@
3259
3480
  </xsl:attribute>
3260
3481
  </xsl:if>
3261
3482
  </xsl:template><xsl:template match="*[local-name()='td']">
3262
- <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
3263
- <xsl:attribute name="text-align">
3264
- <xsl:choose>
3265
- <xsl:when test="@align">
3266
- <xsl:call-template name="setAlignment"/>
3267
- <!-- <xsl:value-of select="@align"/> -->
3268
- </xsl:when>
3269
- <xsl:otherwise>left</xsl:otherwise>
3270
- </xsl:choose>
3271
- </xsl:attribute>
3483
+ <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
3484
+ <xsl:call-template name="setTextAlignment">
3485
+ <xsl:with-param name="default">left</xsl:with-param>
3486
+ </xsl:call-template>
3487
+
3272
3488
  <xsl:if test="$lang = 'ar'">
3273
3489
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3274
3490
  </xsl:if>
3275
3491
 
3276
3492
 
3277
3493
 
3494
+ <!-- bsi -->
3278
3495
 
3279
3496
 
3280
3497
 
3281
3498
 
3282
3499
 
3283
- <xsl:attribute name="border">solid 0pt white</xsl:attribute>
3284
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
3285
- <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
3286
3500
 
3287
3501
 
3288
3502
 
3503
+
3289
3504
 
3290
3505
 
3291
3506
 
3292
3507
 
3293
3508
 
3294
3509
 
3295
- <xsl:if test=".//*[local-name() = 'table']">
3510
+ <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
3296
3511
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3297
3512
  </xsl:if>
3298
- <xsl:if test="@colspan">
3299
- <xsl:attribute name="number-columns-spanned">
3300
- <xsl:value-of select="@colspan"/>
3301
- </xsl:attribute>
3302
- </xsl:if>
3303
- <xsl:if test="@rowspan">
3304
- <xsl:attribute name="number-rows-spanned">
3305
- <xsl:value-of select="@rowspan"/>
3306
- </xsl:attribute>
3307
- </xsl:if>
3308
- <xsl:call-template name="display-align"/>
3513
+
3514
+ <xsl:call-template name="setTableCellAttributes"/>
3515
+
3309
3516
  <fo:block>
3310
-
3517
+
3518
+
3519
+
3311
3520
  <xsl:apply-templates/>
3312
3521
  </fo:block>
3313
3522
  </fo:table-cell>
3314
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
3315
-
3523
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
3524
+
3525
+ <fo:block xsl:use-attribute-sets="table-note-style">
3526
+
3527
+
3528
+
3529
+
3316
3530
 
3317
- <fo:block font-size="10pt" margin-bottom="12pt">
3531
+ <!-- Table's note name (NOTE, for example) -->
3532
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
3318
3533
 
3319
3534
 
3320
3535
 
@@ -3322,25 +3537,16 @@
3322
3537
 
3323
3538
 
3324
3539
 
3325
-
3326
- <!-- Table's note name (NOTE, for example) -->
3327
-
3328
- <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
3329
-
3330
-
3331
-
3332
-
3540
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3333
3541
 
3334
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3335
-
3336
- </fo:inline>
3337
-
3338
-
3339
-
3340
- <xsl:apply-templates mode="process"/>
3341
- </fo:block>
3542
+ </fo:inline>
3543
+
3544
+
3545
+
3546
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3547
+ </fo:block>
3342
3548
 
3343
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
3549
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
3344
3550
  <xsl:apply-templates/>
3345
3551
  </xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
3346
3552
 
@@ -3418,8 +3624,7 @@
3418
3624
  <xsl:copy-of select="$footnote_inline"/>
3419
3625
  <fo:footnote-body>
3420
3626
 
3421
- <fo:block-container text-indent="0" start-indent="0">
3422
-
3627
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
3423
3628
 
3424
3629
  <fo:block xsl:use-attribute-sets="fn-body-style">
3425
3630
 
@@ -3438,7 +3643,7 @@
3438
3643
  <xsl:copy-of select="$footnote_inline"/>
3439
3644
  </xsl:otherwise>
3440
3645
  </xsl:choose>
3441
- </xsl:template><xsl:template name="fn_display">
3646
+ </xsl:template><xsl:template name="table_fn_display">
3442
3647
  <xsl:variable name="references">
3443
3648
 
3444
3649
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
@@ -3449,33 +3654,26 @@
3449
3654
  <xsl:for-each select="xalan:nodeset($references)//fn">
3450
3655
  <xsl:variable name="reference" select="@reference"/>
3451
3656
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
3452
- <fo:block margin-bottom="12pt">
3657
+ <fo:block xsl:use-attribute-sets="table-fn-style">
3453
3658
 
3454
3659
 
3455
3660
 
3456
-
3457
-
3458
-
3459
-
3460
- <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
3661
+ <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
3461
3662
 
3462
- <xsl:attribute name="vertical-align">super</xsl:attribute>
3463
3663
 
3464
3664
 
3465
3665
 
3466
3666
 
3667
+ <xsl:value-of select="@reference"/>
3467
3668
 
3468
3669
 
3469
3670
 
3470
3671
 
3471
- <xsl:value-of select="@reference"/>
3472
3672
 
3473
3673
 
3474
3674
 
3475
3675
  </fo:inline>
3476
- <fo:inline>
3477
-
3478
- <!-- <xsl:apply-templates /> -->
3676
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
3479
3677
  <xsl:copy-of select="./node()"/>
3480
3678
  </fo:inline>
3481
3679
  </fo:block>
@@ -3493,15 +3691,7 @@
3493
3691
 
3494
3692
  <xsl:apply-templates/>
3495
3693
  </fn>
3496
- </xsl:template><xsl:template name="fn_name_display">
3497
- <!-- <xsl:variable name="references">
3498
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
3499
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
3500
- <xsl:apply-templates />
3501
- </fn>
3502
- </xsl:for-each>
3503
- </xsl:variable>
3504
- $references=<xsl:copy-of select="$references"/> -->
3694
+ </xsl:template><xsl:template name="table_name_fn_display">
3505
3695
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
3506
3696
  <xsl:variable name="reference" select="@reference"/>
3507
3697
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
@@ -3510,9 +3700,7 @@
3510
3700
  </fo:block>
3511
3701
  </xsl:for-each>
3512
3702
  </xsl:template><xsl:template name="fn_display_figure">
3513
- <xsl:variable name="key_iso">
3514
- <!-- and (not(@class) or @class !='pseudocode') -->
3515
- </xsl:variable>
3703
+
3516
3704
  <xsl:variable name="references">
3517
3705
  <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
3518
3706
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -3520,50 +3708,52 @@
3520
3708
  </fn>
3521
3709
  </xsl:for-each>
3522
3710
  </xsl:variable>
3711
+
3712
+ <xsl:if test="xalan:nodeset($references)//fn">
3523
3713
 
3524
- <!-- current hierarchy is 'figure' element -->
3525
- <xsl:variable name="following_dl_colwidths">
3526
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3527
- <xsl:variable name="html-table">
3528
- <xsl:variable name="doc_ns">
3714
+ <xsl:variable name="key_iso">
3715
+
3716
+ </xsl:variable>
3717
+
3718
+ <!-- current hierarchy is 'figure' element -->
3719
+ <xsl:variable name="following_dl_colwidths">
3720
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3721
+ <xsl:variable name="html-table">
3722
+ <xsl:variable name="doc_ns">
3723
+
3724
+ </xsl:variable>
3725
+ <xsl:variable name="ns">
3726
+ <xsl:choose>
3727
+ <xsl:when test="normalize-space($doc_ns) != ''">
3728
+ <xsl:value-of select="normalize-space($doc_ns)"/>
3729
+ </xsl:when>
3730
+ <xsl:otherwise>
3731
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
3732
+ </xsl:otherwise>
3733
+ </xsl:choose>
3734
+ </xsl:variable>
3529
3735
 
3530
- </xsl:variable>
3531
- <xsl:variable name="ns">
3532
- <xsl:choose>
3533
- <xsl:when test="normalize-space($doc_ns) != ''">
3534
- <xsl:value-of select="normalize-space($doc_ns)"/>
3535
- </xsl:when>
3536
- <xsl:otherwise>
3537
- <xsl:value-of select="substring-before(name(/*), '-')"/>
3538
- </xsl:otherwise>
3539
- </xsl:choose>
3540
- </xsl:variable>
3541
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
3542
- <!-- <xsl:element name="{$ns}:table"> -->
3543
3736
  <xsl:for-each select="*[local-name() = 'dl'][1]">
3544
3737
  <tbody>
3545
3738
  <xsl:apply-templates mode="dl"/>
3546
3739
  </tbody>
3547
3740
  </xsl:for-each>
3548
- <!-- </xsl:element> -->
3549
- </xsl:variable>
3550
-
3551
- <xsl:call-template name="calculate-column-widths">
3552
- <xsl:with-param name="cols-count" select="2"/>
3553
- <xsl:with-param name="table" select="$html-table"/>
3554
- </xsl:call-template>
3555
-
3556
- </xsl:if>
3557
- </xsl:variable>
3558
-
3559
-
3560
- <xsl:variable name="maxlength_dt">
3561
- <xsl:for-each select="*[local-name() = 'dl'][1]">
3562
- <xsl:call-template name="getMaxLength_dt"/>
3563
- </xsl:for-each>
3564
- </xsl:variable>
3565
-
3566
- <xsl:if test="xalan:nodeset($references)//fn">
3741
+ </xsl:variable>
3742
+
3743
+ <xsl:call-template name="calculate-column-widths">
3744
+ <xsl:with-param name="cols-count" select="2"/>
3745
+ <xsl:with-param name="table" select="$html-table"/>
3746
+ </xsl:call-template>
3747
+
3748
+ </xsl:if>
3749
+ </xsl:variable>
3750
+
3751
+ <xsl:variable name="maxlength_dt">
3752
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
3753
+ <xsl:call-template name="getMaxLength_dt"/>
3754
+ </xsl:for-each>
3755
+ </xsl:variable>
3756
+
3567
3757
  <fo:block>
3568
3758
  <fo:table width="95%" table-layout="fixed">
3569
3759
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -3590,20 +3780,18 @@
3590
3780
  <fo:table-row>
3591
3781
  <fo:table-cell>
3592
3782
  <fo:block>
3593
- <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
3594
-
3783
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
3595
3784
  <xsl:value-of select="@reference"/>
3596
3785
  </fo:inline>
3597
3786
  </fo:block>
3598
3787
  </fo:table-cell>
3599
3788
  <fo:table-cell>
3600
- <fo:block text-align="justify" margin-bottom="12pt">
3601
-
3789
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
3602
3790
  <xsl:if test="normalize-space($key_iso) = 'true'">
3603
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
3791
+
3792
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
3793
+
3604
3794
  </xsl:if>
3605
-
3606
- <!-- <xsl:apply-templates /> -->
3607
3795
  <xsl:copy-of select="./node()"/>
3608
3796
  </fo:block>
3609
3797
  </fo:table-cell>
@@ -3616,16 +3804,8 @@
3616
3804
  </xsl:if>
3617
3805
 
3618
3806
  </xsl:template><xsl:template match="*[local-name()='fn']">
3619
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
3620
- <fo:inline font-size="80%" keep-with-previous.within-line="always">
3621
-
3622
-
3623
-
3624
-
3625
-
3626
-
3627
- <xsl:attribute name="vertical-align">super</xsl:attribute>
3628
-
3807
+ <fo:inline xsl:use-attribute-sets="fn-reference-style">
3808
+
3629
3809
 
3630
3810
 
3631
3811
 
@@ -3654,10 +3834,10 @@
3654
3834
  <xsl:variable name="isDeleted" select="@deleted"/>
3655
3835
  <fo:block-container>
3656
3836
 
3657
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
3658
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
3659
- </xsl:if>
3660
-
3837
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
3838
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
3839
+ </xsl:if>
3840
+
3661
3841
 
3662
3842
  <xsl:if test="parent::*[local-name() = 'note']">
3663
3843
  <xsl:attribute name="margin-left">
@@ -3674,11 +3854,11 @@
3674
3854
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3675
3855
  </xsl:call-template>
3676
3856
 
3677
- <fo:block-container>
3678
-
3679
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
3680
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
3857
+ <fo:block-container margin-left="0mm">
3858
+
3681
3859
 
3860
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3861
+
3682
3862
 
3683
3863
  <xsl:variable name="parent" select="local-name(..)"/>
3684
3864
 
@@ -3689,23 +3869,19 @@
3689
3869
  <xsl:choose>
3690
3870
  <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
3691
3871
 
3692
-
3693
- <fo:block margin-bottom="12pt" text-align="left">
3694
-
3695
- <xsl:variable name="title-where">
3696
-
3872
+ <fo:block margin-bottom="12pt" text-align="left">
3697
3873
 
3698
- <xsl:call-template name="getTitle">
3699
- <xsl:with-param name="name" select="'title-where'"/>
3874
+ <xsl:variable name="title-where">
3875
+ <xsl:call-template name="getLocalizedString">
3876
+ <xsl:with-param name="key">where</xsl:with-param>
3700
3877
  </xsl:call-template>
3701
-
3702
- </xsl:variable>
3703
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
3704
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
3705
- <xsl:text/>
3706
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3707
- </fo:block>
3708
-
3878
+ </xsl:variable>
3879
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
3880
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
3881
+ <xsl:text/>
3882
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3883
+ </fo:block>
3884
+
3709
3885
  </xsl:when>
3710
3886
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
3711
3887
  <fo:block margin-bottom="12pt" text-align="left">
@@ -3714,12 +3890,9 @@
3714
3890
 
3715
3891
 
3716
3892
  <xsl:variable name="title-where">
3717
-
3718
-
3719
- <xsl:call-template name="getTitle">
3720
- <xsl:with-param name="name" select="'title-where'"/>
3721
- </xsl:call-template>
3722
-
3893
+ <xsl:call-template name="getLocalizedString">
3894
+ <xsl:with-param name="key">where</xsl:with-param>
3895
+ </xsl:call-template>
3723
3896
  </xsl:variable>
3724
3897
  <xsl:value-of select="$title-where"/>
3725
3898
  </fo:block>
@@ -3731,12 +3904,9 @@
3731
3904
 
3732
3905
 
3733
3906
  <xsl:variable name="title-key">
3734
-
3735
-
3736
- <xsl:call-template name="getTitle">
3737
- <xsl:with-param name="name" select="'title-key'"/>
3738
- </xsl:call-template>
3739
-
3907
+ <xsl:call-template name="getLocalizedString">
3908
+ <xsl:with-param name="key">key</xsl:with-param>
3909
+ </xsl:call-template>
3740
3910
  </xsl:variable>
3741
3911
  <xsl:value-of select="$title-key"/>
3742
3912
  </fo:block>
@@ -3758,9 +3928,7 @@
3758
3928
  <fo:table width="95%" table-layout="fixed">
3759
3929
 
3760
3930
  <xsl:choose>
3761
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
3762
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
3763
- </xsl:when>
3931
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
3764
3932
  <xsl:when test="normalize-space($key_iso) = 'true'">
3765
3933
  <xsl:attribute name="font-size">10pt</xsl:attribute>
3766
3934
 
@@ -3781,12 +3949,9 @@
3781
3949
  </xsl:otherwise>
3782
3950
  </xsl:choose>
3783
3951
  </xsl:variable>
3784
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
3785
- <!-- <xsl:element name="{$ns}:table"> -->
3786
- <tbody>
3787
- <xsl:apply-templates mode="dl"/>
3788
- </tbody>
3789
- <!-- </xsl:element> -->
3952
+ <tbody>
3953
+ <xsl:apply-templates mode="dl"/>
3954
+ </tbody>
3790
3955
  </xsl:variable>
3791
3956
  <!-- html-table<xsl:copy-of select="$html-table"/> -->
3792
3957
  <xsl:variable name="colwidths">
@@ -3866,8 +4031,6 @@
3866
4031
  </xsl:for-each>
3867
4032
  </xsl:otherwise>
3868
4033
  </xsl:choose>
3869
- <!-- <fo:table-column column-width="15%"/>
3870
- <fo:table-column column-width="85%"/> -->
3871
4034
  </xsl:otherwise>
3872
4035
  </xsl:choose>
3873
4036
  </xsl:template><xsl:template name="getMaxLength_dt">
@@ -3882,12 +4045,6 @@
3882
4045
  </xsl:for-each>
3883
4046
  </xsl:variable>
3884
4047
  <xsl:variable name="maxLength">
3885
- <!-- <xsl:for-each select="*[local-name()='dt']">
3886
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3887
- <xsl:if test="position() = 1">
3888
- <xsl:value-of select="string-length(normalize-space(.))"/>
3889
- </xsl:if>
3890
- </xsl:for-each> -->
3891
4048
  <xsl:for-each select="xalan:nodeset($lengths)/length">
3892
4049
  <xsl:sort select="." data-type="number" order="descending"/>
3893
4050
  <xsl:if test="position() = 1">
@@ -3913,12 +4070,12 @@
3913
4070
  <xsl:if test="normalize-space($key_iso) = 'true'">
3914
4071
  <xsl:attribute name="margin-top">0</xsl:attribute>
3915
4072
  </xsl:if>
3916
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4073
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3917
4074
  </fo:block>
3918
4075
  </fo:table-cell>
3919
4076
  <fo:table-cell>
3920
4077
  <fo:block>
3921
- <xsl:apply-templates/>
4078
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3922
4079
  </fo:block>
3923
4080
  </fo:table-cell>
3924
4081
  </fo:table-row>
@@ -3929,85 +4086,49 @@
3929
4086
  </td>
3930
4087
  <td>
3931
4088
 
3932
-
3933
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3934
-
4089
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
4090
+ <xsl:with-param name="process">true</xsl:with-param>
4091
+ </xsl:apply-templates>
4092
+
3935
4093
  </td>
3936
4094
  </tr>
3937
4095
 
3938
4096
  </xsl:template><xsl:template match="*[local-name()='dt']">
3939
4097
  <xsl:param name="key_iso"/>
3940
4098
 
3941
- <fo:table-row>
3942
-
3943
- <xsl:attribute name="min-height">8.5mm</xsl:attribute>
3944
-
3945
-
4099
+ <fo:table-row xsl:use-attribute-sets="dt-row-style">
3946
4100
  <fo:table-cell>
3947
4101
 
3948
- <fo:block margin-top="6pt">
4102
+ <fo:block xsl:use-attribute-sets="dt-style">
3949
4103
  <xsl:copy-of select="@id"/>
3950
4104
 
3951
-
3952
4105
  <xsl:if test="normalize-space($key_iso) = 'true'">
3953
4106
  <xsl:attribute name="margin-top">0</xsl:attribute>
3954
-
3955
4107
  </xsl:if>
3956
4108
 
3957
4109
 
3958
4110
 
3959
-
3960
-
3961
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
3962
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3963
-
3964
-
3965
-
3966
4111
  <xsl:apply-templates/>
3967
- <!-- <xsl:if test="$namespace = 'gb'">
3968
- <xsl:if test="ancestor::*[local-name()='formula']">
3969
- <xsl:text>—</xsl:text>
3970
- </xsl:if>
3971
- </xsl:if> -->
3972
4112
  </fo:block>
3973
4113
  </fo:table-cell>
3974
4114
  <fo:table-cell>
3975
4115
  <fo:block>
3976
4116
 
3977
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3978
- <xsl:if test="local-name(*[1]) != 'stem'">
3979
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3980
- </xsl:if>
3981
- </xsl:if> -->
3982
-
3983
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3984
-
4117
+
4118
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
4119
+ <xsl:with-param name="process">true</xsl:with-param>
4120
+ </xsl:apply-templates>
3985
4121
  </fo:block>
3986
4122
  </fo:table-cell>
3987
4123
  </fo:table-row>
3988
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3989
- <xsl:if test="local-name(*[1]) = 'stem'">
3990
- <fo:table-row>
3991
- <fo:table-cell>
3992
- <fo:block margin-top="6pt">
3993
- <xsl:if test="normalize-space($key_iso) = 'true'">
3994
- <xsl:attribute name="margin-top">0</xsl:attribute>
3995
- </xsl:if>
3996
- <xsl:text>&#xA0;</xsl:text>
3997
- </fo:block>
3998
- </fo:table-cell>
3999
- <fo:table-cell>
4000
- <fo:block>
4001
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
4002
- </fo:block>
4003
- </fo:table-cell>
4004
- </fo:table-row>
4005
- </xsl:if>
4006
- </xsl:if> -->
4007
4124
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
4008
4125
  <xsl:apply-templates/>
4009
- </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
4010
- <xsl:apply-templates/>
4126
+ </xsl:template><xsl:template match="*[local-name()='dd']">
4127
+ <xsl:param name="process">false</xsl:param>
4128
+ <xsl:if test="$process = 'true'">
4129
+ <xsl:apply-templates select="@language"/>
4130
+ <xsl:apply-templates/>
4131
+ </xsl:if>
4011
4132
  </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
4012
4133
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
4013
4134
  </xsl:template><xsl:template match="*[local-name()='em']">
@@ -4031,6 +4152,7 @@
4031
4152
  </fo:inline>
4032
4153
  </xsl:template><xsl:template match="*[local-name()='tt']">
4033
4154
  <fo:inline xsl:use-attribute-sets="tt-style">
4155
+
4034
4156
  <xsl:variable name="_font-size">
4035
4157
 
4036
4158
 
@@ -4067,7 +4189,22 @@
4067
4189
  <xsl:apply-templates/>
4068
4190
  </fo:inline>
4069
4191
  </xsl:template><xsl:template match="*[local-name()='add']">
4192
+ <xsl:param name="skip">true</xsl:param>
4070
4193
  <xsl:choose>
4194
+ <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
4195
+ <xsl:choose>
4196
+ <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab'])) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
4197
+ <xsl:otherwise>
4198
+ <fo:inline>
4199
+ <xsl:call-template name="insertTag">
4200
+ <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
4201
+ <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
4202
+ <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
4203
+ </xsl:call-template>
4204
+ </fo:inline>
4205
+ </xsl:otherwise>
4206
+ </xsl:choose>
4207
+ </xsl:when>
4071
4208
  <xsl:when test="@amendment">
4072
4209
  <fo:inline>
4073
4210
  <xsl:call-template name="insertTag">
@@ -4102,7 +4239,6 @@
4102
4239
  </fo:inline>
4103
4240
  </xsl:otherwise>
4104
4241
  </xsl:choose>
4105
-
4106
4242
  </xsl:template><xsl:template name="insertTag">
4107
4243
  <xsl:param name="type"/>
4108
4244
  <xsl:param name="kind"/>
@@ -4110,22 +4246,20 @@
4110
4246
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
4111
4247
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
4112
4248
  <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
4113
- <!-- <xsl:attribute name="width">7mm</xsl:attribute>
4114
- <xsl:attribute name="content-height">100%</xsl:attribute> -->
4115
4249
  <xsl:attribute name="height">5mm</xsl:attribute>
4116
4250
  <xsl:attribute name="content-width">100%</xsl:attribute>
4117
4251
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
4118
4252
  <xsl:attribute name="scaling">uniform</xsl:attribute>
4119
4253
  <svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
4120
4254
  <g>
4121
- <xsl:if test="$type = 'closing'">
4255
+ <xsl:if test="$type = 'closing' or $type = 'end'">
4122
4256
  <xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
4123
4257
  </xsl:if>
4124
4258
  <polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
4125
4259
  <line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
4126
4260
  </g>
4127
4261
  <text font-family="Arial" x="15" y="57" font-size="40pt">
4128
- <xsl:if test="$type = 'closing'">
4262
+ <xsl:if test="$type = 'closing' or $type = 'end'">
4129
4263
  <xsl:attribute name="x">25</xsl:attribute>
4130
4264
  </xsl:if>
4131
4265
  <xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
@@ -4169,7 +4303,11 @@
4169
4303
  <xsl:with-param name="text" select="substring($text,2)"/>
4170
4304
  </xsl:call-template>
4171
4305
  </xsl:if>
4172
- </xsl:template><xsl:template name="tokenize">
4306
+ </xsl:template><xsl:template match="*[local-name() = 'pagebreak']">
4307
+ <fo:block break-after="page"/>
4308
+ <fo:block> </fo:block>
4309
+ <fo:block break-after="page"/>
4310
+ </xsl:template><xsl:template name="tokenize">
4173
4311
  <xsl:param name="text"/>
4174
4312
  <xsl:param name="separator" select="' '"/>
4175
4313
  <xsl:choose>
@@ -4329,14 +4467,6 @@
4329
4467
 
4330
4468
  <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
4331
4469
 
4332
- <!-- <xsl:choose>
4333
- <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
4334
-
4335
- </xsl:when>
4336
- <xsl:otherwise>
4337
- <xsl:copy-of select="current()"/>
4338
- </xsl:otherwise>
4339
- </xsl:choose> -->
4340
4470
  </xsl:variable>
4341
4471
  <xsl:copy-of select="$simple-table"/>
4342
4472
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
@@ -4455,8 +4585,6 @@
4455
4585
  <xsl:choose>
4456
4586
  <xsl:when test="contains($str2, ' ')">
4457
4587
  <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
4458
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
4459
- <xsl:value-of select="substring($substr, 2)"/> -->
4460
4588
  <xsl:call-template name="capitalize">
4461
4589
  <xsl:with-param name="str" select="$substr"/>
4462
4590
  </xsl:call-template>
@@ -4466,8 +4594,6 @@
4466
4594
  </xsl:call-template>
4467
4595
  </xsl:when>
4468
4596
  <xsl:otherwise>
4469
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
4470
- <xsl:value-of select="substring($str2, 2)"/> -->
4471
4597
  <xsl:call-template name="capitalize">
4472
4598
  <xsl:with-param name="str" select="$str2"/>
4473
4599
  </xsl:call-template>
@@ -4495,6 +4621,7 @@
4495
4621
  <xsl:apply-templates select="." mode="mathml"/>
4496
4622
  </xsl:variable>
4497
4623
  <fo:instream-foreign-object fox:alt-text="Math">
4624
+
4498
4625
 
4499
4626
 
4500
4627
  <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
@@ -4526,7 +4653,7 @@
4526
4653
  </xsl:attribute>
4527
4654
 
4528
4655
 
4529
- <!-- <xsl:copy-of select="."/> -->
4656
+
4530
4657
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
4531
4658
  </fo:instream-foreign-object>
4532
4659
  </fo:inline>
@@ -4585,6 +4712,10 @@
4585
4712
 
4586
4713
 
4587
4714
 
4715
+
4716
+
4717
+
4718
+
4588
4719
  <xsl:choose>
4589
4720
  <xsl:when test="$target_text = ''">
4590
4721
  <xsl:apply-templates/>
@@ -4608,19 +4739,19 @@
4608
4739
  </fo:inline>
4609
4740
  </xsl:template><xsl:template match="*[local-name()='appendix']">
4610
4741
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
4611
- <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
4742
+ <xsl:apply-templates select="*[local-name()='title']"/>
4612
4743
  </fo:block>
4613
- <xsl:apply-templates/>
4614
- </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
4744
+ <xsl:apply-templates select="node()[not(local-name()='title')]"/>
4745
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" priority="2">
4615
4746
  <xsl:variable name="level">
4616
4747
  <xsl:call-template name="getLevel"/>
4617
4748
  </xsl:variable>
4618
4749
  <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
4619
4750
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
4620
4751
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
4621
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4752
+ <xsl:apply-templates select="*[local-name()='name']"/>
4622
4753
  </fo:block>
4623
- <xsl:apply-templates/>
4754
+ <xsl:apply-templates select="node()[not(local-name()='name')]"/>
4624
4755
  </xsl:template><xsl:template match="*[local-name() = 'callout']">
4625
4756
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
4626
4757
  </xsl:template><xsl:template match="*[local-name() = 'annotation']">
@@ -4642,7 +4773,6 @@
4642
4773
  </fo:inline>
4643
4774
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
4644
4775
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
4645
-
4646
4776
  <xsl:apply-templates/>
4647
4777
  </fo:basic-link>
4648
4778
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -4670,13 +4800,17 @@
4670
4800
  <fo:inline>
4671
4801
  <xsl:apply-templates/>
4672
4802
  </fo:inline>
4673
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
4803
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="formula_number"> <!-- show by demand -->
4674
4804
  <xsl:if test="normalize-space() != ''">
4675
4805
  <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
4676
4806
  </xsl:if>
4677
4807
  </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
4678
4808
 
4679
4809
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
4810
+
4811
+
4812
+
4813
+
4680
4814
 
4681
4815
 
4682
4816
  <xsl:if test="ancestor::ogc:ul or ancestor::ogc:ol and not(ancestor::ogc:note[1]/following-sibling::*)">
@@ -4685,38 +4819,49 @@
4685
4819
 
4686
4820
 
4687
4821
 
4822
+
4823
+
4688
4824
 
4689
4825
  <fo:block-container margin-left="0mm">
4826
+
4690
4827
 
4691
4828
 
4692
4829
 
4830
+
4693
4831
 
4694
-
4695
-
4696
-
4697
-
4698
- <fo:block>
4699
-
4700
-
4701
-
4702
-
4703
-
4832
+ <fo:block>
4833
+
4834
+
4704
4835
 
4705
- <fo:inline xsl:use-attribute-sets="note-name-style">
4706
4836
 
4707
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4708
- </fo:inline>
4709
- <xsl:apply-templates/>
4710
- </fo:block>
4711
-
4712
-
4837
+
4838
+
4839
+
4840
+ <fo:inline xsl:use-attribute-sets="note-name-style">
4841
+
4842
+
4843
+
4844
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
4845
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
4846
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
4847
+ <xsl:with-param name="skip">false</xsl:with-param>
4848
+ </xsl:apply-templates>
4849
+ </xsl:if>
4850
+
4851
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4852
+
4853
+ </fo:inline>
4854
+
4855
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4856
+ </fo:block>
4857
+
4713
4858
  </fo:block-container>
4714
4859
  </fo:block-container>
4715
4860
 
4716
4861
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
4717
4862
  <xsl:variable name="num"><xsl:number/></xsl:variable>
4718
4863
  <xsl:choose>
4719
- <xsl:when test="$num = 1">
4864
+ <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
4720
4865
  <fo:inline xsl:use-attribute-sets="note-p-style">
4721
4866
  <xsl:apply-templates/>
4722
4867
  </fo:inline>
@@ -4731,12 +4876,16 @@
4731
4876
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
4732
4877
 
4733
4878
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
4879
+
4880
+
4881
+
4882
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4734
4883
 
4735
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4736
4884
  </fo:inline>
4737
- <xsl:apply-templates/>
4885
+
4886
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4738
4887
  </fo:block>
4739
- </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
4888
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']">
4740
4889
  <xsl:param name="sfx"/>
4741
4890
  <xsl:variable name="suffix">
4742
4891
  <xsl:choose>
@@ -4755,7 +4904,7 @@
4755
4904
  <xsl:apply-templates/>
4756
4905
  <xsl:value-of select="$suffix"/>
4757
4906
  </xsl:if>
4758
- </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
4907
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']">
4759
4908
  <xsl:param name="sfx"/>
4760
4909
  <xsl:variable name="suffix">
4761
4910
  <xsl:choose>
@@ -4782,25 +4931,25 @@
4782
4931
  <xsl:apply-templates/>
4783
4932
  </fo:block>
4784
4933
  </xsl:template><xsl:template match="*[local-name() = 'term']">
4785
- <!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
4786
4934
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
4787
4935
 
4788
4936
 
4937
+
4938
+ <xsl:apply-templates select="ogc:name"/>
4939
+
4940
+
4789
4941
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
4790
4942
 
4791
4943
  </xsl:if>
4792
- <xsl:apply-templates/>
4944
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4793
4945
  </fo:block>
4794
- </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
4946
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
4795
4947
  <xsl:if test="normalize-space() != ''">
4796
4948
  <xsl:variable name="level">
4797
4949
  <xsl:call-template name="getLevelTermName"/>
4798
4950
  </xsl:variable>
4799
4951
  <fo:inline role="H{$level}">
4800
4952
  <xsl:apply-templates/>
4801
- <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
4802
- <xsl:text>.</xsl:text>
4803
- </xsl:if> -->
4804
4953
  </fo:inline>
4805
4954
  </xsl:if>
4806
4955
  </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
@@ -4813,9 +4962,10 @@
4813
4962
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
4814
4963
  </xsl:call-template>
4815
4964
 
4816
- <fo:block>
4817
-
4818
- <xsl:apply-templates/>
4965
+
4966
+
4967
+ <fo:block xsl:use-attribute-sets="figure-style">
4968
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4819
4969
  </fo:block>
4820
4970
  <xsl:call-template name="fn_display_figure"/>
4821
4971
  <xsl:for-each select="*[local-name() = 'note']">
@@ -4823,14 +4973,15 @@
4823
4973
  </xsl:for-each>
4824
4974
 
4825
4975
 
4826
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4976
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
4977
+
4827
4978
 
4828
4979
  </fo:block-container>
4829
4980
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
4830
4981
  <fo:block id="{@id}">
4831
- <xsl:apply-templates/>
4982
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4832
4983
  </fo:block>
4833
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4984
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4834
4985
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
4835
4986
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
4836
4987
  <xsl:apply-templates/>
@@ -4937,9 +5088,7 @@
4937
5088
  <xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
4938
5089
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
4939
5090
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
4940
- <!-- width=<xsl:value-of select="$width"/> -->
4941
5091
  <xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
4942
- <!-- height=<xsl:value-of select="$height"/> -->
4943
5092
  <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
4944
5093
  <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
4945
5094
  <xsl:call-template name="svg_cross">
@@ -5209,7 +5358,7 @@
5209
5358
  </fo:basic-link>
5210
5359
  </fo:block>
5211
5360
  </fo:block-container>
5212
- </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">
5361
+ </xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
5213
5362
  <xsl:apply-templates mode="contents"/>
5214
5363
  <xsl:text> </xsl:text>
5215
5364
  </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'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
@@ -5221,11 +5370,72 @@
5221
5370
  <xsl:value-of select="."/>
5222
5371
  </xsl:template><xsl:template match="node()" mode="contents">
5223
5372
  <xsl:apply-templates mode="contents"/>
5373
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
5374
+ <xsl:variable name="level">
5375
+ <xsl:call-template name="getLevel">
5376
+ <xsl:with-param name="depth" select="@depth"/>
5377
+ </xsl:call-template>
5378
+ </xsl:variable>
5379
+
5380
+ <xsl:variable name="section">
5381
+ <xsl:choose>
5382
+ <xsl:when test="@type = 'section-title'"/>
5383
+ <xsl:otherwise>
5384
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
5385
+ </xsl:otherwise>
5386
+ </xsl:choose>
5387
+ </xsl:variable>
5388
+
5389
+ <xsl:variable name="type"><xsl:value-of select="@type"/></xsl:variable>
5390
+
5391
+ <xsl:variable name="display">
5392
+ <xsl:choose>
5393
+ <xsl:when test="normalize-space(@id) = ''">false</xsl:when>
5394
+ <xsl:when test="$level &lt;= $toc_level">true</xsl:when>
5395
+ <xsl:otherwise>false</xsl:otherwise>
5396
+ </xsl:choose>
5397
+ </xsl:variable>
5398
+
5399
+ <xsl:variable name="skip">false</xsl:variable>
5400
+
5401
+ <xsl:if test="$skip = 'false'">
5402
+
5403
+ <xsl:variable name="title">
5404
+ <xsl:choose>
5405
+ <xsl:when test="*[local-name() = 'tab']">
5406
+ <xsl:choose>
5407
+ <xsl:when test="@type = 'section-title'">
5408
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
5409
+ <xsl:text>: </xsl:text>
5410
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
5411
+ </xsl:when>
5412
+ <xsl:otherwise>
5413
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
5414
+ </xsl:otherwise>
5415
+ </xsl:choose>
5416
+ </xsl:when>
5417
+ <xsl:otherwise>
5418
+ <xsl:copy-of select="node()"/>
5419
+ </xsl:otherwise>
5420
+ </xsl:choose>
5421
+ </xsl:variable>
5422
+
5423
+ <xsl:variable name="root">
5424
+ <xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
5425
+ <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
5426
+ </xsl:variable>
5427
+
5428
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
5429
+ <title>
5430
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
5431
+ </title>
5432
+ </item>
5433
+ </xsl:if>
5224
5434
  </xsl:template><xsl:template match="node()" mode="bookmarks">
5225
5435
  <xsl:apply-templates mode="bookmarks"/>
5226
5436
  </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
5227
5437
  <xsl:apply-templates select="."/>
5228
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
5438
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
5229
5439
  <xsl:apply-templates mode="bookmarks"/>
5230
5440
  </xsl:template><xsl:template name="addBookmarks">
5231
5441
  <xsl:param name="contents"/>
@@ -5313,8 +5523,6 @@
5313
5523
 
5314
5524
 
5315
5525
 
5316
-
5317
-
5318
5526
  <xsl:variable name="list_of_tables_">
5319
5527
  <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name']]"> <!-- contains(*[local-name() = 'name'], '—') -->
5320
5528
  <table id="{@id}"><xsl:apply-templates select="*[local-name() = 'name']" mode="bookmarks"/></table>
@@ -5459,7 +5667,7 @@
5459
5667
  <xsl:apply-templates mode="bookmark"/>
5460
5668
  </xsl:otherwise>
5461
5669
  </xsl:choose>
5462
- </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
5670
+ </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
5463
5671
  <xsl:if test="normalize-space() != ''">
5464
5672
  <fo:block xsl:use-attribute-sets="figure-name-style">
5465
5673
 
@@ -5468,16 +5676,13 @@
5468
5676
  </fo:block>
5469
5677
  </xsl:if>
5470
5678
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
5471
- <xsl:apply-templates mode="contents_item"/>
5679
+ <xsl:param name="mode">bookmarks</xsl:param>
5680
+ <xsl:apply-templates mode="contents_item">
5681
+ <xsl:with-param name="mode" select="$mode"/>
5682
+ </xsl:apply-templates>
5472
5683
  <!-- <xsl:text> </xsl:text> -->
5473
5684
  </xsl:template><xsl:template name="getSection">
5474
5685
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
5475
- <!--
5476
- <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
5477
- <xsl:value-of select="."/>
5478
- </xsl:for-each>
5479
- -->
5480
-
5481
5686
  </xsl:template><xsl:template name="getName">
5482
5687
  <xsl:choose>
5483
5688
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -5541,9 +5746,26 @@
5541
5746
  <xsl:copy-of select="."/>
5542
5747
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
5543
5748
  <xsl:text> </xsl:text>
5749
+ </xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
5750
+ <xsl:param name="mode">bookmarks</xsl:param>
5751
+ <xsl:apply-templates mode="contents_item">
5752
+ <xsl:with-param name="mode" select="$mode"/>
5753
+ </xsl:apply-templates>
5754
+ </xsl:template><xsl:template match="*[local-name() = 'add']" mode="contents_item">
5755
+ <xsl:param name="mode">bookmarks</xsl:param>
5756
+ <xsl:choose>
5757
+ <xsl:when test="starts-with(text(), $ace_tag)">
5758
+ <xsl:if test="$mode = 'contents'">
5759
+ <xsl:copy>
5760
+ <xsl:apply-templates mode="contents_item"/>
5761
+ </xsl:copy>
5762
+ </xsl:if>
5763
+ </xsl:when>
5764
+ <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
5765
+ </xsl:choose>
5544
5766
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
5545
5767
 
5546
- <fo:block-container margin-left="0mm">
5768
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
5547
5769
  <xsl:copy-of select="@id"/>
5548
5770
 
5549
5771
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -5584,6 +5806,7 @@
5584
5806
 
5585
5807
 
5586
5808
  </xsl:variable>
5809
+
5587
5810
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
5588
5811
  <xsl:if test="$font-size != ''">
5589
5812
  <xsl:attribute name="font-size">
@@ -5604,11 +5827,11 @@
5604
5827
  </xsl:if>
5605
5828
 
5606
5829
 
5607
- <xsl:apply-templates/>
5830
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5608
5831
  </fo:block>
5609
5832
 
5610
5833
 
5611
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5834
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
5612
5835
 
5613
5836
 
5614
5837
 
@@ -5626,7 +5849,7 @@
5626
5849
  <xsl:call-template name="add-zero-spaces-java">
5627
5850
  <xsl:with-param name="text" select="$text"/>
5628
5851
  </xsl:call-template>
5629
- </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
5852
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
5630
5853
  <xsl:if test="normalize-space() != ''">
5631
5854
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
5632
5855
  <xsl:apply-templates/>
@@ -5634,10 +5857,10 @@
5634
5857
  </xsl:if>
5635
5858
  </xsl:template><xsl:template match="*[local-name() = 'permission']">
5636
5859
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
5637
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5638
- <xsl:apply-templates/>
5860
+ <xsl:apply-templates select="*[local-name()='name']"/>
5861
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5639
5862
  </fo:block>
5640
- </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
5863
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
5641
5864
  <xsl:if test="normalize-space() != ''">
5642
5865
  <fo:block xsl:use-attribute-sets="permission-name-style">
5643
5866
  <xsl:apply-templates/>
@@ -5652,13 +5875,13 @@
5652
5875
  </fo:block>
5653
5876
  </xsl:template><xsl:template match="*[local-name() = 'requirement']">
5654
5877
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
5655
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5656
- <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
5657
- <xsl:apply-templates select="@obligation" mode="presentation"/>
5658
- <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
5659
- <xsl:apply-templates/>
5878
+ <xsl:apply-templates select="*[local-name()='name']"/>
5879
+ <xsl:apply-templates select="*[local-name()='label']"/>
5880
+ <xsl:apply-templates select="@obligation"/>
5881
+ <xsl:apply-templates select="*[local-name()='subject']"/>
5882
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'label') and not(local-name() = 'subject')]"/>
5660
5883
  </fo:block>
5661
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
5884
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
5662
5885
  <xsl:if test="normalize-space() != ''">
5663
5886
  <fo:block xsl:use-attribute-sets="requirement-name-style">
5664
5887
 
@@ -5672,20 +5895,24 @@
5672
5895
 
5673
5896
  </fo:block>
5674
5897
  </xsl:if>
5675
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
5898
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']">
5676
5899
  <fo:block xsl:use-attribute-sets="requirement-label-style">
5677
5900
  <xsl:apply-templates/>
5678
5901
  </fo:block>
5679
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
5902
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation">
5680
5903
  <fo:block>
5681
5904
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
5682
5905
  </fo:block>
5906
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2">
5907
+ <fo:block xsl:use-attribute-sets="subject-style">
5908
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
5909
+ </fo:block>
5683
5910
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
5684
5911
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
5685
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5686
- <xsl:apply-templates/>
5912
+ <xsl:apply-templates select="*[local-name()='name']"/>
5913
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5687
5914
  </fo:block>
5688
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
5915
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
5689
5916
  <xsl:if test="normalize-space() != ''">
5690
5917
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
5691
5918
  <xsl:apply-templates/>
@@ -5696,10 +5923,6 @@
5696
5923
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
5697
5924
  <xsl:apply-templates/>
5698
5925
  </fo:block>
5699
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
5700
- <fo:block xsl:use-attribute-sets="subject-style">
5701
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
5702
- </fo:block>
5703
5926
  </xsl:template><xsl:template match="*[local-name() = 'subject']">
5704
5927
  <fo:block xsl:use-attribute-sets="subject-style">
5705
5928
  <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
@@ -5743,8 +5966,6 @@
5743
5966
  </xsl:variable>
5744
5967
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
5745
5968
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
5746
- <!-- <fo:table-column column-width="35mm"/>
5747
- <fo:table-column column-width="115mm"/> -->
5748
5969
  <fo:table-column column-width="30%"/>
5749
5970
  <fo:table-column column-width="70%"/>
5750
5971
  </xsl:if>
@@ -5754,7 +5975,7 @@
5754
5975
  <xsl:if test=".//*[local-name() = 'fn']">
5755
5976
  <xsl:for-each select="*[local-name() = 'tbody']">
5756
5977
  <fo:block font-size="90%" border-bottom="1pt solid black">
5757
- <xsl:call-template name="fn_display"/>
5978
+ <xsl:call-template name="table_fn_display"/>
5758
5979
  </fo:block>
5759
5980
  </xsl:for-each>
5760
5981
  </xsl:if>
@@ -5771,7 +5992,6 @@
5771
5992
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
5772
5993
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
5773
5994
  <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
5774
- <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
5775
5995
  <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
5776
5996
  </xsl:if>
5777
5997
  <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
@@ -5784,34 +6004,11 @@
5784
6004
  </fo:table-row>
5785
6005
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
5786
6006
  <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
5787
- <xsl:attribute name="text-align">
5788
- <xsl:choose>
5789
- <xsl:when test="@align">
5790
- <xsl:value-of select="@align"/>
5791
- </xsl:when>
5792
- <xsl:otherwise>left</xsl:otherwise>
5793
- </xsl:choose>
5794
- </xsl:attribute>
5795
- <xsl:if test="@colspan">
5796
- <xsl:attribute name="number-columns-spanned">
5797
- <xsl:value-of select="@colspan"/>
5798
- </xsl:attribute>
5799
- </xsl:if>
5800
- <xsl:if test="@rowspan">
5801
- <xsl:attribute name="number-rows-spanned">
5802
- <xsl:value-of select="@rowspan"/>
5803
- </xsl:attribute>
5804
- </xsl:if>
5805
- <xsl:call-template name="display-align"/>
6007
+ <xsl:call-template name="setTextAlignment">
6008
+ <xsl:with-param name="default">left</xsl:with-param>
6009
+ </xsl:call-template>
5806
6010
 
5807
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
5808
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5809
- <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
5810
- </xsl:if>
5811
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
5812
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5813
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
5814
- </xsl:if> -->
6011
+ <xsl:call-template name="setTableCellAttributes"/>
5815
6012
 
5816
6013
  <fo:block>
5817
6014
  <xsl:apply-templates/>
@@ -5823,37 +6020,15 @@
5823
6020
  <xsl:attribute name="padding">0mm</xsl:attribute>
5824
6021
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
5825
6022
  </xsl:if>
5826
- <xsl:attribute name="text-align">
5827
- <xsl:choose>
5828
- <xsl:when test="@align">
5829
- <xsl:value-of select="@align"/>
5830
- </xsl:when>
5831
- <xsl:otherwise>left</xsl:otherwise>
5832
- </xsl:choose>
5833
- </xsl:attribute>
6023
+ <xsl:call-template name="setTextAlignment">
6024
+ <xsl:with-param name="default">left</xsl:with-param>
6025
+ </xsl:call-template>
6026
+
5834
6027
  <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
5835
6028
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5836
6029
  </xsl:if>
5837
- <xsl:if test="@colspan">
5838
- <xsl:attribute name="number-columns-spanned">
5839
- <xsl:value-of select="@colspan"/>
5840
- </xsl:attribute>
5841
- </xsl:if>
5842
- <xsl:if test="@rowspan">
5843
- <xsl:attribute name="number-rows-spanned">
5844
- <xsl:value-of select="@rowspan"/>
5845
- </xsl:attribute>
5846
- </xsl:if>
5847
- <xsl:call-template name="display-align"/>
5848
6030
 
5849
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
5850
- <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
5851
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5852
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
5853
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
5854
- </xsl:if>
5855
- </xsl:if> -->
5856
- <!-- 2nd line and below -->
6031
+ <xsl:call-template name="setTableCellAttributes"/>
5857
6032
 
5858
6033
  <fo:block>
5859
6034
  <xsl:apply-templates/>
@@ -5867,15 +6042,15 @@
5867
6042
  <xsl:apply-templates/>
5868
6043
  </fo:block>
5869
6044
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
5870
- <fo:block> <!-- margin-bottom="10pt" -->
6045
+ <fo:block>
5871
6046
  <xsl:apply-templates/>
5872
6047
  </fo:block>
5873
6048
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
5874
6049
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
5875
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5876
- <xsl:apply-templates/>
6050
+ <xsl:apply-templates select="*[local-name()='name']"/>
6051
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5877
6052
  </fo:block>
5878
- </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
6053
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
5879
6054
  <xsl:if test="normalize-space() != ''">
5880
6055
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
5881
6056
  <xsl:apply-templates/>
@@ -5899,42 +6074,46 @@
5899
6074
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
5900
6075
 
5901
6076
 
5902
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5903
-
5904
- <xsl:variable name="element">
5905
-
6077
+ <xsl:variable name="fo_element">
6078
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
5906
6079
  inline
5907
- <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
5908
6080
  </xsl:variable>
5909
6081
 
6082
+ <!-- display 'EXAMPLE' -->
6083
+ <xsl:apply-templates select="*[local-name()='name']">
6084
+ <xsl:with-param name="fo_element" select="$fo_element"/>
6085
+ </xsl:apply-templates>
6086
+
5910
6087
  <xsl:choose>
5911
- <xsl:when test="contains(normalize-space($element), 'block')">
5912
- <fo:block xsl:use-attribute-sets="example-body-style">
5913
- <xsl:apply-templates/>
5914
- </fo:block>
6088
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
6089
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
6090
+ <fo:block-container margin-left="0mm" margin-right="0mm">
6091
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
6092
+ <xsl:with-param name="fo_element" select="$fo_element"/>
6093
+ </xsl:apply-templates>
6094
+ </fo:block-container>
6095
+ </fo:block-container>
5915
6096
  </xsl:when>
5916
6097
  <xsl:otherwise>
5917
6098
  <fo:inline>
5918
- <xsl:apply-templates/>
6099
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
6100
+ <xsl:with-param name="fo_element" select="$fo_element"/>
6101
+ </xsl:apply-templates>
5919
6102
  </fo:inline>
5920
6103
  </xsl:otherwise>
5921
6104
  </xsl:choose>
5922
6105
 
5923
6106
  </fo:block>
5924
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
5925
-
5926
- <xsl:variable name="element">
5927
-
5928
- inline
5929
- <xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
5930
- </xsl:variable>
6107
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
6108
+ <xsl:param name="fo_element">block</xsl:param>
6109
+
5931
6110
  <xsl:choose>
5932
6111
  <xsl:when test="ancestor::*[local-name() = 'appendix']">
5933
6112
  <fo:inline>
5934
6113
  <xsl:apply-templates/>
5935
6114
  </fo:inline>
5936
6115
  </xsl:when>
5937
- <xsl:when test="contains(normalize-space($element), 'block')">
6116
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
5938
6117
  <fo:block xsl:use-attribute-sets="example-name-style">
5939
6118
  <xsl:apply-templates/>
5940
6119
  </fo:block>
@@ -5947,14 +6126,15 @@
5947
6126
  </xsl:choose>
5948
6127
 
5949
6128
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
6129
+ <xsl:param name="fo_element">block</xsl:param>
6130
+
5950
6131
  <xsl:variable name="num"><xsl:number/></xsl:variable>
5951
6132
  <xsl:variable name="element">
5952
6133
 
5953
-
5954
- inline
6134
+ <xsl:value-of select="$fo_element"/>
5955
6135
  </xsl:variable>
5956
6136
  <xsl:choose>
5957
- <xsl:when test="normalize-space($element) = 'block'">
6137
+ <xsl:when test="starts-with(normalize-space($element), 'block')">
5958
6138
  <fo:block xsl:use-attribute-sets="example-p-style">
5959
6139
 
5960
6140
  <xsl:apply-templates/>
@@ -5969,6 +6149,8 @@
5969
6149
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
5970
6150
  <fo:block xsl:use-attribute-sets="termsource-style">
5971
6151
 
6152
+
6153
+
5972
6154
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
5973
6155
  <xsl:variable name="termsource_text">
5974
6156
  <xsl:apply-templates/>
@@ -6006,11 +6188,7 @@
6006
6188
  <xsl:value-of select="."/>
6007
6189
  </xsl:if>
6008
6190
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
6009
- <fo:inline>
6010
-
6011
-
6012
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
6013
-
6191
+ <fo:inline xsl:use-attribute-sets="termsource-text-style">
6014
6192
  <xsl:value-of select="."/>
6015
6193
  </fo:inline>
6016
6194
  </xsl:template><xsl:template match="*[local-name() = 'origin']">
@@ -6024,12 +6202,9 @@
6024
6202
  </fo:basic-link>
6025
6203
  </xsl:template><xsl:template match="*[local-name() = 'modification']">
6026
6204
  <xsl:variable name="title-modified">
6027
-
6028
-
6029
- <xsl:call-template name="getTitle">
6030
- <xsl:with-param name="name" select="'title-modified'"/>
6031
- </xsl:call-template>
6032
-
6205
+ <xsl:call-template name="getLocalizedString">
6206
+ <xsl:with-param name="key">modified</xsl:with-param>
6207
+ </xsl:call-template>
6033
6208
  </xsl:variable>
6034
6209
 
6035
6210
  <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
@@ -6056,7 +6231,6 @@
6056
6231
  <fo:block-container margin-left="0mm">
6057
6232
 
6058
6233
  <fo:block xsl:use-attribute-sets="quote-style">
6059
- <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
6060
6234
 
6061
6235
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
6062
6236
  </fo:block>
@@ -6099,15 +6273,13 @@
6099
6273
  </xsl:variable>
6100
6274
 
6101
6275
  <xsl:choose>
6102
- <xsl:when test="normalize-space($bibitemid) != ''">
6276
+ <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
6103
6277
  <fo:inline xsl:use-attribute-sets="eref-style">
6104
6278
  <xsl:if test="@type = 'footnote'">
6105
-
6106
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
6107
- <xsl:attribute name="font-size">80%</xsl:attribute>
6108
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
6109
- <xsl:attribute name="vertical-align">super</xsl:attribute>
6110
-
6279
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
6280
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
6281
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
6282
+ <xsl:attribute name="font-size">80%</xsl:attribute>
6111
6283
 
6112
6284
  </xsl:if>
6113
6285
 
@@ -6124,8 +6296,6 @@
6124
6296
 
6125
6297
 
6126
6298
 
6127
-
6128
-
6129
6299
  </xsl:if>
6130
6300
 
6131
6301
 
@@ -6183,8 +6353,6 @@
6183
6353
  </xsl:choose>
6184
6354
  </xsl:variable>
6185
6355
 
6186
- <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
6187
-
6188
6356
  <xsl:choose>
6189
6357
  <xsl:when test="$lang = 'zh'">
6190
6358
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -6219,12 +6387,9 @@
6219
6387
  </fo:block>
6220
6388
  </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
6221
6389
  <xsl:variable name="title-deprecated">
6222
-
6223
- <xsl:call-template name="getLocalizedString">
6224
- <xsl:with-param name="key">deprecated</xsl:with-param>
6225
- </xsl:call-template>
6226
-
6227
-
6390
+ <xsl:call-template name="getLocalizedString">
6391
+ <xsl:with-param name="key">deprecated</xsl:with-param>
6392
+ </xsl:call-template>
6228
6393
  </xsl:variable>
6229
6394
  <fo:block xsl:use-attribute-sets="deprecates-style">
6230
6395
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
@@ -6233,6 +6398,8 @@
6233
6398
  <xsl:if test="*[local-name() = 'strong']">
6234
6399
  <xsl:attribute name="font-weight">normal</xsl:attribute>
6235
6400
  </xsl:if>
6401
+ </xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
6402
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
6236
6403
  </xsl:template><xsl:template match="*[local-name() = 'definition']">
6237
6404
  <fo:block xsl:use-attribute-sets="definition-style">
6238
6405
  <xsl:apply-templates/>
@@ -6241,7 +6408,6 @@
6241
6408
  <xsl:apply-templates/>
6242
6409
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
6243
6410
  <fo:inline> <xsl:apply-templates/></fo:inline>
6244
- <!-- <fo:block>&#xA0;</fo:block> -->
6245
6411
  <fo:block/>
6246
6412
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
6247
6413
 
@@ -6282,11 +6448,6 @@
6282
6448
  <xsl:apply-templates/>
6283
6449
  </fo:block>
6284
6450
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
6285
- <fo:block id="{@id}">
6286
- <xsl:apply-templates/>
6287
- </fo:block>
6288
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
6289
-
6290
6451
  <fo:block id="{@id}">
6291
6452
  <xsl:apply-templates/>
6292
6453
  </fo:block>
@@ -6303,6 +6464,51 @@
6303
6464
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
6304
6465
  <!-- 0xA0 to space replacement -->
6305
6466
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
6467
+ </xsl:template><xsl:variable name="ul_labels_">
6468
+
6469
+
6470
+
6471
+
6472
+
6473
+
6474
+
6475
+
6476
+
6477
+
6478
+
6479
+
6480
+
6481
+ <label color="{$color_design}">•</label>
6482
+
6483
+
6484
+
6485
+
6486
+
6487
+ </xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
6488
+ <xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
6489
+ <xsl:variable name="list_level">
6490
+ <xsl:choose>
6491
+ <xsl:when test="$list_level_ &lt;= 3"><xsl:value-of select="$list_level_"/></xsl:when>
6492
+ <xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
6493
+ </xsl:choose>
6494
+ </xsl:variable>
6495
+ <xsl:choose>
6496
+ <xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
6497
+ <xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
6498
+ </xsl:when>
6499
+ <xsl:when test="$list_level mod 3 = 0">
6500
+ <xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
6501
+ </xsl:when>
6502
+ <xsl:when test="$list_level mod 2 = 0">
6503
+ <xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
6504
+ </xsl:when>
6505
+ <xsl:otherwise>
6506
+ <xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
6507
+ </xsl:otherwise>
6508
+ </xsl:choose>
6509
+ </xsl:template><xsl:template match="label" mode="ul_labels">
6510
+ <xsl:copy-of select="@*[not(local-name() = 'level')]"/>
6511
+ <xsl:value-of select="."/>
6306
6512
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
6307
6513
  <xsl:choose>
6308
6514
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
@@ -6509,162 +6715,217 @@
6509
6715
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
6510
6716
  <fo:block><xsl:apply-templates/></fo:block>
6511
6717
  </fo:table-cell>
6512
- </xsl:template><xsl:template name="processBibitem">
6718
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/><xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
6513
6719
 
6514
6720
 
6515
6721
 
6722
+ <fo:block id="{@id}">
6723
+ <xsl:apply-templates/>
6724
+ </fo:block>
6725
+ </xsl:template><xsl:template match="*[local-name() = 'references']">
6726
+ <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
6727
+
6728
+ <fo:block break-after="page"/>
6729
+
6730
+ </xsl:if>
6516
6731
 
6517
- <!-- start OGC bibtem processing -->
6518
- <xsl:choose>
6519
- <xsl:when test="*[local-name() = 'formattedref']">
6520
- <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
6521
- </xsl:when>
6522
- <xsl:otherwise>
6523
- <xsl:variable name="personalAuthors">
6524
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person']">
6525
- <xsl:call-template name="processPersonalAuthor"/>
6526
- </xsl:for-each>
6527
- <xsl:if test="not(*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person'])">
6528
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='editor']/*[local-name() = 'person']">
6529
- <xsl:call-template name="processPersonalAuthor"/>
6530
- </xsl:for-each>
6531
- </xsl:if>
6532
- </xsl:variable>
6533
-
6534
- <xsl:variable name="city" select="*[local-name() = 'place']"/>
6535
- <xsl:variable name="year">
6732
+ <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
6733
+ <xsl:if test="$namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'itu'">
6734
+ <fo:block break-after="page"/>
6735
+ </xsl:if>
6736
+ </xsl:if> -->
6737
+
6738
+ <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
6739
+ <xsl:apply-templates/>
6740
+ </fo:block>
6741
+
6742
+
6743
+
6744
+
6745
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']">
6746
+ <xsl:call-template name="bibitem"/>
6747
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
6748
+
6749
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
6750
+ <xsl:call-template name="processBibitem"/>
6751
+ </fo:block>
6752
+
6753
+
6754
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
6755
+
6756
+ <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
6757
+ $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
6758
+ <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
6759
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
6760
+ <fo:list-item>
6761
+ <fo:list-item-label end-indent="label-end()">
6762
+ <fo:block>
6763
+ <fo:inline>
6764
+
6765
+ <xsl:number format="1."/>
6766
+
6767
+ </fo:inline>
6768
+ </fo:block>
6769
+ </fo:list-item-label>
6770
+ <fo:list-item-body start-indent="body-start()">
6771
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style">
6772
+ <xsl:call-template name="processBibitem"/>
6773
+ </fo:block>
6774
+ </fo:list-item-body>
6775
+ </fo:list-item>
6776
+ </fo:list-block>
6777
+
6778
+
6779
+ </xsl:template><xsl:template name="processBibitem">
6780
+
6781
+
6782
+ <!-- start OGC bibitem processing -->
6783
+ <xsl:if test=".//ogc:fn">
6784
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
6785
+ </xsl:if>
6786
+ <xsl:choose>
6787
+ <xsl:when test="*[local-name() = 'formattedref']">
6788
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
6789
+ </xsl:when>
6790
+ <xsl:otherwise>
6791
+ <xsl:variable name="personalAuthors">
6792
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person']">
6793
+ <xsl:call-template name="processPersonalAuthor"/>
6794
+ </xsl:for-each>
6795
+ <xsl:if test="not(*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person'])">
6796
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='editor']/*[local-name() = 'person']">
6797
+ <xsl:call-template name="processPersonalAuthor"/>
6798
+ </xsl:for-each>
6799
+ </xsl:if>
6800
+ </xsl:variable>
6801
+
6802
+ <xsl:variable name="city" select="*[local-name() = 'place']"/>
6803
+ <xsl:variable name="year">
6804
+ <xsl:choose>
6805
+ <xsl:when test="*[local-name() = 'date'][@type = 'published']">
6806
+ <xsl:for-each select="*[local-name() = 'date'][@type = 'published']">
6807
+ <xsl:call-template name="renderDate"/>
6808
+ </xsl:for-each>
6809
+ </xsl:when>
6810
+ <xsl:when test="*[local-name() = 'date'][@type = 'issued']">
6811
+ <xsl:for-each select="*[local-name() = 'date'][@type = 'issued']">
6812
+ <xsl:call-template name="renderDate"/>
6813
+ </xsl:for-each>
6814
+ </xsl:when>
6815
+ <xsl:when test="*[local-name() = 'date'][@type = 'circulated']">
6816
+ <xsl:for-each select="*[local-name() = 'date'][@type = 'circulated']">
6817
+ <xsl:call-template name="renderDate"/>
6818
+ </xsl:for-each>
6819
+ </xsl:when>
6820
+ <xsl:otherwise>
6821
+ <xsl:for-each select="*[local-name() = 'date']">
6822
+ <xsl:call-template name="renderDate"/>
6823
+ </xsl:for-each>
6824
+ </xsl:otherwise>
6825
+ </xsl:choose>
6826
+ </xsl:variable>
6827
+
6828
+ <xsl:variable name="uri" select="*[local-name() = 'uri']"/>
6829
+
6830
+
6831
+ <!-- citation structure:
6832
+ {personal names | organisation}: {document identifier}, {title}. {publisher}, {city} ({year})
6833
+ -->
6834
+
6835
+ <!-- Author(s) -->
6536
6836
  <xsl:choose>
6537
- <xsl:when test="*[local-name() = 'date'][@type = 'published']">
6538
- <xsl:for-each select="*[local-name() = 'date'][@type = 'published']">
6539
- <xsl:call-template name="renderDate"/>
6540
- </xsl:for-each>
6837
+ <xsl:when test="xalan:nodeset($personalAuthors)//author">
6838
+ <xsl:for-each select="xalan:nodeset($personalAuthors)//author">
6839
+ <xsl:apply-templates/>
6840
+ <xsl:if test="position() != last()">, </xsl:if>
6841
+ </xsl:for-each>
6842
+ <xsl:text>: </xsl:text>
6843
+ </xsl:when>
6844
+ <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
6845
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
6846
+ <xsl:value-of select="."/>
6847
+ <xsl:if test="position() != last()">/</xsl:if>
6848
+ </xsl:for-each>
6849
+ <xsl:text>: </xsl:text>
6541
6850
  </xsl:when>
6542
- <xsl:when test="*[local-name() = 'date'][@type = 'issued']">
6543
- <xsl:for-each select="*[local-name() = 'date'][@type = 'issued']">
6544
- <xsl:call-template name="renderDate"/>
6851
+ <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6852
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6853
+ <xsl:value-of select="."/>
6854
+ <xsl:if test="position() != last()">, </xsl:if>
6545
6855
  </xsl:for-each>
6856
+ <xsl:text>: </xsl:text>
6546
6857
  </xsl:when>
6547
- <xsl:when test="*[local-name() = 'date'][@type = 'circulated']">
6548
- <xsl:for-each select="*[local-name() = 'date'][@type = 'circulated']">
6549
- <xsl:call-template name="renderDate"/>
6550
- </xsl:for-each>
6858
+ </xsl:choose>
6859
+
6860
+
6861
+ <xsl:variable name="document_identifier">
6862
+ <xsl:call-template name="processBibitemDocId"/>
6863
+ </xsl:variable>
6864
+
6865
+ <xsl:value-of select="$document_identifier"/>
6866
+
6867
+ <xsl:apply-templates select="*[local-name() = 'note']"/>
6868
+
6869
+ <xsl:variable name="isDraft">
6870
+ <xsl:variable name="stage" select="normalize-space(*[local-name() = 'status']/*[local-name() = 'stage'])"/>
6871
+ <xsl:if test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization'][*[local-name() = 'name']/text() = 'Open Geospatial Consortium'] and $stage != '' and $stage != 'published' and $stage != 'deprecated' and $stage != 'retired'">true</xsl:if>
6872
+ </xsl:variable>
6873
+
6874
+ <xsl:if test="$isDraft = 'true'">
6875
+ <xsl:text> (Draft)</xsl:text>
6876
+ </xsl:if>
6877
+
6878
+ <xsl:text>, </xsl:text>
6879
+
6880
+ <xsl:choose>
6881
+ <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = 'en']">
6882
+ <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
6551
6883
  </xsl:when>
6552
6884
  <xsl:otherwise>
6553
- <xsl:for-each select="*[local-name() = 'date']">
6554
- <xsl:call-template name="renderDate"/>
6555
- </xsl:for-each>
6885
+ <xsl:apply-templates select="*[local-name() = 'title']"/>
6556
6886
  </xsl:otherwise>
6557
6887
  </xsl:choose>
6558
- </xsl:variable>
6559
-
6560
- <xsl:variable name="uri" select="*[local-name() = 'uri']"/>
6561
-
6562
-
6563
- <!-- citation structure:
6564
- {personal names | organisation}: {document identifier}, {title}. {publisher}, {city} ({year})
6565
- -->
6566
-
6567
- <!-- Author(s) -->
6568
- <xsl:choose>
6569
- <xsl:when test="xalan:nodeset($personalAuthors)//author">
6570
- <xsl:for-each select="xalan:nodeset($personalAuthors)//author">
6571
- <xsl:apply-templates/>
6572
- <xsl:if test="position() != last()">, </xsl:if>
6573
- </xsl:for-each>
6574
- <xsl:text>: </xsl:text>
6575
- </xsl:when>
6576
- <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
6577
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
6578
- <xsl:value-of select="."/>
6579
- <xsl:if test="position() != last()">/</xsl:if>
6580
- </xsl:for-each>
6581
- <xsl:text>: </xsl:text>
6582
- </xsl:when>
6583
- <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6888
+
6889
+ <xsl:text>. </xsl:text>
6890
+
6891
+ <xsl:if test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6584
6892
  <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6585
6893
  <xsl:value-of select="."/>
6586
6894
  <xsl:if test="position() != last()">, </xsl:if>
6587
6895
  </xsl:for-each>
6588
- <xsl:text>: </xsl:text>
6589
- </xsl:when>
6590
- </xsl:choose>
6591
-
6592
-
6593
- <xsl:variable name="document_identifier">
6594
- <xsl:call-template name="processBibitemDocId"/>
6595
- </xsl:variable>
6596
-
6597
- <xsl:value-of select="$document_identifier"/>
6598
-
6599
- <xsl:apply-templates select="*[local-name() = 'note']"/>
6600
-
6601
- <xsl:variable name="isDraft">
6602
- <xsl:variable name="stage" select="normalize-space(*[local-name() = 'status']/*[local-name() = 'stage'])"/>
6603
- <xsl:if test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization'][*[local-name() = 'name']/text() = 'Open Geospatial Consortium'] and $stage != '' and $stage != 'published' and $stage != 'deprecated' and $stage != 'retired'">true</xsl:if>
6604
- </xsl:variable>
6605
-
6606
- <xsl:if test="$isDraft = 'true'">
6607
- <xsl:text> (Draft)</xsl:text>
6608
- </xsl:if>
6609
-
6610
- <xsl:text>, </xsl:text>
6611
-
6612
- <xsl:choose>
6613
- <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = 'en']">
6614
- <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
6615
- </xsl:when>
6616
- <xsl:otherwise>
6617
- <xsl:apply-templates select="*[local-name() = 'title']"/>
6618
- </xsl:otherwise>
6619
- </xsl:choose>
6620
-
6621
- <xsl:text>. </xsl:text>
6622
-
6623
- <xsl:if test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6624
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
6625
- <xsl:value-of select="."/>
6626
- <xsl:if test="position() != last()">, </xsl:if>
6627
- </xsl:for-each>
6628
- <xsl:if test="normalize-space($city) != ''">, </xsl:if>
6629
- </xsl:if>
6630
-
6631
- <xsl:value-of select="$city"/>
6632
-
6633
- <xsl:if test="(*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name'] or normalize-space($city) != '') and normalize-space($year) != ''">
6634
- <xsl:text> </xsl:text>
6635
- </xsl:if>
6636
-
6637
- <xsl:if test="normalize-space($year) != ''">
6638
- <xsl:text>(</xsl:text>
6639
- <xsl:value-of select="$year"/>
6640
- <xsl:text>). </xsl:text>
6641
- </xsl:if>
6642
-
6643
- <xsl:if test="normalize-space($uri) != ''">
6644
- <fo:inline>
6645
-
6646
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
6647
-
6896
+ <xsl:if test="normalize-space($city) != ''">, </xsl:if>
6897
+ </xsl:if>
6898
+
6899
+ <xsl:value-of select="$city"/>
6900
+
6901
+ <xsl:if test="(*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name'] or normalize-space($city) != '') and normalize-space($year) != ''">
6648
6902
  <xsl:text> </xsl:text>
6649
- <fo:basic-link external-destination="{$uri}" fox:alt-text="{$uri}">
6650
- <xsl:value-of select="$uri"/>
6651
- </fo:basic-link>
6652
- </fo:inline>
6653
- </xsl:if>
6654
-
6655
- </xsl:otherwise>
6656
- </xsl:choose>
6657
- <!-- end OGC bibitem processing-->
6658
-
6659
-
6660
-
6661
-
6662
-
6663
-
6664
-
6665
-
6903
+ </xsl:if>
6904
+
6905
+ <xsl:if test="normalize-space($year) != ''">
6906
+ <xsl:text>(</xsl:text>
6907
+ <xsl:value-of select="$year"/>
6908
+ <xsl:text>). </xsl:text>
6909
+ </xsl:if>
6910
+
6911
+ <xsl:if test="normalize-space($uri) != ''">
6912
+ <fo:inline>
6913
+
6914
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
6915
+
6916
+ <xsl:text> </xsl:text>
6917
+ <fo:basic-link external-destination="{$uri}" fox:alt-text="{$uri}">
6918
+ <xsl:value-of select="$uri"/>
6919
+ </fo:basic-link>
6920
+ </fo:inline>
6921
+ </xsl:if>
6922
+
6923
+ </xsl:otherwise>
6924
+ </xsl:choose>
6925
+ <!-- end OGC bibitem processing-->
6926
+
6666
6927
  </xsl:template><xsl:template name="processBibitemDocId">
6667
- <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
6928
+ <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
6668
6929
  <xsl:choose>
6669
6930
  <xsl:when test="normalize-space($_doc_ident) != ''">
6670
6931
  <!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
@@ -6678,7 +6939,7 @@
6678
6939
  <xsl:if test="$type != ''">
6679
6940
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
6680
6941
  </xsl:if> -->
6681
- <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
6942
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
6682
6943
  </xsl:otherwise>
6683
6944
  </xsl:choose>
6684
6945
  </xsl:template><xsl:template name="processPersonalAuthor">
@@ -6719,6 +6980,55 @@
6719
6980
  <xsl:value-of select="substring(.,1,1)"/>
6720
6981
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
6721
6982
  <fo:inline><xsl:apply-templates/></fo:inline>
6983
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
6984
+ <!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
6985
+ <fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
6986
+ <xsl:apply-templates/>
6987
+ </fo:inline>
6988
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
6989
+ <fo:footnote>
6990
+ <xsl:variable name="number">
6991
+
6992
+ <xsl:choose>
6993
+ <xsl:when test="ancestor::*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]">
6994
+ <xsl:number level="any" count="*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]//*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
6995
+ </xsl:when>
6996
+ <xsl:otherwise>
6997
+ <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
6998
+ </xsl:otherwise>
6999
+ </xsl:choose>
7000
+
7001
+ </xsl:variable>
7002
+ <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
7003
+ <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
7004
+ <xsl:value-of select="$number"/>
7005
+
7006
+ </fo:basic-link>
7007
+ </fo:inline>
7008
+ <fo:footnote-body>
7009
+ <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
7010
+ <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
7011
+ <xsl:value-of select="$number"/>
7012
+
7013
+ </fo:inline>
7014
+ <xsl:apply-templates/>
7015
+ </fo:block>
7016
+ </fo:footnote-body>
7017
+ </fo:footnote>
7018
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
7019
+ <xsl:text> edition </xsl:text>
7020
+ <xsl:value-of select="."/>
7021
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
7022
+ <xsl:text> (</xsl:text>
7023
+ <fo:inline xsl:use-attribute-sets="link-style">
7024
+ <fo:basic-link external-destination="." fox:alt-text=".">
7025
+ <xsl:value-of select="."/>
7026
+ </fo:basic-link>
7027
+ </fo:inline>
7028
+ <xsl:text>)</xsl:text>
7029
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/><xsl:template match="*[local-name() = 'formattedref']">
7030
+
7031
+ <xsl:apply-templates/>
6722
7032
  </xsl:template><xsl:template match="*[local-name() = 'form']">
6723
7033
  <fo:block>
6724
7034
  <xsl:apply-templates/>
@@ -6784,27 +7094,14 @@
6784
7094
  <fo:block> </fo:block>
6785
7095
  </fo:block-container>
6786
7096
  </xsl:template><xsl:variable name="toc_level">
7097
+ <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
7098
+ <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
7099
+ <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
6787
7100
  <xsl:choose>
6788
- <xsl:when test="1 = 2"/> <!-- to do https://github.com/metanorma/mn-native-pdf/issues/337: if there is value in xml -->
7101
+ <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
7102
+ <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
6789
7103
  <xsl:otherwise><!-- default value -->
6790
-
6791
-
6792
-
6793
-
6794
-
6795
-
6796
-
6797
-
6798
-
6799
-
6800
-
6801
-
6802
-
6803
7104
  2
6804
-
6805
-
6806
-
6807
-
6808
7105
  </xsl:otherwise>
6809
7106
  </xsl:choose>
6810
7107
  </xsl:variable><xsl:template match="*[local-name() = 'toc']">
@@ -6887,7 +7184,7 @@
6887
7184
  </td>
6888
7185
  </xsl:for-each>
6889
7186
  <td>333</td> <!-- page number, just for fill -->
6890
- </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
7187
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
6891
7188
  <fo:inline padding-right="5mm"> </fo:inline>
6892
7189
  <fo:inline><xsl:apply-templates/></fo:inline>
6893
7190
  </xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
@@ -6898,6 +7195,66 @@
6898
7195
  </svg>
6899
7196
  </fo:instream-foreign-object>
6900
7197
  </fo:inline>
7198
+ </xsl:template><xsl:template match="@language">
7199
+ <xsl:copy-of select="."/>
7200
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="4">
7201
+ <xsl:call-template name="title"/>
7202
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']">
7203
+
7204
+
7205
+
7206
+
7207
+
7208
+ <!-- text in the box -->
7209
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
7210
+
7211
+
7212
+
7213
+
7214
+
7215
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style">
7216
+
7217
+
7218
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
7219
+ <xsl:call-template name="displayAdmonitionName"/>
7220
+ </fo:block>
7221
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
7222
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7223
+ </fo:block>
7224
+
7225
+ </fo:block-container>
7226
+
7227
+ </fo:block-container>
7228
+
7229
+ </xsl:template><xsl:template name="displayAdmonitionName">
7230
+
7231
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
7232
+ <xsl:if test="not(*[local-name() = 'name'])">
7233
+ <xsl:apply-templates select="@type"/>
7234
+ </xsl:if>
7235
+
7236
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
7237
+ <xsl:apply-templates/>
7238
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
7239
+ <xsl:variable name="admonition_type_">
7240
+ <xsl:call-template name="getLocalizedString">
7241
+ <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
7242
+ </xsl:call-template>
7243
+ </xsl:variable>
7244
+ <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
7245
+ <xsl:value-of select="$admonition_type"/>
7246
+ <xsl:if test="$admonition_type = ''">
7247
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
7248
+ </xsl:if>
7249
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
7250
+
7251
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
7252
+
7253
+
7254
+
7255
+ <xsl:apply-templates/>
7256
+ </fo:block>
7257
+
6901
7258
  </xsl:template><xsl:template name="convertDate">
6902
7259
  <xsl:param name="date"/>
6903
7260
  <xsl:param name="format" select="'short'"/>
@@ -6905,83 +7262,80 @@
6905
7262
  <xsl:variable name="month" select="substring($date, 6, 2)"/>
6906
7263
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
6907
7264
  <xsl:variable name="monthStr">
6908
- <xsl:choose>
6909
- <xsl:when test="$month = '01'">January</xsl:when>
6910
- <xsl:when test="$month = '02'">February</xsl:when>
6911
- <xsl:when test="$month = '03'">March</xsl:when>
6912
- <xsl:when test="$month = '04'">April</xsl:when>
6913
- <xsl:when test="$month = '05'">May</xsl:when>
6914
- <xsl:when test="$month = '06'">June</xsl:when>
6915
- <xsl:when test="$month = '07'">July</xsl:when>
6916
- <xsl:when test="$month = '08'">August</xsl:when>
6917
- <xsl:when test="$month = '09'">September</xsl:when>
6918
- <xsl:when test="$month = '10'">October</xsl:when>
6919
- <xsl:when test="$month = '11'">November</xsl:when>
6920
- <xsl:when test="$month = '12'">December</xsl:when>
6921
- </xsl:choose>
7265
+ <xsl:call-template name="getMonthByNum">
7266
+ <xsl:with-param name="num" select="$month"/>
7267
+ <xsl:with-param name="lowercase" select="'true'"/>
7268
+ </xsl:call-template>
7269
+ </xsl:variable>
7270
+ <xsl:variable name="monthStr_localized">
7271
+ <xsl:if test="normalize-space($monthStr) != ''"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param></xsl:call-template></xsl:if>
6922
7272
  </xsl:variable>
6923
7273
  <xsl:variable name="result">
6924
7274
  <xsl:choose>
6925
- <xsl:when test="$format = 'ddMMyyyy'">
7275
+ <xsl:when test="$format = 'ddMMyyyy'"> <!-- convert date from format 2007-04-01 to 1 April 2007 -->
6926
7276
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6927
7277
  <xsl:text> </xsl:text>
6928
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
7278
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
6929
7279
  </xsl:when>
6930
7280
  <xsl:when test="$format = 'ddMM'">
6931
7281
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6932
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
7282
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr_localized"/>
6933
7283
  </xsl:when>
6934
7284
  <xsl:when test="$format = 'short' or $day = ''">
6935
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
7285
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
6936
7286
  </xsl:when>
6937
7287
  <xsl:otherwise>
6938
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
7288
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/> <!-- January 01, 2022 -->
6939
7289
  </xsl:otherwise>
6940
7290
  </xsl:choose>
6941
7291
  </xsl:variable>
6942
7292
  <xsl:value-of select="$result"/>
6943
- </xsl:template><xsl:template name="convertDateLocalized">
6944
- <xsl:param name="date"/>
6945
- <xsl:param name="format" select="'short'"/>
6946
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
6947
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
6948
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
6949
- <xsl:variable name="monthStr">
6950
- <xsl:choose>
6951
- <xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
6952
- <xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
6953
- <xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
6954
- <xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
6955
- <xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
6956
- <xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
6957
- <xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
6958
- <xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
6959
- <xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
6960
- <xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
6961
- <xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
6962
- <xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
6963
- </xsl:choose>
6964
- </xsl:variable>
6965
- <xsl:variable name="result">
7293
+ </xsl:template><xsl:template name="getMonthByNum">
7294
+ <xsl:param name="num"/>
7295
+ <xsl:param name="lang">en</xsl:param>
7296
+ <xsl:param name="lowercase">false</xsl:param> <!-- return 'january' instead of 'January' -->
7297
+ <xsl:variable name="monthStr_">
6966
7298
  <xsl:choose>
6967
- <xsl:when test="$format = 'ddMMyyyy'">
6968
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6969
- <xsl:text> </xsl:text>
6970
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
6971
- </xsl:when>
6972
- <xsl:when test="$format = 'ddMM'">
6973
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6974
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
6975
- </xsl:when>
6976
- <xsl:when test="$format = 'short' or $day = ''">
6977
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
7299
+ <xsl:when test="$lang = 'fr'">
7300
+ <xsl:choose>
7301
+ <xsl:when test="$num = '01'">Janvier</xsl:when>
7302
+ <xsl:when test="$num = '02'">Février</xsl:when>
7303
+ <xsl:when test="$num = '03'">Mars</xsl:when>
7304
+ <xsl:when test="$num = '04'">Avril</xsl:when>
7305
+ <xsl:when test="$num = '05'">Mai</xsl:when>
7306
+ <xsl:when test="$num = '06'">Juin</xsl:when>
7307
+ <xsl:when test="$num = '07'">Juillet</xsl:when>
7308
+ <xsl:when test="$num = '08'">Août</xsl:when>
7309
+ <xsl:when test="$num = '09'">Septembre</xsl:when>
7310
+ <xsl:when test="$num = '10'">Octobre</xsl:when>
7311
+ <xsl:when test="$num = '11'">Novembre</xsl:when>
7312
+ <xsl:when test="$num = '12'">Décembre</xsl:when>
7313
+ </xsl:choose>
6978
7314
  </xsl:when>
6979
7315
  <xsl:otherwise>
6980
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
7316
+ <xsl:choose>
7317
+ <xsl:when test="$num = '01'">January</xsl:when>
7318
+ <xsl:when test="$num = '02'">February</xsl:when>
7319
+ <xsl:when test="$num = '03'">March</xsl:when>
7320
+ <xsl:when test="$num = '04'">April</xsl:when>
7321
+ <xsl:when test="$num = '05'">May</xsl:when>
7322
+ <xsl:when test="$num = '06'">June</xsl:when>
7323
+ <xsl:when test="$num = '07'">July</xsl:when>
7324
+ <xsl:when test="$num = '08'">August</xsl:when>
7325
+ <xsl:when test="$num = '09'">September</xsl:when>
7326
+ <xsl:when test="$num = '10'">October</xsl:when>
7327
+ <xsl:when test="$num = '11'">November</xsl:when>
7328
+ <xsl:when test="$num = '12'">December</xsl:when>
7329
+ </xsl:choose>
6981
7330
  </xsl:otherwise>
6982
7331
  </xsl:choose>
6983
7332
  </xsl:variable>
6984
- <xsl:value-of select="$result"/>
7333
+ <xsl:choose>
7334
+ <xsl:when test="normalize-space($lowercase) = 'true'">
7335
+ <xsl:value-of select="java:toLowerCase(java:java.lang.String.new($monthStr_))"/>
7336
+ </xsl:when>
7337
+ <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
7338
+ </xsl:choose>
6985
7339
  </xsl:template><xsl:template name="insertKeywords">
6986
7340
  <xsl:param name="sorting" select="'true'"/>
6987
7341
  <xsl:param name="charAtEnd" select="'.'"/>
@@ -7029,14 +7383,9 @@
7029
7383
  <dc:title>
7030
7384
  <xsl:variable name="title">
7031
7385
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
7032
-
7033
-
7034
-
7035
-
7036
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
7037
-
7038
-
7039
7386
 
7387
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
7388
+
7040
7389
  </xsl:for-each>
7041
7390
  </xsl:variable>
7042
7391
  <xsl:choose>
@@ -7051,21 +7400,18 @@
7051
7400
  <dc:creator>
7052
7401
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
7053
7402
 
7054
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
7055
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
7056
- <xsl:if test="position() != last()">; </xsl:if>
7057
- </xsl:for-each>
7058
-
7059
-
7060
-
7403
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
7404
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
7405
+ <xsl:if test="position() != last()">; </xsl:if>
7406
+ </xsl:for-each>
7407
+
7061
7408
  </xsl:for-each>
7062
7409
  </dc:creator>
7063
7410
  <dc:description>
7064
7411
  <xsl:variable name="abstract">
7065
7412
 
7066
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
7067
-
7068
-
7413
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
7414
+
7069
7415
  </xsl:variable>
7070
7416
  <xsl:value-of select="normalize-space($abstract)"/>
7071
7417
  </dc:description>
@@ -7085,7 +7431,6 @@
7085
7431
  <xsl:value-of select="../@id"/>
7086
7432
  </xsl:when>
7087
7433
  <xsl:otherwise>
7088
- <!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
7089
7434
  <xsl:value-of select="concat(generate-id(..), '_', text())"/>
7090
7435
  </xsl:otherwise>
7091
7436
  </xsl:choose>
@@ -7111,9 +7456,6 @@
7111
7456
  <xsl:when test="ancestor::*[local-name() = 'preface']">
7112
7457
  <xsl:value-of select="$level_total - 2"/>
7113
7458
  </xsl:when>
7114
- <!-- <xsl:when test="parent::*[local-name() = 'sections']">
7115
- <xsl:value-of select="$level_total - 1"/>
7116
- </xsl:when> -->
7117
7459
  <xsl:when test="ancestor::*[local-name() = 'sections']">
7118
7460
  <xsl:value-of select="$level_total - 1"/>
7119
7461
  </xsl:when>
@@ -7255,9 +7597,15 @@
7255
7597
  </xsl:template><xsl:template name="getLocalizedString">
7256
7598
  <xsl:param name="key"/>
7257
7599
  <xsl:param name="formatted">false</xsl:param>
7600
+ <xsl:param name="lang"/>
7258
7601
 
7259
7602
  <xsl:variable name="curr_lang">
7260
- <xsl:call-template name="getLang"/>
7603
+ <xsl:choose>
7604
+ <xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
7605
+ <xsl:otherwise>
7606
+ <xsl:call-template name="getLang"/>
7607
+ </xsl:otherwise>
7608
+ </xsl:choose>
7261
7609
  </xsl:variable>
7262
7610
 
7263
7611
  <xsl:variable name="data_value">
@@ -7297,7 +7645,6 @@
7297
7645
  <xsl:value-of select="$key_"/>
7298
7646
  </xsl:otherwise>
7299
7647
  </xsl:choose>
7300
-
7301
7648
  </xsl:template><xsl:template name="setTrackChangesStyles">
7302
7649
  <xsl:param name="isAdded"/>
7303
7650
  <xsl:param name="isDeleted"/>
@@ -7320,7 +7667,6 @@
7320
7667
  <xsl:if test="local-name() = 'table'">
7321
7668
  <xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
7322
7669
  </xsl:if>
7323
- <!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
7324
7670
  <xsl:attribute name="padding">2mm</xsl:attribute>
7325
7671
  </xsl:if>
7326
7672
  </xsl:otherwise>
@@ -7340,15 +7686,18 @@
7340
7686
  </xsl:choose>
7341
7687
  </xsl:template><xsl:template name="setTextAlignment">
7342
7688
  <xsl:param name="default">left</xsl:param>
7689
+ <xsl:variable name="align" select="normalize-space(@align)"/>
7343
7690
  <xsl:attribute name="text-align">
7344
7691
  <xsl:choose>
7345
- <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
7692
+ <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
7693
+ <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
7694
+ <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
7346
7695
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
7347
7696
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
7348
7697
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
7349
7698
  </xsl:choose>
7350
7699
  </xsl:attribute>
7351
- <xsl:if test="@align = 'indent'">
7700
+ <xsl:if test="$align = 'indent'">
7352
7701
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
7353
7702
  </xsl:if>
7354
7703
  </xsl:template><xsl:template name="number-to-words">
@@ -7447,6 +7796,25 @@
7447
7796
  </xsl:otherwise>
7448
7797
  </xsl:choose>
7449
7798
  </xsl:if>
7799
+ </xsl:template><xsl:template name="number-to-ordinal">
7800
+ <xsl:param name="number"/>
7801
+ <xsl:param name="curr_lang"/>
7802
+ <xsl:choose>
7803
+ <xsl:when test="$curr_lang = 'fr'">
7804
+ <xsl:choose>
7805
+ <xsl:when test="$number = '1'">re</xsl:when>
7806
+ <xsl:otherwise>e</xsl:otherwise>
7807
+ </xsl:choose>
7808
+ </xsl:when>
7809
+ <xsl:otherwise>
7810
+ <xsl:choose>
7811
+ <xsl:when test="$number = 1">st</xsl:when>
7812
+ <xsl:when test="$number = 2">nd</xsl:when>
7813
+ <xsl:when test="$number = 3">rd</xsl:when>
7814
+ <xsl:otherwise>th</xsl:otherwise>
7815
+ </xsl:choose>
7816
+ </xsl:otherwise>
7817
+ </xsl:choose>
7450
7818
  </xsl:template><xsl:template name="setAltText">
7451
7819
  <xsl:param name="value"/>
7452
7820
  <xsl:attribute name="fox:alt-text">