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

newbie ques: alternating tags in a list?

Subject: newbie ques: alternating tags in a list?
From: Michael Puscar <mpuscar@xxxxxxxxxxxxxxx>
Date: Wed, 9 Dec 1998 11:58:41 -0500 (EST)
mike puscar
I have only been at this for a little while, but I have a question perhaps
someone could give me a hand with:

I have a list of domains in XML that looks like this:

<DOMAINS>
   <DOMAIN>ELITERACY.COM</DOMAIN>
   <DOMAIN>CYBERSUBSCRIPTION.COM</DOMAIN>
   <DOMAIN>CYBERSUBSCRIBE.COM</DOMAIN>
   <DOMAIN>COSMICTEACHER.COM</DOMAIN>
</DOMAINS>

Converting this to HTML (through XSL) into a table is easy, it could look
something like:

<xsl:template match="DOMAINS">
    <table><tr><td> <xsl:process select="DOMAIN"/> </td></tr></table>
</xsl:template>

.. however what I want to do is display the domain information in a two
column format in an HTML table, so that the output would look something
like:

<table>
  <tr><td> FIRST_DOMAIN </td> <td>SECOND_DOMAIN</td></tr>
  <tr><td> THIRD_DOMAIN </td> <td>FOURTH_DOMAIN</td></tr>
</table>

.. as you can see, one "template match" will not work because I want to
handle every other domain differently.  

Does anyone have any ideas for how I can accomplish this in XSL?  What I
basically want to do is be able to number the domain list, mod the number
and use the mod result to determine how the domain should be output.

Any comments, help is greatly appreciated!

Thanks,

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Michael A. J. Puscar           http://thunder.ocis.temple.edu/~mpuscar
mpuscar@xxxxxxxxxxxxxxxxxxxxxxx



 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.