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 3665 - Type checking fn:data(())
Summary: Type checking fn:data(())
Status: CLOSED WONTFIX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Jerome Simeon
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-07 08:15 UTC by Tim Mills
Modified: 2006-10-19 19:47 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2006-09-07 08:15:47 UTC
Consider the type-checking of fn:data(()) (i.e. fn:data on empty sequence)

statEnv |-  data on prime(Type) : Type1
--------------------------------------------
statEnv |-  (FN-URI,"data")(Type) : Type1 ยท quantifier(Type)

Type = empty
Type 1 = data on prime(empty) = data on (none) = none

Surely fn:data(()) should typecheck as empty?
Comment 1 Tim Mills 2006-09-07 15:15:23 UTC
I suspect that:

prime(empty) = empty

and not

prime(empty) = none

as specified in

http://www.w3.org/TR/xquery-semantics/#jd_prime
Comment 2 Jerome Simeon 2006-09-19 14:58:41 UTC
I believe despite being odd, this definition is actually correct.
The prime function computes the item types for a given type. there is none for the empty type.

when computing the factorization for empty the rules will be applied as follows:

prime(empty) = none
quantifier(empty) = ?

prime(empty) . quantifier(empty) = none? = none | empty = empty

which should be the expected result.

- Jerome
Comment 3 Tim Mills 2006-09-19 15:42:07 UTC
Thanks.  That clears that up.
Comment 4 Jerome Simeon 2006-09-26 13:59:48 UTC
Tim,
Thank you for your comment.
The XSLT and XML Query working groups have decided to close this
comment with no further action.
Best,
- Jerome
On behalf of the XSLT and XML Query WGs