私はこれに対する解決策を見つけようと懸命に努力してきましたが、今まで運がありませんでした。xml から PDF を生成していますが、pdf 内に画像をフロートさせたいと考えています。たとえば、xml に画像が残っている場合、同じように pdf に適用する必要があります。
<p>
<img width="127" height="190" src="/images/241729.jpg" style="float: left;">
Globally transition high standards in technology via ubiquitous partnerships.
Distinctively pursue worldwide paradigms vis-a-vis business e-business.
</p>
そして、私が今持っているXSLは次のようになります
<xsl:template match="img">
<xsl:param name="src">
<xsl:choose>
<xsl:when test="substring-before(@src,'://') = 'http'"><xsl:value-of select="@src" /></xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="substring(@src, 1, 1) != '/' "><xsl:value-of select="@src" /></xsl:when>
<xsl:otherwise><xsl:value-of select="@src" /></xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:param>
<fo:block space-after="12pt">
<fo:external-graphic src="{$src}">
<xsl:if test="@width">
<xsl:attribute name="width">
<xsl:choose>
<xsl:when test="contains(@width, 'px')">
<xsl:value-of select="@width"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(@width, 'px')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:if>
<xsl:if test="@height">
<xsl:attribute name="height">
<xsl:choose>
<xsl:when test="contains(@height, 'px')">
<xsl:value-of select="@height"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(@height, 'px')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:if>
</fo:external-graphic>
</fo:block>
</xsl:template>
このテンプレート マッチを追加しようとして<fo:float>
いますが、正常に機能していません。この問題へのアプローチ方法を教えていただければ幸いです。