metanorma-iec 2.8.12 → 2.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c59ee1d944a70515831e1be726a556a36d35d86ca17d4ec1cd973470dc0e931
4
- data.tar.gz: 9c7d59d176404a708b61ce599994a570ab0d67c7476448f838f6b63e6949786f
3
+ metadata.gz: 4b7e589b397e5bf1b465b827fe1b602fc0977ab1cc2382403d48f67f82f28e0c
4
+ data.tar.gz: 3914ee868b05f0383e21b953581e495d7a968def6487067496c915f3d0ddc863
5
5
  SHA512:
6
- metadata.gz: b66f29a9f0ee0c747b5d279b253dc860360050a2731a445d3706c6942582719318c33ad70e71ef009abf2eba6db76b9b36a8bd0bfadea992919cef781d2a0c6c
7
- data.tar.gz: 3fe9bbf9c0dedbc6ec18a1d08f5c083a2c6d2c5f870bc930d0d6f8feb3a0248e87c984148d2ca4caac966d564a0bb0895835e4664d041f68ec132d98f0c10993
6
+ metadata.gz: '0783fbb6c8760ae774144576fa6c4c416cd40b0d8539f57722538d79f3e9a8a5b9d4ef9425bb814e73203fc05036322908160e39fa3a8b8b7c47322196ebc3ee'
7
+ data.tar.gz: 425cb299233570d8742a5957450d5a1099aeaf2f29003e8f553a4ec4036e90b702602015d6bd734b60a20b1b563deb5274caa4706d804e7ad8d06c1c4b1ea749
@@ -335,8 +335,8 @@
335
335
  </fo:static-content>
336
336
  <fo:flow flow-name="xsl-region-body">
337
337
  <fo:block-container absolute-position="fixed" left="18mm" top="107mm">
338
- <fo:block>
339
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="192mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
338
+ <fo:block>
339
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="192mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front" fox:placement="Block"/>
340
340
  </fo:block>
341
341
  </fo:block-container>
342
342
  <xsl:call-template name="insertCoverPart1"/>
@@ -906,7 +906,7 @@
906
906
  <fo:table-row>
907
907
  <fo:table-cell>
908
908
  <fo:block>
909
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Attention))}" width="17.8mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
909
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Attention))}" width="17.8mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front" fox:placement="Block"/>
910
910
  </fo:block>
911
911
  </fo:table-cell>
912
912
  <fo:table-cell font-size="10pt" font-weight="bold" display-align="after">
@@ -1101,7 +1101,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
1101
1101
  <fo:block-container height="6mm">
1102
1102
  <fo:block text-align="right" margin-top="-4.5mm" margin-right="-1mm">
1103
1103
  <xsl:if test="//mn:metanorma/mn:bibdata/mn:ext/mn:accessibility-color-inside = 'true'">
1104
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Colour-Inside))}" width="19mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo IEC"/>
1104
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Colour-Inside))}" width="19mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo IEC" fox:placement="Block"/>
1105
1105
  </xsl:if>
1106
1106
  </fo:block>
1107
1107
  </fo:block-container>
@@ -1278,13 +1278,13 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
1278
1278
  <xsl:choose>
1279
1279
  <xsl:when test=". = 'IEC'">
1280
1280
  <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo-IEC))}" content-height="18mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo IEC"/> -->
1281
- <fo:instream-foreign-object content-height="18mm" fox:alt-text="Image Logo IEC">
1281
+ <fo:instream-foreign-object content-height="18mm" fox:alt-text="Image Logo IEC" fox:placement="Block">
1282
1282
  <xsl:copy-of select="$Image-Logo-IEC-SVG"/>
1283
1283
  </fo:instream-foreign-object>
1284
1284
  </xsl:when>
1285
1285
  <xsl:when test=". = 'ISO'">
1286
1286
  <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo-ISO))}" content-height="18mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo ISO"/> -->
1287
- <fo:instream-foreign-object content-height="18mm" fox:alt-text="Image Logo IEC">
1287
+ <fo:instream-foreign-object content-height="18mm" fox:alt-text="Image Logo IEC" fox:placement="Block">
1288
1288
  <xsl:call-template name="insert_Image-ISO-Logo-SVG">
