2013-09-25 17 views
11

我必須繪製實線作爲邊框。如何爲整個表格創建邊框

我用這祿

<fo:table border="solid 0.1mm black"> 

,但它僅吸收包圍線。它不適用於所有單元格和行。是否有可能繪製實線與最低編碼的邊界,比如不單獨設置單元格邊框和行爲:

<fo:table-row border="solid 0.1mm black"> 

回答

29

border屬性添加到所有table-cell元素。你可以在這裏看到,邊界不繼承:http://www.w3.org/TR/xsl11/#border

雖然它不保存任何打字,你可以通過使用屬性幫助您的樣式表的未來支持設置:

<xsl:attribute-set name="myBorder"> 
    <xsl:attribute name="border">solid 0.1mm black</xsl:attribute> 
</xsl:attribute-set> 
... 
    <fo:table-cell xsl:use-attribute-sets="myBorder"> 
    ... 

然後,當你需要更改全部,您只需在一個地方更改它。

+0

thanx it works .. – bajrangi

+1

它確實可以節省打字! Ctrl + C,Ctrl + V :) –