Skip to content

Commit 0de45d5

Browse files
Merge pull request #734 from metanorma/plateau_update
Plateau update
2 parents 222a0cd + 64edba4 commit 0de45d5

File tree

2 files changed

+37
-5
lines changed

2 files changed

+37
-5
lines changed

xslt_src/common.xsl

+35-5
Original file line numberDiff line numberDiff line change
@@ -13215,7 +13215,16 @@
1321513215
</xsl:variable>
1321613216
<xsl:variable name="img_src">
1321713217
<xsl:choose>
13218-
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
13218+
<xsl:when test="not(starts-with(@src, 'data:'))">
13219+
<xsl:choose>
13220+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
13221+
<xsl:value-of select="@src"/>
13222+
</xsl:when>
13223+
<xsl:otherwise>
13224+
<xsl:value-of select="concat($basepath, @src)"/>
13225+
</xsl:otherwise>
13226+
</xsl:choose>
13227+
</xsl:when>
1321913228
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
1322013229
</xsl:choose>
1322113230
</xsl:variable>
@@ -13241,7 +13250,7 @@
1324113250
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
1324213251
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
1324313252
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
13244-
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
13253+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
1324513254
<xsl:value-of select="$scale"/>
1324613255
</xsl:template>
1324713256

@@ -13262,7 +13271,14 @@
1326213271
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
1326313272
</xsl:when>
1326413273
<xsl:when test="not(starts-with(@src, 'data:'))">
13265-
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
13274+
<xsl:choose>
13275+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
13276+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
13277+
</xsl:when>
13278+
<xsl:otherwise>
13279+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
13280+
</xsl:otherwise>
13281+
</xsl:choose>
1326613282
</xsl:when>
1326713283
<xsl:otherwise>
1326813284
<xsl:value-of select="@src"/>
@@ -13284,7 +13300,14 @@
1328413300
</xsl:when>
1328513301
<xsl:when test="not(starts-with(@src, 'data:'))">
1328613302
<xsl:variable name="src">
13287-
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
13303+
<xsl:choose>
13304+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
13305+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
13306+
</xsl:when>
13307+
<xsl:otherwise>
13308+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
13309+
</xsl:otherwise>
13310+
</xsl:choose>
1328813311
</xsl:variable>
1328913312
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
1329013313
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
@@ -20144,7 +20167,14 @@
2014420167
<xsl:value-of select="$src"/>
2014520168
</xsl:when>
2014620169
<xsl:otherwise>
20147-
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
20170+
<xsl:choose>
20171+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
20172+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
20173+
</xsl:when>
20174+
<xsl:otherwise>
20175+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
20176+
</xsl:otherwise>
20177+
</xsl:choose>
2014820178
</xsl:otherwise>
2014920179
</xsl:choose>
2015020180
</xsl:template>

xslt_src/plateau.international-standard.core.xsl

+2
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,8 @@
12261226
</fo:block-container>
12271227
</xsl:template>
12281228

1229+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="3"/>
1230+
12291231
<xsl:template match="*[local-name() = 'note'][not(ancestor::plateau:table)]/*[local-name() = 'p']" priority="2">
12301232
<xsl:call-template name="paragraph"/>
12311233
</xsl:template>

0 commit comments

Comments
 (0)