metanorma-ogc 2.4.0 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d4cd8698433670cb8dcbc3401345b4db09b559215d80264d5f87268b845051d
4
- data.tar.gz: '09a1f9c9bb600fb387481388aaf366c70362bc64628056c71d827c5cf583b8cf'
3
+ metadata.gz: df6f6cbb5bc0bc2323c2ca580974c1b8088c17cd1b8e54ce952ad349990518d1
4
+ data.tar.gz: c33fb7fe87342becdb7d44ecd64422d5b911230622f0f571b1318d802b89ead2
5
5
  SHA512:
6
- metadata.gz: 7fc662db0f4187b8a889d742fc5218dfb5632258cb120249f308752d2fa623e6ad629cacaae52e43321ddeebb8253aa2f1ee0f8818b609dcb064f4e54a76a326
7
- data.tar.gz: 4ba019984a2ca6514c0a75eba2f2f8bd52b21dd19af9e5af7172f9654ae787e74804566b8c914dc87472d796e5b06bc1bef205811365581e24ff299edb438099
6
+ metadata.gz: 2c8ce9e3fd6cdf2a2f8f349c5991bde3d6809d73cba6b515a20f99dde628d041012602697bad104f21b9578622e18b5acfe6d7b172ae80b08546396f5fdfb527
7
+ data.tar.gz: 70e85764d9f88e93075742ca70b5d2c4bfed91b12c5ccf201421f1760235f684732f70f73073e7795dca982f9ec39ef7e14bc8648afb8e9ed6bd7e411e06aa6a
@@ -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>