This was a message I sent just to Amy rather than the list by mistake...
From: "James Strachan" <[EMAIL PROTECTED]>
> From: "Amy Lewis" <[EMAIL PROTECTED]>
> > So before *everyone* has to deal with positional notation, I'd like to
> > see a justification for it, or I'd like to see a solution that allows
> > someone to enable/disable/override.
>
> BTW sorry for the delay in keeping up with these discussions. I'm at
JavaOne
> right now and don't seem to have much time this week for email :-(
>
> I'm actually leaning towards this point of view now, leaving getPath() to
> return an XPath expression to be a nodeset that will always contain the
> given node, even if other nodes are added or removed.
>
> In many ways I see getPath() as being a helper method, especially useful
for
> debugging and such like and possibly useful when doing XPath
manipulations,
> wanting to know the path to a particular node for use in contructing new
> XPath expressions. If there is sufficient demand for the 'return a path to
a
> single node' version which uses the index notation, then we could
implement
> both methods quite easily.
>
> getPath() -> /root/author/@name
> getSinglePath() -> /root/author[2]/@name
>
> (maybe the name 'getExactPath' is a better name?).
>
> I can see both versions having some use, though is getSinglePath()
> sufficiently useful to add it to the main API? It could always be a helper
> method in, say, DocumentHelper.
After a good suggestion for Amy, I've gone with "getUniquePath()" rather
than "getSinglePath()".
James
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dom4j-dev