[xsl] FW: Two-Column XSL question

Subject: [xsl] FW: Two-Column XSL question
From: "Thomas, Josh" <jpthoma2@xxxxxxxxxxx>
Date: Thu, 31 Jan 2008 09:09:14 -0600
I recently found this post while searching for how to do an two-column list
from one-column data with XSL:

The following would do the two column display you are after (however I have
checked it for typos etc.)

<xsl:template name="twocolumns">
  <xsl:for-each select="people[position() mod 2 = 1]">
    <tr>
    <xsl:variable name="others" select="following-sibling::option[position()
&lt; 2]" />
      <xsl:for-each select=".|$others">
        <td>
          <xsl:value-of select="person' />
        </td>
        <xsl:if test="not($others)">
          <td></td>
        </xsl:if>
      </xsl:if>
    </tr>
  </xsl:for-each>
<!-- end of sorting the currencies into two columns -->
</xsl:template>

It worked for me, but I need some help understanding what these items are
actually doing:
1-    <xsl:variable name="others"
select="following-sibling::option[position()
&lt; 2]" />
2-       <xsl:for-each select=".|$others">
3-  <xsl:if test="not($others)">

Thanks,
Josh

Current Thread