1289
1289
  <xsl:with-param name="copyright_year" select="$copyright_year"/>
1290
1290
  </xsl:call-template>
@@ -2146,13 +2146,13 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
2146
2146
 
2147
2147
  <xsl:template name="insertCheckBoxOff">
2148
2148
  <fo:inline padding-right="1mm">
2149
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Checkbox-Off))}" width="2.5mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Checkbox off" baseline-shift="-5%"/>
2149
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Checkbox-Off))}" width="2.5mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Checkbox off" baseline-shift="-5%" fox:placement="Inline"/>
2150
2150
  </fo:inline>
2151
2151
  </xsl:template>
2152
2152
 
2153
2153
  <xsl:template name="insertCheckBoxOn">
2154
2154
  <fo:inline padding-right="1mm">
2155
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Checkbox-On))}" width="2.5mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Checkbox off" baseline-shift="-5%"/>
2155
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Checkbox-On))}" width="2.5mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Checkbox off" baseline-shift="-5%" fox:placement="Inline"/>
2156
2156
  </fo:inline>
2157
2157
  </xsl:template>
2158
2158
 
@@ -3179,7 +3179,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
3179
3179
  </xsl:element>
3180
3180
  </xsl:template> -->
3181
3181
 
3182
- <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">
3182
+ <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">
3183
3183
  <xsl:apply-templates mode="update_xml_step1"/>
3184
3184
  </xsl:template>
3185
3185
 
@@ -4227,6 +4227,9 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
4227
4227
 
4228
4228
  <xsl:template name="refine_sourcecode-style">
4229
4229
  <xsl:call-template name="setKeepAttributes"/>
4230
+ <xsl:if test="ancestor::mn:sourcecode and parent::mn:td">
4231
+ <xsl:attribute name="role">SKIP</xsl:attribute>
4232
+ </xsl:if>
4230
4233
  </xsl:template> <!-- refine_sourcecode-style -->
4231
4234
 
4232
4235
  <xsl:attribute-set name="sourcecode-number-style">
@@ -4553,30 +4556,30 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
4553
4556
  </xsl:template>
4554
4557
 
4555
4558
  <!-- outer table with line numbers for sourcecode -->
4556
- <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
4557
- <fo:block>
4558
- <fo:table width="100%" table-layout="fixed">
4559
+ <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
4560
+ <fo:block role="SKIP">
4561
+ <fo:table width="100%" table-layout="fixed" role="SKIP">
4559
4562
  <xsl:copy-of select="@id"/>
4560
4563
  <fo:table-column column-width="8%"/>
4561
4564
  <fo:table-column column-width="92%"/>
4562
- <fo:table-body>
4565
+ <fo:table-body role="SKIP">
4563
4566
  <xsl:apply-templates/>
4564
4567
  </fo:table-body>
4565
4568
  </fo:table>
4566
4569
  </fo:block>
4567
4570
  </xsl:template>
4568
- <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table/mn:tbody" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
4571
+ <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table/mn:tbody" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
4569
4572
  <xsl:apply-templates/>
4570
4573
  </xsl:template>
4571
- <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
4572
- <fo:table-row>
4574
+ <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
4575
+ <fo:table-row role="SKIP">
4573
4576
  <xsl:apply-templates/>
4574
4577
  </fo:table-row>
4575
4578
  </xsl:template>
4576
4579
  <!-- first td with line numbers -->
4577
- <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][not(preceding-sibling::*)]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
4578
- <fo:table-cell>
4579
- <fo:block>
4580
+ <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][not(preceding-sibling::*)]" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
4581
+ <fo:table-cell role="SKIP">
4582
+ <fo:block role="SKIP">
4580
4583
 
4581
4584
  <!-- set attibutes for line numbers - same as sourcecode -->
4582
4585
  <xsl:variable name="sourcecode_attributes">
