Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XSLT Newbie Help

From: X-Factor <X-Factor@--------.--->
To: NULL
Date: 7/3/2005 4:22:00 PM
Help I'm stuck with this XSLT malarky.

I've got data something like below (made up names to keep it simple?!)
I want to create a HTML document with a table for everything with group 
0 and another table for the rest. Within each table I'd have a different 
looking row depending on if it's a Car or a Bike.

I've managed to get it to sort all the groups an output a header for the 
first group 0, but I can't work out how to work out when I've got the 
last group 0 and the first/last non group 0.

It would be possible to have no items in either group.

Help!!

Thanks,

<xsl:for-each select=" //Group">
<xsl:sort select="." data-type="number"/>
	<xsl:if test="../Group=0 and position()=1">
		Ungrouped Vehicles
	</xsl:if>

	<h1>Group:</h1>
	<xsl:value-of Select="../Group"/><br></br>
		...
		...
</xsl:for-each>


<Contract>
	<Client Detail>
	....
	</CLient Details>
	<Cars>
		<Car>
			...
			<Group>1<Group>
		</Car>
	<Cars>

	<Bikes>
		<Bike>
			...
			<Group>2<Group>
		</Bike>
		<Bike>
			...
			<Group>0<Group>
		</Bike>
	<Bikes>
</Contract>


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent