我需要通過在XSL中調用模板來創建表格:FO 我希望能調用模板函數XSL fo動態創建表格
表模板
<xsl:template name="getTable">
使用FO創建表:表標籤,並呼籲柱模板並傳遞參數沒有列的
創建fo:body標籤並調用行模板並將no行作爲參數傳遞
</xsl:template>
列模板例如
<xsl:template name="getcolumn">
</xsl:template>
Row template
呼叫的細胞的模板並通過無細胞參數的
</xsl:template>
細胞模板
<xsl:template name="getCell">
呼叫的另一個模板
</xsl:template>
我已經在XSL:FO中創建了一個表格。我可以通過下面的表格在XSL:fo中創建表格,但是我希望創建一個表格,因爲我需要根據輸入多次複製表格。
<fo:table xsl:use-attribute-sets="Table" >
<fo:table-column />
<fo:table-column />
<fo:table-body>
<fo:table-row >
<fo:table-cell >
<fo:block xsl:use-attribute-sets="JobTaskHeaderBackground">
School1
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<xsl:call-template name="Required">
<xsl:with-param name="ElementToCheck" select='m:SchoolName' />
</xsl:call-template>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
目前還不清楚你打算如何填充多個表 - 假設你不希望它們具有相同的數據。 –
您的'xsl:with-param'不允許在XSLT的這些點上使用。 –
託尼你說得對,那是我把它放在呼叫模板標籤中的錯字。 – user1339913