Re: [xsl] [XSL]Display Different Results Based on Count of NodeSets

Subject: Re: [xsl] [XSL]Display Different Results Based on Count of NodeSets
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 24 Sep 2007 12:46:15 +0100
<xsl:template match="title">
           <xsl:when test="position() ='1'"/>

beware that that test will be true just if the current node is the first
node in the current node list, which is a property of the stylesheet,
not of the node itself.

You (still) haven't posted a complete stylesheet so i have to guess, but
if for example this template is executed by


and your input looks like

then the test will never be true, as the first node selected is a text
node (that just has a newline) so the first title will have


The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 

Current Thread