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

RE: HTML table structure

Subject: RE: HTML table structure
From: "Brad Miller" <Brad.Miller@xxxxxxxxxxx>
Date: Wed, 3 Jul 2002 12:33:31 -0700
html table structure
Ah-ha, now I get it.
That works perfectly.

Thank you,
Brad

-----Original Message-----
From: sara.mitchell@xxxxxxxxx [mailto:sara.mitchell@xxxxxxxxx]
Sent: Wednesday, July 03, 2002 12:26 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  HTML table structure


Ah...I looked back at your original message and 
it looks like the problem is in how you select. 
Your structure has <screen> and <description> 
inside following <cell> elements, but your 
XSLT is selecting these as though they are 
all children of the same <cell>. 

So, what is happening is that the template is 
matching the first cell which contains the <item-number>
descendants and generating a table with two rows, 
one of which has the <item-number> content -- but the 
rest is blank because there *are no <screen> or 
<description>* children for the first cell. Then 
it gets invoked for the next cell which has no 
<item-number> descendants but does have <screen>, 
and so on. So you're probably actually getting 3 separate tables
-- it just looks like three rows. 

What you want (I think :), is something like this: 

<xsl:template match="TASKS/GUIDE">
 <table border="3">
 	<tr>
 		<td valign="top" align="left" width="200" 
 bgcolor="blue"  rowspan="2">
 		<OL>
         	<xsl:for-each select="ROW[1]/CELL/LIST/ITEM-NUMBER">
   			<li><xsl:value-of select = "." /></li>
 		</xsl:for-each>
 		</OL>
 		</td>
 		<td width="400">
 		<xsl:for-each select="ROW[2]/CELL/SCREEN">
   			<li><xsl:value-of select = "." /></li>
 		</xsl:for-each>
 		</td>
 	</tr>
 	<tr>
 		<td width="400">
 		<xsl:for-each select="ROW[3]/CELL/DESCRIPTION">
>   			<h2><xsl:value-of select = "TITLE" /></h2>
> 		</xsl:for-each>
> 		<xsl:for-each select="ROW[3]/CELL/DESCRIPTION">
>   			<p><xsl:value-of select = "PARA" /></p>
> 		</xsl:for-each>
> 		</td>
> 	</tr>
> </table>
> </xsl:template>

Sara

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


 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.