Subject: [xsl] Spanning Table Cells From: siarom egrub <egrubs@xxxxxxxxx> Date: Thu, 22 Sep 2005 11:27:25 -0700 (PDT) |
Hi All! I been trying unsuccessfully to get table cell spanning attributes (morerows (number-columns-spanned), namest & nameend (number-rows-spanned)) to work correctly in a style sheet (XSL). I have searched the archive for relevant solution(s) and haven't got the problem resolved. There are snippets of the XSLFO template and table below. I do not want to restrict the rows or columns to span only two, as I'm currently doing in 'number-rows-spanned="2.' Is there a basic table template for CALS table? Thanks in advance for your help! ~S.E. =======XSLFO TEMPLATE======== <xsl:template match="entry"> <xsl:call-template name="cell-span"/> <xsl:if test="@morerows"> <fo:table-cell number-rows-spanned="2" border-style="solid" border-width="0.5pt"> <fo:block> <xsl:value-of select="para"/> </fo:block> </fo:table-cell> </xsl:if> <!-- <xsl:if test="@namest"> <fo:table-cell number-columns-spanned="2" border-style="solid" border-width="0.5pt"> <fo:block> <xsl:call-template name="cell-span"/> </fo:block> </fo:table-cell> </xsl:if>--> <fo:table-cell border-width="1pt" padding-start="5pt" padding-top="3pt" padding-bottom="3pt" display-align="after" border-top-style="solid" border-bottom-style="solid" border-right-style="solid" border-left-style="solid" text-align="center"> <fo:block> <xsl:apply-templates/> </fo:block> </fo:table-cell> </xsl:template> <xsl:template name="cell-span"> <xsl:if test="@namest"> <xsl:attribute name="number-columns-spanned"> <xsl:value-of select="@nameend"/> </xsl:attribute> </xsl:if> <xsl:if test="@morerows"> <xsl:attribute name="number-rows-spanned"> <xsl:value-of select="@morerows"/> </xsl:attribute> </xsl:if> </xsl:template> =======XML Snippet======== <table> <title>Test</title> <tgroup cols="3"> <thead> <row> <entry> <graphic fileref="img/cat_nbr.png"/> </entry> <entry> <para>Title</para> </entry> <entry> <para>Version</para> </entry> </row> </thead> <tbody> <row> <entry namest="1" nameend="2"> <para>Error in Calculation...</para></entry> <entry><para></para></entry> </row> <row> <entry> <para>274706</para> </entry> <entry morerows="2"> <para>Software Operation</para> </entry> <entry> <para>3.9</para> </entry> </row> </tbody> </tgroup> </table> __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] External Graphic, J.Pietschmann | Thread | [xsl] permalink, Joris Gillis |
RE: [xsl] CDATA / UTF-8 / Special C, Michael Kay | Date | Re: [xsl] External Graphic, J.Pietschmann |
Month |