[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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) |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
XP & XT on macOS, Steve Warner | Thread | Getting Started with XSL, Nigel Byrnes |
RE: Newbie question..., Guy_Murphy | Date | Getting Started with XSL, Nigel Byrnes |
Month |
Keywords