metanorma-ogc 2.9.11 → 2.10.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: 33728dc4126d8356b1bf0c002821f3a55bb9898d9285c67666895a524c9e8409
4
- data.tar.gz: 700e119692d754bebed198ce44cfa168369cefbf31ae2f31c419609cb9ed26e9
3
+ metadata.gz: 8d20eed6d34c5097a728d8bc2cb6626647a2acda2e634dc71db1689d6f0a0c7b
4
+ data.tar.gz: ed547a419ccb6f861506067f1eb37077448618359a923113bdf9c461e320d622
5
5
  SHA512:
6
- metadata.gz: c5799dd3358c104db6602d5a35669edd242504074eec37c92767f12a5f852898fbd0160f2b98c0337890430ca28eeadd83875677cab4143a753097036771d271
7
- data.tar.gz: '038704ee24505a7832eaa2d6707dc0c0d3018324ee438a8aebdab3282962522fa2c3e4d6e94eb2f37f55c393fc63ab23b1534be77d65a7e297eda37c578371af'
6
+ metadata.gz: eebdc442874c0d44b738d6184aa501824ffe081b1975abfdd73c10baa54ad793ce5d214f73c3270ebe2cadb2f00b7274de70930dfa39b8c90156787a0b5333a7
7
+ data.tar.gz: 0ed5ec31ae3d4157a1f890545aa8bb4ab6cf17e894ee0307200526eb4f001aaeea5aa623de71de339374c268139db076f774f4bf37582430f1af071615c1b52e
@@ -471,7 +471,7 @@
471
471
  <!-- crossing lines -->
472
472
  <fo:block-container absolute-position="fixed" width="{$pageWidth}mm" height="{$pageHeight}mm" font-size="0">
473
473
  <fo:block>
474
- <fo:instream-foreign-object content-height="{$pageHeight}mm" content-width="{$pageWidth}mm" fox:alt-text="Crossing lines">
474
+ <fo:instream-foreign-object content-height="{$pageHeight}mm" content-width="{$pageWidth}mm" fox:alt-text="Crossing lines" fox:placement="Block">
475
475
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}mm" height="{$pageHeight}mm">
476
476
  <line x1="230" y1="0" x2="2159" y2="490" stroke="{$color_design_light}"/>
477
477
  <line x1="0" y1="395" x2="820" y2="0" stroke="{$color_design_light}"/>
@@ -528,7 +528,7 @@
528
528
  <!-- crossing lines -->
529
529
  <fo:block-container absolute-position="fixed" width="{$pageWidth}mm" height="{$pageHeight}mm" font-size="0">
530
530
  <fo:block>
531
- <fo:instream-foreign-object content-height="{$pageHeight}mm" content-width="{$pageWidth}mm" fox:alt-text="Crossing lines">
531
+ <fo:instream-foreign-object content-height="{$pageHeight}mm" content-width="{$pageWidth}mm" fox:alt-text="Crossing lines" fox:placement="Block">
532
532
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}mm" height="{$pageHeight}mm">
533
533
  <line x1="0" y1="545" x2="2084" y2="0" stroke="{$color_design_light}"/>
534
534
  <line x1="0" y1="1374" x2="355" y2="0" stroke="{$color_design_light}"/>
@@ -658,7 +658,7 @@
658
658
  <!-- background image -->
659
659
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
660
660
  <fo:block>
661
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
661
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front" fox:placement="Block"/>
662
662
  </fo:block>
663
663
  </fo:block-container>
664
664
 
@@ -1861,7 +1861,7 @@
1861
1861
  <xsl:for-each select="$logo/mn:image"><!-- set context -->
1862
1862
  <xsl:choose>
1863
1863
  <xsl:when test="@mimetype = 'image/svg+xml'">
1864
- <fo:instream-foreign-object content-width="39mm" fox:alt-text="Image Logo">
1864
+ <fo:instream-foreign-object content-width="39mm" fox:alt-text="Image Logo" fox:placement="Block">
1865
1865
  <xsl:call-template name="getSVG"/>
1866
1866
  </fo:instream-foreign-object>
1867
1867
  </xsl:when>
@@ -1871,7 +1871,7 @@
1871
1871
  <xsl:with-param name="src" select="@src"/>
