metanorma-ogc 2.8.0 → 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/README.adoc +1 -1
- data/lib/isodoc/ogc/metadata.rb +2 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +123 -33
- data/lib/isodoc/ogc/ogc.best-practice.xsl +123 -33
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +123 -33
- data/lib/isodoc/ogc/ogc.community-practice.xsl +123 -33
- data/lib/isodoc/ogc/ogc.community-standard.xsl +123 -33
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +123 -33
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +123 -33
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +123 -33
- data/lib/isodoc/ogc/ogc.other.xsl +123 -33
- data/lib/isodoc/ogc/ogc.policy.xsl +123 -33
- data/lib/isodoc/ogc/ogc.reference-model.xsl +123 -33
- data/lib/isodoc/ogc/ogc.release-notes.xsl +123 -33
- data/lib/isodoc/ogc/ogc.standard.xsl +123 -33
- data/lib/isodoc/ogc/ogc.test-suite.xsl +123 -33
- data/lib/isodoc/ogc/ogc.user-guide.xsl +123 -33
- data/lib/isodoc/ogc/ogc.white-paper.xsl +127 -38
- data/lib/metanorma/ogc/basicdoc.rng +1 -1
- 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 +7 -60
- data/lib/metanorma/ogc/relaton-ogc.rng +0 -30
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2db64799ff0dc497c2ec942879e3ab750d926b3cdb6e8eb88a196458a2dab896
|
4
|
+
data.tar.gz: 16b8dafbd8f39af2225c969a2b5cb52e1b7fa88efa1239aec3980a0ac1e1e25f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 481b53fc08e55d67732252b4ab8d9d153ee446f1e60761ffadd14c141939f130543a1fafbb5fae88086aa5d5ddf5d823eef86041ebca17b5ac092e25f14e161d
|
7
|
+
data.tar.gz: f2a652407f86ff861497f366a58703a86f9683a8412a8e51c108ad93d271507e2d494e3fcb1de528c6ed725dda8cb4d31495949ba96bf4879c5fb1c1388ca42a
|
data/README.adoc
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
image:https://img.shields.io/gem/v/metanorma-ogc.svg["Gem Version", link="https://rubygems.org/gems/metanorma-ogc"]
|
4
4
|
image:https://github.com/metanorma/metanorma-ogc/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/metanorma-ogc/actions?workflow=rake"]
|
5
|
-
image:https://codeclimate.com/github/metanorma/metanorma-ogc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-ogc"]
|
5
|
+
// image:https://codeclimate.com/github/metanorma/metanorma-ogc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-ogc"]
|
6
6
|
image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-ogc.svg["Pull Requests", link="https://github.com/metanorma/metanorma-ogc/pulls"]
|
7
7
|
image:https://img.shields.io/github/commits-since/metanorma/metanorma-ogc/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-ogc/releases"]
|
8
8
|
|
data/lib/isodoc/ogc/metadata.rb
CHANGED
@@ -60,7 +60,8 @@ module IsoDoc
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def author(isoxml, _out)
|
63
|
-
tc = isoxml.at(ns("//bibdata/
|
63
|
+
tc = isoxml.at(ns("//bibdata/contributor[role/@type='author']/" \
|
64
|
+
"organization/subdivision[@type='Committee']/name"))
|
64
65
|
set(:tc, tc.text) if tc
|
65
66
|
authors = isoxml.xpath(ns("//bibdata/contributor" \
|
66
67
|
"[role/@type = 'author']/person"))
|
@@ -1955,7 +1955,7 @@
|
|
1955
1955
|
</xsl:template>
|
1956
1956
|
|
1957
1957
|
<xsl:template name="insertFootnoteSeparator">
|
1958
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
1958
|
+
<fo:static-content flow-name="xsl-footnote-separator" role="artifact">
|
1959
1959
|
<fo:block>
|
1960
1960
|
<fo:leader leader-pattern="rule" leader-length="20%" color="{$color_design}"/>
|
1961
1961
|
</fo:block>
|
@@ -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'">
|
@@ -11547,7 +11564,7 @@
|
|
11547
11564
|
|
11548
11565
|
<xsl:template name="insertFootnoteSeparatorCommon">
|
11549
11566
|
<xsl:param name="leader_length">30%</xsl:param>
|
11550
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
11567
|
+
<fo:static-content flow-name="xsl-footnote-separator" role="artifact">
|
11551
11568
|
<fo:block>
|
11552
11569
|
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
11553
11570
|
</fo:block>
|
@@ -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
|
<!-- =================== -->
|
@@ -12437,9 +12472,15 @@
|
|
12437
12472
|
<xsl:attribute name="role">H1</xsl:attribute>
|
12438
12473
|
</xsl:attribute-set>
|
12439
12474
|
|
12475
|
+
<xsl:template name="refine_toc-title-style">
|
12476
|
+
</xsl:template>
|
12477
|
+
|
12440
12478
|
<xsl:attribute-set name="toc-title-page-style">
|
12441
12479
|
</xsl:attribute-set> <!-- toc-title-page-style -->
|
12442
12480
|
|
12481
|
+
<xsl:template name="refine_toc-title-page-style">
|
12482
|
+
</xsl:template>
|
12483
|
+
|
12443
12484
|
<xsl:attribute-set name="toc-item-block-style">
|
12444
12485
|
</xsl:attribute-set>
|
12445
12486
|
|
@@ -12478,6 +12519,9 @@
|
|
12478
12519
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
12479
12520
|
</xsl:attribute-set>
|
12480
12521
|
|
12522
|
+
<xsl:template name="refine_toc-listof-title-style">
|
12523
|
+
</xsl:template>
|
12524
|
+
|
12481
12525
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
12482
12526
|
</xsl:attribute-set>
|
12483
12527
|
|
@@ -12824,7 +12868,7 @@
|
|
12824
12868
|
</xsl:if>
|
12825
12869
|
|
12826
12870
|
<xsl:for-each select="$contents_nodes/mnx:doc">
|
12827
|
-
<fo:bookmark internal-destination="{contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
12871
|
+
<fo:bookmark internal-destination="{mnx:contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
12828
12872
|
<xsl:if test="@bundle = 'true'">
|
12829
12873
|
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
12830
12874
|
</xsl:if>
|
@@ -12858,7 +12902,7 @@
|
|
12858
12902
|
</xsl:choose>
|
12859
12903
|
</fo:bookmark-title>
|
12860
12904
|
|
12861
|
-
<xsl:apply-templates select="contents/mnx:item" mode="bookmark"/>
|
12905
|
+
<xsl:apply-templates select="mnx:contents/mnx:item" mode="bookmark"/>
|
12862
12906
|
|
12863
12907
|
<xsl:call-template name="insertFigureBookmarks">
|
12864
12908
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
@@ -14180,11 +14224,35 @@
|
|
14180
14224
|
|
14181
14225
|
<xsl:template match="mn:svgmap"/>
|
14182
14226
|
|
14227
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
14228
|
+
|
14183
14229
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
14184
14230
|
<xsl:template match="*[local-name() = 'lang_none']">
|
14185
14231
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
14186
14232
|
</xsl:template>
|
14187
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
|
+
|
14188
14256
|
<xsl:template name="replaceChar">
|
14189
14257
|
<xsl:param name="text"/>
|
14190
14258
|
<xsl:param name="replace"/>
|
@@ -14951,6 +15019,13 @@
|
|
14951
15019
|
<xsl:with-param name="default" select="$text_align_default"/>
|
14952
15020
|
</xsl:call-template>
|
14953
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>
|
14954
15029
|
</xsl:template>
|
14955
15030
|
|
14956
15031
|
<xsl:template name="setKeepAttributes">
|
@@ -14976,34 +15051,41 @@
|
|
14976
15051
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
14977
15052
|
<fo:block>
|
14978
15053
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
14979
|
-
|
14980
|
-
|
14981
|
-
|
14982
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
14983
|
-
<xsl:call-template name="getSVG"/>
|
14984
|
-
</fo:instream-foreign-object>
|
14985
|
-
</xsl:when>
|
14986
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
14987
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
14988
|
-
</xsl:when>
|
14989
|
-
<xsl:otherwise> <!-- bitmap image -->
|
14990
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
14991
|
-
<xsl:if test="$coverimage_src != ''">
|
14992
|
-
<xsl:variable name="coverpage">
|
14993
|
-
<xsl:call-template name="getImageURL">
|
14994
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
14995
|
-
</xsl:call-template>
|
14996
|
-
</xsl:variable>
|
14997
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
14998
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
14999
|
-
</xsl:if>
|
15000
|
-
</xsl:otherwise>
|
15001
|
-
</xsl:choose>
|
15054
|
+
|
15055
|
+
<xsl:call-template name="insertPageImage"/>
|
15056
|
+
|
15002
15057
|
</xsl:for-each>
|
15003
15058
|
</fo:block>
|
15004
15059
|
</fo:block-container>
|
15005
15060
|
</xsl:template>
|
15006
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
|
+
|
15007
15089
|
<xsl:template name="getImageURL">
|
15008
15090
|
<xsl:param name="src"/>
|
15009
15091
|
<xsl:choose>
|
@@ -15431,6 +15513,14 @@
|
|
15431
15513
|
</xsl:attribute>
|
15432
15514
|
</xsl:template>
|
15433
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
|
+
|
15434
15524
|
<xsl:template name="substring-after-last">
|
15435
15525
|
<xsl:param name="value"/>
|
15436
15526
|
<xsl:param name="delimiter"/>
|
@@ -1955,7 +1955,7 @@
|
|
1955
1955
|
</xsl:template>
|
1956
1956
|
|
1957
1957
|
<xsl:template name="insertFootnoteSeparator">
|
1958
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
1958
|
+
<fo:static-content flow-name="xsl-footnote-separator" role="artifact">
|
1959
1959
|
<fo:block>
|
1960
1960
|
<fo:leader leader-pattern="rule" leader-length="20%" color="{$color_design}"/>
|
1961
1961
|
</fo:block>
|
@@ -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'">
|
@@ -11547,7 +11564,7 @@
|
|
11547
11564
|
|
11548
11565
|
<xsl:template name="insertFootnoteSeparatorCommon">
|
11549
11566
|
<xsl:param name="leader_length">30%</xsl:param>
|
11550
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
11567
|
+
<fo:static-content flow-name="xsl-footnote-separator" role="artifact">
|
11551
11568
|
<fo:block>
|
11552
11569
|
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
11553
11570
|
</fo:block>
|
@@ -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
|
<!-- =================== -->
|
@@ -12437,9 +12472,15 @@
|
|
12437
12472
|
<xsl:attribute name="role">H1</xsl:attribute>
|
12438
12473
|
</xsl:attribute-set>
|
12439
12474
|
|
12475
|
+
<xsl:template name="refine_toc-title-style">
|
12476
|
+
</xsl:template>
|
12477
|
+
|
12440
12478
|
<xsl:attribute-set name="toc-title-page-style">
|
12441
12479
|
</xsl:attribute-set> <!-- toc-title-page-style -->
|
12442
12480
|
|
12481
|
+
<xsl:template name="refine_toc-title-page-style">
|
12482
|
+
</xsl:template>
|
12483
|
+
|
12443
12484
|
<xsl:attribute-set name="toc-item-block-style">
|
12444
12485
|
</xsl:attribute-set>
|
12445
12486
|
|
@@ -12478,6 +12519,9 @@
|
|
12478
12519
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
12479
12520
|
</xsl:attribute-set>
|
12480
12521
|
|
12522
|
+
<xsl:template name="refine_toc-listof-title-style">
|
12523
|
+
</xsl:template>
|
12524
|
+
|
12481
12525
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
12482
12526
|
</xsl:attribute-set>
|
12483
12527
|
|
@@ -12824,7 +12868,7 @@
|
|
12824
12868
|
</xsl:if>
|
12825
12869
|
|
12826
12870
|
<xsl:for-each select="$contents_nodes/mnx:doc">
|
12827
|
-
<fo:bookmark internal-destination="{contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
12871
|
+
<fo:bookmark internal-destination="{mnx:contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
12828
12872
|
<xsl:if test="@bundle = 'true'">
|
12829
12873
|
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
12830
12874
|
</xsl:if>
|
@@ -12858,7 +12902,7 @@
|
|
12858
12902
|
</xsl:choose>
|
12859
12903
|
</fo:bookmark-title>
|
12860
12904
|
|
12861
|
-
<xsl:apply-templates select="contents/mnx:item" mode="bookmark"/>
|
12905
|
+
<xsl:apply-templates select="mnx:contents/mnx:item" mode="bookmark"/>
|
12862
12906
|
|
12863
12907
|
<xsl:call-template name="insertFigureBookmarks">
|
12864
12908
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
@@ -14180,11 +14224,35 @@
|
|
14180
14224
|
|
14181
14225
|
<xsl:template match="mn:svgmap"/>
|
14182
14226
|
|
14227
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
14228
|
+
|
14183
14229
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
14184
14230
|
<xsl:template match="*[local-name() = 'lang_none']">
|
14185
14231
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
14186
14232
|
</xsl:template>
|
14187
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
|
+
|
14188
14256
|
<xsl:template name="replaceChar">
|
14189
14257
|
<xsl:param name="text"/>
|
14190
14258
|
<xsl:param name="replace"/>
|
@@ -14951,6 +15019,13 @@
|
|
14951
15019
|
<xsl:with-param name="default" select="$text_align_default"/>
|
14952
15020
|
</xsl:call-template>
|
14953
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>
|
14954
15029
|
</xsl:template>
|
14955
15030
|
|
14956
15031
|
<xsl:template name="setKeepAttributes">
|
@@ -14976,34 +15051,41 @@
|
|
14976
15051
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
14977
15052
|
<fo:block>
|
14978
15053
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
14979
|
-
|
14980
|
-
|
14981
|
-
|
14982
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
14983
|
-
<xsl:call-template name="getSVG"/>
|
14984
|
-
</fo:instream-foreign-object>
|
14985
|
-
</xsl:when>
|
14986
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
14987
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
14988
|
-
</xsl:when>
|
14989
|
-
<xsl:otherwise> <!-- bitmap image -->
|
14990
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
14991
|
-
<xsl:if test="$coverimage_src != ''">
|
14992
|
-
<xsl:variable name="coverpage">
|
14993
|
-
<xsl:call-template name="getImageURL">
|
14994
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
14995
|
-
</xsl:call-template>
|
14996
|
-
</xsl:variable>
|
14997
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
14998
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
14999
|
-
</xsl:if>
|
15000
|
-
</xsl:otherwise>
|
15001
|
-
</xsl:choose>
|
15054
|
+
|
15055
|
+
<xsl:call-template name="insertPageImage"/>
|
15056
|
+
|
15002
15057
|
</xsl:for-each>
|
15003
15058
|
</fo:block>
|
15004
15059
|
</fo:block-container>
|
15005
15060
|
</xsl:template>
|
15006
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
|
+
|
15007
15089
|
<xsl:template name="getImageURL">
|
15008
15090
|
<xsl:param name="src"/>
|
15009
15091
|
<xsl:choose>
|
@@ -15431,6 +15513,14 @@
|
|
15431
15513
|
</xsl:attribute>
|
15432
15514
|
</xsl:template>
|
15433
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
|
+
|
15434
15524
|
<xsl:template name="substring-after-last">
|
15435
15525
|
<xsl:param name="value"/>
|
15436
15526
|
<xsl:param name="delimiter"/>
|