This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4417 - Static typing of emptyorderdecl-2
Summary: Static typing of emptyorderdecl-2
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 1.0.2
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Frans Englich
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-27 16:41 UTC by Tim Mills
Modified: 2007-10-02 10:25 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2007-03-27 16:41:26 UTC
Queries such as emptyorderdecl-2 exhibit a static typing error.

The order specifier $i/text() is statically typed as a zero-or-more sequence.

Other affected queries are emptyorderdecl-3, 10, 11, 14 15, 18, 19, 22, 24.

(: 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 external;
(: insert-end :)

for $i in (<a>1</a>,<a>4</a>,<a></a>,<a>7</a>)
order by $i/text() ascending
return $i
Comment 1 Frans Englich 2007-09-14 15:14:35 UTC
A fix has been attempted in CVS, XQTS_current.zip is updated.

If the resolution is satisfactory, feel free to change status to CLOSED.
Otherwise, reopen this report. If no feedback is returned within two weeks,
status will be changed to CLOSED. Thanks for reporting!
Comment 2 Tim Mills 2007-09-17 15:20:49 UTC
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
Comment 3 Frans Englich 2007-10-02 09:51:03 UTC
A fix has been attempted in CVS, XQTS_current.zip is updated.

If the resolution is satisfactory, feel free to change status to closed. Otherwise reopen this report. If no feedback is given within two weeks, status will be set to closed.
Comment 4 Tim Mills 2007-10-02 10:25:32 UTC
Thanks.