1872
1872
  </xsl:call-template>
1873
1873
  </xsl:variable>
1874
- <fo:external-graphic src="{$logo_url}" width="39mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo"/>
1874
+ <fo:external-graphic src="{$logo_url}" width="39mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo" fox:placement="Block"/>
1875
1875
  </xsl:otherwise>
1876
1876
  </xsl:choose>
1877
1877
  </xsl:for-each>
@@ -1886,7 +1886,7 @@
1886
1886
  <xsl:choose>
1887
1887
  <xsl:when test="@mimetype = 'image/svg+xml'">
1888
1888
  <fo:block text-align="right" margin-right="-1mm" margin-top="-1mm" margin-bottom="6mm">
1889
- <fo:instream-foreign-object content-width="29mm" fox:alt-text="Image Logo">
1889
+ <fo:instream-foreign-object content-width="29mm" fox:alt-text="Image Logo" fox:placement="Block">
1890
1890
  <xsl:call-template name="getSVG"/>
1891
1891
  </fo:instream-foreign-object>
1892
1892
  </fo:block>
@@ -1898,7 +1898,7 @@
1898
1898
  </xsl:call-template>
1899
1899
  </xsl:variable>
1900
1900
  <fo:block text-align="right" margin-right="-1mm" margin-top="-1mm" margin-bottom="1mm">
1901
- <fo:external-graphic src="{$logo_url}" width="29mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo"/>
1901
+ <fo:external-graphic src="{$logo_url}" width="29mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo" fox:placement="Block"/>
1902
1902
  </fo:block>
1903
1903
  </xsl:otherwise>
1904
1904
  </xsl:choose>
@@ -1947,7 +1947,7 @@
1947
1947
 
1948
1948
  <!-- orange circle 14mm -->
1949
1949
  <fo:block>
1950
- <fo:instream-foreign-object content-height="14mm" content-width="14mm" fox:alt-text="Circle">
1950
+ <fo:instream-foreign-object content-height="14mm" content-width="14mm" fox:alt-text="Circle" fox:placement="Block">
1951
1951
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" viewBox="0 0 500 500">
1952
1952
  <g id="UrTavla">
1953
1953
  <circle style="fill:{$color_design};" cx="250" cy="250" r="250">
@@ -1968,7 +1968,7 @@
1968
1968
  <xsl:variable name="color_background_page">
1969
1969
  <xsl:call-template name="getVariable"><xsl:with-param name="variable">color_background_page</xsl:with-param></xsl:call-template>
1970
1970
  </xsl:variable>
1971
- <fo:instream-foreign-object content-height="{$pageHeight}mm" fox:alt-text="Background color">
1971
+ <fo:instream-foreign-object content-height="{$pageHeight}mm" fox:alt-text="Background color" fox:placement="Block">
1972
1972
  <svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="{$pageWidth}mm" height="{$pageHeight}mm">
1973
1973
  <rect width="{$pageWidth}mm" height="{$pageHeight}mm" style="fill:{$color_background_page};stroke-width:0;fill-opacity:{$opacity}"/>
1974
1974
  </svg>
@@ -1983,7 +1983,7 @@
1983
1983
  </xsl:variable>
1984
1984
  <fo:block-container absolute-position="fixed" width="{$pageWidth}mm" height="{$pageHeight}mm" font-size="0">
1985
1985
  <fo:block>
1986
- <fo:instream-foreign-object content-height="{$pageHeight}mm" content-width="{$pageWidth}mm" fox:alt-text="Crossing lines">
1986
+ <fo:instream-foreign-object content-height="{$pageHeight}mm" content-width="{$pageWidth}mm" fox:alt-text="Crossing lines" fox:placement="Block">
1987
1987
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}mm" height="{$pageHeight}mm">
1988
1988
  <line x1="0" y1="300" x2="2159" y2="675" stroke="{$color_design}"/>
1989
1989
  <line x1="1215" y1="0" x2="2159" y2="1380" stroke="{$color_design}"/>
@@ -3155,7 +3155,7 @@
3155
3155
  </xsl:element>
3156
3156
  </xsl:template> -->
3157
3157
 
3158
- <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">
3158
+ <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">
3159
3159
  <xsl:apply-templates mode="update_xml_step1"/>
3160
3160
  </xsl:template>
