|
1177 | 1177 | </fo:block-container>
|
1178 | 1178 | </xsl:template>
|
1179 | 1179 |
|
| 1180 | + <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="3"/> |
| 1181 | + |
1180 | 1182 | <xsl:template match="*[local-name() = 'note'][not(ancestor::plateau:table)]/*[local-name() = 'p']" priority="2">
|
1181 | 1183 | <xsl:call-template name="paragraph"/>
|
1182 | 1184 | </xsl:template>
|
|
8437 | 8439 | </xsl:variable>
|
8438 | 8440 | <xsl:variable name="img_src">
|
8439 | 8441 | <xsl:choose>
|
8440 |
| - <xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when> |
| 8442 | + <xsl:when test="not(starts-with(@src, 'data:'))"> |
| 8443 | + <xsl:choose> |
| 8444 | + <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 --> |
| 8445 | + <xsl:value-of select="@src"/> |
| 8446 | + </xsl:when> |
| 8447 | + <xsl:otherwise> |
| 8448 | + <xsl:value-of select="concat($basepath, @src)"/> |
| 8449 | + </xsl:otherwise> |
| 8450 | + </xsl:choose> |
| 8451 | + </xsl:when> |
8441 | 8452 | <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
8442 | 8453 | </xsl:choose>
|
8443 | 8454 | </xsl:variable>
|
|
8450 | 8461 | <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
8451 | 8462 | <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
8452 | 8463 | <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
8453 |
| - <xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/> |
| 8464 | + <xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/> |
8454 | 8465 | <xsl:value-of select="$scale"/>
|
8455 | 8466 | </xsl:template>
|
8456 | 8467 |
|
|
8469 | 8480 | <xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
8470 | 8481 | </xsl:when>
|
8471 | 8482 | <xsl:when test="not(starts-with(@src, 'data:'))">
|
8472 |
| - <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/> |
| 8483 | + <xsl:choose> |
| 8484 | + <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 --> |
| 8485 | + <xsl:value-of select="concat('url(file:///', @src, ')')"/> |
| 8486 | + </xsl:when> |
| 8487 | + <xsl:otherwise> |
| 8488 | + <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/> |
| 8489 | + </xsl:otherwise> |
| 8490 | + </xsl:choose> |
8473 | 8491 | </xsl:when>
|
8474 | 8492 | <xsl:otherwise>
|
8475 | 8493 | <xsl:value-of select="@src"/>
|
|
8491 | 8509 | </xsl:when>
|
8492 | 8510 | <xsl:when test="not(starts-with(@src, 'data:'))">
|
8493 | 8511 | <xsl:variable name="src">
|
8494 |
| - <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/> |
| 8512 | + <xsl:choose> |
| 8513 | + <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 --> |
| 8514 | + <xsl:value-of select="concat('url(file:///', @src, ')')"/> |
| 8515 | + </xsl:when> |
| 8516 | + <xsl:otherwise> |
| 8517 | + <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/> |
| 8518 | + </xsl:otherwise> |
| 8519 | + </xsl:choose> |
8495 | 8520 | </xsl:variable>
|
8496 | 8521 | <xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
8497 | 8522 | <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
|
13775 | 13800 | <xsl:value-of select="$src"/>
|
13776 | 13801 | </xsl:when>
|
13777 | 13802 | <xsl:otherwise>
|
13778 |
| - <xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/> |
| 13803 | + <xsl:choose> |
| 13804 | + <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 --> |
| 13805 | + <xsl:value-of select="concat('url(file:///', @src, ')')"/> |
| 13806 | + </xsl:when> |
| 13807 | + <xsl:otherwise> |
| 13808 | + <xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/> |
| 13809 | + </xsl:otherwise> |
| 13810 | + </xsl:choose> |
13779 | 13811 | </xsl:otherwise>
|
13780 | 13812 | </xsl:choose>
|
13781 | 13813 | </xsl:template>
|
|
0 commit comments