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

Table problem

Subject: Table problem
From: "Tanzila Mohammad" <tmohammad@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Nov 2001 13:17:17 -0000
xslt table column
My xml is as follows:
              .......
             <table-header>
                         ......
				<table-column-headers>
                         <table-column-header-rowA> <!-- My problem lies
here within this row -->
                                    <column-header lang="EN"
name="YEAR"></column-header>
						<column-header lang="EN" name="YEAR"></column-header>
						<column-header lang="EN" name="YEAR"></column-header>
						<column-header lang="EN" name="YEAR"></column-header>
     						<column-header lang="EN" name="YEAR">1995/96</column-header>
						<column-header lang="EN" name="YEAR">1996/97</column-header>
                                    <column-header lang="EN"
name="YEAR">1997/98</column-header>
						<column-header lang="EN" name="YEAR">1998/99</column-header>
                          </table-column-header-rowA>
                            <table-column-header-row>
						<column-header lang="EN" name="YEAR">1995/96</column-header>
						<column-header lang="EN" name="YEAR">1996/97</column-header>
						<column-header lang="EN" name="YEAR">1997/98</column-header>
						<column-header lang="EN" name="YEAR">1998/99</column-header>
						<column-header lang="EN" name="YEAR">1994/95</column-header>
						<column-header lang="EN" name="YEAR">1995/96</column-header>
						<column-header lang="EN" name="YEAR">1996/97</column-header>
						<column-header lang="EN" name="YEAR">1997/98</column-header>
					</table-column-header-row>
				</table-column-headers>
			</table-header>
                  .....


Required Output:
The code sits in a table with 9 columns, the aim is to produce the following
table header...

----------------------------------------------------------------------------
-------------
                                                     1995/96   1996/97
1997/98   1998/99
                                                     -------   -------  ----
---   -------
           1995/96    1996/97    1997/98   1998/99   1994/95   1995/96
1996/97   1997/98
----------------------------------------------------------------------------
-------------

The code:
I have the table code in place it is just filling the table header which is
the problem.

I tried something like this:

<!--The first section needed to retrieve all the years from
column-header-row (to produce the bottom row) -->
<xsl:for-each
select="./table-header/table-column-headers/table-column-header-row/column-h
eader">
            <xsl:sort select="." data-type="number" order="ascending"/>

         <fo:table-cell>

               <fo:block text-align="center">
                  <xsl:value-of select="."/>
               </fo:block>

        </fo:table-cell>
</xsl:for-each>

<!--The next section needed to retrieve all the values from
column-header-rowA (to produce the upper value and line for the last 4
columns) -->
<xsl:for-each
select="./table-header/table-column-headers/table-column-header-rowA/column-
header">
               <fo:table-cell>

               <fo:block text-align="center">
                  <xsl:value-of select="."/>
               </fo:block>

              <fo:block>
                   <fo:leader leader-length="1.2cm"
                        leader-pattern="rule"
                        rule-thickness="0.5pt" color="black"/>
              </fo:block>

            </fo:table-cell>

      </xsl:for-each>

I have tried so many combinations but with little success - Any suggestions
(table-column-headers XML can be changed if need be).

Thanks

Tanz



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.