@@ -4584,7 +4587,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
4584
4587
  <xsl:call-template name="get_sourcecode_attributes"/>
4585
4588
  </xsl:for-each>
4586
4589
  </xsl:variable>
4587
- <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*[not(starts-with(local-name(), 'margin-') or starts-with(local-name(), 'space-'))]">
4590
+ <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'))]">
4588
4591
  <xsl:attribute name="{name()}">
4589
4592
  <xsl:value-of select="."/>
4590
4593
  </xsl:attribute>
@@ -4596,8 +4599,8 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
4596
4599
  </xsl:template>
4597
4600
 
4598
4601
  <!-- second td with sourcecode -->
4599
- <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][preceding-sibling::*]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
4600
- <fo:table-cell>
4602
+ <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][preceding-sibling::*]" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
4603
+ <fo:table-cell role="SKIP">
4601
4604
  <fo:block role="SKIP">
4602
4605
  <xsl:apply-templates/>
4603
4606
  </fo:block>
@@ -5167,7 +5170,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
5167
5170
  <xsl:param name="value"/>
5168
5171
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
5169
5172
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
5170
- <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-10%"><!-- alignment-baseline="middle" -->
5173
+ <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-10%" fox:placement="Inline"><!-- alignment-baseline="middle" -->
5171
5174
  <xsl:attribute name="height">3.5mm</xsl:attribute> <!-- 5mm -->
5172
5175
  <xsl:attribute name="content-width">100%</xsl:attribute>
5173
5176
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -5396,11 +5399,12 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
5396
5399
  <xsl:choose>
5397
5400
 
5398
5401
  <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' -->
5402
+ <xsl:attribute name="role">SKIP</xsl:attribute>
5399
5403
  <xsl:if test="ancestor::mn:tr[1]/following-sibling::mn:tr"> <!-- is current tr isn't last -->
5400
5404
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
5401
5405
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
5402
5406
  </xsl:if>
5403
- <fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
5407
+ <fo:instream-foreign-object fox:alt-text="{.}" content-width="95%" fox:placement="Inline" role="artifact">
5404
5408
  <math xmlns="http://www.w3.org/1998/Math/MathML">
5405
5409
  <mtext><xsl:value-of select="."/></mtext>
5406
5410
  </math>
@@ -6986,28 +6990,31 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
6986
6990
  <xsl:if test="normalize-space() != ''">
6987
6991
 
6988
6992
  <fo:block xsl:use-attribute-sets="table-name-style">
6989
-
6990
6993
  <xsl:call-template name="refine_table-name-style">
6991
6994
  <xsl:with-param name="continued" select="$continued"/>
6992
6995
  </xsl:call-template>
6993
6996
 
6994
- <xsl:choose>
6995
- <xsl:when test="$continued = 'true'">
6996
- </xsl:when>
6997
- <xsl:otherwise>
6998
- <xsl:apply-templates/>
6999
- </xsl:otherwise>
7000
- </xsl:choose>
7001
- <xsl:if test="$continued = 'true'">
7002
- <fo:inline font-weight="bold" font-style="normal" role="SKIP">
7003
- <fo:retrieve-table-marker retrieve-class-name="table_number"/>
7004
- </fo:inline>
7005
- <fo:inline font-weight="normal" font-style="italic" role="SKIP">
7006
- <xsl:text> </xsl:text>
7007
- <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
7008
- </fo:inline>
7009
- </xsl:if>
6997
+ <!-- <Caption><P> tags, see https://github.com/metanorma/metanorma-pdfa/issues/81 -->
6998
+ <fo:block role="P">
7010
6999
 
7000
+ <xsl:choose>
7001
+ <xsl:when test="$continued = 'true'">
7002
+ </xsl:when>
7003
+ <xsl:otherwise>
7004
+ <xsl:apply-templates/>
7005
+ </xsl:otherwise>
7006
+ </xsl:choose>
7007
+ <xsl:if test="$continued = 'true'">
7008
+ <fo:inline font-weight="bold" font-style="normal" role="SKIP">
7009
+ <fo:retrieve-table-marker retrieve-class-name="table_number"/>
7010
+ </fo:inline>
7011
+ <fo:inline font-weight="normal" font-style="italic" role="SKIP">
7012
+ <xsl:text> </xsl:text>
7013
+ <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
7014
+ </fo:inline>
7015
+ </xsl:if>
7016
+
7017
+ </fo:block>
7011
7018
  </fo:block>
