metanorma-ogc 2.4.0 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d4cd8698433670cb8dcbc3401345b4db09b559215d80264d5f87268b845051d
4
- data.tar.gz: '09a1f9c9bb600fb387481388aaf366c70362bc64628056c71d827c5cf583b8cf'
3
+ metadata.gz: c36eb2eb19714efe36a2bddd955d89702cbabb9a3206b636f39d89cdddb9b196
4
+ data.tar.gz: 5fa6aaadc06ada3a8f856b33cdd95b8fc3407df9c25f7b43f30d6cac045ab565
5
5
  SHA512:
6
- metadata.gz: 7fc662db0f4187b8a889d742fc5218dfb5632258cb120249f308752d2fa623e6ad629cacaae52e43321ddeebb8253aa2f1ee0f8818b609dcb064f4e54a76a326
7
- data.tar.gz: 4ba019984a2ca6514c0a75eba2f2f8bd52b21dd19af9e5af7172f9654ae787e74804566b8c914dc87472d796e5b06bc1bef205811365581e24ff299edb438099
6
+ metadata.gz: c45ff6fe107ed9e9e34b63925a01c4244943e261224d969412183a81baa0ee67fe3ca5ed870ef1cf485cb6c6e9be747e90307c46d3207ae6341e7388db43c4d9
7
+ data.tar.gz: 0fbc5ca07fda92e07ed344beb8aa9d359eccfad72b0ba4514af0880a43db1dc3c74909551592c561ba55ec0d82c9ae68ce8568dc594f187f875549f7d10095ee
@@ -1822,11 +1822,26 @@
1822
1822
  <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
1823
1823
  </xsl:if>
1824
1824
 
1825
- <xsl:value-of select="."/>
1825
+ <xsl:variable name="font_family" select="."/>
1826
1826
 
1827
- <xsl:if test="$additional_fonts != ''">
1828
- <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1829
- </xsl:if>
1827
+ <xsl:choose>
1828
+ <xsl:when test="$additional_fonts = ''">
1829
+ <xsl:value-of select="$font_family"/>
1830
+ </xsl:when>
1831
+ <xsl:otherwise> <!-- $additional_fonts != '' -->
1832
+ <xsl:choose>
1833
+ <xsl:when test="contains($font_family, ',')">
1834
+ <xsl:value-of select="substring-before($font_family, ',')"/>
1835
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1836
+ <xsl:text>, </xsl:text><xsl:value-of select="substring-after($font_family, ',')"/>
1837
+ </xsl:when>
1838
+ <xsl:otherwise>
1839
+ <xsl:value-of select="$font_family"/>
1840
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1841
+ </xsl:otherwise>
1842
+ </xsl:choose>
1843
+ </xsl:otherwise>
1844
+ </xsl:choose>
1830
1845
  </xsl:attribute>
1831
1846
  </xsl:when>
1832
1847
  <xsl:otherwise>
@@ -4480,21 +4495,21 @@
4480
4495
 
4481
4496
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
4482
4497
 
4483
- <fo:block xsl:use-attribute-sets="table-note-style">
4498
+ <fo:block xsl:use-attribute-sets="table-note-style">
4484
4499
 
4485
- <xsl:call-template name="refine_table-note-style"/>
4500
+ <xsl:call-template name="refine_table-note-style"/>
4486
4501
 
4487
- <!-- Table's note/example name (NOTE, for example) -->
4488
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
4502
+ <!-- Table's note/example name (NOTE, for example) -->
4503
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
4489
4504
 
4490
- <xsl:call-template name="refine_table-note-name-style"/>
4505
+ <xsl:call-template name="refine_table-note-name-style"/>
4491
4506
 
4492
- <xsl:apply-templates select="*[local-name() = 'name']"/>
4507
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4493
4508
 
4494
- </fo:inline>
4509
+ </fo:inline>
4495
4510
 
4496
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4497
- </fo:block>
4511
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4512
+ </fo:block>
4498
4513
 
4499
4514
  </xsl:template> <!-- table/note -->
4500
4515
 
@@ -7637,8 +7652,12 @@
7637
7652
  <xsl:variable name="isAdded" select="../@added"/>
7638
7653
  <xsl:variable name="isDeleted" select="../@deleted"/>
7639
7654
  <xsl:choose>
