metanorma-taste 1.1.1 → 1.1.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/data/csa/csa.standard.xsl +110 -70
- data/data/pdfa/pdfa.xsl +416 -371
- data/lib/metanorma/taste/version.rb +1 -1
- data/lib/metanorma/taste_register.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b99de9e29c2b48903a52665d58004a55e17b1a0393cca0f068d0a1f8da1e09a9
|
|
4
|
+
data.tar.gz: 9e1c2fd3a98d1fe24b173bf19f9b5a8326f0daa54d4e7bd8215aff849070238d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 665f8ecdec1836661122a841ea97282766d30054fa294abc35fa023e141e0d598702bf061b62670916e314af22462b8cc4142bc921bda63c2f6a73b67fc7ff48
|
|
7
|
+
data.tar.gz: ca8f7653266b45efe14df6cd5159bd12ef7d2b6e0771c4686681a9b7a1aeb804522c51fa8083acf31bf5be37a992555dbe7cb3d99d3b395a2efe147d6e10b207
|
data/data/csa/csa.standard.xsl
CHANGED
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
<fo:block-container absolute-position="fixed" left="11mm" top="245mm">
|
|
298
298
|
<fo:block>
|
|
299
299
|
<!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo))}" width="42mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/> -->
|
|
300
|
-
<fo:instream-foreign-object content-width="42mm" fox:alt-text="CSA Logo">
|
|
300
|
+
<fo:instream-foreign-object content-width="42mm" fox:alt-text="CSA Logo" fox:placement="Block">
|
|
301
301
|
<xsl:copy-of select="$Image-Logo-SVG"/>
|
|
302
302
|
</fo:instream-foreign-object>
|
|
303
303
|
</fo:block>
|
|
@@ -577,7 +577,7 @@
|
|
|
577
577
|
|
|
578
578
|
<xsl:if test="$level = 2">
|
|
579
579
|
<fo:inline padding-right="1mm">
|
|
580
|
-
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Title))}" width="15mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
|
580
|
+
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Title))}" width="15mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}" vertical-align="middle" fox:placement="Inline"/>
|
|
581
581
|
</fo:inline>
|
|
582
582
|
</xsl:if>
|
|
583
583
|
|
|
@@ -1724,7 +1724,7 @@
|
|
|
1724
1724
|
</xsl:element>
|
|
1725
1725
|
</xsl:template> -->
|
|
1726
1726
|
|
|
1727
|
-
<xsl:template match="mn:span[ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
|
|
1727
|
+
<xsl:template match="mn:span[ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim' or @class = 'fmt-clause-delim']" mode="update_xml_step1" priority="3">
|
|
1728
1728
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
1729
1729
|
</xsl:template>
|
|
1730
1730
|
|
|
@@ -2757,6 +2757,9 @@
|
|
|
2757
2757
|
|
|
2758
2758
|
<xsl:template name="refine_sourcecode-style">
|
|
2759
2759
|
<xsl:call-template name="setKeepAttributes"/>
|
|
2760
|
+
<xsl:if test="ancestor::mn:sourcecode and parent::mn:td">
|
|
2761
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
2762
|
+
</xsl:if>
|
|
2760
2763
|
</xsl:template> <!-- refine_sourcecode-style -->
|
|
2761
2764
|
|
|
2762
2765
|
<xsl:attribute-set name="sourcecode-number-style">
|
|
@@ -3083,30 +3086,30 @@
|
|
|
3083
3086
|
</xsl:template>
|
|
3084
3087
|
|
|
3085
3088
|
<!-- outer table with line numbers for sourcecode -->
|
|
3086
|
-
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table" priority="
|
|
3087
|
-
<fo:block>
|
|
3088
|
-
<fo:table width="100%" table-layout="fixed">
|
|
3089
|
+
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
|
|
3090
|
+
<fo:block role="SKIP">
|
|
3091
|
+
<fo:table width="100%" table-layout="fixed" role="SKIP">
|
|
3089
3092
|
<xsl:copy-of select="@id"/>
|
|
3090
3093
|
<fo:table-column column-width="8%"/>
|
|
3091
3094
|
<fo:table-column column-width="92%"/>
|
|
3092
|
-
<fo:table-body>
|
|
3095
|
+
<fo:table-body role="SKIP">
|
|
3093
3096
|
<xsl:apply-templates/>
|
|
3094
3097
|
</fo:table-body>
|
|
3095
3098
|
</fo:table>
|
|
3096
3099
|
</fo:block>
|
|
3097
3100
|
</xsl:template>
|
|
3098
|
-
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table/mn:tbody" priority="
|
|
3101
|
+
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table/mn:tbody" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
|
|
3099
3102
|
<xsl:apply-templates/>
|
|
3100
3103
|
</xsl:template>
|
|
3101
|
-
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr" priority="
|
|
3102
|
-
<fo:table-row>
|
|
3104
|
+
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
|
|
3105
|
+
<fo:table-row role="SKIP">
|
|
3103
3106
|
<xsl:apply-templates/>
|
|
3104
3107
|
</fo:table-row>
|
|
3105
3108
|
</xsl:template>
|
|
3106
3109
|
<!-- first td with line numbers -->
|
|
3107
|
-
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][not(preceding-sibling::*)]" priority="
|
|
3108
|
-
<fo:table-cell>
|
|
3109
|
-
<fo:block>
|
|
3110
|
+
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][not(preceding-sibling::*)]" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
|
|
3111
|
+
<fo:table-cell role="SKIP">
|
|
3112
|
+
<fo:block role="SKIP">
|
|
3110
3113
|
|
|
3111
3114
|
<!-- set attibutes for line numbers - same as sourcecode -->
|
|
3112
3115
|
<xsl:variable name="sourcecode_attributes">
|
|
@@ -3114,7 +3117,7 @@
|
|
|
3114
3117
|
<xsl:call-template name="get_sourcecode_attributes"/>
|
|
3115
3118
|
</xsl:for-each>
|
|
3116
3119
|
</xsl:variable>
|
|
3117
|
-
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*[not(starts-with(local-name(), 'margin-') or starts-with(local-name(), 'space-'))]">
|
|
3120
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*[not(starts-with(local-name(), 'margin-') or starts-with(local-name(), 'space-') or starts-with(local-name(), 'role'))]">
|
|
3118
3121
|
<xsl:attribute name="{name()}">
|
|
3119
3122
|
<xsl:value-of select="."/>
|
|
3120
3123
|
</xsl:attribute>
|
|
@@ -3126,8 +3129,8 @@
|
|
|
3126
3129
|
</xsl:template>
|
|
3127
3130
|
|
|
3128
3131
|
<!-- second td with sourcecode -->
|
|
3129
|
-
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][preceding-sibling::*]" priority="
|
|
3130
|
-
<fo:table-cell>
|
|
3132
|
+
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][preceding-sibling::*]" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
|
|
3133
|
+
<fo:table-cell role="SKIP">
|
|
3131
3134
|
<fo:block role="SKIP">
|
|
3132
3135
|
<xsl:apply-templates/>
|
|
3133
3136
|
</fo:block>
|
|
@@ -3697,7 +3700,7 @@
|
|
|
3697
3700
|
<xsl:param name="value"/>
|
|
3698
3701
|
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
|
3699
3702
|
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
|
3700
|
-
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-10%"><!-- alignment-baseline="middle" -->
|
|
3703
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-10%" fox:placement="Inline"><!-- alignment-baseline="middle" -->
|
|
3701
3704
|
<xsl:attribute name="height">3.5mm</xsl:attribute> <!-- 5mm -->
|
|
3702
3705
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
|
3703
3706
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
@@ -3926,11 +3929,12 @@
|
|
|
3926
3929
|
<xsl:choose>
|
|
3927
3930
|
|
|
3928
3931
|
<xsl:when test="ancestor::mn:sourcecode[@linenums = 'true'] and ancestor::*[local-name() = 'td'][1][not(preceding-sibling::*)]"> <!-- pre in the first td in the table with @linenums = 'true' -->
|
|
3932
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
3929
3933
|
<xsl:if test="ancestor::mn:tr[1]/following-sibling::mn:tr"> <!-- is current tr isn't last -->
|
|
3930
3934
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
|
3931
3935
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
3932
3936
|
</xsl:if>
|
|
3933
|
-
<fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
|
|
3937
|
+
<fo:instream-foreign-object fox:alt-text="{.}" content-width="95%" fox:placement="Inline" role="artifact">
|
|
3934
3938
|
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
|
3935
3939
|
<mtext><xsl:value-of select="."/></mtext>
|
|
3936
3940
|
</math>
|
|
@@ -5467,19 +5471,22 @@
|
|
|
5467
5471
|
<xsl:if test="normalize-space() != ''">
|
|
5468
5472
|
|
|
5469
5473
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
|
5470
|
-
|
|
5471
5474
|
<xsl:call-template name="refine_table-name-style">
|
|
5472
5475
|
<xsl:with-param name="continued" select="$continued"/>
|
|
5473
5476
|
</xsl:call-template>
|
|
5474
5477
|
|
|
5475
|
-
<
|
|
5476
|
-
|
|
5477
|
-
</xsl:when>
|
|
5478
|
-
<xsl:otherwise>
|
|
5479
|
-
<xsl:apply-templates/>
|
|
5480
|
-
</xsl:otherwise>
|
|
5481
|
-
</xsl:choose>
|
|
5478
|
+
<!-- <Caption><P> tags, see https://github.com/metanorma/metanorma-pdfa/issues/81 -->
|
|
5479
|
+
<fo:block role="P">
|
|
5482
5480
|
|
|
5481
|
+
<xsl:choose>
|
|
5482
|
+
<xsl:when test="$continued = 'true'">
|
|
5483
|
+
</xsl:when>
|
|
5484
|
+
<xsl:otherwise>
|
|
5485
|
+
<xsl:apply-templates/>
|
|
5486
|
+
</xsl:otherwise>
|
|
5487
|
+
</xsl:choose>
|
|
5488
|
+
|
|
5489
|
+
</fo:block>
|
|
5483
5490
|
</fo:block>
|
|
5484
5491
|
|
|
5485
5492
|
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
|
@@ -5963,7 +5970,7 @@
|
|
|
5963
5970
|
|
|
5964
5971
|
<xsl:variable name="tableWithNotesAndFootnotes">
|
|
5965
5972
|
|
|
5966
|
-
<fo:table keep-with-previous="always" role="
|
|
5973
|
+
<fo:table keep-with-previous="always" role="TFoot">
|
|
5967
5974
|
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
|
5968
5975
|
<xsl:variable name="name" select="local-name()"/>
|
|
5969
5976
|
<xsl:choose>
|
|
@@ -6001,14 +6008,14 @@
|
|
|
6001
6008
|
</xsl:choose>
|
|
6002
6009
|
|
|
6003
6010
|
<fo:table-body role="SKIP">
|
|
6004
|
-
<fo:table-row
|
|
6011
|
+
<fo:table-row>
|
|
6005
6012
|
<xsl:for-each select="ancestor::mn:table[1]">
|
|
6006
6013
|
<xsl:call-template name="setTableStyles">
|
|
6007
6014
|
<xsl:with-param name="scope">ancestor_table</xsl:with-param>
|
|
6008
6015
|
</xsl:call-template>
|
|
6009
6016
|
</xsl:for-each>
|
|
6010
6017
|
|
|
6011
|
-
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}"
|
|
6018
|
+
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
|
6012
6019
|
|
|
6013
6020
|
<xsl:call-template name="refine_table-footer-cell-style"/>
|
|
6014
6021
|
|
|
@@ -8313,6 +8320,13 @@
|
|
|
8313
8320
|
<xsl:template name="refine_note-style">
|
|
8314
8321
|
</xsl:template> <!-- refine_note-style -->
|
|
8315
8322
|
|
|
8323
|
+
<xsl:attribute-set name="note-block-style">
|
|
8324
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
8325
|
+
</xsl:attribute-set> <!-- note-block-style -->
|
|
8326
|
+
|
|
8327
|
+
<xsl:template name="refine_note-block-style">
|
|
8328
|
+
</xsl:template> <!-- refine_note-block-style -->
|
|
8329
|
+
|
|
8316
8330
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
|
8317
8331
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
|
8318
8332
|
|
|
@@ -8388,9 +8402,9 @@
|
|
|
8388
8402
|
<xsl:if test="ancestor::mn:ul or ancestor::mn:ol and not(ancestor::mn:note[1]/following-sibling::*)">
|
|
8389
8403
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
8390
8404
|
</xsl:if>
|
|
8391
|
-
<fo:block
|
|
8405
|
+
<fo:block xsl:use-attribute-sets="note-block-style">
|
|
8392
8406
|
|
|
8393
|
-
<xsl:call-template name="
|
|
8407
|
+
<xsl:call-template name="refine_note-block-style"/>
|
|
8394
8408
|
|
|
8395
8409
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
|
8396
8410
|
|
|
@@ -8429,9 +8443,6 @@
|
|
|
8429
8443
|
</fo:block-container>
|
|
8430
8444
|
</xsl:template>
|
|
8431
8445
|
|
|
8432
|
-
<xsl:template name="refine_note_block_style">
|
|
8433
|
-
</xsl:template> <!-- refine_note_block_style -->
|
|
8434
|
-
|
|
8435
8446
|
<xsl:template match="mn:note/mn:p">
|
|
8436
8447
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
|
8437
8448
|
<xsl:choose>
|
|
@@ -8552,9 +8563,9 @@
|
|
|
8552
8563
|
<!-- ====== -->
|
|
8553
8564
|
|
|
8554
8565
|
<xsl:attribute-set name="quote-container-style">
|
|
8566
|
+
<xsl:attribute name="role">BlockQuote</xsl:attribute>
|
|
8555
8567
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
8556
8568
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
8557
|
-
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
8558
8569
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
8559
8570
|
<xsl:attribute name="margin-left">13mm</xsl:attribute>
|
|
8560
8571
|
</xsl:attribute-set>
|
|
@@ -8578,6 +8589,7 @@
|
|
|
8578
8589
|
</xsl:template> <!-- refine_quote-style -->
|
|
8579
8590
|
|
|
8580
8591
|
<xsl:attribute-set name="quote-source-style">
|
|
8592
|
+
<xsl:attribute name="role">Caption</xsl:attribute>
|
|
8581
8593
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
8582
8594
|
<xsl:attribute name="margin-right">-12mm</xsl:attribute>
|
|
8583
8595
|
<xsl:attribute name="margin-right">13mm</xsl:attribute>
|
|
@@ -8611,7 +8623,7 @@
|
|
|
8611
8623
|
<xsl:call-template name="refine_quote-style"/>
|
|
8612
8624
|
|
|
8613
8625
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
8614
|
-
<fo:block role="
|
|
8626
|
+
<fo:block role="SKIP"> <!-- BlockQuote -->
|
|
8615
8627
|
<xsl:apply-templates select="./node()[not(self::mn:author) and not(self::mn:fmt-source) and not(self::mn:attribution)]"/> <!-- process all nested nodes, except author and source -->
|
|
8616
8628
|
</fo:block>
|
|
8617
8629
|
</fo:block-container>
|
|
@@ -8620,11 +8632,15 @@
|
|
|
8620
8632
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
8621
8633
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
8622
8634
|
<xsl:call-template name="refine_quote-source-style"/>
|
|
8623
|
-
|
|
8624
|
-
<
|
|
8625
|
-
<
|
|
8626
|
-
|
|
8627
|
-
|
|
8635
|
+
|
|
8636
|
+
<!-- <Caption><P> tags, see https://github.com/metanorma/metanorma-pdfa/issues/81 -->
|
|
8637
|
+
<fo:block role="P">
|
|
8638
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
8639
|
+
<xsl:apply-templates select="mn:author"/>
|
|
8640
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
|
8641
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
|
8642
|
+
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
|
8643
|
+
</fo:block>
|
|
8628
8644
|
</fo:block>
|
|
8629
8645
|
</fo:block-container>
|
|
8630
8646
|
</xsl:if>
|
|
@@ -9091,7 +9107,7 @@
|
|
|
9091
9107
|
|
|
9092
9108
|
<!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
|
|
9093
9109
|
|
|
9094
|
-
<fo:external-graphic src="{$src}" vertical-align="middle">
|
|
9110
|
+
<fo:external-graphic src="{$src}" vertical-align="middle" fox:placement="Inline">
|
|
9095
9111
|
<xsl:call-template name="addAltText"/>
|
|
9096
9112
|
|
|
9097
9113
|
<xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
|
|
@@ -9156,7 +9172,7 @@
|
|
|
9156
9172
|
<xsl:choose>
|
|
9157
9173
|
<xsl:when test="$isDeleted = 'true'">
|
|
9158
9174
|
<!-- enclose in svg -->
|
|
9159
|
-
<fo:instream-foreign-object>
|
|
9175
|
+
<fo:instream-foreign-object fox:placement="Block">
|
|
9160
9176
|
<xsl:attribute name="width">100%</xsl:attribute>
|
|
9161
9177
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
|
9162
9178
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
@@ -9177,7 +9193,7 @@
|
|
|
9177
9193
|
<xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
|
|
9178
9194
|
</fo:block> -->
|
|
9179
9195
|
|
|
9180
|
-
<fo:external-graphic src="{$src}">
|
|
9196
|
+
<fo:external-graphic src="{$src}" fox:placement="Block">
|
|
9181
9197
|
<xsl:call-template name="addAltText"/>
|
|
9182
9198
|
|
|
9183
9199
|
<xsl:choose>
|
|
@@ -9516,7 +9532,7 @@
|
|
|
9516
9532
|
</xsl:if>
|
|
9517
9533
|
<fo:block text-depth="0" line-height="0" font-size="0">
|
|
9518
9534
|
|
|
9519
|
-
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
|
9535
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}" fox:placement="Block">
|
|
9520
9536
|
<xsl:attribute name="width">100%</xsl:attribute>
|
|
9521
9537
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
|
9522
9538
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
@@ -9565,7 +9581,7 @@
|
|
|
9565
9581
|
<xsl:copy>
|
|
9566
9582
|
<xsl:copy-of select="@*"/>
|
|
9567
9583
|
<!-- <fo:block xsl:use-attribute-sets="image-style"> -->
|
|
9568
|
-
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
|
9584
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}" fox:placement="Block">
|
|
9569
9585
|
|
|
9570
9586
|
<xsl:choose>
|
|
9571
9587
|
<xsl:when test="$image_class = 'corrigenda-tag'">
|
|
@@ -9630,6 +9646,10 @@
|
|
|
9630
9646
|
<xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
|
|
9631
9647
|
</xsl:if>
|
|
9632
9648
|
|
|
9649
|
+
<xsl:if test="self::fo:inline">
|
|
9650
|
+
<xsl:attribute name="fox:placement">Inline</xsl:attribute>
|
|
9651
|
+
</xsl:if>
|
|
9652
|
+
|
|
9633
9653
|
<xsl:copy-of select="$svg_content"/>
|
|
9634
9654
|
|
|
9635
9655
|
<!-- <debug>
|
|
@@ -9905,10 +9925,12 @@
|
|
|
9905
9925
|
<xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
|
|
9906
9926
|
<xsl:if test="normalize-space() != ''">
|
|
9907
9927
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
|
9908
|
-
|
|
9909
9928
|
<xsl:call-template name="refine_figure-name-style"/>
|
|
9910
9929
|
|
|
9911
|
-
<
|
|
9930
|
+
<!-- <Caption><P> tags, see https://github.com/metanorma/metanorma-pdfa/issues/81 -->
|
|
9931
|
+
<fo:block role="P">
|
|
9932
|
+
<xsl:apply-templates/>
|
|
9933
|
+
</fo:block>
|
|
9912
9934
|
</fo:block>
|
|
9913
9935
|
</xsl:if>
|
|
9914
9936
|
</xsl:template>
|
|
@@ -9930,6 +9952,7 @@
|
|
|
9930
9952
|
|
|
9931
9953
|
<!-- Formula's styles -->
|
|
9932
9954
|
<xsl:attribute-set name="formula-style">
|
|
9955
|
+
<xsl:attribute name="role">P</xsl:attribute>
|
|
9933
9956
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
|
9934
9957
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
9935
9958
|
</xsl:attribute-set> <!-- formula-style -->
|
|
@@ -9938,6 +9961,7 @@
|
|
|
9938
9961
|
</xsl:template>
|
|
9939
9962
|
|
|
9940
9963
|
<xsl:attribute-set name="formula-stem-block-style">
|
|
9964
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
9941
9965
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
9942
9966
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
9943
9967
|
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
|
@@ -9947,6 +9971,7 @@
|
|
|
9947
9971
|
</xsl:template> <!-- refine_formula-stem-block-style -->
|
|
9948
9972
|
|
|
9949
9973
|
<xsl:attribute-set name="formula-stem-number-style">
|
|
9974
|
+
<xsl:attribute name="role">Span</xsl:attribute>
|
|
9950
9975
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
9951
9976
|
</xsl:attribute-set> <!-- formula-stem-number-style -->
|
|
9952
9977
|
<!-- End Formula's styles -->
|
|
@@ -9955,12 +9980,25 @@
|
|
|
9955
9980
|
</xsl:template>
|
|
9956
9981
|
|
|
9957
9982
|
<xsl:attribute-set name="mathml-style">
|
|
9983
|
+
<xsl:attribute name="role">Formula</xsl:attribute>
|
|
9958
9984
|
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
|
9959
9985
|
</xsl:attribute-set>
|
|
9960
9986
|
|
|
9961
9987
|
<xsl:template name="refine_mathml-style">
|
|
9962
9988
|
</xsl:template>
|
|
9963
9989
|
|
|
9990
|
+
<xsl:attribute-set name="mathml-instream-foreign-object-style">
|
|
9991
|
+
<xsl:attribute name="fox:alt-text">Math</xsl:attribute>
|
|
9992
|
+
<xsl:attribute name="fox:actual-text">Math</xsl:attribute>
|
|
9993
|
+
<xsl:attribute name="fox:placement">Inline</xsl:attribute>
|
|
9994
|
+
</xsl:attribute-set> <!-- mathml-instream-foreign-object-style -->
|
|
9995
|
+
|
|
9996
|
+
<xsl:template name="refine_mathml-instream-foreign-object-style">
|
|
9997
|
+
<xsl:if test="ancestor::mn:formula">
|
|
9998
|
+
<xsl:attribute name="fox:placement">Block</xsl:attribute>
|
|
9999
|
+
</xsl:if>
|
|
10000
|
+
</xsl:template> <!-- refine_mathml-instream-foreign-object-style -->
|
|
10001
|
+
|
|
9964
10002
|
<!-- ====== -->
|
|
9965
10003
|
<!-- formula -->
|
|
9966
10004
|
<!-- ====== -->
|
|
@@ -9976,7 +10014,7 @@
|
|
|
9976
10014
|
</xsl:if>
|
|
9977
10015
|
<fo:block-container margin-left="0mm" role="SKIP">
|
|
9978
10016
|
<xsl:call-template name="setNamedDestination"/>
|
|
9979
|
-
<fo:block id="{@id}">
|
|
10017
|
+
<fo:block id="{@id}" role="SKIP">
|
|
9980
10018
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
|
|
9981
10019
|
</fo:block>
|
|
9982
10020
|
</fo:block-container>
|
|
@@ -10009,22 +10047,22 @@
|
|
|
10009
10047
|
|
|
10010
10048
|
<xsl:call-template name="refine_formula-style"/>
|
|
10011
10049
|
|
|
10012
|
-
<fo:table table-layout="fixed" width="100%">
|
|
10050
|
+
<fo:table table-layout="fixed" width="100%" role="SKIP">
|
|
10013
10051
|
<fo:table-column column-width="95%"/>
|
|
10014
10052
|
<fo:table-column column-width="5%"/>
|
|
10015
|
-
<fo:table-body>
|
|
10016
|
-
<fo:table-row>
|
|
10017
|
-
<fo:table-cell display-align="center">
|
|
10018
|
-
<fo:block xsl:use-attribute-sets="formula-stem-block-style"
|
|
10053
|
+
<fo:table-body role="SKIP">
|
|
10054
|
+
<fo:table-row role="SKIP">
|
|
10055
|
+
<fo:table-cell display-align="center" role="SKIP">
|
|
10056
|
+
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
|
10019
10057
|
|
|
10020
10058
|
<xsl:call-template name="refine_formula-stem-block-style"/>
|
|
10021
10059
|
|
|
10022
10060
|
<xsl:apply-templates/>
|
|
10023
10061
|
</fo:block>
|
|
10024
10062
|
</fo:table-cell>
|
|
10025
|
-
<fo:table-cell display-align="center">
|
|
10063
|
+
<fo:table-cell display-align="center" role="SKIP">
|
|
10026
10064
|
|
|
10027
|
-
<fo:block xsl:use-attribute-sets="formula-stem-number-style"
|
|
10065
|
+
<fo:block xsl:use-attribute-sets="formula-stem-number-style">
|
|
10028
10066
|
|
|
10029
10067
|
<xsl:for-each select="../mn:fmt-name">
|
|
10030
10068
|
<xsl:call-template name="setIDforNamedDestination"/>
|
|
@@ -10172,9 +10210,9 @@
|
|
|
10172
10210
|
<xsl:apply-templates select="." mode="mathml"/>
|
|
10173
10211
|
</xsl:variable>
|
|
10174
10212
|
|
|
10175
|
-
<fo:instream-foreign-object
|
|
10213
|
+
<fo:instream-foreign-object xsl:use-attribute-sets="mathml-instream-foreign-object-style">
|
|
10176
10214
|
|
|
10177
|
-
<xsl:call-template name="
|
|
10215
|
+
<xsl:call-template name="refine_mathml-instream-foreign-object-style"/>
|
|
10178
10216
|
|
|
10179
10217
|
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
10180
10218
|
<!-- put MathML in Actual Text -->
|
|
@@ -10198,9 +10236,6 @@
|
|
|
10198
10236
|
</fo:instream-foreign-object>
|
|
10199
10237
|
</xsl:template>
|
|
10200
10238
|
|
|
10201
|
-
<xsl:template name="refine_mathml_insteam_object_style">
|
|
10202
|
-
</xsl:template> <!-- refine_mathml_insteam_object_style -->
|
|
10203
|
-
|
|
10204
10239
|
<xsl:template match="mathml:*" mode="mathml_actual_text">
|
|
10205
10240
|
<!-- <xsl:text>a+b</xsl:text> -->
|
|
10206
10241
|
<xsl:text><</xsl:text>
|
|
@@ -11308,8 +11343,10 @@
|
|
|
11308
11343
|
|
|
11309
11344
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
|
11310
11345
|
|
|
11346
|
+
<!-- commented 2026-08-06: from https://github.com/metanorma/metanorma-standoc/issues/1140:
|
|
11347
|
+
Presentation XML will no longer contain notes following bibitem, those notes will have been moved in Presentation XML to inside bibitem, and then duplicated to inside formattedref. -->
|
|
11311
11348
|
<!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
|
|
11312
|
-
<xsl:template match="mn:references/mn:note" priority="2"
|
|
11349
|
+
<!-- <xsl:template match="mn:references/mn:note" priority="2"/>--> <!-- [not(@normative='true')] -->
|
|
11313
11350
|
|
|
11314
11351
|
<xsl:template name="insertListItem_Bibitem">
|
|
11315
11352
|
<xsl:choose>
|
|
@@ -12009,7 +12046,7 @@
|
|
|
12009
12046
|
<xsl:call-template name="set_id_metanorma_form_item">
|
|
12010
12047
|
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
12011
12048
|
</xsl:call-template>
|
|
12012
|
-
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
|
12049
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%" fox:placement="Inline">
|
|
12013
12050
|
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
|
12014
12051
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
|
12015
12052
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
@@ -12036,7 +12073,7 @@
|
|
|
12036
12073
|
<xsl:call-template name="set_id_metanorma_form_item">
|
|
12037
12074
|
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
12038
12075
|
</xsl:call-template>
|
|
12039
|
-
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
|
12076
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%" fox:placement="Inline">
|
|
12040
12077
|
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
|
12041
12078
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
|
12042
12079
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
@@ -12315,7 +12352,9 @@
|
|
|
12315
12352
|
</xsl:variable>
|
|
12316
12353
|
<mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
|
|
12317
12354
|
<xsl:element name="fmt-name" namespace="{$namespace_full}">
|
|
12318
|
-
<xsl:
|
|
12355
|
+
<xsl:call-template name="capitalize"><!-- https://github.com/metanorma/metanorma-pdfa/issues/72 -->
|
|
12356
|
+
<xsl:with-param name="str" select="mn:fmt-xref-label[@container]"/>
|
|
12357
|
+
</xsl:call-template>
|
|
12319
12358
|
<xsl:if test="normalize-space($example_name) != ''">
|
|
12320
12359
|
<xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
|
|
12321
12360
|
<xsl:copy-of select="$example_name"/>
|
|
@@ -14065,7 +14104,8 @@
|
|
|
14065
14104
|
<xsl:template match="//mn:metanorma/mn:preface/*" priority="2" name="preface_node"> <!-- /*/mn:preface/* -->
|
|
14066
14105
|
<fo:block break-after="page"/>
|
|
14067
14106
|
<xsl:call-template name="setNamedDestination"/>
|
|
14068
|
-
<fo:block>
|
|
14107
|
+
<fo:block role="Sect">
|
|
14108
|
+
<xsl:call-template name="addTagElementT"/>
|
|
14069
14109
|
<xsl:call-template name="setId"/>
|
|
14070
14110
|
<xsl:call-template name="addReviewHelper"/>
|
|
14071
14111
|
<xsl:apply-templates/>
|
|
@@ -14154,7 +14194,7 @@
|
|
|
14154
14194
|
|
|
14155
14195
|
<xsl:template match="mn:blacksquare" name="blacksquare">
|
|
14156
14196
|
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
|
14157
|
-
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
|
14197
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad" fox:placement="Inline">
|
|
14158
14198
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
|
14159
14199
|
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
|
14160
14200
|
</svg>
|
|
@@ -15110,13 +15150,13 @@
|
|
|
15110
15150
|
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
|
15111
15151
|
<xsl:choose>
|
|
15112
15152
|
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
|
15113
|
-
<fo:instream-foreign-object fox:alt-text="Image Front">
|
|
15153
|
+
<fo:instream-foreign-object fox:alt-text="Image Front" fox:placement="Block">
|
|
15114
15154
|
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
|
15115
15155
|
<xsl:call-template name="getSVG"/>
|
|
15116
15156
|
</fo:instream-foreign-object>
|
|
15117
15157
|
</xsl:when>
|
|
15118
15158
|
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
|
15119
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
|
15159
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front" fox:placement="Block"/>
|
|
15120
15160
|
</xsl:when>
|
|
15121
15161
|
<xsl:otherwise> <!-- bitmap image -->
|
|
15122
15162
|
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
|
@@ -15126,7 +15166,7 @@
|
|
|
15126
15166
|
<xsl:with-param name="src" select="$coverimage_src"/>
|
|
15127
15167
|
</xsl:call-template>
|
|
15128
15168
|
</xsl:variable>
|
|
15129
|
-
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
|
15169
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front" fox:placement="Block"/>
|
|
15130
15170
|
</xsl:if>
|
|
15131
15171
|
</xsl:otherwise>
|
|
15132
15172
|
</xsl:choose>
|