7012
7019
 
7013
7020
  <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
@@ -7498,7 +7505,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
7498
7505
 
7499
7506
  <xsl:variable name="tableWithNotesAndFootnotes">
7500
7507
 
7501
- <fo:table keep-with-previous="always" role="SKIP">
7508
+ <fo:table keep-with-previous="always" role="TFoot">
7502
7509
  <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
7503
7510
  <xsl:variable name="name" select="local-name()"/>
7504
7511
  <xsl:choose>
@@ -7536,14 +7543,14 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
7536
7543
  </xsl:choose>
7537
7544
 
7538
7545
  <fo:table-body role="SKIP">
7539
- <fo:table-row role="SKIP">
7546
+ <fo:table-row>
7540
7547
  <xsl:for-each select="ancestor::mn:table[1]">
7541
7548
  <xsl:call-template name="setTableStyles">
7542
7549
  <xsl:with-param name="scope">ancestor_table</xsl:with-param>
7543
7550
  </xsl:call-template>
7544
7551
  </xsl:for-each>
7545
7552
 
7546
- <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
7553
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
7547
7554
 
7548
7555
  <xsl:call-template name="refine_table-footer-cell-style"/>
7549
7556
 
@@ -9883,6 +9890,13 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
9883
9890
  <xsl:template name="refine_note-style">
9884
9891
  </xsl:template> <!-- refine_note-style -->
9885
9892
 
9893
+ <xsl:attribute-set name="note-block-style">
9894
+ <xsl:attribute name="role">SKIP</xsl:attribute>
9895
+ </xsl:attribute-set> <!-- note-block-style -->
9896
+
9897
+ <xsl:template name="refine_note-block-style">
9898
+ </xsl:template> <!-- refine_note-block-style -->
9899
+
9886
9900
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
9887
9901
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
9888
9902
 
@@ -9955,9 +9969,9 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
9955
9969
  <xsl:call-template name="refine_note-style"/>
9956
9970
 
9957
9971
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9958
- <fo:block role="SKIP">
9972
+ <fo:block xsl:use-attribute-sets="note-block-style">
9959
9973
 
9960
- <xsl:call-template name="refine_note_block_style"/>
9974
+ <xsl:call-template name="refine_note-block-style"/>
9961
9975
 
9962
9976
  <fo:inline xsl:use-attribute-sets="note-name-style">
9963
9977
 
@@ -9996,9 +10010,6 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
9996
10010
  </fo:block-container>
9997
10011
  </xsl:template>
9998
10012
 
9999
- <xsl:template name="refine_note_block_style">
10000
- </xsl:template> <!-- refine_note_block_style -->
10001
-
10002
10013
  <xsl:template match="mn:note/mn:p">
10003
10014
  <xsl:variable name="num"><xsl:number/></xsl:variable>
10004
10015
  <xsl:choose>
@@ -10119,9 +10130,9 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
10119
10130
  <!-- ====== -->
10120
10131
 
10121
10132
  <xsl:attribute-set name="quote-container-style">
10133
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
10122
10134
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
10123
10135
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
10124
- <xsl:attribute name="role">SKIP</xsl:attribute>
10125
10136
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
10126
10137
  </xsl:attribute-set>
10127
10138
 
@@ -10145,6 +10156,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
10145
10156
  </xsl:template> <!-- refine_quote-style -->
10146
10157
 
10147
10158
  <xsl:attribute-set name="quote-source-style">
10159
+ <xsl:attribute name="role">Caption</xsl:attribute>
10148
10160
  <xsl:attribute name="text-align">right</xsl:attribute>
10149
10161
  <xsl:attribute name="margin-right">-12mm</xsl:attribute>
