1- <xsl:variable name="others"
select="following-sibling::option[position() < 2]" />
selects the immediately following sibling. Same as
following-sibling::option[1], but the code was presumably written this way
so that 2 could be replaced by any number as the number of columns; if it
was 5 then the meaning would be "the first 4 following siblings".
2- <xsl:for-each select=".|$others">
"|" forms the union of two node sets: in this case, the union of "." (the
context node) and $others. So if you want four columns,
.|following-sibling::*[position() < 4] selects this node and the next
three.
3- <xsl:if test="not($others)">
not() takes the effective boolean value of its operand; the EBV of a
node-set is true except when the node-set is empty. So this (common)
construct tests true if $others is an empty node-set.
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--