|
13215 | 13215 | </xsl:variable>
|
13216 | 13216 | <xsl:variable name="img_src">
|
13217 | 13217 | <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> |
13219 | 13228 | <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
13220 | 13229 | </xsl:choose>
|
13221 | 13230 | </xsl:variable>
|
|
13241 | 13250 | <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
13242 | 13251 | <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
13243 | 13252 | <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)"/> |
13245 | 13254 | <xsl:value-of select="$scale"/>
|
13246 | 13255 | </xsl:template>
|
13247 | 13256 |
|
|
13262 | 13271 | <xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
13263 | 13272 | </xsl:when>
|
13264 | 13273 | <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> |
13266 | 13282 | </xsl:when>
|
13267 | 13283 | <xsl:otherwise>
|
13268 | 13284 | <xsl:value-of select="@src"/>
|
|
13284 | 13300 | </xsl:when>
|
13285 | 13301 | <xsl:when test="not(starts-with(@src, 'data:'))">
|
13286 | 13302 | <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> |
13288 | 13311 | </xsl:variable>
|
13289 | 13312 | <xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
13290 | 13313 | <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
|
20144 | 20167 | <xsl:value-of select="$src"/>
|
20145 | 20168 | </xsl:when>
|
20146 | 20169 | <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> |
20148 | 20178 | </xsl:otherwise>
|
20149 | 20179 | </xsl:choose>
|
20150 | 20180 | </xsl:template>
|
|
0 commit comments