3161
3161
 
@@ -4238,6 +4238,9 @@
4238
4238
  <xsl:if test="parent::mn:example">
4239
4239
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
4240
4240
  </xsl:if>
4241
+ <xsl:if test="ancestor::mn:sourcecode and parent::mn:td">
4242
+ <xsl:attribute name="role">SKIP</xsl:attribute>
4243
+ </xsl:if>
4241
4244
  </xsl:template> <!-- refine_sourcecode-style -->
4242
4245
 
4243
4246
  <xsl:attribute-set name="sourcecode-number-style">
@@ -4574,30 +4577,30 @@
4574
4577
  </xsl:template>
4575
4578
 
4576
4579
  <!-- outer table with line numbers for sourcecode -->
4577
- <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
4578
- <fo:block>
4579
- <fo:table width="100%" table-layout="fixed">
4580
+ <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode'] | -->
4581
+ <fo:block role="SKIP">
4582
+ <fo:table width="100%" table-layout="fixed" role="SKIP">
4580
4583
  <xsl:copy-of select="@id"/>
4581
4584
  <fo:table-column column-width="8%"/>
4582
4585
  <fo:table-column column-width="92%"/>
4583
- <fo:table-body>
4586
+ <fo:table-body role="SKIP">
4584
4587
  <xsl:apply-templates/>
4585
4588
  </fo:table-body>
4586
4589
  </fo:table>
4587
4590
  </fo:block>
4588
4591
  </xsl:template>
4589
- <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table/mn:tbody" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
4592
+ <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table/mn:tbody" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] | -->
4590
4593
  <xsl:apply-templates/>
4591
4594
  </xsl:template>
4592
- <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
4593
- <fo:table-row>
4595
+ <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] | -->
4596
+ <fo:table-row role="SKIP">
4594
4597
  <xsl:apply-templates/>
4595
4598
  </fo:table-row>
4596
4599
  </xsl:template>
4597
4600
  <!-- first td with line numbers -->
4598
- <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][not(preceding-sibling::*)]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
4599
- <fo:table-cell>
4600
- <fo:block>
4601
+ <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][not(preceding-sibling::*)]" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
4602
+ <fo:table-cell role="SKIP">
4603
+ <fo:block role="SKIP">
4601
4604
 
4602
4605
  <!-- set attibutes for line numbers - same as sourcecode -->
4603
4606
  <xsl:variable name="sourcecode_attributes">
@@ -4605,7 +4608,7 @@
4605
4608
  <xsl:call-template name="get_sourcecode_attributes"/>
4606
4609
  </xsl:for-each>
4607
4610
  </xsl:variable>
4608
- <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*[not(starts-with(local-name(), 'margin-') or starts-with(local-name(), 'space-'))]">
4611
+ <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'))]">
4609
4612
  <xsl:attribute name="{name()}">
4610
4613
  <xsl:value-of select="."/>
4611
4614
  </xsl:attribute>
@@ -4617,8 +4620,8 @@
4617
4620
  </xsl:template>
4618
4621
 
4619
4622
  <!-- second td with sourcecode -->
4620
- <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][preceding-sibling::*]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
4621
- <fo:table-cell>
4623
+ <xsl:template match="mn:sourcecode[@linenums = 'true']/mn:table//mn:tr/*[local-name() = 'td'][preceding-sibling::*]" priority="3"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
4624
+ <fo:table-cell role="SKIP">
4622
4625
  <fo:block role="SKIP">
4623
4626
  <xsl:apply-templates/>
4624
4627
  </fo:block>
@@ -5195,7 +5198,7 @@
5195
5198
  <xsl:param name="value"/>
5196
5199
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
5197
5200
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
5198
- <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-10%"><!-- alignment-baseline="middle" -->
5201
+ <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-10%" fox:placement="Inline"><!-- alignment-baseline="middle" -->
5199
5202
  <xsl:attribute name="height">3.5mm</xsl:attribute> <!-- 5mm -->
5200
5203
  <xsl:attribute name="content-width">100%</xsl:attribute>
5201
5204
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -5424,11 +5427,12 @@
5424
5427
  <xsl:choose>
5425
5428
 
5426
5429
  <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' -->
