logo       

distinct-values( ) appears to return empty for any sequence of nodes.: msg#00095

text.xml.saxon.help

Subject: distinct-values( ) appears to return empty for any sequence of nodes.

I have a problem with distinct-values using Saxon 8.4

If I run the following XQuery:
----------------begin XQuery ----------------
let $x:=(<one/>,<one/>,<two/>)
let $y:=(1,1,2)
return
<answers>
<nodeDistinct>{distinct-values($x)}</nodeDistinct> <valueDistinct>{distinct-values($y)}</valueDistinct>
</answers>
-------------- end XQuery ----------------

I get the result
--------------begin Result ------------------------
<?xml version="1.0" encoding="UTF-8"?>
<answers>
<nodeDistinct/>
<valueDistinct>1 2</valueDistinct>
</answers>
--------------end Result --------------------------

It seems that distinct-values fails silently on any sequence of nodes. Am I missing something
in the spec for XQuery 1.0 that forbids using a sequence containing nodes of type element or document?

Thanks,

Ben



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise