- From: Alberto Massari <amassari@progress.com>
- Date: Fri, 10 Oct 2003 19:38:03 +0200
- To: public-qt-comments@w3.org
- Message-id: <6.0.0.22.2.20031009164341.0353b390@namail.bedford.progress.com>
Hi everybody,
1) in the R use cases, a user defined function is introduced:
declare function local:dec-max($i as item()*)
as xs:decimal
{
max( for $j in $i return xs:decimal($j) )
};
In a couple of cases (Q2 and Q6) the list of items provided to the function
is empty, so "max" returns an empty sequence too. In this case, an error is
raised, because an xs:decimal cannot be constructed from an empty sequence.
In my opinion, the return value should be changed into an xs:decimal?
Note: we are not sure that constructing an xs:decimal from an empty
sequence is not allowed; can you confirm this is true? It would seem so, as
the result for the Q2 query shows "<high_bid></high_bid>" instead of
"<high_bid>0</high_bid>", implying that the local:dec-max function returns
an empty sequence.
2) the XMP-Q4 use case has been modified in this version to sort the
authors by last and first name
<results>
{
let $a := doc("http://bstore1.example.com/bib/bib.xml")//author
for $last in distinct-values($a/last),
$first in distinct-values($a[last=$last]/first)
order by $last, $first
...
but the result still lists Stevens W. as the first one (it should be the third)
Alberto
Received on Friday, 10 October 2003 13:38:26 UTC