Steven wrote:
I've got a number of elements that each contain a paragraph of text, I want
to put that text into 2 columns of a HTML table, half the paragraphs in one
column, half in the other. So I loop through the paragraph elements (using
xsl:for-each), outputting each one in turn. When I'm on the middle element I
want to output HTML that will close the tag for the current cell and start
the new cell (or column). After that I just output the rest of paragraph
elements. So what I've been trying is to use an xsl:if statement in the
middle of the xsl:for-each to see if I'm on the middle element and then
creating the new cell at that point.
Well, again, you can't program in XSLT as in C or Java, it's not imperative
procedural language. You have to learn to think in a declarative way.
So instead of processing paragraph and closing/opening cells XSLT requires you
just to declare that you want two cells, half of text in one and the rest in
the second.
Why don't you post an example of you XML and the desired result?
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel