[xquery-talk] comparing consequtive elements

David Carlisle davidc at nag.co.uk
Fri Jun 2 12:35:58 PDT 2006


   now say I need to look for the transition

   <a attribute="3"/>
   <a attribute="2"/>

   example one will produce a positive and example 2 a negative (a yes/no 
   answer is sufficient at this time)

if (/eg[@N=1]/a[@attribute=3 and following-sibling::a[1]/@attribute=2])
then
 "yes"
else
 "no"

David



________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


More information about the talk mailing list