10150
10162
  <xsl:attribute name="margin-top">15pt</xsl:attribute>
@@ -10180,7 +10192,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
10180
10192
  <xsl:call-template name="refine_quote-style"/>
10181
10193
 
10182
10194
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10183
- <fo:block role="BlockQuote">
10195
+ <fo:block role="SKIP"> <!-- BlockQuote -->
10184
10196
  <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 -->
10185
10197
  </fo:block>
10186
10198
  </fo:block-container>
@@ -10189,11 +10201,15 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
10189
10201
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10190
10202
  <fo:block xsl:use-attribute-sets="quote-source-style">
10191
10203
  <xsl:call-template name="refine_quote-source-style"/>
10192
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
10193
- <xsl:apply-templates select="mn:author"/>
10194
- <xsl:apply-templates select="mn:fmt-source"/>
10195
- <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
10196
- <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
10204
+
10205
+ <!-- <Caption><P> tags, see https://github.com/metanorma/metanorma-pdfa/issues/81 -->
10206
+ <fo:block role="P">
10207
+ <!-- ISO, ISO 7301:2011, Clause 1 -->
10208
+ <xsl:apply-templates select="mn:author"/>
10209
+ <xsl:apply-templates select="mn:fmt-source"/>
10210
+ <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
10211
+ <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
10212
+ </fo:block>
10197
10213
  </fo:block>
10198
10214
  </fo:block-container>
10199
10215
  </xsl:if>
@@ -10673,7 +10689,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
10673
10689
 
10674
10690
  <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
10675
10691
 
10676
- <fo:external-graphic src="{$src}" vertical-align="middle">
10692
+ <fo:external-graphic src="{$src}" vertical-align="middle" fox:placement="Inline">
10677
10693
  <xsl:call-template name="addAltText"/>
10678
10694
 
10679
10695
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
@@ -10738,7 +10754,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
10738
10754
  <xsl:choose>
10739
10755
  <xsl:when test="$isDeleted = 'true'">
10740
10756
  <!-- enclose in svg -->
10741
- <fo:instream-foreign-object>
10757
+ <fo:instream-foreign-object fox:placement="Block">
10742
10758
  <xsl:attribute name="width">100%</xsl:attribute>
10743
10759
  <xsl:attribute name="content-height">100%</xsl:attribute>
10744
10760
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -10759,7 +10775,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
10759
10775
  <xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
10760
10776
  </fo:block> -->
10761
10777
 
10762
- <fo:external-graphic src="{$src}">
10778
+ <fo:external-graphic src="{$src}" fox:placement="Block">
10763
10779
  <xsl:call-template name="addAltText"/>
10764
10780
 
10765
10781
  <xsl:choose>
@@ -11098,7 +11114,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
11098
11114
  </xsl:if>
11099
11115
  <fo:block text-depth="0" line-height="0" font-size="0">
11100
11116
 
11101
- <fo:instream-foreign-object fox:alt-text="{$alt-text}">
11117
+ <fo:instream-foreign-object fox:alt-text="{$alt-text}" fox:placement="Block">
11102
11118
  <xsl:attribute name="width">100%</xsl:attribute>
11103
11119
  <xsl:attribute name="content-height">100%</xsl:attribute>
11104
11120
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -11147,7 +11163,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
11147
11163
  <xsl:copy>
11148
11164
  <xsl:copy-of select="@*"/>
11149
11165
  <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
11150
- <fo:instream-foreign-object fox:alt-text="{$alt-text}">
11166
+ <fo:instream-foreign-object fox:alt-text="{$alt-text}" fox:placement="Block">
11151
11167
 
11152
11168
  <xsl:choose>
11153
11169
  <xsl:when test="$image_class = 'corrigenda-tag'">
@@ -11212,6 +11228,10 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
11212
11228
  <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
11213
11229
  </xsl:if>
11214
11230
 
11231
+ <xsl:if test="self::fo:inline">
11232
+ <xsl:attribute name="fox:placement">Inline</xsl:attribute>
11233
+ </xsl:if>
11234
+
11215
11235
  <xsl:copy-of select="$svg_content"/>
