xsl-list
[Top] [All Lists]

Re: [xsl] following-sibling problem

2007-06-06 05:20:17
  

 <xsl:when test="following-sibling::ReferenceReasonText[1]">


   following-sibling::ReferenceReasonText

selects all following sibling ReferenceReasonText nodes, so

  following-sibling::ReferenceReasonText[1]

selects the first of these.

The boolean test will be true if this node set is non empty, so
in a test the [1] isn't doing anything ,the tests "is there a following
sibling" and "is there a first following sibling"  are the same.

You don't want the first ReferenceReasonText node, you want teh first
element node and then test if that's a ReferenceReasonText


   <xsl:when test="following-sibling::*[1][self::ReferenceReasonText]">


David

________________________________________________________________________
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. 
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>