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
@@ -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"/>
|
@@ -2316,17 +2316,32 @@
|
|
2316
2316
|
<xsl:attribute-set name="copyright-statement-style">
|
2317
2317
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
2318
2318
|
|
2319
|
+
<xsl:template name="refine_copyright-statement-style">
|
2320
|
+
</xsl:template>
|
2321
|
+
|
2319
2322
|
<xsl:attribute-set name="copyright-statement-title-style">
|
2320
2323
|
<xsl:attribute name="font-family">Lato</xsl:attribute>
|
2321
2324
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2322
2325
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2323
2326
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
2324
2327
|
|
2328
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
2329
|
+
</xsl:template>
|
2330
|
+
|
2325
2331
|
<xsl:attribute-set name="copyright-statement-p-style">
|
2326
2332
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
2327
2333
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
2328
2334
|
|
2329
|
-
|
2335
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
2336
|
+
<xsl:if test="@align">
|
2337
|
+
<xsl:attribute name="text-align">
|
2338
|
+
<xsl:value-of select="@align"/>
|
2339
|
+
</xsl:attribute>
|
2340
|
+
</xsl:if>
|
2341
|
+
|
2342
|
+
</xsl:template>
|
2343
|
+
|
2344
|
+
<xsl:attribute-set name="license-statement-style">
|
2330
2345
|
</xsl:attribute-set> <!-- license-statement-style -->
|
2331
2346
|
|
2332
2347
|
<xsl:attribute-set name="license-statement-title-style">
|
@@ -2343,6 +2358,10 @@
|
|
2343
2358
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2344
2359
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
2345
2360
|
|
2361
|
+
<xsl:template name="refine_license-statement-p-style">
|
2362
|
+
|
2363
|
+
</xsl:template>
|
2364
|
+
|
2346
2365
|
<xsl:attribute-set name="legal-statement-style">
|
2347
2366
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
2348
2367
|
|
@@ -2374,6 +2393,8 @@
|
|
2374
2393
|
<!-- ================================= -->
|
2375
2394
|
<xsl:template match="mn:copyright-statement">
|
2376
2395
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
2396
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
2397
|
+
|
2377
2398
|
<xsl:apply-templates/>
|
2378
2399
|
</fo:block>
|
2379
2400
|
</xsl:template> <!-- copyright-statement -->
|
@@ -2390,11 +2411,7 @@
|
|
2390
2411
|
|
2391
2412
|
<xsl:template match="mn:copyright-statement//mn:p">
|
2392
2413
|
<fo:block xsl:use-attribute-sets="copyright-statement-p-style">
|
2393
|
-
|
2394
|
-
<xsl:attribute name="text-align">
|
2395
|
-
<xsl:value-of select="@align"/>
|
2396
|
-
</xsl:attribute>
|
2397
|
-
</xsl:if>
|
2414
|
+
<xsl:call-template name="refine_copyright-statement-p-style"/>
|
2398
2415
|
|
2399
2416
|
<xsl:apply-templates/>
|
2400
2417
|
</fo:block>
|
@@ -3516,7 +3533,7 @@
|
|
3516
3533
|
</xsl:otherwise>
|
3517
3534
|
</xsl:choose>
|
3518
3535
|
</xsl:variable>
|
3519
|
-
<xsl:if test="$key = 'font-family' or
|
3536
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
3520
3537
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
3521
3538
|
</xsl:if>
|
3522
3539
|
<xsl:if test="$key = 'text-indent'">
|
@@ -10336,7 +10353,7 @@
|
|
10336
10353
|
|
10337
10354
|
<xsl:template name="insertFootnoteSeparatorCommon">
|
10338
10355
|
<xsl:param name="leader_length">30%</xsl:param>
|
10339
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
10356
|
+
<fo:static-content flow-name="xsl-footnote-separator" role="artifact">
|
10340
10357
|
<fo:block>
|
10341
10358
|
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
10342
10359
|
</fo:block>
|
@@ -11111,13 +11128,31 @@
|
|
11111
11128
|
<!-- skip here, see the template 'fmt-review-start' -->
|
11112
11129
|
</xsl:when>
|
11113
11130
|
<xsl:otherwise>
|
11114
|
-
|
11115
|
-
|
11116
|
-
|
11117
|
-
|
11131
|
+
<xsl:choose>
|
11132
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
11133
|
+
<fo:block font-size="1pt" line-height="0.1">
|
11134
|
+
<xsl:call-template name="fo_inline_bookmark">
|
11135
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
11136
|
+
</xsl:call-template>
|
11137
|
+
</fo:block>
|
11138
|
+
</xsl:when>
|
11139
|
+
<xsl:otherwise>
|
11140
|
+
<xsl:call-template name="fo_inline_bookmark">
|
11141
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
11142
|
+
</xsl:call-template>
|
11143
|
+
</xsl:otherwise>
|
11144
|
+
</xsl:choose>
|
11118
11145
|
</xsl:otherwise>
|
11119
11146
|
</xsl:choose>
|
11120
11147
|
</xsl:template>
|
11148
|
+
|
11149
|
+
<xsl:template name="fo_inline_bookmark">
|
11150
|
+
<xsl:param name="bookmark_id"/>
|
11151
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
11152
|
+
<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>
|
11153
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
11154
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
11155
|
+
</xsl:template>
|
11121
11156
|
<!-- =================== -->
|
11122
11157
|
<!-- End of Index processing -->
|
11123
11158
|
<!-- =================== -->
|
@@ -11223,9 +11258,15 @@
|
|
11223
11258
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
11224
11259
|
</xsl:attribute-set>
|
11225
11260
|
|
11261
|
+
<xsl:template name="refine_toc-title-style">
|
11262
|
+
</xsl:template>
|
11263
|
+
|
11226
11264
|
<xsl:attribute-set name="toc-title-page-style">
|
11227
11265
|
</xsl:attribute-set> <!-- toc-title-page-style -->
|
11228
11266
|
|
11267
|
+
<xsl:template name="refine_toc-title-page-style">
|
11268
|
+
</xsl:template>
|
11269
|
+
|
11229
11270
|
<xsl:attribute-set name="toc-item-block-style">
|
11230
11271
|
</xsl:attribute-set>
|
11231
11272
|
|
@@ -11237,7 +11278,6 @@
|
|
11237
11278
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
11238
11279
|
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
11239
11280
|
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
11240
|
-
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11241
11281
|
</xsl:attribute-set> <!-- END: toc-item-style -->
|
11242
11282
|
|
11243
11283
|
<xsl:template name="refine_toc-item-style">
|
@@ -11256,6 +11296,9 @@
|
|
11256
11296
|
<xsl:attribute-set name="toc-listof-title-style">
|
11257
11297
|
</xsl:attribute-set>
|
11258
11298
|
|
11299
|
+
<xsl:template name="refine_toc-listof-title-style">
|
11300
|
+
</xsl:template>
|
11301
|
+
|
11259
11302
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
11260
11303
|
</xsl:attribute-set>
|
11261
11304
|
|
@@ -11603,7 +11646,7 @@
|
|
11603
11646
|
</xsl:if>
|
11604
11647
|
|
11605
11648
|
<xsl:for-each select="$contents_nodes/mnx:doc">
|
11606
|
-
<fo:bookmark internal-destination="{contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
11649
|
+
<fo:bookmark internal-destination="{mnx:contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
11607
11650
|
<xsl:if test="@bundle = 'true'">
|
11608
11651
|
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
11609
11652
|
</xsl:if>
|
@@ -11637,7 +11680,7 @@
|
|
11637
11680
|
</xsl:choose>
|
11638
11681
|
</fo:bookmark-title>
|
11639
11682
|
|
11640
|
-
<xsl:apply-templates select="contents/mnx:item" mode="bookmark"/>
|
11683
|
+
<xsl:apply-templates select="mnx:contents/mnx:item" mode="bookmark"/>
|
11641
11684
|
|
11642
11685
|
<xsl:call-template name="insertFigureBookmarks">
|
11643
11686
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
@@ -12963,11 +13006,35 @@
|
|
12963
13006
|
|
12964
13007
|
<xsl:template match="mn:svgmap"/>
|
12965
13008
|
|
13009
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
13010
|
+
|
12966
13011
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
12967
13012
|
<xsl:template match="*[local-name() = 'lang_none']">
|
12968
13013
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
12969
13014
|
</xsl:template>
|
12970
13015
|
|
13016
|
+
<xsl:template name="addTagElementT">
|
13017
|
+
<xsl:variable name="title_">
|
13018
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
13019
|
+
</xsl:variable>
|
13020
|
+
<xsl:variable name="title__">
|
13021
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
13022
|
+
<xsl:choose>
|
13023
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
13024
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
13025
|
+
</xsl:choose>
|
13026
|
+
</xsl:for-each>
|
13027
|
+
</xsl:variable>
|
13028
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
13029
|
+
<xsl:if test="$title != ''">
|
13030
|
+
<xsl:attribute name="fox:title">
|
13031
|
+
<xsl:if test="ancestor::mn:sections">
|
13032
|
+
<xsl:text>Section </xsl:text>
|
13033
|
+
</xsl:if>
|
13034
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
13035
|
+
</xsl:if>
|
13036
|
+
</xsl:template>
|
13037
|
+
|
12971
13038
|
<xsl:template name="replaceChar">
|
12972
13039
|
<xsl:param name="text"/>
|
12973
13040
|
<xsl:param name="replace"/>
|
@@ -13734,6 +13801,13 @@
|
|
13734
13801
|
<xsl:with-param name="default" select="$text_align_default"/>
|
13735
13802
|
</xsl:call-template>
|
13736
13803
|
<xsl:call-template name="setKeepAttributes"/>
|
13804
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
13805
|
+
<xsl:variable name="styles">
|
13806
|
+
<xsl:apply-templates select="*[1]"/>
|
13807
|
+
</xsl:variable>
|
13808
|
+
<!-- move attribute line-height from inline to block -->
|
13809
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
13810
|
+
</xsl:if>
|
13737
13811
|
</xsl:template>
|
13738
13812
|
|
13739
13813
|
<xsl:template name="setKeepAttributes">
|
@@ -13759,34 +13833,41 @@
|
|
13759
13833
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
13760
13834
|
<fo:block>
|
13761
13835
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
13762
|
-
|
13763
|
-
|
13764
|
-
|
13765
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
13766
|
-
<xsl:call-template name="getSVG"/>
|
13767
|
-
</fo:instream-foreign-object>
|
13768
|
-
</xsl:when>
|
13769
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
13770
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
13771
|
-
</xsl:when>
|
13772
|
-
<xsl:otherwise> <!-- bitmap image -->
|
13773
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
13774
|
-
<xsl:if test="$coverimage_src != ''">
|
13775
|
-
<xsl:variable name="coverpage">
|
13776
|
-
<xsl:call-template name="getImageURL">
|
13777
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
13778
|
-
</xsl:call-template>
|
13779
|
-
</xsl:variable>
|
13780
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
13781
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
13782
|
-
</xsl:if>
|
13783
|
-
</xsl:otherwise>
|
13784
|
-
</xsl:choose>
|
13836
|
+
|
13837
|
+
<xsl:call-template name="insertPageImage"/>
|
13838
|
+
|
13785
13839
|
</xsl:for-each>
|
13786
13840
|
</fo:block>
|
13787
13841
|
</fo:block-container>
|
13788
13842
|
</xsl:template>
|
13789
13843
|
|
13844
|
+
<xsl:template name="insertPageImage">
|
13845
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
13846
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
13847
|
+
<xsl:choose>
|
13848
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
13849
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
13850
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
13851
|
+
<xsl:call-template name="getSVG"/>
|
13852
|
+
</fo:instream-foreign-object>
|
13853
|
+
</xsl:when>
|
13854
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
13855
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
13856
|
+
</xsl:when>
|
13857
|
+
<xsl:otherwise> <!-- bitmap image -->
|
13858
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
13859
|
+
<xsl:if test="$coverimage_src != ''">
|
13860
|
+
<xsl:variable name="coverpage">
|
13861
|
+
<xsl:call-template name="getImageURL">
|
13862
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
13863
|
+
</xsl:call-template>
|
13864
|
+
</xsl:variable>
|
13865
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
13866
|
+
</xsl:if>
|
13867
|
+
</xsl:otherwise>
|
13868
|
+
</xsl:choose>
|
13869
|
+
</xsl:template>
|
13870
|
+
|
13790
13871
|
<xsl:template name="getImageURL">
|
13791
13872
|
<xsl:param name="src"/>
|
13792
13873
|
<xsl:choose>
|
@@ -14214,6 +14295,14 @@
|
|
14214
14295
|
</xsl:attribute>
|
14215
14296
|
</xsl:template>
|
14216
14297
|
|
14298
|
+
<xsl:template name="getCharByCodePoint">
|
14299
|
+
<xsl:param name="codepoint"/>
|
14300
|
+
<xsl:param name="radix">16</xsl:param>
|
14301
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
14302
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
14303
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
14304
|
+
</xsl:template>
|
14305
|
+
|
14217
14306
|
<xsl:template name="substring-after-last">
|
14218
14307
|
<xsl:param name="value"/>
|
14219
14308
|
<xsl:param name="delimiter"/>
|
@@ -1291,13 +1291,13 @@ Restricted recursively to contain only other such inline elements with no identi
|
|
1291
1291
|
<ref name="pure_strike"/>
|
1292
1292
|
<ref name="pure_smallcap"/>
|
1293
1293
|
<ref name="br"/>
|
1294
|
+
<ref name="stem"/>
|
1294
1295
|
</choice>
|
1295
1296
|
</define>
|
1296
1297
|
<define name="NestedTextElement">
|
1297
1298
|
<a:documentation>Contents of TextElement tags: leaves out tags that should occur only at top level of block: bookmark image hr pagebreak</a:documentation>
|
1298
1299
|
<choice>
|
1299
1300
|
<ref name="PureTextElement"/>
|
1300
|
-
<ref name="stem"/>
|
1301
1301
|
<ref name="eref"/>
|
1302
1302
|
<ref name="xref"/>
|
1303
1303
|
<ref name="hyperlink"/>
|