Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Returning "nearest in document" matches using XPath

From: Nick Leverton <nick@--------.--->
To: 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent