Here is my code
<table cellspacing="0" cellpadding="0"><tbody>
<tr>
<xsl:for-each select="/*/nearme/location">
<td>
<input type="radio" name="rf" id="rf" class="page_checkbox"/><label for="rf1"><span></span><xsl:value-of select="."/></label>
</td>
<xsl:if test="position() mod 5=0">
</tr><tr>
</xsl:if>
</xsl:for-each>
</tr>
</tbody></table>
If you look there is an xsl if test
that determines if the position is modulus 5. When it does, i want to end the tr
and start a new tr
however it breaks with this current code.
Any idea how to solve this?
UPDATE:
Here is my xml:
<nearme>
<location id="538">Pleasures</location>
<location id="541">Baby Dolls</location>
<location id="1521">Michelle's Beach House</location>
<location id="1886">Wild Wild West Gentlemen's Club</location>
<location id="993">Sadies</location>
<location id="5381">ABC</location>
<location id="541">DEF</location>
<location id="1521">ghi</location>
<location id="1886">FDFFDSFD</location>
<location id="993">HGHHFH</location>
</nearme>
And here is my expected output:
<table cellspacing="0" cellpadding="0"><tbody>
<tr>
<td>
<input type="radio" name="rf" id="rf1" class="page_checkbox"/><label for="rf1"><span></span>Pleasures</label>
</td>
<td>
<input type="radio" name="rf" id="rf2" class="page_checkbox"/><label for="rf2"><span></span>Baby Dolls</label>
</td>
<td>
<input type="radio" name="rf" id="rf3" class="page_checkbox"/><label for="rf3"><span></span>Michelle's Beach House</label>
</td>
<td>
<input type="radio" name="rf" id="rf4" class="page_checkbox"/><label for="rf4"><span></span>Wild Wild West Gentlemen's Club</label>
</td>
<td>
<input type="radio" name="rf" id="rf5" class="page_checkbox"/><label for="rf5"><span></span>Sadies</label>
</td>
</tr>
<tr>
<td>
<input type="radio" name="rf" id="rf6" class="page_checkbox"/><label for="rf6"><span></span>ABC</label>
</td>
<td>
<input type="radio" name="rf" id="rf7" class="page_checkbox"/><label for="rf7"><span></span>DEF</label>
</td>
<td>
<input type="radio" name="rf" id="rf8" class="page_checkbox"/><label for="rf8"><span></span>ghi</label>
</td>
<td>
<input type="radio" name="rf" id="rf9" class="page_checkbox"/><label for="rf9"><span></span>FDFFDSFD</label>
</td>
<td>
<input type="radio" name="rf" id="rf10" class="page_checkbox"/><label for="rf10"><span></span>HGHHFH</label>
</td>
</tr>
</tbody></table>