lib/isodoc/cc/cc.standard.xsl in metanorma-cc-2.2.13 vs lib/isodoc/cc/cc.standard.xsl in metanorma-cc-2.3.0
- old
+ new
@@ -232,13 +232,13 @@
<fo:leader leader-pattern="rule" leader-length="30%"/>
</fo:block>
</fo:static-content>
<xsl:call-template name="insertHeaderFooter"/>
<fo:flow flow-name="xsl-region-body">
- <fo:block font-size="16pt" font-weight="bold" margin-bottom="17pt" role="H1">
+ <!-- <fo:block font-size="16pt" font-weight="bold" margin-bottom="17pt" role="H1">
<xsl:value-of select="/csd:csd-standard/csd:bibdata/csd:title[@language = 'en']"/>
- </fo:block>
+ </fo:block> -->
<fo:block>
<xsl:call-template name="processMainSectionsDefault"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
@@ -415,10 +415,16 @@
</xsl:template>
<!-- ============================= -->
<!-- ============================= -->
+ <xsl:template match="csd:sections/csd:p[@class = 'zzSTDTitle1']" priority="4">
+ <fo:block font-size="16pt" font-weight="bold" margin-bottom="17pt" role="H1">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template>
+
<xsl:template match="csd:title" name="title">
<xsl:variable name="level">
<xsl:call-template name="getLevel"/>
</xsl:variable>
@@ -4437,10 +4443,13 @@
<xsl:template match="*[local-name()='dd']" mode="dl_if_nested"/>
<!-- ===================== -->
<!-- END Definition List -->
<!-- ===================== -->
+ <!-- default: ignore title in sections/p -->
+ <xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
+
<!-- ========================= -->
<!-- Rich text formatting -->
<!-- ========================= -->
<xsl:template match="*[local-name()='em']">
<fo:inline font-style="italic">
@@ -6518,30 +6527,50 @@
</xsl:when>
<xsl:otherwise>
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
- <xsl:variable name="img_src">
- <xsl:choose>
- <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
+ <xsl:if test="@width != '' and @width != 'auto'">
+ <xsl:attribute name="width">
+ <xsl:value-of select="@width"/>
+ </xsl:attribute>
+ </xsl:if>
- <xsl:variable name="image_width_effective">
+ <xsl:if test="@height != '' and @height != 'auto'">
+ <xsl:attribute name="height">
+ <xsl:value-of select="@height"/>
+ </xsl:attribute>
+ </xsl:if>
- <xsl:value-of select="$width_effective"/>
+ <xsl:choose>
+ <xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
+ <xsl:attribute name="scaling">non-uniform</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
- </xsl:variable>
+ <xsl:variable name="img_src">
+ <xsl:choose>
+ <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
- <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
- <xsl:if test="number($scale) < 100">
+ <xsl:variable name="image_width_effective">
- <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
+ <xsl:value-of select="$width_effective"/>
- </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
+ <xsl:if test="number($scale) < 100">
+
+ <xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
+
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+
</xsl:if>
</fo:external-graphic>
</xsl:otherwise>
</xsl:choose>
@@ -10199,10 +10228,10 @@
</xsl:template>
<!-- Note: to enable the addition of character span markup with semantic styling for DIS Word output -->
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
<xsl:apply-templates mode="update_xml_step1"/>
</xsl:template>
- <xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
+ <xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]/*[local-name() = 'span'][@class] | *[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="update_xml_step1"/>
</xsl:copy>
</xsl:template>
\ No newline at end of file