Trouble with tables

Subject: Trouble with tables
From: "Richard Lander" <rlander@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Feb 1999 15:11:32 -0500
 Hello,

I'm having a bit of trouble constructing a table.  I have created a list of
terms and meaning, which comply to the following definitions.

<!ELEMENT TERMS 		(TERM,MEANING)+>
<!ELEMENT TERM 		(#PCDATA)>
<!ELEMENT MEANING		(#PCDATA)>

I can create a table that includes one row of terms, broken into table-data
(<TD>) cells and another row of meanings in TD cells. That was easy. I'm now
trying to start another set of rows every time I reach four term/meaning
sets, so that I don't send my table off into oblivion. I was thinking about
using a counter and xsl:if or xsl:when, but am not sure of what to do or if
that will even work. Does anyone have any perls of wisdom that they might
offer? I'm currently using ie5b2, but am happy to start playing with XT, for
those who only use it.

The following text is the XSL that I'm using for the job, so far.

<xsl:template match="TERMS">
	<TABLE>
	<TR>
	<xsl:apply-templates select="TERM"/>
	</TR>
	<TR>
	<xsl:apply-templates select="MEANING"/>
	</TR>
	</TABLE>
</xsl:template>

<xsl:template match="TERM">
	<TD bgcolor="yellow" color="black">
	<DIV class="CODE">
	<xsl:apply-templates/>
	</DIV>
	</TD>
</xsl:template>

<xsl:template match="MEANING">
	<TD bgcolor="blue">
	<DIV style="color:white;font:bold">
	<xsl:apply-templates/>
	</DIV>
	</TD>
</xsl:template>

Thanks,

Richard.



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


Current Thread