metanorma-bipm 2.7.2 → 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/lib/isodoc/bipm/base_convert.rb +3 -28
- data/lib/isodoc/bipm/bipm.brochure.xsl +134 -36
- data/lib/isodoc/bipm/bipm.guide.xsl +134 -36
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +134 -36
- data/lib/isodoc/bipm/bipm.rapport.xsl +134 -36
- data/lib/isodoc/bipm/jcgm.standard.xsl +139 -45
- data/lib/isodoc/bipm/metadata.rb +23 -12
- data/lib/isodoc/bipm/presentation_xml_convert.rb +3 -2
- data/lib/isodoc/bipm/xref.rb +3 -2
- data/lib/metanorma/bipm/biblio-standoc.rng +0 -49
- data/lib/metanorma/bipm/biblio.rng +11 -1
- data/lib/metanorma/bipm/converter.rb +2 -2
- data/lib/metanorma/bipm/front.rb +35 -31
- data/lib/metanorma/bipm/isodoc.rng +6 -1
- data/lib/metanorma/bipm/relaton-bipm.rng +0 -45
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma.yml +3 -0
- metadata +2 -2
@@ -1206,7 +1206,10 @@
|
|
1206
1206
|
<!-- indexes=<xsl:copy-of select="$indexes"/> -->
|
1207
1207
|
<!-- Index -->
|
1208
1208
|
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//mn:indexsect" mode="index">
|
1209
|
-
<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')"/>
|
1210
1213
|
<xsl:with-param name="lang" select="$curr_lang"/>
|
1211
1214
|
</xsl:apply-templates>
|
1212
1215
|
|
@@ -1294,7 +1297,9 @@
|
|
1294
1297
|
|
1295
1298
|
<fo:block> </fo:block>
|
1296
1299
|
<fo:block font-size="9pt">
|
1297
|
-
<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]"/>
|
1298
1303
|
</fo:block>
|
1299
1304
|
</fo:block-container>
|
1300
1305
|
|
@@ -1361,7 +1366,10 @@
|
|
1361
1366
|
|
1362
1367
|
<!-- Index -->
|
1363
1368
|
<xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//mn:indexsect" mode="index">
|
1364
|
-
<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')"/>
|
1365
1373
|
<xsl:with-param name="lang" select="$curr_lang"/>
|
1366
1374
|
</xsl:apply-templates>
|
1367
1375
|
|
@@ -1691,8 +1699,12 @@
|
|
1691
1699
|
|
1692
1700
|
<fo:block-container absolute-position="fixed" left="12mm" top="242mm" height="42mm" width="140mm" display-align="after">
|
1693
1701
|
<fo:block font-size="12pt">
|
1694
|
-
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/mn:variant[@language = 'fr']"/></fo:block>
|
1695
|
-
<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>
|
1696
1708
|
<fo:block> </fo:block>
|
1697
1709
|
|
1698
1710
|
<fo:block>
|
@@ -3560,7 +3572,10 @@
|
|
3560
3572
|
<xsl:template name="insertDraftWatermark">
|
3561
3573
|
<xsl:param name="isDraft"/>
|
3562
3574
|
<xsl:param name="lang"/>
|
3563
|
-
<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'">
|
3564
3579
|
<!-- DRAFT -->
|
3565
3580
|
<xsl:variable name="draft_label">
|
3566
3581
|
<xsl:choose>
|
@@ -3604,7 +3619,10 @@
|
|
3604
3619
|
</xsl:template>
|
3605
3620
|
|
3606
3621
|
<xsl:template name="insertHeaderDraftWatermark">
|
3607
|
-
<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')"/>
|
3608
3626
|
<xsl:variable name="curr_lang" select="$doc_split_by_language"/>
|
3609
3627
|
<xsl:if test="$isDraft = 'true'">
|
3610
3628
|
<fo:static-content flow-name="header-blank" role="artifact">
|
@@ -5602,13 +5620,23 @@
|
|
5602
5620
|
<xsl:attribute-set name="copyright-statement-style">
|
5603
5621
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
5604
5622
|
|
5623
|
+
<xsl:template name="refine_copyright-statement-style">
|
5624
|
+
</xsl:template>
|
5625
|
+
|
5605
5626
|
<xsl:attribute-set name="copyright-statement-title-style">
|
5606
5627
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
5607
5628
|
|
5629
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
5630
|
+
</xsl:template>
|
5631
|
+
|
5608
5632
|
<xsl:attribute-set name="copyright-statement-p-style">
|
5609
5633
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
5610
5634
|
|
5611
|
-
|
5635
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
5636
|
+
|
5637
|
+
</xsl:template>
|
5638
|
+
|
5639
|
+
<xsl:attribute-set name="license-statement-style">
|
5612
5640
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
5613
5641
|
<xsl:attribute name="font-size">10.5pt</xsl:attribute>
|
5614
5642
|
</xsl:attribute-set> <!-- license-statement-style -->
|
@@ -5624,6 +5652,10 @@
|
|
5624
5652
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
5625
5653
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
5626
5654
|
|
5655
|
+
<xsl:template name="refine_license-statement-p-style">
|
5656
|
+
|
5657
|
+
</xsl:template>
|
5658
|
+
|
5627
5659
|
<xsl:attribute-set name="legal-statement-style">
|
5628
5660
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
5629
5661
|
|
@@ -5653,6 +5685,8 @@
|
|
5653
5685
|
<!-- ================================= -->
|
5654
5686
|
<xsl:template match="mn:copyright-statement">
|
5655
5687
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
5688
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
5689
|
+
|
5656
5690
|
<xsl:apply-templates/>
|
5657
5691
|
</fo:block>
|
5658
5692
|
</xsl:template> <!-- copyright-statement -->
|
@@ -6752,7 +6786,7 @@
|
|
6752
6786
|
</xsl:otherwise>
|
6753
6787
|
</xsl:choose>
|
6754
6788
|
</xsl:variable>
|
6755
|
-
<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' ">
|
6756
6790
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
6757
6791
|
</xsl:if>
|
6758
6792
|
<xsl:if test="$key = 'text-indent'">
|
@@ -14385,13 +14419,31 @@
|
|
14385
14419
|
<!-- skip here, see the template 'fmt-review-start' -->
|
14386
14420
|
</xsl:when>
|
14387
14421
|
<xsl:otherwise>
|
14388
|
-
|
14389
|
-
|
14390
|
-
|
14391
|
-
|
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>
|
14392
14436
|
</xsl:otherwise>
|
14393
14437
|
</xsl:choose>
|
14394
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>
|
14395
14447
|
<!-- =================== -->
|
14396
14448
|
<!-- End of Index processing -->
|
14397
14449
|
<!-- =================== -->
|
@@ -16315,11 +16367,35 @@
|
|
16315
16367
|
|
16316
16368
|
<xsl:template match="mn:svgmap"/>
|
16317
16369
|
|
16370
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
16371
|
+
|
16318
16372
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
16319
16373
|
<xsl:template match="*[local-name() = 'lang_none']">
|
16320
16374
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
16321
16375
|
</xsl:template>
|
16322
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
|
+
|
16323
16399
|
<xsl:template name="replaceChar">
|
16324
16400
|
<xsl:param name="text"/>
|
16325
16401
|
<xsl:param name="replace"/>
|
@@ -17110,6 +17186,13 @@
|
|
17110
17186
|
<xsl:with-param name="default" select="$text_align_default"/>
|
17111
17187
|
</xsl:call-template>
|
17112
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>
|
17113
17196
|
</xsl:template>
|
17114
17197
|
|
17115
17198
|
<xsl:template name="setKeepAttributes">
|
@@ -17135,34 +17218,41 @@
|
|
17135
17218
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
17136
17219
|
<fo:block>
|
17137
17220
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
17138
|
-
|
17139
|
-
|
17140
|
-
|
17141
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
17142
|
-
<xsl:call-template name="getSVG"/>
|
17143
|
-
</fo:instream-foreign-object>
|
17144
|
-
</xsl:when>
|
17145
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
17146
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
17147
|
-
</xsl:when>
|
17148
|
-
<xsl:otherwise> <!-- bitmap image -->
|
17149
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
17150
|
-
<xsl:if test="$coverimage_src != ''">
|
17151
|
-
<xsl:variable name="coverpage">
|
17152
|
-
<xsl:call-template name="getImageURL">
|
17153
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
17154
|
-
</xsl:call-template>
|
17155
|
-
</xsl:variable>
|
17156
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
17157
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
17158
|
-
</xsl:if>
|
17159
|
-
</xsl:otherwise>
|
17160
|
-
</xsl:choose>
|
17221
|
+
|
17222
|
+
<xsl:call-template name="insertPageImage"/>
|
17223
|
+
|
17161
17224
|
</xsl:for-each>
|
17162
17225
|
</fo:block>
|
17163
17226
|
</fo:block-container>
|
17164
17227
|
</xsl:template>
|
17165
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
|
+
|
17166
17256
|
<xsl:template name="getImageURL">
|
17167
17257
|
<xsl:param name="src"/>
|
17168
17258
|
<xsl:choose>
|
@@ -17590,6 +17680,14 @@
|
|
17590
17680
|
</xsl:attribute>
|
17591
17681
|
</xsl:template>
|
17592
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
|
+
|
17593
17691
|
<xsl:template name="substring-after-last">
|
17594
17692
|
<xsl:param name="value"/>
|
17595
17693
|
<xsl:param name="delimiter"/>
|
@@ -80,7 +80,13 @@
|
|
80
80
|
</xsl:call-template>
|
81
81
|
</xsl:variable>
|
82
82
|
|
83
|
-
<xsl:variable name="
|
83
|
+
<xsl:variable name="committee_acronym" select="(//mn:metanorma)[1]/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:identifier[not(@full)]"/>
|
84
|
+
|
85
|
+
<xsl:variable name="copyright_year" select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/>
|
86
|
+
<!-- <xsl:variable name="copyrightText" select="concat('© ', (//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym, ' ', (//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from, ' — ', $all_rights_reserved)"/> -->
|
87
|
+
<xsl:variable name="copyrightText" select="concat('© ', $committee_acronym, ' ', $copyright_year, ' — ', $all_rights_reserved)"/>
|
88
|
+
|
89
|
+
<xsl:variable name="docnumber" select="(//mn:metanorma)[1]/mn:bibdata/mn:docnumber"/>
|
84
90
|
|
85
91
|
<!-- Example:
|
86
92
|
<item level="1" id="Foreword" display="true">Foreword</item>
|
@@ -375,9 +381,10 @@
|
|
375
381
|
<!-- Example © JCGM 2009 -->
|
376
382
|
<fo:block font-size="11pt">
|
377
383
|
<fo:inline font-family="Times New Roman" font-size="12pt"><xsl:text>© </xsl:text></fo:inline>
|
378
|
-
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>
|
384
|
+
<!-- <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/> -->
|
385
|
+
<xsl:value-of select="$committee_acronym"/>
|
379
386
|
<xsl:text> </xsl:text>
|
380
|
-
<xsl:value-of select="
|
387
|
+
<xsl:value-of select="$copyright_year"/>
|
381
388
|
</fo:block>
|
382
389
|
</fo:static-content>
|
383
390
|
<fo:flow flow-name="xsl-region-body">
|
@@ -385,11 +392,12 @@
|
|
385
392
|
<xsl:call-template name="insertDraftWatermark"/>
|
386
393
|
<fo:block-container font-weight="bold">
|
387
394
|
<fo:block font-size="16.5pt">
|
388
|
-
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>
|
395
|
+
<!-- <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/> -->
|
396
|
+
<xsl:value-of select="$committee_acronym"/>
|
389
397
|
<xsl:text> </xsl:text>
|
390
|
-
<xsl:value-of select="
|
398
|
+
<xsl:value-of select="$docnumber"/>
|
391
399
|
<fo:inline font-weight="normal">:</fo:inline>
|
392
|
-
<xsl:value-of select="
|
400
|
+
<xsl:value-of select="$copyright_year"/>
|
393
401
|
</fo:block>
|
394
402
|
<fo:block font-size="13pt" font-weight="normal" space-after="19.5mm">
|
395
403
|
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@type = 'title-provenance']"/>
|
@@ -435,12 +443,14 @@
|
|
435
443
|
<fo:table-body>
|
436
444
|
<fo:table-row>
|
437
445
|
<fo:table-cell>
|
438
|
-
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/></fo:block>
|
446
|
+
<!-- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/></fo:block> -->
|
447
|
+
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name"/></fo:block>
|
439
448
|
</fo:table-cell>
|
440
449
|
<fo:table-cell line-height="140%">
|
441
|
-
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/></fo:block>
|
442
|
-
<fo:block><xsl:value-of select="
|
443
|
-
<fo:block><xsl:value-of select="
|
450
|
+
<!-- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/></fo:block> -->
|
451
|
+
<fo:block><xsl:value-of select="$committee_acronym"/></fo:block>
|
452
|
+
<fo:block><xsl:value-of select="$docnumber"/></fo:block>
|
453
|
+
<fo:block><xsl:value-of select="$copyright_year"/></fo:block>
|
444
454
|
</fo:table-cell>
|
445
455
|
</fo:table-row>
|
446
456
|
</fo:table-body>
|
@@ -1006,11 +1016,12 @@
|
|
1006
1016
|
</xsl:template>
|
1007
1017
|
|
1008
1018
|
<xsl:variable name="header_text">
|
1009
|
-
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"
|
1019
|
+
<!-- <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>-->
|
1020
|
+
<xsl:value-of select="$committee_acronym"/>
|
1010
1021
|
<xsl:text> </xsl:text>
|
1011
|
-
<xsl:value-of select="
|
1022
|
+
<xsl:value-of select="$docnumber"/>
|
1012
1023
|
<xsl:text>:</xsl:text>
|
1013
|
-
<xsl:value-of select="
|
1024
|
+
<xsl:value-of select="$copyright_year"/>
|
1014
1025
|
</xsl:variable>
|
1015
1026
|
|
1016
1027
|
<xsl:template name="insertHeaderFooter">
|
@@ -1070,7 +1081,10 @@
|
|
1070
1081
|
|
1071
1082
|
<xsl:template name="insertDraftWatermark">
|
1072
1083
|
<xsl:param name="isDraft"/>
|
1073
|
-
<xsl:if test="$isDraft = 'true' or normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
1084
|
+
<!-- <xsl:if test="$isDraft = 'true' or normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
1085
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'draft') or
|
1086
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'projet')) = 'true'"> -->
|
1087
|
+
<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'">
|
1074
1088
|
<!-- DRAFT -->
|
1075
1089
|
<xsl:variable name="draft_label">
|
1076
1090
|
<xsl:call-template name="getLocalizedString">
|
@@ -1227,10 +1241,10 @@
|
|
1227
1241
|
|
1228
1242
|
<fo:flow flow-name="xsl-region-body">
|
1229
1243
|
<fo:block id="{@id}" span="all">
|
1230
|
-
<xsl:apply-templates select="mn:title"/>
|
1244
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
1231
1245
|
</fo:block>
|
1232
1246
|
<fo:block role="Index">
|
1233
|
-
<xsl:apply-templates select="*[not(self::mn:title)]"/>
|
1247
|
+
<xsl:apply-templates select="*[not(self::mn:title or self::mn:fmt-title)]"/>
|
1234
1248
|
</fo:block>
|
1235
1249
|
</fo:flow>
|
1236
1250
|
</fo:page-sequence>
|
@@ -3499,13 +3513,23 @@
|
|
3499
3513
|
<xsl:attribute-set name="copyright-statement-style">
|
3500
3514
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
3501
3515
|
|
3516
|
+
<xsl:template name="refine_copyright-statement-style">
|
3517
|
+
</xsl:template>
|
3518
|
+
|
3502
3519
|
<xsl:attribute-set name="copyright-statement-title-style">
|
3503
3520
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
3504
3521
|
|
3522
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
3523
|
+
</xsl:template>
|
3524
|
+
|
3505
3525
|
<xsl:attribute-set name="copyright-statement-p-style">
|
3506
3526
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
3507
3527
|
|
3508
|
-
|
3528
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
3529
|
+
|
3530
|
+
</xsl:template>
|
3531
|
+
|
3532
|
+
<xsl:attribute-set name="license-statement-style">
|
3509
3533
|
</xsl:attribute-set> <!-- license-statement-style -->
|
3510
3534
|
|
3511
3535
|
<xsl:attribute-set name="license-statement-title-style">
|
@@ -3515,6 +3539,10 @@
|
|
3515
3539
|
<xsl:attribute-set name="license-statement-p-style">
|
3516
3540
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
3517
3541
|
|
3542
|
+
<xsl:template name="refine_license-statement-p-style">
|
3543
|
+
|
3544
|
+
</xsl:template>
|
3545
|
+
|
3518
3546
|
<xsl:attribute-set name="legal-statement-style">
|
3519
3547
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
3520
3548
|
|
@@ -3542,6 +3570,8 @@
|
|
3542
3570
|
<!-- ================================= -->
|
3543
3571
|
<xsl:template match="mn:copyright-statement">
|
3544
3572
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
3573
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
3574
|
+
|
3545
3575
|
<xsl:apply-templates/>
|
3546
3576
|
</fo:block>
|
3547
3577
|
</xsl:template> <!-- copyright-statement -->
|
@@ -4637,7 +4667,7 @@
|
|
4637
4667
|
</xsl:otherwise>
|
4638
4668
|
</xsl:choose>
|
4639
4669
|
</xsl:variable>
|
4640
|
-
<xsl:if test="$key = 'font-family' or
|
4670
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
4641
4671
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
4642
4672
|
</xsl:if>
|
4643
4673
|
<xsl:if test="$key = 'text-indent'">
|
@@ -12267,13 +12297,31 @@
|
|
12267
12297
|
<!-- skip here, see the template 'fmt-review-start' -->
|
12268
12298
|
</xsl:when>
|
12269
12299
|
<xsl:otherwise>
|
12270
|
-
|
12271
|
-
|
12272
|
-
|
12273
|
-
|
12300
|
+
<xsl:choose>
|
12301
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
12302
|
+
<fo:block font-size="1pt" line-height="0.1">
|
12303
|
+
<xsl:call-template name="fo_inline_bookmark">
|
12304
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
12305
|
+
</xsl:call-template>
|
12306
|
+
</fo:block>
|
12307
|
+
</xsl:when>
|
12308
|
+
<xsl:otherwise>
|
12309
|
+
<xsl:call-template name="fo_inline_bookmark">
|
12310
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
12311
|
+
</xsl:call-template>
|
12312
|
+
</xsl:otherwise>
|
12313
|
+
</xsl:choose>
|
12274
12314
|
</xsl:otherwise>
|
12275
12315
|
</xsl:choose>
|
12276
12316
|
</xsl:template>
|
12317
|
+
|
12318
|
+
<xsl:template name="fo_inline_bookmark">
|
12319
|
+
<xsl:param name="bookmark_id"/>
|
12320
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
12321
|
+
<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>
|
12322
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
12323
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
12324
|
+
</xsl:template>
|
12277
12325
|
<!-- =================== -->
|
12278
12326
|
<!-- End of Index processing -->
|
12279
12327
|
<!-- =================== -->
|
@@ -14153,11 +14201,35 @@
|
|
14153
14201
|
|
14154
14202
|
<xsl:template match="mn:svgmap"/>
|
14155
14203
|
|
14204
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
14205
|
+
|
14156
14206
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
14157
14207
|
<xsl:template match="*[local-name() = 'lang_none']">
|
14158
14208
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
14159
14209
|
</xsl:template>
|
14160
14210
|
|
14211
|
+
<xsl:template name="addTagElementT">
|
14212
|
+
<xsl:variable name="title_">
|
14213
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
14214
|
+
</xsl:variable>
|
14215
|
+
<xsl:variable name="title__">
|
14216
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
14217
|
+
<xsl:choose>
|
14218
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
14219
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
14220
|
+
</xsl:choose>
|
14221
|
+
</xsl:for-each>
|
14222
|
+
</xsl:variable>
|
14223
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
14224
|
+
<xsl:if test="$title != ''">
|
14225
|
+
<xsl:attribute name="fox:title">
|
14226
|
+
<xsl:if test="ancestor::mn:sections">
|
14227
|
+
<xsl:text>Section </xsl:text>
|
14228
|
+
</xsl:if>
|
14229
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
14230
|
+
</xsl:if>
|
14231
|
+
</xsl:template>
|
14232
|
+
|
14161
14233
|
<xsl:template name="replaceChar">
|
14162
14234
|
<xsl:param name="text"/>
|
14163
14235
|
<xsl:param name="replace"/>
|
@@ -14923,6 +14995,13 @@
|
|
14923
14995
|
<xsl:with-param name="default" select="$text_align_default"/>
|
14924
14996
|
</xsl:call-template>
|
14925
14997
|
<xsl:call-template name="setKeepAttributes"/>
|
14998
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
14999
|
+
<xsl:variable name="styles">
|
15000
|
+
<xsl:apply-templates select="*[1]"/>
|
15001
|
+
</xsl:variable>
|
15002
|
+
<!-- move attribute line-height from inline to block -->
|
15003
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
15004
|
+
</xsl:if>
|
14926
15005
|
</xsl:template>
|
14927
15006
|
|
14928
15007
|
<xsl:template name="setKeepAttributes">
|
@@ -14948,34 +15027,41 @@
|
|
14948
15027
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
14949
15028
|
<fo:block>
|
14950
15029
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
14951
|
-
|
14952
|
-
|
14953
|
-
|
14954
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
14955
|
-
<xsl:call-template name="getSVG"/>
|
14956
|
-
</fo:instream-foreign-object>
|
14957
|
-
</xsl:when>
|
14958
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
14959
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
14960
|
-
</xsl:when>
|
14961
|
-
<xsl:otherwise> <!-- bitmap image -->
|
14962
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
14963
|
-
<xsl:if test="$coverimage_src != ''">
|
14964
|
-
<xsl:variable name="coverpage">
|
14965
|
-
<xsl:call-template name="getImageURL">
|
14966
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
14967
|
-
</xsl:call-template>
|
14968
|
-
</xsl:variable>
|
14969
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
14970
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
14971
|
-
</xsl:if>
|
14972
|
-
</xsl:otherwise>
|
14973
|
-
</xsl:choose>
|
15030
|
+
|
15031
|
+
<xsl:call-template name="insertPageImage"/>
|
15032
|
+
|
14974
15033
|
</xsl:for-each>
|
14975
15034
|
</fo:block>
|
14976
15035
|
</fo:block-container>
|
14977
15036
|
</xsl:template>
|
14978
15037
|
|
15038
|
+
<xsl:template name="insertPageImage">
|
15039
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
15040
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
15041
|
+
<xsl:choose>
|
15042
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
15043
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
15044
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
15045
|
+
<xsl:call-template name="getSVG"/>
|
15046
|
+
</fo:instream-foreign-object>
|
15047
|
+
</xsl:when>
|
15048
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
15049
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
15050
|
+
</xsl:when>
|
15051
|
+
<xsl:otherwise> <!-- bitmap image -->
|
15052
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
15053
|
+
<xsl:if test="$coverimage_src != ''">
|
15054
|
+
<xsl:variable name="coverpage">
|
15055
|
+
<xsl:call-template name="getImageURL">
|
15056
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
15057
|
+
</xsl:call-template>
|
15058
|
+
</xsl:variable>
|
15059
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
15060
|
+
</xsl:if>
|
15061
|
+
</xsl:otherwise>
|
15062
|
+
</xsl:choose>
|
15063
|
+
</xsl:template>
|
15064
|
+
|
14979
15065
|
<xsl:template name="getImageURL">
|
14980
15066
|
<xsl:param name="src"/>
|
14981
15067
|
<xsl:choose>
|
@@ -15403,6 +15489,14 @@
|
|
15403
15489
|
</xsl:attribute>
|
15404
15490
|
</xsl:template>
|
15405
15491
|
|
15492
|
+
<xsl:template name="getCharByCodePoint">
|
15493
|
+
<xsl:param name="codepoint"/>
|
15494
|
+
<xsl:param name="radix">16</xsl:param>
|
15495
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
15496
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
15497
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
15498
|
+
</xsl:template>
|
15499
|
+
|
15406
15500
|
<xsl:template name="substring-after-last">
|
15407
15501
|
<xsl:param name="value"/>
|
15408
15502
|
<xsl:param name="delimiter"/>
|