7640
- <xsl:when test="ancestor::*[local-name() = 'title']">
7655
+ <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7641
7656
  <fo:inline padding-left="1mm" padding-right="1mm">
7657
+ <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7658
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
7659
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
7660
+ </xsl:if>
7642
7661
  <xsl:variable name="src">
7643
7662
  <xsl:call-template name="image_src"/>
7644
7663
  </xsl:variable>
@@ -7671,7 +7690,7 @@
7671
7690
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
7672
7691
  <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
7673
7692
 
7674
- <xsl:if test="@width != '' and @width != 'auto'">
7693
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
7675
7694
  <xsl:attribute name="width">
7676
7695
  <xsl:value-of select="@width"/>
7677
7696
  </xsl:attribute>
@@ -1822,11 +1822,26 @@
1822
1822
  <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
1823
1823
  </xsl:if>
1824
1824
 
1825
- <xsl:value-of select="."/>
1825
+ <xsl:variable name="font_family" select="."/>
1826
1826
 
1827
- <xsl:if test="$additional_fonts != ''">
1828
- <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1829
- </xsl:if>
1827
+ <xsl:choose>
1828
+ <xsl:when test="$additional_fonts = ''">
1829
+ <xsl:value-of select="$font_family"/>
1830
+ </xsl:when>
1831
+ <xsl:otherwise> <!-- $additional_fonts != '' -->
1832
+ <xsl:choose>
1833
+ <xsl:when test="contains($font_family, ',')">
1834
+ <xsl:value-of select="substring-before($font_family, ',')"/>
1835
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1836
+ <xsl:text>, </xsl:text><xsl:value-of select="substring-after($font_family, ',')"/>
1837
+ </xsl:when>
1838
+ <xsl:otherwise>
1839
+ <xsl:value-of select="$font_family"/>
1840
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1841
+ </xsl:otherwise>
1842
+ </xsl:choose>
1843
+ </xsl:otherwise>
1844
+ </xsl:choose>
1830
1845
  </xsl:attribute>
1831
1846
  </xsl:when>
1832
1847
  <xsl:otherwise>
@@ -4480,21 +4495,21 @@
4480
4495
 
4481
4496
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
4482
4497
 
4483
- <fo:block xsl:use-attribute-sets="table-note-style">
4498
+ <fo:block xsl:use-attribute-sets="table-note-style">
4484
4499
 
4485
- <xsl:call-template name="refine_table-note-style"/>
4500
+ <xsl:call-template name="refine_table-note-style"/>
4486
4501
 
4487
- <!-- Table's note/example name (NOTE, for example) -->
4488
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
4502
+ <!-- Table's note/example name (NOTE, for example) -->
4503
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
4489
4504
 
4490
- <xsl:call-template name="refine_table-note-name-style"/>
4505
+ <xsl:call-template name="refine_table-note-name-style"/>
4491
4506
 
4492
- <xsl:apply-templates select="*[local-name() = 'name']"/>
4507
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4493
4508
 
4494
- </fo:inline>
4509
+ </fo:inline>
4495
4510
 
4496
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4497
- </fo:block>
4511
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4512
+ </fo:block>
4498
4513
 
4499
4514
  </xsl:template> <!-- table/note -->
4500
4515
 
@@ -7637,8 +7652,12 @@
7637
7652
  <xsl:variable name="isAdded" select="../@added"/>
7638
7653
  <xsl:variable name="isDeleted" select="../@deleted"/>
7639
7654
  <xsl:choose>
7640
- <xsl:when test="ancestor::*[local-name() = 'title']">
7655
+ <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7641
7656
  <fo:inline padding-left="1mm" padding-right="1mm">
7657
+ <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7658
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
7659
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
7660
+ </xsl:if>
7642
7661
  <xsl:variable name="src">
7643
7662
  <xsl:call-template name="image_src"/>
7644
7663
  </xsl:variable>
@@ -7671,7 +7690,7 @@
7671
7690
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
7672
7691
  <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
7673
7692
 
7674
- <xsl:if test="@width != '' and @width != 'auto'">
7693
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
7675
7694
  <xsl:attribute name="width">
7676
7695
  <xsl:value-of select="@width"/>
7677
7696
  </xsl:attribute>
@@ -1822,11 +1822,26 @@
1822
1822
  <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
1823
1823
  </xsl:if>
1824
1824
 
