[xquery-talk] comparing consequtive elements

Philippe Michiels philippe.michiels at gmail.com
Fri Jun 2 16:03:31 PDT 2006


> no book recommendations guys? web tutorials?
Plenty of them, look for pointers in the archives of this list. My
favorite book is:
  XQuery, the XML query language by M. Brudage

> PS why do I get reply messages twice?
Because that's what happens if we do a reply to all, i.e., we reply to
you as the sender and to the mailing list separately.

-Ph

> 
> 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
> >________________________________________________________________________
> >
> >
> >  
> >
> 
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk
-- 
Philippe Michiels (PhD Student)
Advanced Database Research and Modeling
University of Antwerp
t: +32 3 265 38 80
w: http://www.adrem.ua.ac.be/~michiels



More information about the talk mailing list