[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] newbie ques: alternating tags in a list?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|