1825
- <xsl:value-of select="."/>
1825
+ <xsl:variable name="font_family" select="."/>
1826
1826
 
1827
- <xsl:if test="$additional_fonts != ''">
1828
- <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1829
- </xsl:if>
1827
+ <xsl:choose>
1828
+ <xsl:when test="$additional_fonts = ''">
1829
+ <xsl:value-of select="$font_family"/>
1830
+ </xsl:when>
1831
+ <xsl:otherwise> <!-- $additional_fonts != '' -->
1832
+ <xsl:choose>
1833
+ <xsl:when test="contains($font_family, ',')">
1834
+ <xsl:value-of select="substring-before($font_family, ',')"/>
1835
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1836
+ <xsl:text>, </xsl:text><xsl:value-of select="substring-after($font_family, ',')"/>
1837
+ </xsl:when>
1838
+ <xsl:otherwise>
1839
+ <xsl:value-of select="$font_family"/>
1840
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1841
+ </xsl:otherwise>
1842
+ </xsl:choose>
1843
+ </xsl:otherwise>
1844
+ </xsl:choose>
1830
1845
  </xsl:attribute>
1831
1846
  </xsl:when>
1832
1847
  <xsl:otherwise>
@@ -4480,21 +4495,21 @@
4480
4495
 
4481
4496
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
4482
4497
 
4483
- <fo:block xsl:use-attribute-sets="table-note-style">
4498
+ <fo:block xsl:use-attribute-sets="table-note-style">
4484
4499
 
4485
- <xsl:call-template name="refine_table-note-style"/>
4500
+ <xsl:call-template name="refine_table-note-style"/>
4486
4501
 
4487
- <!-- Table's note/example name (NOTE, for example) -->
4488
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
4502
+ <!-- Table's note/example name (NOTE, for example) -->
4503
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
4489
4504
 
4490
- <xsl:call-template name="refine_table-note-name-style"/>
4505
+ <xsl:call-template name="refine_table-note-name-style"/>
4491
4506
 
4492
- <xsl:apply-templates select="*[local-name() = 'name']"/>
4507
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4493
4508
 
4494
- </fo:inline>
4509
+ </fo:inline>
4495
4510
 
4496
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4497
- </fo:block>
4511
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4512
+ </fo:block>
4498
4513
 
4499
4514
  </xsl:template> <!-- table/note -->
4500
4515
 
@@ -7637,8 +7652,12 @@
7637
7652
  <xsl:variable name="isAdded" select="../@added"/>
7638
7653
  <xsl:variable name="isDeleted" select="../@deleted"/>
7639
7654
  <xsl:choose>
7640
- <xsl:when test="ancestor::*[local-name() = 'title']">
7655
+ <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7641
7656
  <fo:inline padding-left="1mm" padding-right="1mm">
7657
+ <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7658
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
7659
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
7660
+ </xsl:if>
7642
7661
  <xsl:variable name="src">
7643
7662
  <xsl:call-template name="image_src"/>
7644
7663
  </xsl:variable>
@@ -7671,7 +7690,7 @@
7671
7690
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
7672
7691
  <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
7673
7692
 
7674
- <xsl:if test="@width != '' and @width != 'auto'">
7693
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
7675
7694
  <xsl:attribute name="width">
7676
7695
  <xsl:value-of select="@width"/>
7677
7696
  </xsl:attribute>
@@ -1822,11 +1822,26 @@
1822
1822
  <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
1823
1823
  </xsl:if>
1824
1824
 
1825
- <xsl:value-of select="."/>
1825
+ <xsl:variable name="font_family" select="."/>
1826
1826
 
1827
- <xsl:if test="$additional_fonts != ''">
1828
- <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1829
- </xsl:if>
1827
+ <xsl:choose>
1828
+ <xsl:when test="$additional_fonts = ''">
1829
+ <xsl:value-of select="$font_family"/>
1830
+ </xsl:when>
1831
+ <xsl:otherwise> <!-- $additional_fonts != '' -->
1832
+ <xsl:choose>
1833
+ <xsl:when test="contains($font_family, ',')">
1834
+ <xsl:value-of select="substring-before($font_family, ',')"/>
1835
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1836
+ <xsl:text>, </xsl:text><xsl:value-of select="substring-after($font_family, ',')"/>
1837
+ </xsl:when>
1838
+ <xsl:otherwise>
1839
+ <xsl:value-of select="$font_family"/>
1840
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1841
+ </xsl:otherwise>
1842
+ </xsl:choose>
1843
+ </xsl:otherwise>
1844
+ </xsl:choose>
1830
1845
  </xsl:attribute>