11216
11236
 
11217
11237
  <!-- <debug>
@@ -11487,10 +11507,12 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
11487
11507
  <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
11488
11508
  <xsl:if test="normalize-space() != ''">
11489
11509
  <fo:block xsl:use-attribute-sets="figure-name-style">
11490
-
11491
11510
  <xsl:call-template name="refine_figure-name-style"/>
11492
11511
 
11493
- <xsl:apply-templates/>
11512
+ <!-- <Caption><P> tags, see https://github.com/metanorma/metanorma-pdfa/issues/81 -->
11513
+ <fo:block role="P">
11514
+ <xsl:apply-templates/>
11515
+ </fo:block>
11494
11516
  </fo:block>
11495
11517
  </xsl:if>
11496
11518
  </xsl:template>
@@ -11512,6 +11534,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
11512
11534
 
11513
11535
  <!-- Formula's styles -->
11514
11536
  <xsl:attribute-set name="formula-style">
11537
+ <xsl:attribute name="role">P</xsl:attribute>
11515
11538
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
11516
11539
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11517
11540
  </xsl:attribute-set> <!-- formula-style -->
@@ -11520,6 +11543,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
11520
11543
  </xsl:template>
11521
11544
 
11522
11545
  <xsl:attribute-set name="formula-stem-block-style">
11546
+ <xsl:attribute name="role">SKIP</xsl:attribute>
11523
11547
  <xsl:attribute name="text-align">center</xsl:attribute>
11524
11548
  </xsl:attribute-set> <!-- formula-stem-block-style -->
11525
11549
 
@@ -11527,6 +11551,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
11527
11551
  </xsl:template> <!-- refine_formula-stem-block-style -->
11528
11552
 
11529
11553
  <xsl:attribute-set name="formula-stem-number-style">
11554
+ <xsl:attribute name="role">Span</xsl:attribute>
11530
11555
  <xsl:attribute name="text-align">right</xsl:attribute>
11531
11556
  <xsl:attribute name="margin-right">-10mm</xsl:attribute>
11532
11557
  </xsl:attribute-set> <!-- formula-stem-number-style -->
@@ -11539,12 +11564,25 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
11539
11564
  </xsl:template>
11540
11565
 
11541
11566
  <xsl:attribute-set name="mathml-style">
11567
+ <xsl:attribute name="role">Formula</xsl:attribute>
11542
11568
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
11543
11569
  </xsl:attribute-set>
11544
11570
 
11545
11571
  <xsl:template name="refine_mathml-style">
11546
11572
  </xsl:template>
11547
11573
 
11574
+ <xsl:attribute-set name="mathml-instream-foreign-object-style">
11575
+ <xsl:attribute name="fox:alt-text">Math</xsl:attribute>
11576
+ <xsl:attribute name="fox:actual-text">Math</xsl:attribute>
11577
+ <xsl:attribute name="fox:placement">Inline</xsl:attribute>
11578
+ </xsl:attribute-set> <!-- mathml-instream-foreign-object-style -->
11579
+
11580
+ <xsl:template name="refine_mathml-instream-foreign-object-style">
11581
+ <xsl:if test="ancestor::mn:formula">
11582
+ <xsl:attribute name="fox:placement">Block</xsl:attribute>
11583
+ </xsl:if>
11584
+ </xsl:template> <!-- refine_mathml-instream-foreign-object-style -->
11585
+
11548
11586
  <!-- ====== -->
11549
11587
  <!-- formula -->
11550
11588
  <!-- ====== -->
@@ -11560,7 +11598,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
11560
11598
  </xsl:if>
11561
11599
  <fo:block-container margin-left="0mm" role="SKIP">
11562
11600
  <xsl:call-template name="setNamedDestination"/>
11563
- <fo:block id="{@id}">
11601
+ <fo:block id="{@id}" role="SKIP">
11564
11602
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
11565
11603
  </fo:block>
11566
11604
  </fo:block-container>
@@ -11593,22 +11631,22 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
11593
11631
 
