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

Trouble with tables

Subject: Trouble with tables
From: "Richard Lander" <rlander@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Feb 1999 15:11:32 -0500
trouble with tables
 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

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.