5430
+ <xsl:attribute name="role">SKIP</xsl:attribute>
5427
5431
  <xsl:if test="ancestor::mn:tr[1]/following-sibling::mn:tr"> <!-- is current tr isn't last -->
5428
5432
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
5429
5433
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
5430
5434
  </xsl:if>
5431
- <fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
5435
+ <fo:instream-foreign-object fox:alt-text="{.}" content-width="95%" fox:placement="Inline" role="artifact">
5432
5436
  <math xmlns="http://www.w3.org/1998/Math/MathML">
5433
5437
  <mtext><xsl:value-of select="."/></mtext>
5434
5438
  </math>
@@ -7058,19 +7062,22 @@
7058
7062
  <xsl:if test="normalize-space() != ''">
7059
7063
 
7060
7064
  <fo:block xsl:use-attribute-sets="table-name-style">
7061
-
7062
7065
  <xsl:call-template name="refine_table-name-style">
7063
7066
  <xsl:with-param name="continued" select="$continued"/>
7064
7067
  </xsl:call-template>
7065
7068
 
7066
- <xsl:choose>
7067
- <xsl:when test="$continued = 'true'">
7068
- </xsl:when>
7069
- <xsl:otherwise>
7070
- <xsl:apply-templates/>
7071
- </xsl:otherwise>
7072
- </xsl:choose>
7069
+ <!-- <Caption><P> tags, see https://github.com/metanorma/metanorma-pdfa/issues/81 -->
7070
+ <fo:block role="P">
7073
7071
 
7072
+ <xsl:choose>
7073
+ <xsl:when test="$continued = 'true'">
7074
+ </xsl:when>
7075
+ <xsl:otherwise>
7076
+ <xsl:apply-templates/>
7077
+ </xsl:otherwise>
7078
+ </xsl:choose>
7079
+
7080
+ </fo:block>
7074
7081
  </fo:block>
7075
7082
 
7076
7083
  <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
@@ -7554,7 +7561,7 @@
7554
7561
 
7555
7562
  <xsl:variable name="tableWithNotesAndFootnotes">
7556
7563
 
7557
- <fo:table keep-with-previous="always" role="SKIP">
7564
+ <fo:table keep-with-previous="always" role="TFoot">
7558
7565
  <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
7559
7566
  <xsl:variable name="name" select="local-name()"/>
7560
7567
  <xsl:choose>
@@ -7592,14 +7599,14 @@
7592
7599
  </xsl:choose>
7593
7600
 
7594
7601
  <fo:table-body role="SKIP">
7595
- <fo:table-row role="SKIP">
7602
+ <fo:table-row>
7596
7603
  <xsl:for-each select="ancestor::mn:table[1]">
7597
7604
  <xsl:call-template name="setTableStyles">
7598
7605
  <xsl:with-param name="scope">ancestor_table</xsl:with-param>
7599
7606
  </xsl:call-template>
7600
7607
  </xsl:for-each>
7601
7608
 
7602
- <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
7609
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
7603
7610
 
7604
7611
  <xsl:call-template name="refine_table-footer-cell-style"/>
7605
7612
 
@@ -9933,6 +9940,13 @@
9933
9940
  </xsl:if>
9934
9941
  </xsl:template> <!-- refine_note-style -->
9935
9942
 
9943
+ <xsl:attribute-set name="note-block-style">
9944
+ <xsl:attribute name="role">SKIP</xsl:attribute>
9945
+ </xsl:attribute-set> <!-- note-block-style -->
9946
+
9947
+ <xsl:template name="refine_note-block-style">
9948
+ </xsl:template> <!-- refine_note-block-style -->
9949
+
9936
9950
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
9937
9951
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
9938
9952
 
@@ -10009,9 +10023,9 @@
10009
10023
  <xsl:call-template name="refine_note-style"/>
10010
10024
 
10011
10025
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10012
- <fo:block role="SKIP">
10026
+ <fo:block xsl:use-attribute-sets="note-block-style">
10013
10027
 
10014
- <xsl:call-template name="refine_note_block_style"/>
10028
+ <xsl:call-template name="refine_note-block-style"/>
10015
10029
 
10016
10030
  <fo:inline xsl:use-attribute-sets="note-name-style">
10017
10031
 
@@ -10050,9 +10064,6 @@
10050
10064
  </fo:block-container>
