[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Spanning Table Cells

Subject: Spanning Table Cells
From: siarom egrub <egrubs@xxxxxxxxx>
Date: Thu, 22 Sep 2005 11:27:25 -0700 (PDT)
spanning table
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.