You're thinking in terms of writing tags to the serialized output. But that's not what XSLT does: it builds a tree. Writing a node is an atomic operation, you can't write two halves of a node to a tree separately.
The logic you want is something like this:
<xsl:if test="position() mod 2 = 1">
<tr>
process "."
process "./following-sibing::*[1]"
</tr>
</xsl:if>
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|