10051
10065
  </xsl:template>
10052
10066
 
10053
- <xsl:template name="refine_note_block_style">
10054
- </xsl:template> <!-- refine_note_block_style -->
10055
-
10056
10067
  <xsl:template match="mn:note/mn:p">
10057
10068
  <xsl:variable name="num"><xsl:number/></xsl:variable>
10058
10069
  <xsl:choose>
@@ -10173,9 +10184,9 @@
10173
10184
  <!-- ====== -->
10174
10185
 
10175
10186
  <xsl:attribute-set name="quote-container-style">
10187
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
10176
10188
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
10177
10189
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
10178
- <xsl:attribute name="role">SKIP</xsl:attribute>
10179
10190
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
10180
10191
  <xsl:attribute name="margin-left">13mm</xsl:attribute>
10181
10192
  </xsl:attribute-set>
@@ -10199,6 +10210,7 @@
10199
10210
  </xsl:template> <!-- refine_quote-style -->
10200
10211
 
10201
10212
  <xsl:attribute-set name="quote-source-style">
10213
+ <xsl:attribute name="role">Caption</xsl:attribute>
10202
10214
  <xsl:attribute name="text-align">right</xsl:attribute>
10203
10215
  <xsl:attribute name="margin-right">-12mm</xsl:attribute>
10204
10216
  <xsl:attribute name="margin-right">13mm</xsl:attribute>
@@ -10232,7 +10244,7 @@
10232
10244
  <xsl:call-template name="refine_quote-style"/>
10233
10245
 
10234
10246
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10235
- <fo:block role="BlockQuote">
10247
+ <fo:block role="SKIP"> <!-- BlockQuote -->
10236
10248
  <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 -->
10237
10249
  </fo:block>
10238
10250
  </fo:block-container>
@@ -10241,11 +10253,15 @@
10241
10253
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10242
10254
  <fo:block xsl:use-attribute-sets="quote-source-style">
10243
10255
  <xsl:call-template name="refine_quote-source-style"/>
10244
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
10245
- <xsl:apply-templates select="mn:author"/>
10246
- <xsl:apply-templates select="mn:fmt-source"/>
10247
- <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
10248
- <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
10256
+
10257
+ <!-- <Caption><P> tags, see https://github.com/metanorma/metanorma-pdfa/issues/81 -->
10258
+ <fo:block role="P">
10259
+ <!-- ISO, ISO 7301:2011, Clause 1 -->
10260
+ <xsl:apply-templates select="mn:author"/>
10261
+ <xsl:apply-templates select="mn:fmt-source"/>
10262
+ <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
10263
+ <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
10264
+ </fo:block>
10249
10265
  </fo:block>
10250
10266
  </fo:block-container>
10251
10267
  </xsl:if>
@@ -10718,7 +10734,7 @@
10718
10734
 
10719
10735
  <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
10720
10736
 
10721
- <fo:external-graphic src="{$src}" vertical-align="middle">
10737
+ <fo:external-graphic src="{$src}" vertical-align="middle" fox:placement="Inline">
10722
10738
  <xsl:call-template name="addAltText"/>
10723
10739
 
10724
10740
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
@@ -10783,7 +10799,7 @@
10783
10799
  <xsl:choose>
10784
10800
  <xsl:when test="$isDeleted = 'true'">
10785
10801
  <!-- enclose in svg -->
10786
- <fo:instream-foreign-object>
10802
+ <fo:instream-foreign-object fox:placement="Block">
10787
10803
  <xsl:attribute name="width">100%</xsl:attribute>
10788
10804
  <xsl:attribute name="content-height">100%</xsl:attribute>
10789
10805
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -10804,7 +10820,7 @@
10804
10820
  <xsl:value-of select="concat('scale=', $scale,', indent=', $indent)"/>
10805
10821
  </fo:block> -->
10806
10822
 
10807
- <fo:external-graphic src="{$src}">
10823
+ <fo:external-graphic src="{$src}" fox:placement="Block">
10808
10824
  <xsl:call-template name="addAltText"/>
10809
10825
 
10810
10826
  <xsl:choose>
@@ -11143,7 +11159,7 @@
11143
11159
  </xsl:if>
11144
11160
  <fo:block text-depth="0" line-height="0" font-size="0">
