metanorma-bipm 2.7.1 → 2.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.adoc +1 -1
- data/lib/isodoc/bipm/base_convert.rb +3 -28
- data/lib/isodoc/bipm/bipm.brochure.xsl +263 -121
- data/lib/isodoc/bipm/bipm.guide.xsl +263 -121
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +263 -121
- data/lib/isodoc/bipm/bipm.rapport.xsl +263 -121
- data/lib/isodoc/bipm/jcgm.standard.xsl +151 -48
- data/lib/isodoc/bipm/metadata.rb +23 -12
- data/lib/isodoc/bipm/presentation_xml_convert.rb +7 -3
- data/lib/isodoc/bipm/xref.rb +3 -2
- data/lib/metanorma/bipm/basicdoc.rng +1 -1
- data/lib/metanorma/bipm/biblio-standoc.rng +0 -49
- data/lib/metanorma/bipm/biblio.rng +11 -1
- data/lib/metanorma/bipm/cleanup.rb +6 -4
- data/lib/metanorma/bipm/converter.rb +2 -2
- data/lib/metanorma/bipm/front.rb +35 -31
- data/lib/metanorma/bipm/isodoc.rng +7 -60
- data/lib/metanorma/bipm/relaton-bipm.rng +0 -45
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +1 -1
- data/metanorma.yml +3 -0
- metadata +3 -3
@@ -432,7 +432,9 @@
|
|
432
432
|
</redirect:write>
|
433
433
|
</xsl:if>
|
434
434
|
|
435
|
-
<xsl:
|
435
|
+
<xsl:if test="$debug = 'true'">
|
436
|
+
<xsl:message>START flatxml_</xsl:message>
|
437
|
+
</xsl:if>
|
436
438
|
<xsl:variable name="startTime2" select="java:getTime(java:java.util.Date.new())"/>
|
437
439
|
<xsl:variable name="flatxml__">
|
438
440
|
<!-- <xsl:apply-templates select="xalan:nodeset($title_eref)" mode="flatxml"/> -->
|
@@ -451,16 +453,44 @@
|
|
451
453
|
<xsl:with-param name="filepath" select="$updated_flatxml_filename"/>
|
452
454
|
</xsl:call-template>
|
453
455
|
<xsl:variable name="endTime2" select="java:getTime(java:java.util.Date.new())"/>
|
456
|
+
<xsl:if test="$debug = 'true'">
|
457
|
+
<xsl:message>DEBUG: processing time <xsl:value-of select="$endTime2 - $startTime2"/> msec.</xsl:message>
|
458
|
+
<xsl:message>END flatxml_</xsl:message>
|
459
|
+
</xsl:if>
|
454
460
|
|
461
|
+
<xsl:if test="$debug = 'true'">
|
462
|
+
<redirect:write file="flatxml.xml">
|
463
|
+
<xsl:copy-of select="xalan:nodeset($flatxml_)"/>
|
464
|
+
</redirect:write>
|
465
|
+
</xsl:if>
|
466
|
+
|
467
|
+
<xsl:if test="$debug = 'true'">
|
468
|
+
<xsl:message>START flatxml</xsl:message>
|
469
|
+
</xsl:if>
|
470
|
+
<xsl:variable name="startTime3" select="java:getTime(java:java.util.Date.new())"/>
|
455
471
|
<xsl:variable name="flatxml">
|
456
472
|
<xsl:apply-templates select="xalan:nodeset($flatxml_)" mode="pagebreak"/>
|
457
473
|
</xsl:variable>
|
474
|
+
<xsl:variable name="endTime3" select="java:getTime(java:java.util.Date.new())"/>
|
475
|
+
<xsl:if test="$debug = 'true'">
|
476
|
+
<xsl:message>DEBUG: processing time <xsl:value-of select="$endTime3 - $startTime3"/> msec.</xsl:message>
|
477
|
+
<xsl:message>END flatxml</xsl:message>
|
478
|
+
</xsl:if>
|
458
479
|
|
459
480
|
<!-- flatxml=<xsl:copy-of select="$flatxml"/> -->
|
460
481
|
|
482
|
+
<xsl:if test="$debug = 'true'">
|
483
|
+
<xsl:message>START bipm-standard</xsl:message>
|
484
|
+
</xsl:if>
|
485
|
+
<xsl:variable name="startTime4" select="java:getTime(java:java.util.Date.new())"/>
|
461
486
|
<xsl:apply-templates select="xalan:nodeset($flatxml)/mn:metanorma" mode="bipm-standard">
|
462
487
|
<xsl:with-param name="curr_docnum" select="$num"/>
|
463
488
|
</xsl:apply-templates>
|
489
|
+
<xsl:variable name="endTime4" select="java:getTime(java:java.util.Date.new())"/>
|
490
|
+
<xsl:if test="$debug = 'true'">
|
491
|
+
<xsl:message>DEBUG: processing time <xsl:value-of select="$endTime4 - $startTime4"/> msec.</xsl:message>
|
492
|
+
<xsl:message>END bipm-standard</xsl:message>
|
493
|
+
</xsl:if>
|
464
494
|
|
465
495
|
</xsl:for-each>
|
466
496
|
</xsl:when>
|
@@ -1025,7 +1055,7 @@
|
|
1025
1055
|
</xsl:attribute>
|
1026
1056
|
</xsl:if>
|
1027
1057
|
|
1028
|
-
<xsl:call-template name="
|
1058
|
+
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
1029
1059
|
|
1030
1060
|
<xsl:call-template name="insertHeaderDraftWatermark">
|
1031
1061
|
<xsl:with-param name="lang" select="$curr_lang"/>
|
@@ -1101,7 +1131,7 @@
|
|
1101
1131
|
|
1102
1132
|
<xsl:if test="mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
1103
1133
|
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
1104
|
-
<xsl:call-template name="
|
1134
|
+
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
1105
1135
|
|
1106
1136
|
<xsl:variable name="header-title">
|
1107
1137
|
<xsl:choose>
|
@@ -1130,7 +1160,7 @@
|
|
1130
1160
|
</xsl:variable>
|
1131
1161
|
|
1132
1162
|
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
1133
|
-
<xsl:call-template name="
|
1163
|
+
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
1134
1164
|
|
1135
1165
|
<xsl:variable name="title-toc">
|
1136
1166
|
<fo:inline>
|
@@ -1145,74 +1175,10 @@
|
|
1145
1175
|
|
1146
1176
|
<fo:flow flow-name="xsl-region-body">
|
1147
1177
|
|
1148
|
-
|
1149
|
-
<
|
1150
|
-
|
1151
|
-
|
1152
|
-
<fo:inline keep-together.within-line="always">
|
1153
|
-
<fo:leader leader-pattern="space"/>
|
1154
|
-
<fo:inline>
|
1155
|
-
<xsl:value-of select="$title-toc"/>
|
1156
|
-
</fo:inline>
|
1157
|
-
</fo:inline>
|
1158
|
-
</fo:block>
|
1159
|
-
<!-- </fo:block-container>
|
1160
|
-
</fo:block-container> -->
|
1161
|
-
|
1162
|
-
<fo:block-container xsl:use-attribute-sets="toc-style">
|
1163
|
-
<fo:block role="TOC">
|
1164
|
-
<!-- <xsl:copy-of select="$contents"/> -->
|
1165
|
-
|
1166
|
-
<xsl:if test="$contents/mnx:doc[@id = $docid]//mnx:item[@display='true']">
|
1167
|
-
<fo:table table-layout="fixed" width="100%" id="__internal_layout__toc_{generate-id()}" role="SKIP">
|
1168
|
-
<fo:table-column column-width="127mm"/>
|
1169
|
-
<fo:table-column column-width="12mm"/>
|
1170
|
-
<fo:table-body role="SKIP">
|
1171
|
-
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:item[@display='true' and not(@type = 'annex') and not(@type = 'index') and not(@parent = 'annex')]">
|
1172
|
-
<xsl:call-template name="insertContentItem"/>
|
1173
|
-
</xsl:for-each>
|
1174
|
-
<!-- insert page break between main sections and appendixes in ToC -->
|
1175
|
-
<!-- <xsl:if test="$doctype ='brochure'">
|
1176
|
-
<fo:table-row>
|
1177
|
-
<fo:table-cell number-columns-spanned="2">
|
1178
|
-
<fo:block break-after="page"/>
|
1179
|
-
</fo:table-cell>
|
1180
|
-
</fo:table-row>
|
1181
|
-
</xsl:if> -->
|
1182
|
-
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:item[@display='true' and (@type = 'annex')]"> <!-- or (@level = 2 and @parent = 'annex') -->
|
1183
|
-
<xsl:call-template name="insertContentItem">
|
1184
|
-
<xsl:with-param name="keep-with-next">true</xsl:with-param>
|
1185
|
-
</xsl:call-template>
|
1186
|
-
</xsl:for-each>
|
1187
|
-
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:item[@display='true' and (@type = 'index')]">
|
1188
|
-
<xsl:call-template name="insertContentItem"/>
|
1189
|
-
</xsl:for-each>
|
1190
|
-
|
1191
|
-
<!-- List of Tables -->
|
1192
|
-
<xsl:if test="$contents/mnx:doc[@id = $docid]//mnx:tables/mnx:table">
|
1193
|
-
<xsl:call-template name="insertListOf_Title">
|
1194
|
-
<xsl:with-param name="title" select="$title-list-tables"/>
|
1195
|
-
</xsl:call-template>
|
1196
|
-
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:tables/mnx:table">
|
1197
|
-
<xsl:call-template name="insertListOf_Item"/>
|
1198
|
-
</xsl:for-each>
|
1199
|
-
</xsl:if>
|
1200
|
-
|
1201
|
-
<!-- List of Figures -->
|
1202
|
-
<xsl:if test="$contents/doc[@id = $docid]//mnx:figures/mnx:figure">
|
1203
|
-
<xsl:call-template name="insertListOf_Title">
|
1204
|
-
<xsl:with-param name="title" select="$title-list-figures"/>
|
1205
|
-
</xsl:call-template>
|
1206
|
-
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:figures/mnx:figure">
|
1207
|
-
<xsl:call-template name="insertListOf_Item"/>
|
1208
|
-
</xsl:for-each>
|
1209
|
-
</xsl:if>
|
1210
|
-
|
1211
|
-
</fo:table-body>
|
1212
|
-
</fo:table>
|
1213
|
-
</xsl:if>
|
1214
|
-
</fo:block>
|
1215
|
-
</fo:block-container>
|
1178
|
+
<xsl:call-template name="toc">
|
1179
|
+
<xsl:with-param name="docid" select="$docid"/>
|
1180
|
+
<xsl:with-param name="curr_lang" select="$curr_lang"/>
|
1181
|
+
</xsl:call-template>
|
1216
1182
|
|
1217
1183
|
</fo:flow>
|
1218
1184
|
|
@@ -1237,9 +1203,13 @@
|
|
1237
1203
|
<!-- Document Control -->
|
1238
1204
|
<xsl:apply-templates select="mn:doccontrol | mn:colophon" mode="sections"/>
|
1239
1205
|
|
1206
|
+
<!-- indexes=<xsl:copy-of select="$indexes"/> -->
|
1240
1207
|
<!-- Index -->
|
1241
1208
|
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//mn:indexsect" mode="index">
|
1242
|
-
<xsl:with-param name="isDraft" select="normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
1209
|
+
<!-- <xsl:with-param name="isDraft" select="normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
1210
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'draft') or
|
1211
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'projet'))"/> -->
|
1212
|
+
<xsl:with-param name="isDraft" select="normalize-space(normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft) != '' or normalize-space(//mn:metanorma/mn:metanorma-extension/mn:semantic-metadata/mn:stage-published) = 'false')"/>
|
1243
1213
|
<xsl:with-param name="lang" select="$curr_lang"/>
|
1244
1214
|
</xsl:apply-templates>
|
1245
1215
|
|
@@ -1327,7 +1297,9 @@
|
|
1327
1297
|
|
1328
1298
|
<fo:block> </fo:block>
|
1329
1299
|
<fo:block font-size="9pt">
|
1330
|
-
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/mn:variant[@language = $curr_lang]"/>
|
1300
|
+
<!-- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/mn:variant[@language = $curr_lang]"/> -->
|
1301
|
+
<!-- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee[@language = $curr_lang]"/> -->
|
1302
|
+
<xsl:value-of select="//mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name[@language = $curr_lang]"/>
|
1331
1303
|
</fo:block>
|
1332
1304
|
</fo:block-container>
|
1333
1305
|
|
@@ -1394,7 +1366,10 @@
|
|
1394
1366
|
|
1395
1367
|
<!-- Index -->
|
1396
1368
|
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//mn:indexsect" mode="index">
|
1397
|
-
<xsl:with-param name="isDraft" select="normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
1369
|
+
<!-- <xsl:with-param name="isDraft" select="normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
1370
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'draft') or
|
1371
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'projet'))"/> -->
|
1372
|
+
<xsl:with-param name="isDraft" select="normalize-space(normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft) != '' or normalize-space(//mn:metanorma/mn:metanorma-extension/mn:semantic-metadata/mn:stage-published) = 'false')"/>
|
1398
1373
|
<xsl:with-param name="lang" select="$curr_lang"/>
|
1399
1374
|
</xsl:apply-templates>
|
1400
1375
|
|
@@ -1724,8 +1699,12 @@
|
|
1724
1699
|
|
1725
1700
|
<fo:block-container absolute-position="fixed" left="12mm" top="242mm" height="42mm" width="140mm" display-align="after">
|
1726
1701
|
<fo:block font-size="12pt">
|
1727
|
-
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/mn:variant[@language = 'fr']"/></fo:block>
|
1728
|
-
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee
|
1702
|
+
<!-- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/mn:variant[@language = 'fr']"/></fo:block> -->
|
1703
|
+
<!-- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee[@language = 'fr']"/></fo:block> -->
|
1704
|
+
<fo:block><xsl:value-of select="//mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name[@language = 'fr']"/></fo:block>
|
1705
|
+
<!-- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/mn:variant[@language = 'en']"/></fo:block> -->
|
1706
|
+
<!-- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee[@language = 'en']"/></fo:block> -->
|
1707
|
+
<fo:block><xsl:value-of select="//mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name[@language = 'en']"/></fo:block>
|
1729
1708
|
<fo:block> </fo:block>
|
1730
1709
|
|
1731
1710
|
<fo:block>
|
@@ -1894,6 +1873,82 @@
|
|
1894
1873
|
</xsl:choose>
|
1895
1874
|
</xsl:template>
|
1896
1875
|
|
1876
|
+
<xsl:template name="toc">
|
1877
|
+
<xsl:param name="curr_lang"/>
|
1878
|
+
<xsl:param name="docid"/>
|
1879
|
+
|
1880
|
+
<xsl:variable name="title-toc"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">table_of_contents</xsl:with-param></xsl:call-template></xsl:variable>
|
1881
|
+
|
1882
|
+
<!-- <fo:block-container margin-left="-14mm" margin-right="0mm">
|
1883
|
+
<fo:block-container margin-left="0mm" margin-right="0mm"> -->
|
1884
|
+
<fo:block xsl:use-attribute-sets="toc-title-style">
|
1885
|
+
<fo:inline><xsl:value-of select="//mn:metanorma/mn:bibdata/mn:title[@language = $curr_lang and @type='title-main']"/></fo:inline>
|
1886
|
+
<fo:inline keep-together.within-line="always">
|
1887
|
+
<fo:leader leader-pattern="space"/>
|
1888
|
+
<fo:inline>
|
1889
|
+
<xsl:value-of select="$title-toc"/>
|
1890
|
+
</fo:inline>
|
1891
|
+
</fo:inline>
|
1892
|
+
</fo:block>
|
1893
|
+
<!-- </fo:block-container>
|
1894
|
+
</fo:block-container> -->
|
1895
|
+
|
1896
|
+
<fo:block-container xsl:use-attribute-sets="toc-style">
|
1897
|
+
<fo:block role="TOC">
|
1898
|
+
<!-- <xsl:copy-of select="$contents"/> -->
|
1899
|
+
|
1900
|
+
<xsl:if test="$contents/mnx:doc[@id = $docid]//mnx:item[@display='true']">
|
1901
|
+
<fo:table table-layout="fixed" width="100%" id="__internal_layout__toc_{generate-id()}" role="SKIP">
|
1902
|
+
<fo:table-column column-width="127mm"/>
|
1903
|
+
<fo:table-column column-width="12mm"/>
|
1904
|
+
<fo:table-body role="SKIP">
|
1905
|
+
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:item[@display='true' and not(@type = 'annex') and not(@type = 'index') and not(@parent = 'annex')]">
|
1906
|
+
<xsl:call-template name="insertContentItem"/>
|
1907
|
+
</xsl:for-each>
|
1908
|
+
<!-- insert page break between main sections and appendixes in ToC -->
|
1909
|
+
<!-- <xsl:if test="$doctype ='brochure'">
|
1910
|
+
<fo:table-row>
|
1911
|
+
<fo:table-cell number-columns-spanned="2">
|
1912
|
+
<fo:block break-after="page"/>
|
1913
|
+
</fo:table-cell>
|
1914
|
+
</fo:table-row>
|
1915
|
+
</xsl:if> -->
|
1916
|
+
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:item[@display='true' and (@type = 'annex')]"> <!-- or (@level = 2 and @parent = 'annex') -->
|
1917
|
+
<xsl:call-template name="insertContentItem">
|
1918
|
+
<xsl:with-param name="keep-with-next">true</xsl:with-param>
|
1919
|
+
</xsl:call-template>
|
1920
|
+
</xsl:for-each>
|
1921
|
+
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:item[@display='true' and (@type = 'index')]">
|
1922
|
+
<xsl:call-template name="insertContentItem"/>
|
1923
|
+
</xsl:for-each>
|
1924
|
+
|
1925
|
+
<!-- List of Tables -->
|
1926
|
+
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:tables/mnx:table">
|
1927
|
+
<xsl:if test="position() = 1">
|
1928
|
+
<xsl:call-template name="insertListOf_Title">
|
1929
|
+
<xsl:with-param name="title" select="$title-list-tables"/>
|
1930
|
+
</xsl:call-template>
|
1931
|
+
</xsl:if>
|
1932
|
+
<xsl:call-template name="insertListOf_Item"/>
|
1933
|
+
</xsl:for-each>
|
1934
|
+
|
1935
|
+
<!-- List of Figures -->
|
1936
|
+
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:figures/mnx:figure">
|
1937
|
+
<xsl:if test="position() = 1">
|
1938
|
+
<xsl:call-template name="insertListOf_Title">
|
1939
|
+
<xsl:with-param name="title" select="$title-list-figures"/>
|
1940
|
+
</xsl:call-template>
|
1941
|
+
</xsl:if>
|
1942
|
+
<xsl:call-template name="insertListOf_Item"/>
|
1943
|
+
</xsl:for-each>
|
1944
|
+
|
1945
|
+
</fo:table-body>
|
1946
|
+
</fo:table>
|
1947
|
+
</xsl:if>
|
1948
|
+
</fo:block>
|
1949
|
+
</fo:block-container>
|
1950
|
+
</xsl:template>
|
1951
|
+
|
1897
1952
|
<xsl:template name="insertContentItem">
|
1898
1953
|
<xsl:param name="keep-with-next"/>
|
1899
1954
|
<fo:table-row xsl:use-attribute-sets="toc-item-style">
|
@@ -2114,7 +2169,7 @@
|
|
2114
2169
|
<xsl:attribute name="master-reference">document-landscape</xsl:attribute>
|
2115
2170
|
</xsl:if>
|
2116
2171
|
|
2117
|
-
<xsl:call-template name="
|
2172
|
+
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
2118
2173
|
|
2119
2174
|
<xsl:variable name="header-title">
|
2120
2175
|
<xsl:choose>
|
@@ -2171,7 +2226,7 @@
|
|
2171
2226
|
|
2172
2227
|
<xsl:template name="sections_appendix">
|
2173
2228
|
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
2174
|
-
<xsl:call-template name="
|
2229
|
+
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
2175
2230
|
|
2176
2231
|
<xsl:variable name="curr_lang" select="/mn:metanorma/mn:bibdata/mn:language[@current = 'true']"/>
|
2177
2232
|
|
@@ -3517,7 +3572,10 @@
|
|
3517
3572
|
<xsl:template name="insertDraftWatermark">
|
3518
3573
|
<xsl:param name="isDraft"/>
|
3519
3574
|
<xsl:param name="lang"/>
|
3520
|
-
<xsl:if test="$isDraft = 'true' or normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
3575
|
+
<!-- <xsl:if test="$isDraft = 'true' or normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
3576
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'draft') or
|
3577
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'projet')) = 'true'"> -->
|
3578
|
+
<xsl:if test="$isDraft = 'true' or normalize-space(normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft) != '' or normalize-space(//mn:metanorma/mn:metanorma-extension/mn:semantic-metadata/mn:stage-published) = 'false') = 'true'">
|
3521
3579
|
<!-- DRAFT -->
|
3522
3580
|
<xsl:variable name="draft_label">
|
3523
3581
|
<xsl:choose>
|
@@ -3561,7 +3619,10 @@
|
|
3561
3619
|
</xsl:template>
|
3562
3620
|
|
3563
3621
|
<xsl:template name="insertHeaderDraftWatermark">
|
3564
|
-
<xsl:variable name="isDraft" select="normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
3622
|
+
<!-- <xsl:variable name="isDraft" select="normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
3623
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'draft') or
|
3624
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'projet'))"/> -->
|
3625
|
+
<xsl:variable name="isDraft" select="normalize-space(normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft) != '' or normalize-space(//mn:metanorma/mn:metanorma-extension/mn:semantic-metadata/mn:stage-published) = 'false')"/>
|
3565
3626
|
<xsl:variable name="curr_lang" select="$doc_split_by_language"/>
|
3566
3627
|
<xsl:if test="$isDraft = 'true'">
|
3567
3628
|
<fo:static-content flow-name="header-blank" role="artifact">
|
@@ -3620,14 +3681,6 @@
|
|
3620
3681
|
</xsl:choose>
|
3621
3682
|
</xsl:template>
|
3622
3683
|
|
3623
|
-
<xsl:template name="insertFootnoteSeparator">
|
3624
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
3625
|
-
<fo:block>
|
3626
|
-
<fo:leader leader-pattern="rule" leader-length="30%"/>
|
3627
|
-
</fo:block>
|
3628
|
-
</fo:static-content>
|
3629
|
-
</xsl:template>
|
3630
|
-
|
3631
3684
|
<!-- =================== -->
|
3632
3685
|
<!-- Index processing -->
|
3633
3686
|
<!-- =================== -->
|
@@ -5567,13 +5620,23 @@
|
|
5567
5620
|
<xsl:attribute-set name="copyright-statement-style">
|
5568
5621
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
5569
5622
|
|
5623
|
+
<xsl:template name="refine_copyright-statement-style">
|
5624
|
+
</xsl:template>
|
5625
|
+
|
5570
5626
|
<xsl:attribute-set name="copyright-statement-title-style">
|
5571
5627
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
5572
5628
|
|
5629
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
5630
|
+
</xsl:template>
|
5631
|
+
|
5573
5632
|
<xsl:attribute-set name="copyright-statement-p-style">
|
5574
5633
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
5575
5634
|
|
5576
|
-
|
5635
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
5636
|
+
|
5637
|
+
</xsl:template>
|
5638
|
+
|
5639
|
+
<xsl:attribute-set name="license-statement-style">
|
5577
5640
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
5578
5641
|
<xsl:attribute name="font-size">10.5pt</xsl:attribute>
|
5579
5642
|
</xsl:attribute-set> <!-- license-statement-style -->
|
@@ -5589,6 +5652,10 @@
|
|
5589
5652
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
5590
5653
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
5591
5654
|
|
5655
|
+
<xsl:template name="refine_license-statement-p-style">
|
5656
|
+
|
5657
|
+
</xsl:template>
|
5658
|
+
|
5592
5659
|
<xsl:attribute-set name="legal-statement-style">
|
5593
5660
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
5594
5661
|
|
@@ -5618,6 +5685,8 @@
|
|
5618
5685
|
<!-- ================================= -->
|
5619
5686
|
<xsl:template match="mn:copyright-statement">
|
5620
5687
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
5688
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
5689
|
+
|
5621
5690
|
<xsl:apply-templates/>
|
5622
5691
|
</fo:block>
|
5623
5692
|
</xsl:template> <!-- copyright-statement -->
|
@@ -6717,7 +6786,7 @@
|
|
6717
6786
|
</xsl:otherwise>
|
6718
6787
|
</xsl:choose>
|
6719
6788
|
</xsl:variable>
|
6720
|
-
<xsl:if test="$key = 'font-family' or
|
6789
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
6721
6790
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
6722
6791
|
</xsl:if>
|
6723
6792
|
<xsl:if test="$key = 'text-indent'">
|
@@ -13572,7 +13641,7 @@
|
|
13572
13641
|
|
13573
13642
|
<xsl:template name="insertFootnoteSeparatorCommon">
|
13574
13643
|
<xsl:param name="leader_length">30%</xsl:param>
|
13575
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
13644
|
+
<fo:static-content flow-name="xsl-footnote-separator" role="artifact">
|
13576
13645
|
<fo:block>
|
13577
13646
|
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
13578
13647
|
</fo:block>
|
@@ -14350,13 +14419,31 @@
|
|
14350
14419
|
<!-- skip here, see the template 'fmt-review-start' -->
|
14351
14420
|
</xsl:when>
|
14352
14421
|
<xsl:otherwise>
|
14353
|
-
|
14354
|
-
|
14355
|
-
|
14356
|
-
|
14422
|
+
<xsl:choose>
|
14423
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
14424
|
+
<fo:block font-size="1pt" line-height="0.1">
|
14425
|
+
<xsl:call-template name="fo_inline_bookmark">
|
14426
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
14427
|
+
</xsl:call-template>
|
14428
|
+
</fo:block>
|
14429
|
+
</xsl:when>
|
14430
|
+
<xsl:otherwise>
|
14431
|
+
<xsl:call-template name="fo_inline_bookmark">
|
14432
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
14433
|
+
</xsl:call-template>
|
14434
|
+
</xsl:otherwise>
|
14435
|
+
</xsl:choose>
|
14357
14436
|
</xsl:otherwise>
|
14358
14437
|
</xsl:choose>
|
14359
14438
|
</xsl:template>
|
14439
|
+
|
14440
|
+
<xsl:template name="fo_inline_bookmark">
|
14441
|
+
<xsl:param name="bookmark_id"/>
|
14442
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
14443
|
+
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
|
14444
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
14445
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
14446
|
+
</xsl:template>
|
14360
14447
|
<!-- =================== -->
|
14361
14448
|
<!-- End of Index processing -->
|
14362
14449
|
<!-- =================== -->
|
@@ -14467,6 +14554,9 @@
|
|
14467
14554
|
<xsl:attribute name="role">H1</xsl:attribute>
|
14468
14555
|
</xsl:attribute-set>
|
14469
14556
|
|
14557
|
+
<xsl:template name="refine_toc-title-style">
|
14558
|
+
</xsl:template>
|
14559
|
+
|
14470
14560
|
<xsl:attribute-set name="toc-title-page-style">
|
14471
14561
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
14472
14562
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
@@ -14474,6 +14564,9 @@
|
|
14474
14564
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
14475
14565
|
</xsl:attribute-set> <!-- toc-title-page-style -->
|
14476
14566
|
|
14567
|
+
<xsl:template name="refine_toc-title-page-style">
|
14568
|
+
</xsl:template>
|
14569
|
+
|
14477
14570
|
<xsl:attribute-set name="toc-item-block-style">
|
14478
14571
|
</xsl:attribute-set>
|
14479
14572
|
|
@@ -14531,6 +14624,9 @@
|
|
14531
14624
|
<xsl:attribute name="padding-bottom">6pt</xsl:attribute>
|
14532
14625
|
</xsl:attribute-set>
|
14533
14626
|
|
14627
|
+
<xsl:template name="refine_toc-listof-title-style">
|
14628
|
+
</xsl:template>
|
14629
|
+
|
14534
14630
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
14535
14631
|
</xsl:attribute-set>
|
14536
14632
|
|
@@ -14877,7 +14973,7 @@
|
|
14877
14973
|
</xsl:if>
|
14878
14974
|
|
14879
14975
|
<xsl:for-each select="$contents_nodes/mnx:doc">
|
14880
|
-
<fo:bookmark internal-destination="{contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
14976
|
+
<fo:bookmark internal-destination="{mnx:contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
14881
14977
|
<xsl:if test="@bundle = 'true'">
|
14882
14978
|
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
14883
14979
|
</xsl:if>
|
@@ -14911,7 +15007,7 @@
|
|
14911
15007
|
</xsl:choose>
|
14912
15008
|
</fo:bookmark-title>
|
14913
15009
|
|
14914
|
-
<xsl:apply-templates select="contents/mnx:item" mode="bookmark"/>
|
15010
|
+
<xsl:apply-templates select="mnx:contents/mnx:item" mode="bookmark"/>
|
14915
15011
|
|
14916
15012
|
<xsl:call-template name="insertFigureBookmarks">
|
14917
15013
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
@@ -16271,11 +16367,35 @@
|
|
16271
16367
|
|
16272
16368
|
<xsl:template match="mn:svgmap"/>
|
16273
16369
|
|
16370
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
16371
|
+
|
16274
16372
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
16275
16373
|
<xsl:template match="*[local-name() = 'lang_none']">
|
16276
16374
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
16277
16375
|
</xsl:template>
|
16278
16376
|
|
16377
|
+
<xsl:template name="addTagElementT">
|
16378
|
+
<xsl:variable name="title_">
|
16379
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
16380
|
+
</xsl:variable>
|
16381
|
+
<xsl:variable name="title__">
|
16382
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
16383
|
+
<xsl:choose>
|
16384
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
16385
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
16386
|
+
</xsl:choose>
|
16387
|
+
</xsl:for-each>
|
16388
|
+
</xsl:variable>
|
16389
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
16390
|
+
<xsl:if test="$title != ''">
|
16391
|
+
<xsl:attribute name="fox:title">
|
16392
|
+
<xsl:if test="ancestor::mn:sections">
|
16393
|
+
<xsl:text>Section </xsl:text>
|
16394
|
+
</xsl:if>
|
16395
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
16396
|
+
</xsl:if>
|
16397
|
+
</xsl:template>
|
16398
|
+
|
16279
16399
|
<xsl:template name="replaceChar">
|
16280
16400
|
<xsl:param name="text"/>
|
16281
16401
|
<xsl:param name="replace"/>
|
@@ -17066,6 +17186,13 @@
|
|
17066
17186
|
<xsl:with-param name="default" select="$text_align_default"/>
|
17067
17187
|
</xsl:call-template>
|
17068
17188
|
<xsl:call-template name="setKeepAttributes"/>
|
17189
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
17190
|
+
<xsl:variable name="styles">
|
17191
|
+
<xsl:apply-templates select="*[1]"/>
|
17192
|
+
</xsl:variable>
|
17193
|
+
<!-- move attribute line-height from inline to block -->
|
17194
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
17195
|
+
</xsl:if>
|
17069
17196
|
</xsl:template>
|
17070
17197
|
|
17071
17198
|
<xsl:template name="setKeepAttributes">
|
@@ -17091,34 +17218,41 @@
|
|
17091
17218
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
17092
17219
|
<fo:block>
|
17093
17220
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
17094
|
-
|
17095
|
-
|
17096
|
-
|
17097
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
17098
|
-
<xsl:call-template name="getSVG"/>
|
17099
|
-
</fo:instream-foreign-object>
|
17100
|
-
</xsl:when>
|
17101
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
17102
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
17103
|
-
</xsl:when>
|
17104
|
-
<xsl:otherwise> <!-- bitmap image -->
|
17105
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
17106
|
-
<xsl:if test="$coverimage_src != ''">
|
17107
|
-
<xsl:variable name="coverpage">
|
17108
|
-
<xsl:call-template name="getImageURL">
|
17109
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
17110
|
-
</xsl:call-template>
|
17111
|
-
</xsl:variable>
|
17112
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
17113
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
17114
|
-
</xsl:if>
|
17115
|
-
</xsl:otherwise>
|
17116
|
-
</xsl:choose>
|
17221
|
+
|
17222
|
+
<xsl:call-template name="insertPageImage"/>
|
17223
|
+
|
17117
17224
|
</xsl:for-each>
|
17118
17225
|
</fo:block>
|
17119
17226
|
</fo:block-container>
|
17120
17227
|
</xsl:template>
|
17121
17228
|
|
17229
|
+
<xsl:template name="insertPageImage">
|
17230
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
17231
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
17232
|
+
<xsl:choose>
|
17233
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
17234
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
17235
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
17236
|
+
<xsl:call-template name="getSVG"/>
|
17237
|
+
</fo:instream-foreign-object>
|
17238
|
+
</xsl:when>
|
17239
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
17240
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
17241
|
+
</xsl:when>
|
17242
|
+
<xsl:otherwise> <!-- bitmap image -->
|
17243
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
17244
|
+
<xsl:if test="$coverimage_src != ''">
|
17245
|
+
<xsl:variable name="coverpage">
|
17246
|
+
<xsl:call-template name="getImageURL">
|
17247
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
17248
|
+
</xsl:call-template>
|
17249
|
+
</xsl:variable>
|
17250
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
17251
|
+
</xsl:if>
|
17252
|
+
</xsl:otherwise>
|
17253
|
+
</xsl:choose>
|
17254
|
+
</xsl:template>
|
17255
|
+
|
17122
17256
|
<xsl:template name="getImageURL">
|
17123
17257
|
<xsl:param name="src"/>
|
17124
17258
|
<xsl:choose>
|
@@ -17546,6 +17680,14 @@
|
|
17546
17680
|
</xsl:attribute>
|
17547
17681
|
</xsl:template>
|
17548
17682
|
|
17683
|
+
<xsl:template name="getCharByCodePoint">
|
17684
|
+
<xsl:param name="codepoint"/>
|
17685
|
+
<xsl:param name="radix">16</xsl:param>
|
17686
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
17687
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
17688
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
17689
|
+
</xsl:template>
|
17690
|
+
|
17549
17691
|
<xsl:template name="substring-after-last">
|
17550
17692
|
<xsl:param name="value"/>
|
17551
17693
|
<xsl:param name="delimiter"/>
|