metanorma-ogc 1.2.17 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,6 +5,7 @@
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
+ <xsl:param name="basepath"/>
8
9
 
9
10
  <xsl:variable name="pageWidth" select="'215.9mm'"/>
10
11
  <xsl:variable name="pageHeight" select="'279.4mm'"/>
@@ -1993,7 +1994,7 @@
1993
1994
 
1994
1995
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1995
1996
 
1996
-
1997
+
1997
1998
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1998
1999
 
1999
2000
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
@@ -2001,6 +2002,12 @@
2001
2002
  <xsl:attribute name="space-after">6pt</xsl:attribute>
2002
2003
 
2003
2004
 
2005
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
2006
+ <xsl:attribute name="color">red</xsl:attribute>
2007
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2008
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
2009
+ <xsl:attribute name="color">red</xsl:attribute>
2010
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
2004
2011
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
2005
2012
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2006
2013
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -3390,8 +3397,12 @@
3390
3397
  <fo:inline text-decoration="underline">
3391
3398
  <xsl:apply-templates/>
3392
3399
  </fo:inline>
3400
+ </xsl:template><xsl:template match="*[local-name()='add']">
3401
+ <fo:inline xsl:use-attribute-sets="add-style">
3402
+ <xsl:apply-templates/>
3403
+ </fo:inline>
3393
3404
  </xsl:template><xsl:template match="*[local-name()='del']">
3394
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
3405
+ <fo:inline xsl:use-attribute-sets="del-style">
3395
3406
  <xsl:apply-templates/>
3396
3407
  </fo:inline>
3397
3408
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -4011,22 +4022,37 @@
4011
4022
  <xsl:apply-templates/>
4012
4023
  </fo:block>
4013
4024
  </xsl:template><xsl:template match="*[local-name() = 'image']">
4014
- <fo:block xsl:use-attribute-sets="image-style">
4015
-
4016
-
4017
- <xsl:variable name="src">
4018
- <xsl:choose>
4019
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
4020
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
4021
- </xsl:when>
4022
- <xsl:otherwise>
4023
- <xsl:value-of select="@src"/>
4024
- </xsl:otherwise>
4025
- </xsl:choose>
4026
- </xsl:variable>
4027
-
4028
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4029
- </fo:block>
4025
+ <xsl:choose>
4026
+ <xsl:when test="ancestor::*[local-name() = 'title']">
4027
+ <fo:inline padding-left="1mm" padding-right="1mm">
4028
+ <xsl:variable name="src">
4029
+ <xsl:call-template name="image_src"/>
4030
+ </xsl:variable>
4031
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
4032
+ </fo:inline>
4033
+ </xsl:when>
4034
+ <xsl:otherwise>
4035
+ <fo:block xsl:use-attribute-sets="image-style">
4036
+
4037
+ <xsl:variable name="src">
4038
+ <xsl:call-template name="image_src"/>
4039
+ </xsl:variable>
4040
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4041
+ </fo:block>
4042
+ </xsl:otherwise>
4043
+ </xsl:choose>
4044
+ </xsl:template><xsl:template name="image_src">
4045
+ <xsl:choose>
4046
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
4047
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
4048
+ </xsl:when>
4049
+ <xsl:when test="not(starts-with(@src, 'data:'))">
4050
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
4051
+ </xsl:when>
4052
+ <xsl:otherwise>
4053
+ <xsl:value-of select="@src"/>
4054
+ </xsl:otherwise>
4055
+ </xsl:choose>
4030
4056
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4031
4057
  <xsl:apply-templates mode="contents"/>
4032
4058
  <xsl:text> </xsl:text>
@@ -5,6 +5,7 @@
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
+ <xsl:param name="basepath"/>
8
9
 
9
10
  <xsl:variable name="pageWidth" select="'215.9mm'"/>
10
11
  <xsl:variable name="pageHeight" select="'279.4mm'"/>
@@ -1993,7 +1994,7 @@
1993
1994
 
1994
1995
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1995
1996
 
1996
-
1997
+
1997
1998
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1998
1999
 
1999
2000
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
@@ -2001,6 +2002,12 @@
2001
2002
  <xsl:attribute name="space-after">6pt</xsl:attribute>
2002
2003
 
2003
2004
 
2005
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
2006
+ <xsl:attribute name="color">red</xsl:attribute>
2007
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2008
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
2009
+ <xsl:attribute name="color">red</xsl:attribute>
2010
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
2004
2011
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
2005
2012
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2006
2013
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -3390,8 +3397,12 @@
3390
3397
  <fo:inline text-decoration="underline">