11145
11161
 
11146
- <fo:instream-foreign-object fox:alt-text="{$alt-text}">
11162
+ <fo:instream-foreign-object fox:alt-text="{$alt-text}" fox:placement="Block">
11147
11163
  <xsl:attribute name="width">100%</xsl:attribute>
11148
11164
  <xsl:attribute name="content-height">100%</xsl:attribute>
11149
11165
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -11192,7 +11208,7 @@
11192
11208
  <xsl:copy>
11193
11209
  <xsl:copy-of select="@*"/>
11194
11210
  <!-- <fo:block xsl:use-attribute-sets="image-style"> -->
11195
- <fo:instream-foreign-object fox:alt-text="{$alt-text}">
11211
+ <fo:instream-foreign-object fox:alt-text="{$alt-text}" fox:placement="Block">
11196
11212
 
11197
11213
  <xsl:choose>
11198
11214
  <xsl:when test="$image_class = 'corrigenda-tag'">
@@ -11257,6 +11273,10 @@
11257
11273
  <xsl:attribute name="content-height"><xsl:value-of select="round($scale_x * $scale_y * 100)"/>%</xsl:attribute>
11258
11274
  </xsl:if>
11259
11275
 
11276
+ <xsl:if test="self::fo:inline">
11277
+ <xsl:attribute name="fox:placement">Inline</xsl:attribute>
11278
+ </xsl:if>
11279
+
11260
11280
  <xsl:copy-of select="$svg_content"/>
11261
11281
 
11262
11282
  <!-- <debug>
@@ -11532,10 +11552,12 @@
11532
11552
  <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
11533
11553
  <xsl:if test="normalize-space() != ''">
11534
11554
  <fo:block xsl:use-attribute-sets="figure-name-style">
11535
-
11536
11555
  <xsl:call-template name="refine_figure-name-style"/>
11537
11556
 
11538
- <xsl:apply-templates/>
11557
+ <!-- <Caption><P> tags, see https://github.com/metanorma/metanorma-pdfa/issues/81 -->
11558
+ <fo:block role="P">
11559
+ <xsl:apply-templates/>
11560
+ </fo:block>
11539
11561
  </fo:block>
11540
11562
  </xsl:if>
11541
11563
  </xsl:template>
@@ -11557,6 +11579,7 @@
11557
11579
 
11558
11580
  <!-- Formula's styles -->
11559
11581
  <xsl:attribute-set name="formula-style">
11582
+ <xsl:attribute name="role">P</xsl:attribute>
11560
11583
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
11561
11584
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11562
11585
  </xsl:attribute-set> <!-- formula-style -->
@@ -11565,6 +11588,7 @@
11565
11588
  </xsl:template>
11566
11589
 
11567
11590
  <xsl:attribute-set name="formula-stem-block-style">
11591
+ <xsl:attribute name="role">SKIP</xsl:attribute>
11568
11592
  <xsl:attribute name="text-align">center</xsl:attribute>
11569
11593
  <xsl:attribute name="text-align">left</xsl:attribute>
11570
11594
  </xsl:attribute-set> <!-- formula-stem-block-style -->
@@ -11573,6 +11597,7 @@
11573
11597
  </xsl:template> <!-- refine_formula-stem-block-style -->
11574
11598
 
11575
11599
  <xsl:attribute-set name="formula-stem-number-style">
11600
+ <xsl:attribute name="role">Span</xsl:attribute>
11576
11601
  <xsl:attribute name="text-align">right</xsl:attribute>
11577
11602
  </xsl:attribute-set> <!-- formula-stem-number-style -->
11578
11603
  <!-- End Formula's styles -->
@@ -11581,12 +11606,25 @@
11581
11606
  </xsl:template>
11582
11607
 
11583
11608
  <xsl:attribute-set name="mathml-style">
11609
+ <xsl:attribute name="role">Formula</xsl:attribute>
11584
11610
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
11585
11611
  </xsl:attribute-set>
11586
11612
 
11587
11613
  <xsl:template name="refine_mathml-style">
11588
11614
  </xsl:template>
11589
11615
 
