The XSLT transformation I'm working on is crucial for my project, and it's hampering progress as I'm not familiar with XSLT. I've managed to get my xsl stylesheet to do some of the things I want it to do, but not all. I'd just like to get it working without having to go though an XSLT book for now as I'm already reading two other books.
Anyway, to the point.
A. Combining apply-templates
SOLVED: Okay, I've just discovered xsl:call-template.
I have the following:
<xsl:apply-templates select="docname/date/day"/>
<xsl:apply-templates select="docname/date/month"/>
<xsl:apply-templates select="docname/date/year"/>
And three
separate matching templates. Surely there must be a way to just have one xsl:apply-templates statement.
B. Alternating rows
1. I need to read words
<word>aWord</word> from an XML file, but I will never know how many words there will be
2. The words will go into an html table, a maximum of five per row.
3. Rows have alternating colors
If I had to write a program in
Java which printed five words per line, I'd just do something like
So I'm assuming I could also use mod % 5 to create a new table row and perhaps some kind of boolean value to indicate whether we're working with odd or even rows for colors. Could someone help me out?