This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: HTML table structure


Ah-ha, now I get it.
That works perfectly.

Thank you,
Brad

-----Original Message-----
From: sara.mitchell@ps.ge.com [mailto:sara.mitchell@ps.ge.com]
Sent: Wednesday, July 03, 2002 12:26 PM
To: xsl-list@lists.mulberrytech.com
Subject: RE: [xsl] 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]