11616
+ <xsl:attribute-set name="mathml-instream-foreign-object-style">
11617
+ <xsl:attribute name="fox:alt-text">Math</xsl:attribute>
11618
+ <xsl:attribute name="fox:actual-text">Math</xsl:attribute>
11619
+ <xsl:attribute name="fox:placement">Inline</xsl:attribute>
11620
+ </xsl:attribute-set> <!-- mathml-instream-foreign-object-style -->
11621
+
11622
+ <xsl:template name="refine_mathml-instream-foreign-object-style">
11623
+ <xsl:if test="ancestor::mn:formula">
11624
+ <xsl:attribute name="fox:placement">Block</xsl:attribute>
11625
+ </xsl:if>
11626
+ </xsl:template> <!-- refine_mathml-instream-foreign-object-style -->
11627
+
11590
11628
  <!-- ====== -->
11591
11629
  <!-- formula -->
11592
11630
  <!-- ====== -->
@@ -11602,7 +11640,7 @@
11602
11640
  </xsl:if>
11603
11641
  <fo:block-container margin-left="0mm" role="SKIP">
11604
11642
  <xsl:call-template name="setNamedDestination"/>
11605
- <fo:block id="{@id}">
11643
+ <fo:block id="{@id}" role="SKIP">
11606
11644
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
11607
11645
  </fo:block>
11608
11646
  </fo:block-container>
@@ -11635,22 +11673,22 @@
11635
11673
 
11636
11674
  <xsl:call-template name="refine_formula-style"/>
11637
11675
 
11638
- <fo:table table-layout="fixed" width="100%">
11676
+ <fo:table table-layout="fixed" width="100%" role="SKIP">
11639
11677
  <fo:table-column column-width="95%"/>
11640
11678
  <fo:table-column column-width="5%"/>
11641
- <fo:table-body>
11642
- <fo:table-row>
11643
- <fo:table-cell display-align="center">
11644
- <fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
11679
+ <fo:table-body role="SKIP">
11680
+ <fo:table-row role="SKIP">
11681
+ <fo:table-cell display-align="center" role="SKIP">
11682
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style">
11645
11683
 
11646
11684
  <xsl:call-template name="refine_formula-stem-block-style"/>
11647
11685
 
11648
11686
  <xsl:apply-templates/>
11649
11687
  </fo:block>
11650
11688
  </fo:table-cell>
11651
- <fo:table-cell display-align="center">
11689
+ <fo:table-cell display-align="center" role="SKIP">
11652
11690
 
11653
- <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
11691
+ <fo:block xsl:use-attribute-sets="formula-stem-number-style">
11654
11692
 
11655
11693
  <xsl:for-each select="../mn:fmt-name">
11656
11694
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -11798,9 +11836,9 @@
11798
11836
  <xsl:apply-templates select="." mode="mathml"/>
11799
11837
  </xsl:variable>
11800
11838
 
11801
- <fo:instream-foreign-object fox:alt-text="Math" fox:actual-text="Math">
11839
+ <fo:instream-foreign-object xsl:use-attribute-sets="mathml-instream-foreign-object-style">
11802
11840
 
11803
- <xsl:call-template name="refine_mathml_insteam_object_style"/>
11841
+ <xsl:call-template name="refine_mathml-instream-foreign-object-style"/>
11804
11842
 
11805
11843
  <xsl:if test="$isGenerateTableIF = 'false'">
11806
11844
  <!-- put MathML in Actual Text -->
@@ -11824,9 +11862,6 @@
11824
11862
  </fo:instream-foreign-object>
11825
11863
  </xsl:template>
11826
11864
 
11827
- <xsl:template name="refine_mathml_insteam_object_style">
11828
- </xsl:template> <!-- refine_mathml_insteam_object_style -->
11829
-
11830
11865
  <xsl:template match="mathml:*" mode="mathml_actual_text">
11831
11866
  <!-- <xsl:text>a+b</xsl:text> -->
11832
11867
  <xsl:text>&lt;</xsl:text>
@@ -12999,8 +13034,10 @@
12999
13034
 
13000
13035
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
13001
13036
 
13037
+ <!-- commented 2026-08-06: from https://github.com/metanorma/metanorma-standoc/issues/1140:
13038
+ 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. -->
13002
13039
  <!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
13003
- <xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
13040
+ <!-- <xsl:template match="mn:references/mn:note" priority="2"/>--> <!-- [not(@normative='true')] -->
13004
13041
 
