[xquery-talk] comparing consequtive elements
Chris Ness
cness at soundmotion.co.uk
Fri Jun 2 14:54:58 PDT 2006
excellent!! thanks David.
I shall continue on my own now. (for a while anyway)
no book recommendations guys? web tutorials?
chris
PS why do I get reply messages twice?
David Carlisle wrote:
>adj.xml (made well formed:-)
><eg>
> <section n="1">
> <a attribute="1"/>
> <a attribute="2"/>
> </section>
> <section n="2">
> <a attribute="3"/>
> <a attribute="1"/>
> </section>
> <section n="3">
> <a attribute="3"/>
> <a attribute="3"/>
> </section>
> <section n="4">
> <a attribute="1"/>
> <a attribute="1"/>
> </section>
></eg>
>
>
>
>
>adj.xq
>
>/eg/section[a[@attribute=3 and following::a[1]/@attribute=1]]/number(@n)
>
>
>$ saxon8q -s adj.xml adj.xq
><?xml version="1.0" encoding="UTF-8"?>2 3
> ^^^ as requested
>
>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