3391
3398
  <xsl:apply-templates/>
3392
3399
  </fo:inline>
3400
+ </xsl:template><xsl:template match="*[local-name()='add']">
3401
+ <fo:inline xsl:use-attribute-sets="add-style">
3402
+ <xsl:apply-templates/>
3403
+ </fo:inline>
3393
3404
  </xsl:template><xsl:template match="*[local-name()='del']">
3394
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
3405
+ <fo:inline xsl:use-attribute-sets="del-style">
3395
3406
  <xsl:apply-templates/>
3396
3407
  </fo:inline>
3397
3408
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -4011,22 +4022,37 @@
4011
4022
  <xsl:apply-templates/>
4012
4023
  </fo:block>
4013
4024
  </xsl:template><xsl:template match="*[local-name() = 'image']">
4014
- <fo:block xsl:use-attribute-sets="image-style">
4015
-
4016
-
4017
- <xsl:variable name="src">
4018
- <xsl:choose>
4019
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
4020
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
4021
- </xsl:when>
4022
- <xsl:otherwise>
4023
- <xsl:value-of select="@src"/>
4024
- </xsl:otherwise>
4025
- </xsl:choose>
4026
- </xsl:variable>
4027
-
4028
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4029
- </fo:block>
4025
+ <xsl:choose>
4026
+ <xsl:when test="ancestor::*[local-name() = 'title']">
4027
+ <fo:inline padding-left="1mm" padding-right="1mm">
4028
+ <xsl:variable name="src">
4029
+ <xsl:call-template name="image_src"/>
4030
+ </xsl:variable>
4031
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
4032
+ </fo:inline>
4033
+ </xsl:when>
4034
+ <xsl:otherwise>
4035
+ <fo:block xsl:use-attribute-sets="image-style">
4036
+
4037
+ <xsl:variable name="src">
4038
+ <xsl:call-template name="image_src"/>
4039
+ </xsl:variable>
4040
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4041
+ </fo:block>
4042
+ </xsl:otherwise>
4043
+ </xsl:choose>
4044
+ </xsl:template><xsl:template name="image_src">
4045
+ <xsl:choose>
4046
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
4047
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
4048
+ </xsl:when>
4049
+ <xsl:when test="not(starts-with(@src, 'data:'))">
4050
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
4051
+ </xsl:when>
4052
+ <xsl:otherwise>
4053
+ <xsl:value-of select="@src"/>
4054
+ </xsl:otherwise>
4055
+ </xsl:choose>
4030
4056
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4031
4057
  <xsl:apply-templates mode="contents"/>
4032
4058
  <xsl:text> </xsl:text>
@@ -5,6 +5,7 @@
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
+ <xsl:param name="basepath"/>
8
9
 
9
10
  <xsl:variable name="pageWidth" select="'215.9mm'"/>
10
11
  <xsl:variable name="pageHeight" select="'279.4mm'"/>
@@ -1993,7 +1994,7 @@
1993
1994
 
1994
1995
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1995
1996
 
1996
-
1997
+
1997
1998
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1998
1999
 
1999
2000
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
@@ -2001,6 +2002,12 @@
2001
2002
  <xsl:attribute name="space-after">6pt</xsl:attribute>
2002
2003
 
2003
2004
 
2005
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
2006
+ <xsl:attribute name="color">red</xsl:attribute>
2007
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2008
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
2009
+ <xsl:attribute name="color">red</xsl:attribute>
2010
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
2004
2011
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
2005
2012
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2006
2013
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -3390,8 +3397,12 @@
3390
3397
  <fo:inline text-decoration="underline">
3391
3398
  <xsl:apply-templates/>
3392
3399
  </fo:inline>
3400
+ </xsl:template><xsl:template match="*[local-name()='add']">
3401
+ <fo:inline xsl:use-attribute-sets="add-style">
3402
+ <xsl:apply-templates/>
3403
+ </fo:inline>
3393
3404
  </xsl:template><xsl:template match="*[local-name()='del']">
3394
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
3405
+ <fo:inline xsl:use-attribute-sets="del-style">
3395
3406
  <xsl:apply-templates/>
3396
3407
  </fo:inline>
3397
3408
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -4011,22 +4022,37 @@
4011
4022
  <xsl:apply-templates/>
4012
4023
  </fo:block>
4013
4024
  </xsl:template><xsl:template match="*[local-name() = 'image']">
