Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Returning "nearest in document" matches using XPath >Thread Next - Re: Returning "nearest in document" matches using XPath Re: Returning "nearest in document" matches using XPathTo: NULL Date: 12/5/2008 3:18:00 PM In article <4939431f$0$17068$6e1ede2f@r...>,
Dimitre Novatchev <dnovatchev@c...> wrote:
>What do you mean by "nearest"? Is this the geographical distance b/n two
>nodes? I dont see this reflected in the XML document.
No, sorry for being unclear. I mean that from the set of ip attributes
on the axis which contains both the root and the required id attribute:
/ ... @ip ... @ip ... @ip ... @id
I want to find the left-most one in the above diagram, nearest to the root
(or to other selected starting node inbetween the root and the required @id).
I can do this for single ids with the Xpath query I posted, although I
don't fully understand the ordering I am getting. I can't figure out
how to make a satisfactory query which will return the set of leftmost
@ip for all the ids in the XML document.
Thanks for your interest, if I'm still not explaining clearly please let
me know. I'm quite new to XML/Xpath and don't always know the correct
way to describe what I want to do.
Nick
--
Serendipity: http://www.leverton.org/blosxom (last update 19th September 2008)
"The Internet, a sort of ersatz counterfeit of real life"
-- Janet Street-Porter, BBC2, 19th March 1996
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
