qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] Parent Navigation


From: Per Bothner
Subject: Re: [Qexo-general] Parent Navigation
Date: Sun, 30 Nov 2003 16:37:02 -0800
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5) Gecko/20031007

Sascha Opletal wrote:

[I took the liberty of cc'ing the list, since you forgot to
"reply-all".]

The for-loop in my query is like this:

for $b in distinct-values(doc("data2.xml")/a/b/@c)

The distinct-values does not operate correctly on /a/b but on /a/b/@c it works.

But not that distinct-values returns a sequence of atomic values,
*not* nodes.  If the operands are nodes, their typed value (i.e.
a string since we don't have schemas) is extracted.  And you can't
get the parent of a string.

Of course that assumes you're using the standard distinct-values
function.  If you're using the implementation I posted, that might
work accidentally.  If not, it could be the basis for something that
does what you need - but you should rename it if you're depending
on non-standard behavior.
--
        --Per Bothner
address@hidden   http://per.bothner.com/






reply via email to

[Prev in Thread] Current Thread [Next in Thread]