4014
- <fo:block xsl:use-attribute-sets="image-style">
4015
-
4016
-
4017
- <xsl:variable name="src">
4018
- <xsl:choose>
4019
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
4020
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
4021
- </xsl:when>
4022
- <xsl:otherwise>
4023
- <xsl:value-of select="@src"/>
4024
- </xsl:otherwise>
4025
- </xsl:choose>
4026
- </xsl:variable>
4027
-
4028
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4029
- </fo:block>
4025
+ <xsl:choose>
4026
+ <xsl:when test="ancestor::*[local-name() = 'title']">
4027
+ <fo:inline padding-left="1mm" padding-right="1mm">
4028
+ <xsl:variable name="src">
4029
+ <xsl:call-template name="image_src"/>
4030
+ </xsl:variable>
4031
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
4032
+ </fo:inline>
4033
+ </xsl:when>
4034
+ <xsl:otherwise>
4035
+ <fo:block xsl:use-attribute-sets="image-style">
4036
+
4037
+ <xsl:variable name="src">
4038
+ <xsl:call-template name="image_src"/>
4039
+ </xsl:variable>
4040
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4041
+ </fo:block>
4042
+ </xsl:otherwise>
4043
+ </xsl:choose>
4044
+ </xsl:template><xsl:template name="image_src">
4045
+ <xsl:choose>
4046
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
4047
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
4048
+ </xsl:when>
4049
+ <xsl:when test="not(starts-with(@src, 'data:'))">
4050
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
4051
+ </xsl:when>
4052
+ <xsl:otherwise>
4053
+ <xsl:value-of select="@src"/>
4054
+ </xsl:otherwise>
4055
+ </xsl:choose>
4030
4056
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4031
4057
  <xsl:apply-templates mode="contents"/>
4032
4058
  <xsl:text> </xsl:text>
@@ -5,6 +5,7 @@
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
+ <xsl:param name="basepath"/>
8
9
 
9
10
  <xsl:variable name="pageWidth" select="'215.9mm'"/>
10
11
  <xsl:variable name="pageHeight" select="'279.4mm'"/>
@@ -1993,7 +1994,7 @@
1993
1994
 
1994
1995
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1995
1996
 
1996
-
1997
+
1997
1998
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1998
1999
 
1999
2000
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
@@ -2001,6 +2002,12 @@
2001
2002
  <xsl:attribute name="space-after">6pt</xsl:attribute>
2002
2003
 
2003
2004
 
2005
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
2006
+ <xsl:attribute name="color">red</xsl:attribute>
2007
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2008
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
2009
+ <xsl:attribute name="color">red</xsl:attribute>
2010
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
2004
2011
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
2005
2012
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2006
2013
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -3390,8 +3397,12 @@
3390
3397
  <fo:inline text-decoration="underline">
3391
3398
  <xsl:apply-templates/>
3392
3399
  </fo:inline>
3400
+ </xsl:template><xsl:template match="*[local-name()='add']">
3401
+ <fo:inline xsl:use-attribute-sets="add-style">
3402
+ <xsl:apply-templates/>
3403
+ </fo:inline>
3393
3404
  </xsl:template><xsl:template match="*[local-name()='del']">
3394
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
3405
+ <fo:inline xsl:use-attribute-sets="del-style">
3395
3406
  <xsl:apply-templates/>
3396
3407
  </fo:inline>
3397
3408
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -4011,22 +4022,37 @@
4011
4022
  <xsl:apply-templates/>
4012
4023
  </fo:block>
4013
4024
  </xsl:template><xsl:template match="*[local-name() = 'image']">
4014
- <fo:block xsl:use-attribute-sets="image-style">
4015
-
4016
-
4017
- <xsl:variable name="src">
4018
- <xsl:choose>
4019
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
4020
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
4021
- </xsl:when>
4022
- <xsl:otherwise>
4023
- <xsl:value-of select="@src"/>
4024
- </xsl:otherwise>
4025
- </xsl:choose>
4026
- </xsl:variable>
4027
-
4028
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4029
- </fo:block>
4025
+ <xsl:choose>
4026
+ <xsl:when test="ancestor::*[local-name() = 'title']">
4027
+ <fo:inline padding-left="1mm" padding-right="1mm">
4028
+ <xsl:variable name="src">
4029
+ <xsl:call-template name="image_src"/>
4030
+ </xsl:variable>
4031
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
4032
+ </fo:inline>
4033
+ </xsl:when>
4034
+ <xsl:otherwise>
4035
+ <fo:block xsl:use-attribute-sets="image-style">
4036
+
4037
+ <xsl:variable name="src">
4038
+ <xsl:call-template name="image_src"/>
4039
+ </xsl:variable>
4040
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4041
+ </fo:block>
4042
+ </xsl:otherwise>
4043
+ </xsl:choose>
4044
+ </xsl:template><xsl:template name="image_src">
4045
+ <xsl:choose>
4046
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
4047
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
4048
+ </xsl:when>
4049
+ <xsl:when test="not(starts-with(@src, 'data:'))">
4050
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
4051
+ </xsl:when>
4052
+ <xsl:otherwise>
4053
+ <xsl:value-of select="@src"/>
4054
+ </xsl:otherwise>
4055
+ </xsl:choose>
4030
4056
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4031
4057
  <xsl:apply-templates mode="contents"/>
