[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] 5 column grid sorted by Country


Subject: RE: [xsl] 5 column grid sorted by Country
From: "W Charlton" <XSLList@xxxxxxxxxx>
Date: Fri, 13 Jul 2007 09:31:55 +0100

Charles,

The problem is that any method (that I know of) for iteration over the nodes
remaining after a mod 5 uses the position(), unfortunately this does not
distinguish between Country unless I do something like <xsl:when
test="(position() &gt; $ThisNode) and (CountryCode = $ThisCountryCode)">
Select next vintner</xsl:when> where the 2 variables relate to the currently
selected node, which got very complex.

I have actually implemented a reasonably satisfactory solution using a fixed
width "550px" <td/> and using fixed size "100px" images so that they are
forced to display in a x width "grid".

The solution I was looking for would produce HTML something like:

<table>
	<tr><td colspan="5">USA</td></tr>
	<tr>
		<td>USVintnet1</td>
		<td>USVintnet2</td>
		<td>USVintnet3</td>
		<td>USVintnet4</td>
		<td>USVintnet5</td>
	</tr>
	<tr>
		<td>USVintnet6</td>
		<td>USVintnet7</td>
		<td>USVintnet8</td>
		<td>USVintnet9</td>
		<td>&nbsp;</td>
	</tr>
	<tr><td colspan="5">Chile</td></tr>
	<tr>
		<td>CLVintnet1</td>
		<td>CLVintnet2</td>
		<td>CLVintnet3</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
	<tr><td colspan="5">Australia</td></tr>
	<tr>
		<td>AUVintnet1</td>
		<td>AUVintnet2</td>
		<td>AUVintnet3</td>
		<td>AUVintnet4</td>
		<td>AUVintnet5</td>
	</tr>
	<tr>
		<td>AUVintnet6</td>
		<td>AUVintnet7</td>
		<td>AUVintnet8</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
	ETC..
</table>

Each Vintner could have 1-3 lines of <br /> separated text.


William Charlton
The yMonda team
yMonda Limited
w: www.ymonda.net


Current Thread