Subject: Re: N input nodes to specific number of ouput nodes
From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Oct 2008 16:43:56 +0100
|
>>>>> "Chris" == Bordeman, Chris <Chris.Bordeman@xxxxxxxxxxxxxxxxx> writes:
Chris> Hi all.
Chris> I need to loop through some nodes and output exactly 10
Chris> output nodes, no matter how many input nodes there are. If
Chris> too few input nodes the ouput will just show "N/A" and if
Chris> too many input nodes they will just be ignored.
Chris> I can do the 'too many' with a for-each and a choose based
Chris> on position() but don't get how the 'too few' scenario is
Chris> handled.
An xsl:choose discriminating on count() should do the trick.
--
Colin Adams
Preston Lancashire
|