[xsl] two column table with alternating row colors using xsl xml and css

Subject: [xsl] two column table with alternating row colors using xsl xml and css
From: nicholse@xxxxxxxxxxxxxxxx
Date: Thu, 7 Aug 2003 02:40:26 -0700 (PDT)
two column table with alternating row colors using xsl xml and css
I would like to create a balanced two column table with alternating row
colors sorted by business excluding html pre data for data non existant in
the xml elements like () in the phone number. I am using the processor php
extension http://nona.net/software/phplibxslt/:

$transformed = libxslt_transform($xmlstring, $xsltstring);

The data will come from xml:
<?xml version="1.0" encoding="UTF-8" ?>
<FMPDSORESULT xmlns="http://www.filemaker.com/fmpdsoresult";>
<Co>Abbott Tinkers (Pat)</Co>
<Address1>736 Santa Anna Ave</Address1>
<Co>Aderbouy Specialty</Co>
<Address1>1557 Hemmy Drive</Address1>
<Phone1_Area_Code></Phone1_Area_Code><! if phone number is missing exclude
output of "(   )">
<Phone1_Number></Phone1_Number><! what if this tag is "<Phone1_Number/>"?>
<! etcetera...>

I have tried a xsl like the following which works fine but dosent
implement two columns, sorting by business and alternating color rows. I
am also not sure how fancy I can get with this processor. Every time I try
to modify this xsl the processor returns raw xml to the browser. Tis is
the default behaviour if there are errors encountered:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="fmp:FMPDSORESULT">
<xsl:for-each select="fmp:ROW">
<B><xsl:value-of select="fmp:Co" /></B><BR />
<xsl:value-of select="fmp:Address1" /><BR />
<xsl:value-of select="fmp:City1" />, <xsl:value-of select="fmp:State1" />
<xsl:value-of select="fmp:Zip1" />
<BR />
(<xsl:value-of select="fmp:Phone1_Area_Code" />)<xsl:value-of
select="fmp:Phone1_Number" />
<BR />

I read that using css with table or tr tags can cause browser
crashes/display problems at http://css.nu/examples/table-example.html .
Need I be worried?. I have not attempted an external css but maybe
something like this?:

tr.address_row {background-color: #FFFFFF;}
tr.address_row_alternate {background-color: #FFFFFF;}

I want the html/xhtml output to resemble this:
<TR VALIGN="top" CLASS="address_row" BGCOLOR="#FFFFFF">
<!altenating color would be EFEFEF>
<TD WIDTH="100%">
<DIV CLASS="address">
<!city>city, <!state>state <!zip>zip<BR>
<TD VALIGN="bottom" nowrap>

Is it safe/stable to impliment the templates from
http://xsltsl.sourceforge.net/ ? Would this provide functionality that
would help enable what I am trying to accomplish? I am struggling but
learning alot. Any advice or help is much appreciated!

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

Current Thread