1831
1846
  </xsl:when>
1832
1847
  <xsl:otherwise>
@@ -4480,21 +4495,21 @@
4480
4495
 
4481
4496
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
4482
4497
 
4483
- <fo:block xsl:use-attribute-sets="table-note-style">
4498
+ <fo:block xsl:use-attribute-sets="table-note-style">
4484
4499
 
4485
- <xsl:call-template name="refine_table-note-style"/>
4500
+ <xsl:call-template name="refine_table-note-style"/>
4486
4501
 
4487
- <!-- Table's note/example name (NOTE, for example) -->
4488
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
4502
+ <!-- Table's note/example name (NOTE, for example) -->
4503
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
4489
4504
 
4490
- <xsl:call-template name="refine_table-note-name-style"/>
4505
+ <xsl:call-template name="refine_table-note-name-style"/>
4491
4506
 
4492
- <xsl:apply-templates select="*[local-name() = 'name']"/>
4507
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4493
4508
 
4494
- </fo:inline>
4509
+ </fo:inline>
4495
4510
 
4496
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4497
- </fo:block>
4511
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4512
+ </fo:block>
4498
4513
 
4499
4514
  </xsl:template> <!-- table/note -->
4500
4515
 
@@ -7637,8 +7652,12 @@
7637
7652
  <xsl:variable name="isAdded" select="../@added"/>
7638
7653
  <xsl:variable name="isDeleted" select="../@deleted"/>
7639
7654
  <xsl:choose>
7640
- <xsl:when test="ancestor::*[local-name() = 'title']">
7655
+ <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7641
7656
  <fo:inline padding-left="1mm" padding-right="1mm">
7657
+ <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7658
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
7659
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
7660
+ </xsl:if>
7642
7661
  <xsl:variable name="src">
7643
7662
  <xsl:call-template name="image_src"/>
7644
7663
  </xsl:variable>
@@ -7671,7 +7690,7 @@
7671
7690
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
7672
7691
  <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
7673
7692
 
7674
- <xsl:if test="@width != '' and @width != 'auto'">
7693
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
7675
7694
  <xsl:attribute name="width">
7676
7695
  <xsl:value-of select="@width"/>
7677
7696
  </xsl:attribute>
@@ -1822,11 +1822,26 @@
1822
1822
  <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
1823
1823
  </xsl:if>
1824
1824
 
1825
- <xsl:value-of select="."/>
1825
+ <xsl:variable name="font_family" select="."/>
1826
1826
 
1827
- <xsl:if test="$additional_fonts != ''">
1828
- <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1829
- </xsl:if>
1827
+ <xsl:choose>
1828
+ <xsl:when test="$additional_fonts = ''">
1829
+ <xsl:value-of select="$font_family"/>
1830
+ </xsl:when>
1831
+ <xsl:otherwise> <!-- $additional_fonts != '' -->
1832
+ <xsl:choose>
1833
+ <xsl:when test="contains($font_family, ',')">
1834
+ <xsl:value-of select="substring-before($font_family, ',')"/>
1835
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1836
+ <xsl:text>, </xsl:text><xsl:value-of select="substring-after($font_family, ',')"/>
1837
+ </xsl:when>
1838
+ <xsl:otherwise>
1839
+ <xsl:value-of select="$font_family"/>
1840
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1841
+ </xsl:otherwise>
1842
+ </xsl:choose>
1843
+ </xsl:otherwise>
1844
+ </xsl:choose>
1830
1845
  </xsl:attribute>
1831
1846
  </xsl:when>
1832
1847
  <xsl:otherwise>
@@ -4480,21 +4495,21 @@
4480
4495
 
4481
4496
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
4482
4497
 
4483
- <fo:block xsl:use-attribute-sets="table-note-style">
4498
+ <fo:block xsl:use-attribute-sets="table-note-style">
4484
4499
 
4485
- <xsl:call-template name="refine_table-note-style"/>
4500
+ <xsl:call-template name="refine_table-note-style"/>
4486
4501
 
4487
- <!-- Table's note/example name (NOTE, for example) -->
4488
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
4502
+ <!-- Table's note/example name (NOTE, for example) -->
4503
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
4489
4504
 
