0
我使用的Apache FOP 1.1版建立一個PDF(通過命令行) 這裏是我的XSL是工作的罰款XSL-FO網址功能到模板
<fo:table-row >
<fo:table-cell >
<fo:block >
<fo:external-graphic content-height="9mm" content-width="9mm" height="10mm" width="10mm" scaling="non-uniform" src="url(./images/pict2.jpg)" />
</fo:block>
</fo:table-cell>
</fo:table-row >
如果我嘗試使用模板以這種方式
<xsl:template name="myRow" >
<xsl:param name="imgUrl"/>
<fo:table-row >
<fo:table-cell >
<fo:block >
<fo:external-graphic content-height="9mm" content-width="9mm" height="10mm" width="10mm" scaling="non-uniform" src="url($imgUrl)"/>
</fo:block>
</fo:table-cell>
</fo:table-row >
</xsl:template>
聲明,我把它作爲
<xsl:call-template name="myRow">
<xsl:with-param name="imgUrl" select="'./images/pict2.jpg'" />
</xsl:call-template>
沒有圖像顯示。 如果我寫入select =「./ images/pict2.jpg」(不帶單引號),則imgUrl參數爲空 如何傳遞url並使其工作?