metanorma-ogc 2.8.1 → 2.8.2
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/ogc/metadata.rb +2 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +110 -29
- data/lib/isodoc/ogc/ogc.best-practice.xsl +110 -29
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +110 -29
- data/lib/isodoc/ogc/ogc.community-practice.xsl +110 -29
- data/lib/isodoc/ogc/ogc.community-standard.xsl +110 -29
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +110 -29
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +110 -29
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +110 -29
- data/lib/isodoc/ogc/ogc.other.xsl +110 -29
- data/lib/isodoc/ogc/ogc.policy.xsl +110 -29
- data/lib/isodoc/ogc/ogc.reference-model.xsl +110 -29
- data/lib/isodoc/ogc/ogc.release-notes.xsl +110 -29
- data/lib/isodoc/ogc/ogc.standard.xsl +110 -29
- data/lib/isodoc/ogc/ogc.test-suite.xsl +110 -29
- data/lib/isodoc/ogc/ogc.user-guide.xsl +110 -29
- data/lib/isodoc/ogc/ogc.white-paper.xsl +115 -34
- data/lib/metanorma/ogc/biblio-standoc.rng +0 -49
- data/lib/metanorma/ogc/biblio.rng +11 -1
- data/lib/metanorma/ogc/cleanup.rb +4 -0
- data/lib/metanorma/ogc/front.rb +8 -15
- data/lib/metanorma/ogc/isodoc.rng +6 -1
- data/lib/metanorma/ogc/relaton-ogc.rng +0 -30
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
@@ -3510,17 +3510,27 @@
|
|
3510
3510
|
<xsl:attribute name="line-height">125%</xsl:attribute>
|
3511
3511
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
3512
3512
|
|
3513
|
+
<xsl:template name="refine_copyright-statement-style">
|
3514
|
+
</xsl:template>
|
3515
|
+
|
3513
3516
|
<xsl:attribute-set name="copyright-statement-title-style">
|
3514
3517
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3515
3518
|
<xsl:attribute name="color"><xsl:value-of select="$color_text_title"/></xsl:attribute>
|
3516
3519
|
<xsl:attribute name="margin-top">24pt</xsl:attribute>
|
3517
3520
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
3518
3521
|
|
3522
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
3523
|
+
</xsl:template>
|
3524
|
+
|
3519
3525
|
<xsl:attribute-set name="copyright-statement-p-style">
|
3520
3526
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
3521
3527
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
3522
3528
|
|
3523
|
-
|
3529
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
3530
|
+
|
3531
|
+
</xsl:template>
|
3532
|
+
|
3533
|
+
<xsl:attribute-set name="license-statement-style">
|
3524
3534
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
3525
3535
|
<xsl:attribute name="line-height">125%</xsl:attribute>
|
3526
3536
|
</xsl:attribute-set> <!-- license-statement-style -->
|
@@ -3535,6 +3545,10 @@
|
|
3535
3545
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
3536
3546
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
3537
3547
|
|
3548
|
+
<xsl:template name="refine_license-statement-p-style">
|
3549
|
+
|
3550
|
+
</xsl:template>
|
3551
|
+
|
3538
3552
|
<xsl:attribute-set name="legal-statement-style">
|
3539
3553
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
3540
3554
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
@@ -3566,6 +3580,8 @@
|
|
3566
3580
|
<!-- ================================= -->
|
3567
3581
|
<xsl:template match="mn:copyright-statement">
|
3568
3582
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
3583
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
3584
|
+
|
3569
3585
|
<xsl:apply-templates/>
|
3570
3586
|
</fo:block>
|
3571
3587
|
</xsl:template> <!-- copyright-statement -->
|
@@ -3582,6 +3598,7 @@
|
|
3582
3598
|
|
3583
3599
|
<xsl:template match="mn:copyright-statement//mn:p">
|
3584
3600
|
<fo:block xsl:use-attribute-sets="copyright-statement-p-style">
|
3601
|
+
<xsl:call-template name="refine_copyright-statement-p-style"/>
|
3585
3602
|
|
3586
3603
|
<xsl:apply-templates/>
|
3587
3604
|
</fo:block>
|
@@ -4701,7 +4718,7 @@
|
|
4701
4718
|
</xsl:otherwise>
|
4702
4719
|
</xsl:choose>
|
4703
4720
|
</xsl:variable>
|
4704
|
-
<xsl:if test="$key = 'font-family' or
|
4721
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
4705
4722
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
4706
4723
|
</xsl:if>
|
4707
4724
|
<xsl:if test="$key = 'text-indent'">
|
@@ -12325,13 +12342,31 @@
|
|
12325
12342
|
<!-- skip here, see the template 'fmt-review-start' -->
|
12326
12343
|
</xsl:when>
|
12327
12344
|
<xsl:otherwise>
|
12328
|
-
|
12329
|
-
|
12330
|
-
|
12331
|
-
|
12345
|
+
<xsl:choose>
|
12346
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
12347
|
+
<fo:block font-size="1pt" line-height="0.1">
|
12348
|
+
<xsl:call-template name="fo_inline_bookmark">
|
12349
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
12350
|
+
</xsl:call-template>
|
12351
|
+
</fo:block>
|
12352
|
+
</xsl:when>
|
12353
|
+
<xsl:otherwise>
|
12354
|
+
<xsl:call-template name="fo_inline_bookmark">
|
12355
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
12356
|
+
</xsl:call-template>
|
12357
|
+
</xsl:otherwise>
|
12358
|
+
</xsl:choose>
|
12332
12359
|
</xsl:otherwise>
|
12333
12360
|
</xsl:choose>
|
12334
12361
|
</xsl:template>
|
12362
|
+
|
12363
|
+
<xsl:template name="fo_inline_bookmark">
|
12364
|
+
<xsl:param name="bookmark_id"/>
|
12365
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
12366
|
+
<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>
|
12367
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
12368
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
12369
|
+
</xsl:template>
|
12335
12370
|
<!-- =================== -->
|
12336
12371
|
<!-- End of Index processing -->
|
12337
12372
|
<!-- =================== -->
|
@@ -14189,11 +14224,35 @@
|
|
14189
14224
|
|
14190
14225
|
<xsl:template match="mn:svgmap"/>
|
14191
14226
|
|
14227
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
14228
|
+
|
14192
14229
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
14193
14230
|
<xsl:template match="*[local-name() = 'lang_none']">
|
14194
14231
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
14195
14232
|
</xsl:template>
|
14196
14233
|
|
14234
|
+
<xsl:template name="addTagElementT">
|
14235
|
+
<xsl:variable name="title_">
|
14236
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
14237
|
+
</xsl:variable>
|
14238
|
+
<xsl:variable name="title__">
|
14239
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
14240
|
+
<xsl:choose>
|
14241
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
14242
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
14243
|
+
</xsl:choose>
|
14244
|
+
</xsl:for-each>
|
14245
|
+
</xsl:variable>
|
14246
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
14247
|
+
<xsl:if test="$title != ''">
|
14248
|
+
<xsl:attribute name="fox:title">
|
14249
|
+
<xsl:if test="ancestor::mn:sections">
|
14250
|
+
<xsl:text>Section </xsl:text>
|
14251
|
+
</xsl:if>
|
14252
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
14253
|
+
</xsl:if>
|
14254
|
+
</xsl:template>
|
14255
|
+
|
14197
14256
|
<xsl:template name="replaceChar">
|
14198
14257
|
<xsl:param name="text"/>
|
14199
14258
|
<xsl:param name="replace"/>
|
@@ -14960,6 +15019,13 @@
|
|
14960
15019
|
<xsl:with-param name="default" select="$text_align_default"/>
|
14961
15020
|
</xsl:call-template>
|
14962
15021
|
<xsl:call-template name="setKeepAttributes"/>
|
15022
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
15023
|
+
<xsl:variable name="styles">
|
15024
|
+
<xsl:apply-templates select="*[1]"/>
|
15025
|
+
</xsl:variable>
|
15026
|
+
<!-- move attribute line-height from inline to block -->
|
15027
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
15028
|
+
</xsl:if>
|
14963
15029
|
</xsl:template>
|
14964
15030
|
|
14965
15031
|
<xsl:template name="setKeepAttributes">
|
@@ -14985,34 +15051,41 @@
|
|
14985
15051
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
14986
15052
|
<fo:block>
|
14987
15053
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
14988
|
-
|
14989
|
-
|
14990
|
-
|
14991
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
14992
|
-
<xsl:call-template name="getSVG"/>
|
14993
|
-
</fo:instream-foreign-object>
|
14994
|
-
</xsl:when>
|
14995
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
14996
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
14997
|
-
</xsl:when>
|
14998
|
-
<xsl:otherwise> <!-- bitmap image -->
|
14999
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
15000
|
-
<xsl:if test="$coverimage_src != ''">
|
15001
|
-
<xsl:variable name="coverpage">
|
15002
|
-
<xsl:call-template name="getImageURL">
|
15003
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
15004
|
-
</xsl:call-template>
|
15005
|
-
</xsl:variable>
|
15006
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
15007
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
15008
|
-
</xsl:if>
|
15009
|
-
</xsl:otherwise>
|
15010
|
-
</xsl:choose>
|
15054
|
+
|
15055
|
+
<xsl:call-template name="insertPageImage"/>
|
15056
|
+
|
15011
15057
|
</xsl:for-each>
|
15012
15058
|
</fo:block>
|
15013
15059
|
</fo:block-container>
|
15014
15060
|
</xsl:template>
|
15015
15061
|
|
15062
|
+
<xsl:template name="insertPageImage">
|
15063
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
15064
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
15065
|
+
<xsl:choose>
|
15066
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
15067
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
15068
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
15069
|
+
<xsl:call-template name="getSVG"/>
|
15070
|
+
</fo:instream-foreign-object>
|
15071
|
+
</xsl:when>
|
15072
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
15073
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
15074
|
+
</xsl:when>
|
15075
|
+
<xsl:otherwise> <!-- bitmap image -->
|
15076
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
15077
|
+
<xsl:if test="$coverimage_src != ''">
|
15078
|
+
<xsl:variable name="coverpage">
|
15079
|
+
<xsl:call-template name="getImageURL">
|
15080
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
15081
|
+
</xsl:call-template>
|
15082
|
+
</xsl:variable>
|
15083
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
15084
|
+
</xsl:if>
|
15085
|
+
</xsl:otherwise>
|
15086
|
+
</xsl:choose>
|
15087
|
+
</xsl:template>
|
15088
|
+
|
15016
15089
|
<xsl:template name="getImageURL">
|
15017
15090
|
<xsl:param name="src"/>
|
15018
15091
|
<xsl:choose>
|
@@ -15440,6 +15513,14 @@
|
|
15440
15513
|
</xsl:attribute>
|
15441
15514
|
</xsl:template>
|
15442
15515
|
|
15516
|
+
<xsl:template name="getCharByCodePoint">
|
15517
|
+
<xsl:param name="codepoint"/>
|
15518
|
+
<xsl:param name="radix">16</xsl:param>
|
15519
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
15520
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
15521
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
15522
|
+
</xsl:template>
|
15523
|
+
|
15443
15524
|
<xsl:template name="substring-after-last">
|
15444
15525
|
<xsl:param name="value"/>
|
15445
15526
|
<xsl:param name="delimiter"/>
|
@@ -3510,17 +3510,27 @@
|
|
3510
3510
|
<xsl:attribute name="line-height">125%</xsl:attribute>
|
3511
3511
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
3512
3512
|
|
3513
|
+
<xsl:template name="refine_copyright-statement-style">
|
3514
|
+
</xsl:template>
|
3515
|
+
|
3513
3516
|
<xsl:attribute-set name="copyright-statement-title-style">
|
3514
3517
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3515
3518
|
<xsl:attribute name="color"><xsl:value-of select="$color_text_title"/></xsl:attribute>
|
3516
3519
|
<xsl:attribute name="margin-top">24pt</xsl:attribute>
|
3517
3520
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
3518
3521
|
|
3522
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
3523
|
+
</xsl:template>
|
3524
|
+
|
3519
3525
|
<xsl:attribute-set name="copyright-statement-p-style">
|
3520
3526
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
3521
3527
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
3522
3528
|
|
3523
|
-
|
3529
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
3530
|
+
|
3531
|
+
</xsl:template>
|
3532
|
+
|
3533
|
+
<xsl:attribute-set name="license-statement-style">
|
3524
3534
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
3525
3535
|
<xsl:attribute name="line-height">125%</xsl:attribute>
|
3526
3536
|
</xsl:attribute-set> <!-- license-statement-style -->
|
@@ -3535,6 +3545,10 @@
|
|
3535
3545
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
3536
3546
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
3537
3547
|
|
3548
|
+
<xsl:template name="refine_license-statement-p-style">
|
3549
|
+
|
3550
|
+
</xsl:template>
|
3551
|
+
|
3538
3552
|
<xsl:attribute-set name="legal-statement-style">
|
3539
3553
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
3540
3554
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
@@ -3566,6 +3580,8 @@
|
|
3566
3580
|
<!-- ================================= -->
|
3567
3581
|
<xsl:template match="mn:copyright-statement">
|
3568
3582
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
3583
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
3584
|
+
|
3569
3585
|
<xsl:apply-templates/>
|
3570
3586
|
</fo:block>
|
3571
3587
|
</xsl:template> <!-- copyright-statement -->
|
@@ -3582,6 +3598,7 @@
|
|
3582
3598
|
|
3583
3599
|
<xsl:template match="mn:copyright-statement//mn:p">
|
3584
3600
|
<fo:block xsl:use-attribute-sets="copyright-statement-p-style">
|
3601
|
+
<xsl:call-template name="refine_copyright-statement-p-style"/>
|
3585
3602
|
|
3586
3603
|
<xsl:apply-templates/>
|
3587
3604
|
</fo:block>
|
@@ -4701,7 +4718,7 @@
|
|
4701
4718
|
</xsl:otherwise>
|
4702
4719
|
</xsl:choose>
|
4703
4720
|
</xsl:variable>
|
4704
|
-
<xsl:if test="$key = 'font-family' or
|
4721
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
4705
4722
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
4706
4723
|
</xsl:if>
|
4707
4724
|
<xsl:if test="$key = 'text-indent'">
|
@@ -12325,13 +12342,31 @@
|
|
12325
12342
|
<!-- skip here, see the template 'fmt-review-start' -->
|
12326
12343
|
</xsl:when>
|
12327
12344
|
<xsl:otherwise>
|
12328
|
-
|
12329
|
-
|
12330
|
-
|
12331
|
-
|
12345
|
+
<xsl:choose>
|
12346
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
12347
|
+
<fo:block font-size="1pt" line-height="0.1">
|
12348
|
+
<xsl:call-template name="fo_inline_bookmark">
|
12349
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
12350
|
+
</xsl:call-template>
|
12351
|
+
</fo:block>
|
12352
|
+
</xsl:when>
|
12353
|
+
<xsl:otherwise>
|
12354
|
+
<xsl:call-template name="fo_inline_bookmark">
|
12355
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
12356
|
+
</xsl:call-template>
|
12357
|
+
</xsl:otherwise>
|
12358
|
+
</xsl:choose>
|
12332
12359
|
</xsl:otherwise>
|
12333
12360
|
</xsl:choose>
|
12334
12361
|
</xsl:template>
|
12362
|
+
|
12363
|
+
<xsl:template name="fo_inline_bookmark">
|
12364
|
+
<xsl:param name="bookmark_id"/>
|
12365
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
12366
|
+
<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>
|
12367
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
12368
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
12369
|
+
</xsl:template>
|
12335
12370
|
<!-- =================== -->
|
12336
12371
|
<!-- End of Index processing -->
|
12337
12372
|
<!-- =================== -->
|
@@ -14189,11 +14224,35 @@
|
|
14189
14224
|
|
14190
14225
|
<xsl:template match="mn:svgmap"/>
|
14191
14226
|
|
14227
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
14228
|
+
|
14192
14229
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
14193
14230
|
<xsl:template match="*[local-name() = 'lang_none']">
|
14194
14231
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
14195
14232
|
</xsl:template>
|
14196
14233
|
|
14234
|
+
<xsl:template name="addTagElementT">
|
14235
|
+
<xsl:variable name="title_">
|
14236
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
14237
|
+
</xsl:variable>
|
14238
|
+
<xsl:variable name="title__">
|
14239
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
14240
|
+
<xsl:choose>
|
14241
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
14242
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
14243
|
+
</xsl:choose>
|
14244
|
+
</xsl:for-each>
|
14245
|
+
</xsl:variable>
|
14246
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
14247
|
+
<xsl:if test="$title != ''">
|
14248
|
+
<xsl:attribute name="fox:title">
|
14249
|
+
<xsl:if test="ancestor::mn:sections">
|
14250
|
+
<xsl:text>Section </xsl:text>
|
14251
|
+
</xsl:if>
|
14252
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
14253
|
+
</xsl:if>
|
14254
|
+
</xsl:template>
|
14255
|
+
|
14197
14256
|
<xsl:template name="replaceChar">
|
14198
14257
|
<xsl:param name="text"/>
|
14199
14258
|
<xsl:param name="replace"/>
|
@@ -14960,6 +15019,13 @@
|
|
14960
15019
|
<xsl:with-param name="default" select="$text_align_default"/>
|
14961
15020
|
</xsl:call-template>
|
14962
15021
|
<xsl:call-template name="setKeepAttributes"/>
|
15022
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
15023
|
+
<xsl:variable name="styles">
|
15024
|
+
<xsl:apply-templates select="*[1]"/>
|
15025
|
+
</xsl:variable>
|
15026
|
+
<!-- move attribute line-height from inline to block -->
|
15027
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
15028
|
+
</xsl:if>
|
14963
15029
|
</xsl:template>
|
14964
15030
|
|
14965
15031
|
<xsl:template name="setKeepAttributes">
|
@@ -14985,34 +15051,41 @@
|
|
14985
15051
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
14986
15052
|
<fo:block>
|
14987
15053
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
14988
|
-
|
14989
|
-
|
14990
|
-
|
14991
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
14992
|
-
<xsl:call-template name="getSVG"/>
|
14993
|
-
</fo:instream-foreign-object>
|
14994
|
-
</xsl:when>
|
14995
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
14996
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
14997
|
-
</xsl:when>
|
14998
|
-
<xsl:otherwise> <!-- bitmap image -->
|
14999
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
15000
|
-
<xsl:if test="$coverimage_src != ''">
|
15001
|
-
<xsl:variable name="coverpage">
|
15002
|
-
<xsl:call-template name="getImageURL">
|
15003
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
15004
|
-
</xsl:call-template>
|
15005
|
-
</xsl:variable>
|
15006
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
15007
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
15008
|
-
</xsl:if>
|
15009
|
-
</xsl:otherwise>
|
15010
|
-
</xsl:choose>
|
15054
|
+
|
15055
|
+
<xsl:call-template name="insertPageImage"/>
|
15056
|
+
|
15011
15057
|
</xsl:for-each>
|
15012
15058
|
</fo:block>
|
15013
15059
|
</fo:block-container>
|
15014
15060
|
</xsl:template>
|
15015
15061
|
|
15062
|
+
<xsl:template name="insertPageImage">
|
15063
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
15064
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
15065
|
+
<xsl:choose>
|
15066
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
15067
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
15068
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
15069
|
+
<xsl:call-template name="getSVG"/>
|
15070
|
+
</fo:instream-foreign-object>
|
15071
|
+
</xsl:when>
|
15072
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
15073
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
15074
|
+
</xsl:when>
|
15075
|
+
<xsl:otherwise> <!-- bitmap image -->
|
15076
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
15077
|
+
<xsl:if test="$coverimage_src != ''">
|
15078
|
+
<xsl:variable name="coverpage">
|
15079
|
+
<xsl:call-template name="getImageURL">
|
15080
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
15081
|
+
</xsl:call-template>
|
15082
|
+
</xsl:variable>
|
15083
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
15084
|
+
</xsl:if>
|
15085
|
+
</xsl:otherwise>
|
15086
|
+
</xsl:choose>
|
15087
|
+
</xsl:template>
|
15088
|
+
|
15016
15089
|
<xsl:template name="getImageURL">
|
15017
15090
|
<xsl:param name="src"/>
|
15018
15091
|
<xsl:choose>
|
@@ -15440,6 +15513,14 @@
|
|
15440
15513
|
</xsl:attribute>
|
15441
15514
|
</xsl:template>
|
15442
15515
|
|
15516
|
+
<xsl:template name="getCharByCodePoint">
|
15517
|
+
<xsl:param name="codepoint"/>
|
15518
|
+
<xsl:param name="radix">16</xsl:param>
|
15519
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
15520
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
15521
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
15522
|
+
</xsl:template>
|
15523
|
+
|
15443
15524
|
<xsl:template name="substring-after-last">
|
15444
15525
|
<xsl:param name="value"/>
|
15445
15526
|
<xsl:param name="delimiter"/>
|