[Bug 4273] [FS] data on element()

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





--- Comment #45 from Michael Dyck <jmdyck@ibiblio.org>  2009-02-17 06:49:17 ---
(In reply to comment #43)
> Regarding Comment #38, although it fails type checking under the current rules,
> is there a reason why a query such as
> 
> 1 + <f><e>2</e></f> / e
> 
> can't pass static typing?

Actually, I believe it does succeed under the current rules, if
construction mode is 'strip'.

When construction mode is 'preserve', it can't succeed because the XQuery
spec mandates a type annotation of xs:anyType for a constructed node, so
soundness dictates that FS can't infer anything more specific for the
constructor expression. I don't know what Michael Rys means when he refers
to doing "more precise inference for anonymous types", unless he's also
imagining changing the XQuery spec. (If, in some cases, the XQuery spec
assigned a more specific type annotation, then the FS might be able to
reflect that in its static inferences.)

(I also don't know what he means when he says that "writing such an
expression is rather bad for many different reasons".)


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 17 February 2009 06:49:30 UTC