11594
11632
  <xsl:call-template name="refine_formula-style"/>
11595
11633
 
11596
- <fo:table table-layout="fixed" width="100%">
11634
+ <fo:table table-layout="fixed" width="100%" role="SKIP">
11597
11635
  <fo:table-column column-width="95%"/>
11598
11636
  <fo:table-column column-width="5%"/>
11599
- <fo:table-body>
11600
- <fo:table-row>
11601
- <fo:table-cell display-align="center">
11602
- <fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
11637
+ <fo:table-body role="SKIP">
11638
+ <fo:table-row role="SKIP">
11639
+ <fo:table-cell display-align="center" role="SKIP">
11640
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style">
11603
11641
 
11604
11642
  <xsl:call-template name="refine_formula-stem-block-style"/>
11605
11643
 
11606
11644
  <xsl:apply-templates/>
11607
11645
  </fo:block>
11608
11646
  </fo:table-cell>
11609
- <fo:table-cell display-align="center">
11647
+ <fo:table-cell display-align="center" role="SKIP">
11610
11648
 
11611
- <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
11649
+ <fo:block xsl:use-attribute-sets="formula-stem-number-style">
11612
11650
 
11613
11651
  <xsl:for-each select="../mn:fmt-name">
11614
11652
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -11756,9 +11794,9 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
11756
11794
  <xsl:apply-templates select="." mode="mathml"/>
11757
11795
  </xsl:variable>
11758
11796
 
11759
- <fo:instream-foreign-object fox:alt-text="Math" fox:actual-text="Math">
11797
+ <fo:instream-foreign-object xsl:use-attribute-sets="mathml-instream-foreign-object-style">
11760
11798
 
11761
- <xsl:call-template name="refine_mathml_insteam_object_style"/>
11799
+ <xsl:call-template name="refine_mathml-instream-foreign-object-style"/>
11762
11800
 
11763
11801
  <xsl:if test="$isGenerateTableIF = 'false'">
11764
11802
  <!-- put MathML in Actual Text -->
@@ -11782,9 +11820,6 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
11782
11820
  </fo:instream-foreign-object>
11783
11821
  </xsl:template>
11784
11822
 
11785
- <xsl:template name="refine_mathml_insteam_object_style">
11786
- </xsl:template> <!-- refine_mathml_insteam_object_style -->
11787
-
11788
11823
  <xsl:template match="mathml:*" mode="mathml_actual_text">
11789
11824
  <!-- <xsl:text>a+b</xsl:text> -->
11790
11825
  <xsl:text>&lt;</xsl:text>
@@ -12929,8 +12964,10 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
12929
12964
 
12930
12965
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
12931
12966
 
12967
+ <!-- commented 2026-08-06: from https://github.com/metanorma/metanorma-standoc/issues/1140:
12968
+ 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. -->
12932
12969
  <!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
12933
- <xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
12970
+ <!-- <xsl:template match="mn:references/mn:note" priority="2"/>--> <!-- [not(@normative='true')] -->
12934
12971
 
12935
12972
  <xsl:template name="insertListItem_Bibitem">
12936
12973
  <xsl:choose>
@@ -13607,7 +13644,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
13607
13644
  <xsl:call-template name="set_id_metanorma_form_item">
13608
13645
  <xsl:with-param name="form_item_type" select="$form_item_type"/>
13609
13646
  </xsl:call-template>
13610
- <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
13647
+ <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%" fox:placement="Inline">
13611
13648
  <xsl:attribute name="height">3.5mm</xsl:attribute>
13612
13649
  <xsl:attribute name="content-width">100%</xsl:attribute>
13613
13650
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -13634,7 +13671,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
13634
13671
  <xsl:call-template name="set_id_metanorma_form_item">
13635
13672
  <xsl:with-param name="form_item_type" select="$form_item_type"/>
13636
13673
  </xsl:call-template>
13637
- <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
13674
+ <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%" fox:placement="Inline">
13638
13675
  <xsl:attribute name="height">3.5mm</xsl:attribute>
