Subject: RE: [xsl] HTML table structure From: "Brad Miller" <Brad.Miller@xxxxxxxxxxx> Date: Wed, 3 Jul 2002 12:33:31 -0700 |
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: [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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] HTML table structure, sara . mitchell | Thread | [xsl] illegal characters in large X, Meltem Kogelbauer |
RE: [xsl] HTML table structure, sara . mitchell | Date | RE: [xsl] The Future of Browser-Bou, sara . mitchell |
Month |