4032
4058
  <xsl:text> </xsl:text>
@@ -5,6 +5,7 @@
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
+ <xsl:param name="basepath"/>
8
9
 
9
10
  <xsl:variable name="pageWidth" select="'215.9mm'"/>
10
11
  <xsl:variable name="pageHeight" select="'279.4mm'"/>
@@ -1993,7 +1994,7 @@
1993
1994
 
1994
1995
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1995
1996
 
1996
-
1997
+
1997
1998
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1998
1999
 
1999
2000
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
@@ -2001,6 +2002,12 @@
2001
2002
  <xsl:attribute name="space-after">6pt</xsl:attribute>
2002
2003
 
2003
2004
 
2005
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
2006
+ <xsl:attribute name="color">red</xsl:attribute>
2007
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2008
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
2009
+ <xsl:attribute name="color">red</xsl:attribute>
2010
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
2004
2011
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
2005
2012
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2006
2013
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -3390,8 +3397,12 @@
3390
3397
  <fo:inline text-decoration="underline">
3391
3398
  <xsl:apply-templates/>
3392
3399
  </fo:inline>
3400
+ </xsl:template><xsl:template match="*[local-name()='add']">
3401
+ <fo:inline xsl:use-attribute-sets="add-style">
3402
+ <xsl:apply-templates/>
3403
+ </fo:inline>
3393
3404
  </xsl:template><xsl:template match="*[local-name()='del']">
3394
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
3405
+ <fo:inline xsl:use-attribute-sets="del-style">
3395
3406
  <xsl:apply-templates/>
3396
3407
  </fo:inline>
3397
3408
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -4011,22 +4022,37 @@
4011
4022
  <xsl:apply-templates/>
4012
4023
  </fo:block>
4013
4024
  </xsl:template><xsl:template match="*[local-name() = 'image']">
4014
- <fo:block xsl:use-attribute-sets="image-style">
4015
-
4016
-
4017
- <xsl:variable name="src">
4018
- <xsl:choose>
4019
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
4020
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
4021
- </xsl:when>
4022
- <xsl:otherwise>
4023
- <xsl:value-of select="@src"/>
4024
- </xsl:otherwise>
4025
- </xsl:choose>
4026
- </xsl:variable>
4027
-
4028
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4029
- </fo:block>
4025
+ <xsl:choose>
4026
+ <xsl:when test="ancestor::*[local-name() = 'title']">
4027
+ <fo:inline padding-left="1mm" padding-right="1mm">
4028
+ <xsl:variable name="src">
4029
+ <xsl:call-template name="image_src"/>
4030
+ </xsl:variable>
4031
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
4032
+ </fo:inline>
4033
+ </xsl:when>
4034
+ <xsl:otherwise>
4035
+ <fo:block xsl:use-attribute-sets="image-style">
4036
+
4037
+ <xsl:variable name="src">
4038
+ <xsl:call-template name="image_src"/>
4039
+ </xsl:variable>
4040
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
4041
+ </fo:block>
4042
+ </xsl:otherwise>
4043
+ </xsl:choose>
4044
+ </xsl:template><xsl:template name="image_src">
4045
+ <xsl:choose>
4046
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
4047
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
4048
+ </xsl:when>
4049
+ <xsl:when test="not(starts-with(@src, 'data:'))">
4050
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
4051
+ </xsl:when>
4052
+ <xsl:otherwise>
4053
+ <xsl:value-of select="@src"/>
4054
+ </xsl:otherwise>
4055
+ </xsl:choose>
4030
4056
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4031
4057
  <xsl:apply-templates mode="contents"/>
4032
4058
  <xsl:text> </xsl:text>