4490
- <xsl:call-template name="refine_table-note-name-style"/>
4505
+ <xsl:call-template name="refine_table-note-name-style"/>
4491
4506
 
4492
- <xsl:apply-templates select="*[local-name() = 'name']"/>
4507
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4493
4508
 
4494
- </fo:inline>
4509
+ </fo:inline>
4495
4510
 
4496
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4497
- </fo:block>
4511
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4512
+ </fo:block>
4498
4513
 
4499
4514
  </xsl:template> <!-- table/note -->
4500
4515
 
@@ -7637,8 +7652,12 @@
7637
7652
  <xsl:variable name="isAdded" select="../@added"/>
7638
7653
  <xsl:variable name="isDeleted" select="../@deleted"/>
7639
7654
  <xsl:choose>
7640
- <xsl:when test="ancestor::*[local-name() = 'title']">
7655
+ <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7641
7656
  <fo:inline padding-left="1mm" padding-right="1mm">
7657
+ <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7658
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
7659
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
7660
+ </xsl:if>
7642
7661
  <xsl:variable name="src">
7643
7662
  <xsl:call-template name="image_src"/>
7644
7663
  </xsl:variable>
@@ -7671,7 +7690,7 @@
7671
7690
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
7672
7691
  <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
7673
7692
 
7674
- <xsl:if test="@width != '' and @width != 'auto'">
7693
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
7675
7694
  <xsl:attribute name="width">
7676
7695
  <xsl:value-of select="@width"/>
7677
7696
  </xsl:attribute>
@@ -1822,11 +1822,26 @@
1822
1822
  <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
1823
1823
  </xsl:if>
1824
1824
 
1825
- <xsl:value-of select="."/>
1825
+ <xsl:variable name="font_family" select="."/>
1826
1826
 
1827
- <xsl:if test="$additional_fonts != ''">
1828
- <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1829
- </xsl:if>
1827
+ <xsl:choose>
1828
+ <xsl:when test="$additional_fonts = ''">
1829
+ <xsl:value-of select="$font_family"/>
1830
+ </xsl:when>
1831
+ <xsl:otherwise> <!-- $additional_fonts != '' -->
1832
+ <xsl:choose>
1833
+ <xsl:when test="contains($font_family, ',')">
1834
+ <xsl:value-of select="substring-before($font_family, ',')"/>
1835
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1836
+ <xsl:text>, </xsl:text><xsl:value-of select="substring-after($font_family, ',')"/>
1837
+ </xsl:when>
1838
+ <xsl:otherwise>
1839
+ <xsl:value-of select="$font_family"/>
1840
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1841
+ </xsl:otherwise>
1842
+ </xsl:choose>
1843
+ </xsl:otherwise>
1844
+ </xsl:choose>
1830
1845
  </xsl:attribute>
1831
1846
  </xsl:when>
1832
1847
  <xsl:otherwise>
@@ -4480,21 +4495,21 @@
4480
4495
 
4481
4496
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
4482
4497
 
4483
- <fo:block xsl:use-attribute-sets="table-note-style">
4498
+ <fo:block xsl:use-attribute-sets="table-note-style">
4484
4499
 
4485
- <xsl:call-template name="refine_table-note-style"/>
4500
+ <xsl:call-template name="refine_table-note-style"/>
4486
4501
 
4487
- <!-- Table's note/example name (NOTE, for example) -->
4488
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
4502
+ <!-- Table's note/example name (NOTE, for example) -->
4503
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
4489
4504
 
4490
- <xsl:call-template name="refine_table-note-name-style"/>
4505
+ <xsl:call-template name="refine_table-note-name-style"/>
4491
4506
 
4492
- <xsl:apply-templates select="*[local-name() = 'name']"/>
4507
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4493
4508
 
4494
- </fo:inline>
4509
+ </fo:inline>
4495
4510
 
4496
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4497
- </fo:block>
4511
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4512
+ </fo:block>
4498
4513
 
4499
4514
  </xsl:template> <!-- table/note -->
4500
4515
 
@@ -7637,8 +7652,12 @@
7637
7652
  <xsl:variable name="isAdded" select="../@added"/>
7638
7653
  <xsl:variable name="isDeleted" select="../@deleted"/>
7639
7654
  <xsl:choose>
