metanorma-iho 1.3.11 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/iho/iho.specification.xsl +109 -69
- data/lib/isodoc/iho/iho.standard.xsl +109 -69
- data/lib/metanorma/iho/basicdoc.rng +53 -30
- data/lib/metanorma/iho/biblio-standoc.rng +18 -0
- data/lib/metanorma/iho/isodoc.rng +237 -77
- data/lib/metanorma/iho/reqt.rng +32 -12
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 96444c62163fc8f8702645b92af0693fa783e40bda4ed9503137a4ec03a786fe
|
|
4
|
+
data.tar.gz: 42ec3fa9b8dcc8788c6617e1be1dddb3ad4c4b3c9ee35732b553261b8b3f083f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6ea76b11527507b8dd5c15aa4c5e6fb46105a09ca92b4d3791d48d623b299b2a6be97e9e7060c7b1c6dc3999b21dc19745195b1056b18dcb08da032fd3ad4231
|
|
7
|
+
data.tar.gz: 5c039b323f7e42597d140aaccfa9184492ed7c4cc2767537e25f0de18f24359ae12b2d90a69f4b658b50a1e20333e8a029fa64c7f8ff2612783a1cc10cf4f219
|
|
@@ -1227,7 +1227,7 @@
|
|
|
1227
1227
|
</xsl:template>
|
|
1228
1228
|
|
|
1229
1229
|
<xsl:template match="mn:logo[@type = 'desc' or @type = 'mark' or @type = 'sign']">
|
|
1230
|
-
<fo:instream-foreign-object content-width="25.9mm" fox:alt-text="Image Logo IHO">
|
|
1230
|
+
<fo:instream-foreign-object content-width="25.9mm" fox:alt-text="Image Logo IHO" fox:placement="Block">
|
|
1231
1231
|
<xsl:if test="@type = 'desc'"><xsl:attribute name="content-width">25.8mm</xsl:attribute></xsl:if>
|
|
1232
1232
|
<xsl:copy-of select="mn:image/*[local-name() = 'svg']"/>
|
|
1233
1233
|
<xsl:if test="not(mn:image/*[local-name() = 'svg'])">
|
|
@@ -2223,7 +2223,7 @@
|
|
|
2223
2223
|
</xsl:element>
|
|
2224
2224
|
</xsl:template> -->
|
|
2225
2225
|
|
|
2226
|
-
<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">
|
|
2226
|
+
<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">
|
|
2227
2227
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
2228
2228
|
</xsl:template>
|
|
2229
2229
|
|
|
@@ -3256,6 +3256,9 @@
|
|
|
3256
3256
|
|
|
3257
3257
|
<xsl:template name="refine_sourcecode-style">
|
|
3258
3258
|
<xsl:call-template name="setKeepAttributes"/>
|
|
3259
|
+
<xsl:if test="ancestor::mn:sourcecode and parent::mn:td">
|
|
3260
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
3261
|
+
</xsl:if>
|
|
3259
3262
|
</xsl:template> <!-- refine_sourcecode-style -->
|
|
3260
3263
|
|
|
3261
3264
|
<xsl:attribute-set name="sourcecode-number-style">
|
|
@@ -3582,30 +3585,30 @@
|
|
|
3582
3585
|
</xsl:template>
|
|
3583
3586
|
|
|
3584
3587
|
<!-- outer table with line numbers for sourcecode -->
|
|
3585
|
-
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table" priority="
|
|
3586
|
-
<fo:block>
|
|
3587
|
-
<fo:table width="100%" table-layout="fixed">
|
|
3588
|
+
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
|
|
3589
|
+
<fo:block role="SKIP">
|
|
3590
|
+
<fo:table width="100%" table-layout="fixed" role="SKIP">
|
|
3588
3591
|
<xsl:copy-of select="@id"/>
|
|
3589
3592
|
<fo:table-column column-width="8%"/>
|
|
3590
3593
|
<fo:table-column column-width="92%"/>
|
|
3591
|
-
<fo:table-body>
|
|
3594
|
+
<fo:table-body role="SKIP">
|
|
3592
3595
|
<xsl:apply-templates/>
|
|
3593
3596
|
</fo:table-body>
|
|
3594
3597
|
</fo:table>
|
|
3595
3598
|
</fo:block>
|
|
3596
3599
|
</xsl:template>
|
|
3597
|
-
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table/mn:tbody" priority="
|
|
3600
|
+
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table/mn:tbody" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
|
|
3598
3601
|
<xsl:apply-templates/>
|
|
3599
3602
|
</xsl:template>
|
|
3600
|
-
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr" priority="
|
|
3601
|
-
<fo:table-row>
|
|
3603
|
+
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
|
|
3604
|
+
<fo:table-row role="SKIP">
|
|
3602
3605
|
<xsl:apply-templates/>
|
|
3603
3606
|
</fo:table-row>
|
|
3604
3607
|
</xsl:template>
|
|
3605
3608
|
<!-- first td with line numbers -->
|
|
3606
|
-
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][not(preceding-sibling::*)]" priority="
|
|
3607
|
-
<fo:table-cell>
|
|
3608
|
-
<fo:block>
|
|
3609
|
+
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][not(preceding-sibling::*)]" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
|
|
3610
|
+
<fo:table-cell role="SKIP">
|
|
3611
|
+
<fo:block role="SKIP">
|
|
3609
3612
|
|
|
3610
3613
|
<!-- set attibutes for line numbers - same as sourcecode -->
|
|
3611
3614
|
<xsl:variable name="sourcecode_attributes">
|
|
@@ -3613,7 +3616,7 @@
|
|
|
3613
3616
|
<xsl:call-template name="get_sourcecode_attributes"/>
|
|
3614
3617
|
</xsl:for-each>
|
|
3615
3618
|
</xsl:variable>
|
|
3616
|
-
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*[not(starts-with(local-name(), 'margin-') or starts-with(local-name(), 'space-'))]">
|
|
3619
|
+
<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'))]">
|
|
3617
3620
|
<xsl:attribute name="{name()}">
|
|
3618
3621
|
<xsl:value-of select="."/>
|
|
3619
3622
|
</xsl:attribute>
|
|
@@ -3625,8 +3628,8 @@
|
|
|
3625
3628
|
</xsl:template>
|
|
3626
3629
|
|
|
3627
3630
|
<!-- second td with sourcecode -->
|
|
3628
|
-
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][preceding-sibling::*]" priority="
|
|
3629
|
-
<fo:table-cell>
|
|
3631
|
+
<xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][preceding-sibling::*]" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
|
|
3632
|
+
<fo:table-cell role="SKIP">
|
|
3630
3633
|
<fo:block role="SKIP">
|
|
3631
3634
|
<xsl:apply-templates/>
|
|
3632
3635
|
</fo:block>
|
|
@@ -4196,7 +4199,7 @@
|
|
|
4196
4199
|
<xsl:param name="value"/>
|
|
4197
4200
|
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
|
4198
4201
|
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
|
4199
|
-
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-10%"><!-- alignment-baseline="middle" -->
|
|
4202
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-10%" fox:placement="Inline"><!-- alignment-baseline="middle" -->
|
|
4200
4203
|
<xsl:attribute name="height">3.5mm</xsl:attribute> <!-- 5mm -->
|
|
4201
4204
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
|
4202
4205
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
@@ -4425,11 +4428,12 @@
|
|
|
4425
4428
|
<xsl:choose>
|
|
4426
4429
|
|
|
4427
4430
|
<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' -->
|
|
4431
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
4428
4432
|
<xsl:if test="ancestor::mn:tr[1]/following-sibling::mn:tr"> <!-- is current tr isn't last -->
|
|
4429
4433
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
|
4430
4434
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
4431
4435
|
</xsl:if>
|
|
4432
|
-
<fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
|
|
4436
|
+
<fo:instream-foreign-object fox:alt-text="{.}" content-width="95%" fox:placement="Inline" role="artifact">
|
|
4433
4437
|
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
|
4434
4438
|
<mtext><xsl:value-of select="."/></mtext>
|
|
4435
4439
|
</math>
|
|
@@ -5995,19 +5999,22 @@
|
|
|
5995
5999
|
<xsl:if test="normalize-space() != ''">
|
|
5996
6000
|
|
|
5997
6001
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
|
5998
|
-
|
|
5999
6002
|
<xsl:call-template name="refine_table-name-style">
|
|
6000
6003
|
<xsl:with-param name="continued" select="$continued"/>
|
|
6001
6004
|
</xsl:call-template>
|
|
6002
6005
|
|
|
6003
|
-
<
|
|
6004
|
-
|
|
6005
|
-
</xsl:when>
|
|
6006
|
-
<xsl:otherwise>
|
|
6007
|
-
<xsl:apply-templates/>
|
|
6008
|
-
</xsl:otherwise>
|
|
6009
|
-
</xsl:choose>
|
|
6006
|
+
<!-- <Caption><P> tags, see https://github.com/metanorma/metanorma-pdfa/issues/81 -->
|
|
6007
|
+
<fo:block role="P">
|
|
6010
6008
|
|
|
6009
|
+
<xsl:choose>
|
|
6010
|
+
<xsl:when test="$continued = 'true'">
|
|
6011
|
+
</xsl:when>
|
|
6012
|
+
<xsl:otherwise>
|
|
6013
|
+
<xsl:apply-templates/>
|
|
6014
|
+
</xsl:otherwise>
|
|
6015
|
+
</xsl:choose>
|
|
6016
|
+
|
|
6017
|
+
</fo:block>
|
|
6011
6018
|
</fo:block>
|
|
6012
6019
|
|
|
6013
6020
|
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
|
@@ -6491,7 +6498,7 @@
|
|
|
6491
6498
|
|
|
6492
6499
|
<xsl:variable name="tableWithNotesAndFootnotes">
|
|
6493
6500
|
|
|
6494
|
-
<fo:table keep-with-previous="always" role="
|
|
6501
|
+
<fo:table keep-with-previous="always" role="TFoot">
|
|
6495
6502
|
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
|
6496
6503
|
<xsl:variable name="name" select="local-name()"/>
|
|
6497
6504
|
<xsl:choose>
|
|
@@ -6529,14 +6536,14 @@
|
|
|
6529
6536
|
</xsl:choose>
|
|
6530
6537
|
|
|
6531
6538
|
<fo:table-body role="SKIP">
|
|
6532
|
-
<fo:table-row
|
|
6539
|
+
<fo:table-row>
|
|
6533
6540
|
<xsl:for-each select="ancestor::mn:table[1]">
|
|
6534
6541
|
<xsl:call-template name="setTableStyles">
|
|
6535
6542
|
<xsl:with-param name="scope">ancestor_table</xsl:with-param>
|
|
6536
6543
|
</xsl:call-template>
|
|
6537
6544
|
</xsl:for-each>
|
|
6538
6545
|
|
|
6539
|
-
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}"
|
|
6546
|
+
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
|
6540
6547
|
|
|
6541
6548
|
<xsl:call-template name="refine_table-footer-cell-style"/>
|
|
6542
6549
|
|
|
@@ -8847,6 +8854,13 @@
|
|
|
8847
8854
|
<xsl:template name="refine_note-style">
|
|
8848
8855
|
</xsl:template> <!-- refine_note-style -->
|
|
8849
8856
|
|
|
8857
|
+
<xsl:attribute-set name="note-block-style">
|
|
8858
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
8859
|
+
</xsl:attribute-set> <!-- note-block-style -->
|
|
8860
|
+
|
|
8861
|
+
<xsl:template name="refine_note-block-style">
|
|
8862
|
+
</xsl:template> <!-- refine_note-block-style -->
|
|
8863
|
+
|
|
8850
8864
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
|
8851
8865
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
|
8852
8866
|
|
|
@@ -8923,9 +8937,9 @@
|
|
|
8923
8937
|
<xsl:call-template name="refine_note-style"/>
|
|
8924
8938
|
|
|
8925
8939
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
8926
|
-
<fo:block
|
|
8940
|
+
<fo:block xsl:use-attribute-sets="note-block-style">
|
|
8927
8941
|
|
|
8928
|
-
<xsl:call-template name="
|
|
8942
|
+
<xsl:call-template name="refine_note-block-style"/>
|
|
8929
8943
|
|
|
8930
8944
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
|
8931
8945
|
|
|
@@ -8964,9 +8978,6 @@
|
|
|
8964
8978
|
</fo:block-container>
|
|
8965
8979
|
</xsl:template>
|
|
8966
8980
|
|
|
8967
|
-
<xsl:template name="refine_note_block_style">
|
|
8968
|
-
</xsl:template> <!-- refine_note_block_style -->
|
|
8969
|
-
|
|
8970
8981
|
<xsl:template match="mn:note/mn:p">
|
|
8971
8982
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
|
8972
8983
|
<xsl:choose>
|
|
@@ -9087,9 +9098,9 @@
|
|
|
9087
9098
|
<!-- ====== -->
|
|
9088
9099
|
|
|
9089
9100
|
<xsl:attribute-set name="quote-container-style">
|
|
9101
|
+
<xsl:attribute name="role">BlockQuote</xsl:attribute>
|
|
9090
9102
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
9091
9103
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
9092
|
-
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
9093
9104
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
9094
9105
|
<xsl:attribute name="margin-left">4.5mm</xsl:attribute>
|
|
9095
9106
|
<xsl:attribute name="margin-right">9mm</xsl:attribute>
|
|
@@ -9114,6 +9125,7 @@
|
|
|
9114
9125
|
</xsl:template> <!-- refine_quote-style -->
|
|
9115
9126
|
|
|
9116
9127
|
<xsl:attribute-set name="quote-source-style">
|
|
9128
|
+
<xsl:attribute name="role">Caption</xsl:attribute>
|
|
9117
9129
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
9118
9130
|
<xsl:attribute name="margin-right">-12mm</xsl:attribute>
|
|
9119
9131
|
</xsl:attribute-set> <!-- quote-source-style -->
|
|
@@ -9146,7 +9158,7 @@
|
|
|
9146
9158
|
<xsl:call-template name="refine_quote-style"/>
|
|
9147
9159
|
|
|
9148
9160
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
9149
|
-
<fo:block role="
|
|
9161
|
+
<fo:block role="SKIP"> <!-- BlockQuote -->
|
|
9150
9162
|
<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 -->
|
|
9151
9163
|
</fo:block>
|
|
9152
9164
|
</fo:block-container>
|
|
@@ -9155,11 +9167,15 @@
|
|
|
9155
9167
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
9156
9168
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
9157
9169
|
<xsl:call-template name="refine_quote-source-style"/>
|
|
9158
|
-
|
|
9159
|
-
<
|
|
9160
|
-
<
|
|
9161
|
-
|
|
9162
|
-
|
|
9170
|
+
|
|
9171
|
+
<!-- <Caption><P> tags, see https://github.com/metanorma/metanorma-pdfa/issues/81 -->
|
|
9172
|
+
<fo:block role="P">
|
|
9173
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
9174
|
+
<xsl:apply-templates select="mn:author"/>
|
|
9175
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
|
9176
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
|
9177
|
+
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
|
9178
|
+
</fo:block>
|
|
9163
9179
|
</fo:block>
|
|
9164
9180
|
</fo:block-container>
|
|
9165
9181
|
</xsl:if>
|
|
@@ -9626,7 +9642,7 @@
|
|
|
9626
9642
|
|
|
9627
9643
|
<!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
|
|
9628
9644
|
|
|
9629
|
-
<fo:external-graphic src="{$src}" vertical-align="middle">
|
|
9645
|
+
<fo:external-graphic src="{$src}" vertical-align="middle" fox:placement="Inline">
|
|
9630
9646
|
<xsl:call-template name="addAltText"/>
|
|
9631
9647
|
|
|
9632
9648
|
<xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
|
|
@@ -9691,7 +9707,7 @@
|
|
|
9691
9707
|
<xsl:choose>
|
|
9692
9708
|
<xsl:when test="$isDeleted = 'true'">
|
|
9693
9709
|
<!-- enclose in svg -->
|
|
9694
|
-
<fo:instream-foreign-object>
|
|
9710
|
+
<fo:instream-foreign-object fox:placement="Block">
|
|
9695
9711
|
<xsl:attribute name="width">100%</xsl:attribute>
|
|
9696
9712
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
|
9697
9713
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
@@ -9712,7 +9728,7 @@
|
|
|
9712
9728
|
<xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
|
|
9713
9729
|
</fo:block> -->
|
|
9714
9730
|
|
|
9715
|
-
<fo:external-graphic src="{$src}">
|
|
9731
|
+
<fo:external-graphic src="{$src}" fox:placement="Block">
|
|
9716
9732
|
<xsl:call-template name="addAltText"/>
|
|
9717
9733
|
|
|
9718
9734
|
<xsl:choose>
|
|
@@ -10051,7 +10067,7 @@
|
|
|
10051
10067
|
</xsl:if>
|
|
10052
10068
|
<fo:block text-depth="0" line-height="0" font-size="0">
|
|
10053
10069
|
|
|
10054
|
-
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
|
10070
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}" fox:placement="Block">
|
|
10055
10071
|
<xsl:attribute name="width">100%</xsl:attribute>
|
|
10056
10072
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
|
10057
10073
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
@@ -10100,7 +10116,7 @@
|
|
|
10100
10116
|
<xsl:copy>
|
|
10101
10117
|
<xsl:copy-of select="@*"/>
|
|
10102
10118
|
<!-- <fo:block xsl:use-attribute-sets="image-style"> -->
|
|
10103
|
-
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
|
10119
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}" fox:placement="Block">
|
|
10104
10120
|
|
|
10105
10121
|
<xsl:choose>
|
|
10106
10122
|
<xsl:when test="$image_class = 'corrigenda-tag'">
|
|
@@ -10165,6 +10181,10 @@
|
|
|
10165
10181
|
<xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
|
|
10166
10182
|
</xsl:if>
|
|
10167
10183
|
|
|
10184
|
+
<xsl:if test="self::fo:inline">
|
|
10185
|
+
<xsl:attribute name="fox:placement">Inline</xsl:attribute>
|
|
10186
|
+
</xsl:if>
|
|
10187
|
+
|
|
10168
10188
|
<xsl:copy-of select="$svg_content"/>
|
|
10169
10189
|
|
|
10170
10190
|
<!-- <debug>
|
|
@@ -10440,10 +10460,12 @@
|
|
|
10440
10460
|
<xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
|
|
10441
10461
|
<xsl:if test="normalize-space() != ''">
|
|
10442
10462
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
|
10443
|
-
|
|
10444
10463
|
<xsl:call-template name="refine_figure-name-style"/>
|
|
10445
10464
|
|
|
10446
|
-
<
|
|
10465
|
+
<!-- <Caption><P> tags, see https://github.com/metanorma/metanorma-pdfa/issues/81 -->
|
|
10466
|
+
<fo:block role="P">
|
|
10467
|
+
<xsl:apply-templates/>
|
|
10468
|
+
</fo:block>
|
|
10447
10469
|
</fo:block>
|
|
10448
10470
|
</xsl:if>
|
|
10449
10471
|
</xsl:template>
|
|
@@ -10465,6 +10487,7 @@
|
|
|
10465
10487
|
|
|
10466
10488
|
<!-- Formula's styles -->
|
|
10467
10489
|
<xsl:attribute-set name="formula-style">
|
|
10490
|
+
<xsl:attribute name="role">P</xsl:attribute>
|
|
10468
10491
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
|
10469
10492
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
10470
10493
|
</xsl:attribute-set> <!-- formula-style -->
|
|
@@ -10473,6 +10496,7 @@
|
|
|
10473
10496
|
</xsl:template>
|
|
10474
10497
|
|
|
10475
10498
|
<xsl:attribute-set name="formula-stem-block-style">
|
|
10499
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
10476
10500
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
10477
10501
|
</xsl:attribute-set> <!-- formula-stem-block-style -->
|
|
10478
10502
|
|
|
@@ -10480,6 +10504,7 @@
|
|
|
10480
10504
|
</xsl:template> <!-- refine_formula-stem-block-style -->
|
|
10481
10505
|
|
|
10482
10506
|
<xsl:attribute-set name="formula-stem-number-style">
|
|
10507
|
+
<xsl:attribute name="role">Span</xsl:attribute>
|
|
10483
10508
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
10484
10509
|
</xsl:attribute-set> <!-- formula-stem-number-style -->
|
|
10485
10510
|
<!-- End Formula's styles -->
|
|
@@ -10488,12 +10513,25 @@
|
|
|
10488
10513
|
</xsl:template>
|
|
10489
10514
|
|
|
10490
10515
|
<xsl:attribute-set name="mathml-style">
|
|
10516
|
+
<xsl:attribute name="role">Formula</xsl:attribute>
|
|
10491
10517
|
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
|
10492
10518
|
</xsl:attribute-set>
|
|
10493
10519
|
|
|
10494
10520
|
<xsl:template name="refine_mathml-style">
|
|
10495
10521
|
</xsl:template>
|
|
10496
10522
|
|
|
10523
|
+
<xsl:attribute-set name="mathml-instream-foreign-object-style">
|
|
10524
|
+
<xsl:attribute name="fox:alt-text">Math</xsl:attribute>
|
|
10525
|
+
<xsl:attribute name="fox:actual-text">Math</xsl:attribute>
|
|
10526
|
+
<xsl:attribute name="fox:placement">Inline</xsl:attribute>
|
|
10527
|
+
</xsl:attribute-set> <!-- mathml-instream-foreign-object-style -->
|
|
10528
|
+
|
|
10529
|
+
<xsl:template name="refine_mathml-instream-foreign-object-style">
|
|
10530
|
+
<xsl:if test="ancestor::mn:formula">
|
|
10531
|
+
<xsl:attribute name="fox:placement">Block</xsl:attribute>
|
|
10532
|
+
</xsl:if>
|
|
10533
|
+
</xsl:template> <!-- refine_mathml-instream-foreign-object-style -->
|
|
10534
|
+
|
|
10497
10535
|
<!-- ====== -->
|
|
10498
10536
|
<!-- formula -->
|
|
10499
10537
|
<!-- ====== -->
|
|
@@ -10509,7 +10547,7 @@
|
|
|
10509
10547
|
</xsl:if>
|
|
10510
10548
|
<fo:block-container margin-left="0mm" role="SKIP">
|
|
10511
10549
|
<xsl:call-template name="setNamedDestination"/>
|
|
10512
|
-
<fo:block id="{@id}">
|
|
10550
|
+
<fo:block id="{@id}" role="SKIP">
|
|
10513
10551
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
|
|
10514
10552
|
</fo:block>
|
|
10515
10553
|
</fo:block-container>
|
|
@@ -10542,22 +10580,22 @@
|
|
|
10542
10580
|
|
|
10543
10581
|
<xsl:call-template name="refine_formula-style"/>
|
|
10544
10582
|
|
|
10545
|
-
<fo:table table-layout="fixed" width="100%">
|
|
10583
|
+
<fo:table table-layout="fixed" width="100%" role="SKIP">
|
|
10546
10584
|
<fo:table-column column-width="95%"/>
|
|
10547
10585
|
<fo:table-column column-width="5%"/>
|
|
10548
|
-
<fo:table-body>
|
|
10549
|
-
<fo:table-row>
|
|
10550
|
-
<fo:table-cell display-align="center">
|
|
10551
|
-
<fo:block xsl:use-attribute-sets="formula-stem-block-style"
|
|
10586
|
+
<fo:table-body role="SKIP">
|
|
10587
|
+
<fo:table-row role="SKIP">
|
|
10588
|
+
<fo:table-cell display-align="center" role="SKIP">
|
|
10589
|
+
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
|
10552
10590
|
|
|
10553
10591
|
<xsl:call-template name="refine_formula-stem-block-style"/>
|
|
10554
10592
|
|
|
10555
10593
|
<xsl:apply-templates/>
|
|
10556
10594
|
</fo:block>
|
|
10557
10595
|
</fo:table-cell>
|
|
10558
|
-
<fo:table-cell display-align="center">
|
|
10596
|
+
<fo:table-cell display-align="center" role="SKIP">
|
|
10559
10597
|
|
|
10560
|
-
<fo:block xsl:use-attribute-sets="formula-stem-number-style"
|
|
10598
|
+
<fo:block xsl:use-attribute-sets="formula-stem-number-style">
|
|
10561
10599
|
|
|
10562
10600
|
<xsl:for-each select="../mn:fmt-name">
|
|
10563
10601
|
<xsl:call-template name="setIDforNamedDestination"/>
|
|
@@ -10705,9 +10743,9 @@
|
|
|
10705
10743
|
<xsl:apply-templates select="." mode="mathml"/>
|
|
10706
10744
|
</xsl:variable>
|
|
10707
10745
|
|
|
10708
|
-
<fo:instream-foreign-object
|
|
10746
|
+
<fo:instream-foreign-object xsl:use-attribute-sets="mathml-instream-foreign-object-style">
|
|
10709
10747
|
|
|
10710
|
-
<xsl:call-template name="
|
|
10748
|
+
<xsl:call-template name="refine_mathml-instream-foreign-object-style"/>
|
|
10711
10749
|
|
|
10712
10750
|
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
10713
10751
|
<!-- put MathML in Actual Text -->
|
|
@@ -10731,9 +10769,6 @@
|
|
|
10731
10769
|
</fo:instream-foreign-object>
|
|
10732
10770
|
</xsl:template>
|
|
10733
10771
|
|
|
10734
|
-
<xsl:template name="refine_mathml_insteam_object_style">
|
|
10735
|
-
</xsl:template> <!-- refine_mathml_insteam_object_style -->
|
|
10736
|
-
|
|
10737
10772
|
<xsl:template match="mathml:*" mode="mathml_actual_text">
|
|
10738
10773
|
<!-- <xsl:text>a+b</xsl:text> -->
|
|
10739
10774
|
<xsl:text><</xsl:text>
|
|
@@ -11879,8 +11914,10 @@
|
|
|
11879
11914
|
|
|
11880
11915
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
|
11881
11916
|
|
|
11917
|
+
<!-- commented 2026-08-06: from https://github.com/metanorma/metanorma-standoc/issues/1140:
|
|
11918
|
+
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. -->
|
|
11882
11919
|
<!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
|
|
11883
|
-
<xsl:template match="mn:references/mn:note" priority="2"
|
|
11920
|
+
<!-- <xsl:template match="mn:references/mn:note" priority="2"/>--> <!-- [not(@normative='true')] -->
|
|
11884
11921
|
|
|
11885
11922
|
<xsl:template name="insertListItem_Bibitem">
|
|
11886
11923
|
<xsl:choose>
|
|
@@ -12554,7 +12591,7 @@
|
|
|
12554
12591
|
<xsl:call-template name="set_id_metanorma_form_item">
|
|
12555
12592
|
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
12556
12593
|
</xsl:call-template>
|
|
12557
|
-
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
|
12594
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%" fox:placement="Inline">
|
|
12558
12595
|
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
|
12559
12596
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
|
12560
12597
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
@@ -12581,7 +12618,7 @@
|
|
|
12581
12618
|
<xsl:call-template name="set_id_metanorma_form_item">
|
|
12582
12619
|
<xsl:with-param name="form_item_type" select="$form_item_type"/>
|
|
12583
12620
|
</xsl:call-template>
|
|
12584
|
-
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
|
12621
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%" fox:placement="Inline">
|
|
12585
12622
|
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
|
12586
12623
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
|
12587
12624
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
@@ -12895,7 +12932,9 @@
|
|
|
12895
12932
|
</xsl:variable>
|
|
12896
12933
|
<mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
|
|
12897
12934
|
<xsl:element name="fmt-name" namespace="{$namespace_full}">
|
|
12898
|
-
<xsl:
|
|
12935
|
+
<xsl:call-template name="capitalize"><!-- https://github.com/metanorma/metanorma-pdfa/issues/72 -->
|
|
12936
|
+
<xsl:with-param name="str" select="mn:fmt-xref-label[@container]"/>
|
|
12937
|
+
</xsl:call-template>
|
|
12899
12938
|
<xsl:if test="normalize-space($example_name) != ''">
|
|
12900
12939
|
<xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
|
|
12901
12940
|
<xsl:copy-of select="$example_name"/>
|
|
@@ -14697,7 +14736,8 @@
|
|
|
14697
14736
|
<xsl:template match="//mn:metanorma/mn:preface/*" priority="2" name="preface_node"> <!-- /*/mn:preface/* -->
|
|
14698
14737
|
<fo:block break-after="page"/>
|
|
14699
14738
|
<xsl:call-template name="setNamedDestination"/>
|
|
14700
|
-
<fo:block>
|
|
14739
|
+
<fo:block role="Sect">
|
|
14740
|
+
<xsl:call-template name="addTagElementT"/>
|
|
14701
14741
|
<xsl:call-template name="setId"/>
|
|
14702
14742
|
<xsl:call-template name="addReviewHelper"/>
|
|
14703
14743
|
<xsl:apply-templates/>
|
|
@@ -14786,7 +14826,7 @@
|
|
|
14786
14826
|
|
|
14787
14827
|
<xsl:template match="mn:blacksquare" name="blacksquare">
|
|
14788
14828
|
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
|
14789
|
-
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
|
14829
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad" fox:placement="Inline">
|
|
14790
14830
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
|
14791
14831
|
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
|
14792
14832
|
</svg>
|
|
@@ -15742,13 +15782,13 @@
|
|
|
15742
15782
|
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
|
15743
15783
|
<xsl:choose>
|
|
15744
15784
|
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
|
15745
|
-
<fo:instream-foreign-object fox:alt-text="Image Front">
|
|
15785
|
+
<fo:instream-foreign-object fox:alt-text="Image Front" fox:placement="Block">
|
|
15746
15786
|
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
|
15747
15787
|
<xsl:call-template name="getSVG"/>
|
|
15748
15788
|
</fo:instream-foreign-object>
|
|
15749
15789
|
</xsl:when>
|
|
15750
15790
|
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
|
15751
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
|
15791
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front" fox:placement="Block"/>
|
|
15752
15792
|
</xsl:when>
|
|
15753
15793
|
<xsl:otherwise> <!-- bitmap image -->
|
|
15754
15794
|
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
|
@@ -15758,7 +15798,7 @@
|
|
|
15758
15798
|
<xsl:with-param name="src" select="$coverimage_src"/>
|
|
15759
15799
|
</xsl:call-template>
|
|
15760
15800
|
</xsl:variable>
|
|
15761
|
-
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
|
15801
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front" fox:placement="Block"/>
|
|
15762
15802
|
</xsl:if>
|
|
15763
15803
|
</xsl:otherwise>
|
|
15764
15804
|
</xsl:choose>
|