Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 12th, 2007, 10:37 AM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Table creation


I am trying to create a table structure using XSLT where 2 rows are merged together for first column and for next column they are seperate. Something like
  ________
 | | |
 | |---|
 |___|___|

How can I achieve this?


 
Old November 12th, 2007, 02:21 PM
Authorized User
 
Join Date: Jun 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rushman
Default

You'd better provide an example with XML source, desired output and what you have done up until now with your XSLT. It'll be easier to help you if you help us help you...
 
Old November 13th, 2007, 12:48 AM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm trying sth like
<fo:table-cell border-style="thin"
number-rows-spanned="2" number-columns-spanned="2">
inside <fo::table-row> to generate
a table where first 2 rows are merged

...
</xsl:when>
                <xsl:when test="../@refer_condition1='true' and ../@condition='^'
                            and ../@refer_condition2='true' and ../@condition2='^'">
                    <fo:table-cell border-style="thin"
                        number-columns-spanned="2" number-rows-spanned="2">
                         <xsl:for-each select="parent::node()">
                        <fo:block start-indent="0pt" font-family="Arial"
                            language="EN-US" space-before="3pt"
                            space-before.conditionality="retain" space-after="3pt"
                            space-after.conditionality="retain" font-size="9pt"
                            font-style="italic">
                                <xsl:variable name="cond" select="preceding-sibling::node()/@condition"/>
                                <xsl:value-of select="$cond"/>
                        </fo:block>
                        </xsl:for-each>
                    </fo:table-cell>
                    <fo:table-cell border-style="thin"
                        number-columns-spanned="1">
                        <fo:block start-indent="0pt" font-family="Arial"
                            language="EN-US" space-before="3pt"
                            space-before.conditionality="retain" space-after="3pt"
                            space-after.conditionality="retain" font-size="9pt"
                            font-style="italic">
                            <xsl:for-each select="parent::node()">
                                <xsl:variable name="cond" select="preceding-sibling::node()/@condition2"/>
                                <xsl:value-of select="$cond"/>
                            </xsl:for-each>
                        </fo:block>
                    </fo:table-cell>
                </xsl:when>
...

 
Old November 14th, 2007, 02:50 PM
Authorized User
 
Join Date: Jun 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rushman
Default

I think that your problem isn't XSLT but XSL-FO... Try to post this in an XSL-FO forum... And make a simple example while you're at it...

Dijkstra's law on Programming and Inertia:

If you don't know what your program is supposed to do, don't try to write it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Creation date of a table firefighter2045 Access VBA 4 November 2nd, 2007 10:52 AM
Regarding Table of Contents Creation forrestfsu XSLT 7 June 21st, 2007 03:04 PM
creation of table from xml file s2_saha XML 0 April 27th, 2007 01:14 AM
Dynamic Table Creation in DTS Package clm100 SQL Server DTS 3 September 3rd, 2004 04:08 PM
Table Creation rgerald Access VBA 1 June 24th, 2003 08:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.