Hi Luis
Comments in place...
----- Original Message -----
From: "Luis Pe�a" <[EMAIL PROTECTED]>
> Hi James,
>
> This time I try to finish to understand the XPath implementation for the
> "selectNodes" method.
>
> I have the following problems:
> 1. I want to sort a set of nodes that appear in a XML document and I use
the
> selectNodes method as:
>
> List l = d.selectNodes("/rule//param","/rules//param[@name]")
>
> for sorting the output, but it doesn't work, why? :(.
The second parameter is the sorting XPath expression, which is relative to
the nodes that are selected.
e.g. the first /rule//param XPath expression will find a list of <param>
elements. If you want to sort these by their @param attribute then use...
List l = d.selectNodes("/rule//param","@name")
> 2. The first problem cames from the need of sort the nodes by their order
of
> apparition in a document, but I recieve the nodes on inversed order,
> <rule name="A">
> <param name="v1"/>
> <param name="v2"/>
> </rule>
> <rule name="B>....
>
> recived= v2,v1 instead of v1,v2;
>
> again why?
>
> 3. The last question that I have is about the third parameter in
> selectNodes, is I set it true then the duplicated are eliminated, but both
> of them and I want to recived at least one, again and again why?.
Not totally sure I follow. Does changing the sort-by XPath expression help
this last question?
James
>
> Thanks James.
> ___________________________________________________
> Luis Pe�a S�nchez. AQS (Advanced Quality Solutions).
> Ingeniero de Software. Jorge Juan 30, 6� planta.
> [EMAIL PROTECTED] 28001 Madrid.
> <http://www.aqs.es/>. Tel.91 578 01 27. / Fax. 91 577 76 78.
> ___________________________________________________
>
>
>
> -----Mensaje original-----
> De: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]En nombre de James
> Strachan
> Enviado el: mi�rcoles, 19 de diciembre de 2001 11:24
> Para: [EMAIL PROTECTED]
> Asunto: Re: [dom4j-dev] Another XPath-question
>
>
> Thats correct Jim. This page describes the changes that have been added
> since the 1.1 release...
>
> http://dom4j.org/todo.html
>
> James
> ----- Original Message -----
> From: "Jim Wissner" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, December 17, 2001 4:10 PM
> Subject: Re: [dom4j-dev] Another XPath-question
>
>
> >
> > I had the same problem. You have to download the latest daily build,
and
> > it will be there. Seems to have been added since 1.1.
> >
> > Jim
> >
> >
> > At 03:41 PM 12/17/2001 +0100, [EMAIL PROTECTED] wrote:
> > >Thanks, James for your fast response.
> > >
> > >Now things are getting clearer... But one more question:
> > >trying your sample code I get the error that
> > >
> > >myXPath.setNamespaceURIs(uris);
> > >
> > >does not work as there is no method called setNamespaceURIs. Although
it
> > >is written in the ApiDocs there is only setNamespaceContext which is
> using
> > >JAXEN.
> > >
> > >I downloaded dom4j-1.0.zip from Southforge but there is no such
function
> > >in the source code.
> > >
> > >How come?
> > >
> > >Rgds.
> > >Marc
> > >________________________________________________________________
> > >Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr!
> > >Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13
> > >
> > >
> > >
> > >_______________________________________________
> > >dom4j-dev mailing list
> > >[EMAIL PROTECTED]
> > >https://lists.sourceforge.net/lists/listinfo/dom4j-dev
> >
> > --
> > [EMAIL PROTECTED]
> >
> > Visit www.jbrix.org for:
> > + SpeedJAVA jEdit Code Completion Plugin
> > + Xybrix XML Application Framework
> > + other great Open Source Software
> >
> >
> > _______________________________________________
> > dom4j-dev mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/dom4j-dev
> >
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> _______________________________________________
> dom4j-dev mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-dev
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user