[Bug 4417] Static typing of emptyorderdecl-2

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4417


tim@cbcl.co.uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




------- Comment #2 from tim@cbcl.co.uk  2007-09-17 15:20 -------
Sorry, this still isn't correct.

Note that <a></a> contains no text nodes, so exactly-one fails.  You probably
meant zero-or-one here.

(: Name: emptyorderdecl-2 :)
(: Description: Evaluation of a prolog that specifies "empty greatest" with a
se
t of nodes (one empty) and sort them in ascending order :)

declare default order empty greatest;

(: insert-start :)
declare variable $input-context1 as document-node(element(*, xs:untyped))
extern
al;
(: insert-end :)

for $i in (<a>1</a>,<a>4</a>,<a></a>,<a>7</a>)
order by exactly-one($i/text()) ascending
return $i

Received on Monday, 17 September 2007 15:20:56 UTC