7640
- <xsl:when test="ancestor::*[local-name() = 'title']">
7655
+ <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7641
7656
  <fo:inline padding-left="1mm" padding-right="1mm">
7657
+ <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7658
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
7659
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
7660
+ </xsl:if>
7642
7661
  <xsl:variable name="src">
7643
7662
  <xsl:call-template name="image_src"/>
7644
7663
  </xsl:variable>
@@ -7671,7 +7690,7 @@
7671
7690
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
7672
7691
  <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
7673
7692
 
7674
- <xsl:if test="@width != '' and @width != 'auto'">
7693
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
7675
7694
  <xsl:attribute name="width">
7676
7695
  <xsl:value-of select="@width"/>
7677
7696
  </xsl:attribute>
@@ -1822,11 +1822,26 @@
1822
1822
  <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
1823
1823
  </xsl:if>
1824
1824
 
1825
- <xsl:value-of select="."/>
1825
+ <xsl:variable name="font_family" select="."/>
1826
1826
 
1827
- <xsl:if test="$additional_fonts != ''">
1828
- <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1829
- </xsl:if>
1827
+ <xsl:choose>
1828
+ <xsl:when test="$additional_fonts = ''">
1829
+ <xsl:value-of select="$font_family"/>
1830
+ </xsl:when>
1831
+ <xsl:otherwise> <!-- $additional_fonts != '' -->
1832
+ <xsl:choose>
1833
+ <xsl:when test="contains($font_family, ',')">
1834
+ <xsl:value-of select="substring-before($font_family, ',')"/>
1835
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1836
+ <xsl:text>, </xsl:text><xsl:value-of select="substring-after($font_family, ',')"/>
1837
+ </xsl:when>
1838
+ <xsl:otherwise>
1839
+ <xsl:value-of select="$font_family"/>
1840
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1841
+ </xsl:otherwise>
1842
+ </xsl:choose>
1843
+ </xsl:otherwise>
1844
+ </xsl:choose>
1830
1845
  </xsl:attribute>
1831
1846
  </xsl:when>
1832
1847
  <xsl:otherwise>
@@ -4480,21 +4495,21 @@
4480
4495
 
4481
4496
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
4482
4497
 
4483
- <fo:block xsl:use-attribute-sets="table-note-style">
4498
+ <fo:block xsl:use-attribute-sets="table-note-style">
4484
4499
 
4485
- <xsl:call-template name="refine_table-note-style"/>
4500
+ <xsl:call-template name="refine_table-note-style"/>
4486
4501
 
4487
- <!-- Table's note/example name (NOTE, for example) -->
4488
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
4502
+ <!-- Table's note/example name (NOTE, for example) -->
4503
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
4489
4504
 
4490
- <xsl:call-template name="refine_table-note-name-style"/>
4505
+ <xsl:call-template name="refine_table-note-name-style"/>
4491
4506
 
4492
- <xsl:apply-templates select="*[local-name() = 'name']"/>
4507
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4493
4508
 
4494
- </fo:inline>
4509
+ </fo:inline>
4495
4510
 
4496
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4497
- </fo:block>
4511
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4512
+ </fo:block>
4498
4513
 
4499
4514
  </xsl:template> <!-- table/note -->
4500
4515
 
@@ -7637,8 +7652,12 @@
7637
7652
  <xsl:variable name="isAdded" select="../@added"/>
7638
7653
  <xsl:variable name="isDeleted" select="../@deleted"/>
7639
7654
  <xsl:choose>
7640
- <xsl:when test="ancestor::*[local-name() = 'title']">
7655
+ <xsl:when test="ancestor::*[local-name() = 'title'] or not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7641
7656
  <fo:inline padding-left="1mm" padding-right="1mm">
7657
+ <xsl:if test="not(parent::*[local-name() = 'figure']) or parent::*[local-name() = 'p']">
7658
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
7659
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
7660
+ </xsl:if>
7642
7661
  <xsl:variable name="src">
7643
7662
  <xsl:call-template name="image_src"/>
7644
7663
  </xsl:variable>
@@ -7671,7 +7690,7 @@
7671
7690
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
7672
7691
  <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
7673
7692
 
7674
- <xsl:if test="@width != '' and @width != 'auto'">
7693
+ <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
7675
7694
  <xsl:attribute name="width">
7676
7695
  <xsl:value-of select="@width"/>
7677
7696
  </xsl:attribute>