13639
13676
  <xsl:attribute name="content-width">100%</xsl:attribute>
13640
13677
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -13932,7 +13969,9 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
13932
13969
  </xsl:variable>
13933
13970
  <mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
13934
13971
  <xsl:element name="fmt-name" namespace="{$namespace_full}">
13935
- <xsl:value-of select="mn:fmt-xref-label[@container]"/>
13972
+ <xsl:call-template name="capitalize"><!-- https://github.com/metanorma/metanorma-pdfa/issues/72 -->
13973
+ <xsl:with-param name="str" select="mn:fmt-xref-label[@container]"/>
13974
+ </xsl:call-template>
13936
13975
  <xsl:if test="normalize-space($example_name) != ''">
13937
13976
  <xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
13938
13977
  <xsl:copy-of select="$example_name"/>
@@ -15723,7 +15762,8 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
15723
15762
  <xsl:template match="//mn:metanorma/mn:preface/*" priority="2" name="preface_node"> <!-- /*/mn:preface/* -->
15724
15763
  <fo:block break-after="page"/>
15725
15764
  <xsl:call-template name="setNamedDestination"/>
15726
- <fo:block>
15765
+ <fo:block role="Sect">
15766
+ <xsl:call-template name="addTagElementT"/>
15727
15767
  <xsl:call-template name="setId"/>
15728
15768
  <xsl:call-template name="addReviewHelper"/>
15729
15769
  <xsl:apply-templates/>
@@ -15812,7 +15852,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
15812
15852
 
15813
15853
  <xsl:template match="mn:blacksquare" name="blacksquare">
15814
15854
  <fo:inline padding-right="2.5mm" baseline-shift="5%">
15815
- <fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
15855
+ <fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad" fox:placement="Inline">
15816
15856
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
15817
15857
  <rect x="0" y="0" width="2" height="2" fill="black"/>
15818
15858
  </svg>
@@ -16794,13 +16834,13 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
16794
16834
  <xsl:param name="bitmap_width" select="$pageWidth"/>
16795
16835
  <xsl:choose>
16796
16836
  <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
16797
- <fo:instream-foreign-object fox:alt-text="Image Front">
16837
+ <fo:instream-foreign-object fox:alt-text="Image Front" fox:placement="Block">
16798
16838
  <xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
16799
16839
  <xsl:call-template name="getSVG"/>
16800
16840
  </fo:instream-foreign-object>
16801
16841
  </xsl:when>
16802
16842
  <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
16803
- <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
16843
+ <fo:external-graphic src="{@src}" fox:alt-text="Image Front" fox:placement="Block"/>
16804
16844
  </xsl:when>
16805
16845
  <xsl:otherwise> <!-- bitmap image -->
16806
16846
  <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
@@ -16810,7 +16850,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
16810
16850
  <xsl:with-param name="src" select="$coverimage_src"/>
16811
16851
  </xsl:call-template>
16812
16852
  </xsl:variable>
16813
- <fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
16853
+ <fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front" fox:placement="Block"/>
16814
16854
  </xsl:if>
16815
16855
  </xsl:otherwise>
16816
16856
  </xsl:choose>
@@ -170,8 +170,14 @@ module IsoDoc
170
170
  @i18n = @i18n_lg[lg] if lg && @i18n_lg[lg]
171
171
  p, ref, orig = related1_prep(node)
172
172
  label = @i18n.relatedterms[orig["type"]].upcase
173
- node.children = (l10n("<p>#{label}: " \
174
- "#{to_xml(p)} (#{Common::to_xml(ref)})</p>"))
173
+ err = node.at(ns("./errormsg"))
174
+ ret = if err
175
+ # generator-emitted term-resolution failure reports
176
+ # (metanorma-model-iso#144) render in boldface
177
+ "<strong>#{to_xml(err.children)}</strong>"
178
+ else "#{to_xml(p)} (#{Common::to_xml(ref)})"
179
+ end
180
+ node.children = (l10n("<p>#{label}: #{ret}</p>"))
175
181
  @i18n = @i18n_lg["default"]
176
182
  end
177
183