13005
13042
  <xsl:template name="insertListItem_Bibitem">
13006
13043
  <xsl:choose>
@@ -13678,7 +13715,7 @@
13678
13715
  <xsl:call-template name="set_id_metanorma_form_item">
13679
13716
  <xsl:with-param name="form_item_type" select="$form_item_type"/>
13680
13717
  </xsl:call-template>
13681
- <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
13718
+ <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%" fox:placement="Inline">
13682
13719
  <xsl:attribute name="height">3.5mm</xsl:attribute>
13683
13720
  <xsl:attribute name="content-width">100%</xsl:attribute>
13684
13721
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -13705,7 +13742,7 @@
13705
13742
  <xsl:call-template name="set_id_metanorma_form_item">
13706
13743
  <xsl:with-param name="form_item_type" select="$form_item_type"/>
13707
13744
  </xsl:call-template>
13708
- <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
13745
+ <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%" fox:placement="Inline">
13709
13746
  <xsl:attribute name="height">3.5mm</xsl:attribute>
13710
13747
  <xsl:attribute name="content-width">100%</xsl:attribute>
13711
13748
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -13983,7 +14020,9 @@
13983
14020
  </xsl:variable>
13984
14021
  <mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
13985
14022
  <xsl:element name="fmt-name" namespace="{$namespace_full}">
13986
- <xsl:value-of select="mn:fmt-xref-label[@container]"/>
14023
+ <xsl:call-template name="capitalize"><!-- https://github.com/metanorma/metanorma-pdfa/issues/72 -->
14024
+ <xsl:with-param name="str" select="mn:fmt-xref-label[@container]"/>
14025
+ </xsl:call-template>
13987
14026
  <xsl:if test="normalize-space($example_name) != ''">
13988
14027
  <xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
13989
14028
  <xsl:copy-of select="$example_name"/>
@@ -15711,7 +15750,8 @@
15711
15750
  <xsl:template match="//mn:metanorma/mn:preface/*" priority="2" name="preface_node"> <!-- /*/mn:preface/* -->
15712
15751
  <fo:block break-after="page"/>
15713
15752
  <xsl:call-template name="setNamedDestination"/>
15714
- <fo:block>
15753
+ <fo:block role="Sect">
15754
+ <xsl:call-template name="addTagElementT"/>
15715
15755
  <xsl:call-template name="setId"/>
15716
15756
  <xsl:call-template name="addReviewHelper"/>
15717
15757
  <xsl:apply-templates/>
@@ -15800,7 +15840,7 @@
15800
15840
 
15801
15841
  <xsl:template match="mn:blacksquare" name="blacksquare">
15802
15842
  <fo:inline padding-right="2.5mm" baseline-shift="5%">
15803
- <fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
15843
+ <fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad" fox:placement="Inline">
15804
15844
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
15805
15845
  <rect x="0" y="0" width="2" height="2" fill="black"/>
15806
15846
  </svg>
@@ -16756,13 +16796,13 @@
16756
16796
  <xsl:param name="bitmap_width" select="$pageWidth"/>
16757
16797
  <xsl:choose>
16758
16798
  <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
16759
- <fo:instream-foreign-object fox:alt-text="Image Front">
16799
+ <fo:instream-foreign-object fox:alt-text="Image Front" fox:placement="Block">
16760
16800
  <xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
16761
16801
  <xsl:call-template name="getSVG"/>
16762
16802
  </fo:instream-foreign-object>
16763
16803
  </xsl:when>
16764
16804
  <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
16765
- <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
16805
+ <fo:external-graphic src="{@src}" fox:alt-text="Image Front" fox:placement="Block"/>
16766
16806
  </xsl:when>
16767
16807
  <xsl:otherwise> <!-- bitmap image -->
16768
16808
  <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
@@ -16772,7 +16812,7 @@
16772
16812
  <xsl:with-param name="src" select="$coverimage_src"/>
16773
16813
  </xsl:call-template>
16774
16814
  </xsl:variable>
16775
- <fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
16815
+ <fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front" fox:placement="Block"/>
16776
16816
  </xsl:if>
16777
16817
  </xsl:otherwise>
16778
16818
  </xsl:choose>