Re: [Bug 3773] CastableAs648

On Thursday 28 September 2006 20:59, bugzilla@wiggum.w3.org wrote:
> http://www.w3.org/Bugs/Public/show_bug.cgi?id=3773
>
>            Summary: CastableAs648
>            Product: XML Query Test Suite
>            Version: 1.0
>           Platform: PC
>         OS/Version: Linux
>             Status: NEW
>           Severity: normal
>           Priority: P2
>          Component: XML Query Test Suite
>         AssignedTo: andrew.eisenberg@us.ibm.com
>         ReportedBy: simeon@us.ibm.com
>          QAContact: public-qt-comments@w3.org
>
>
> CastableAs648 tests that the argument to cast (or test castability)
> to a QName is a literal string.  This test, in theory, should fail
> because the argument is a variable:
>
>  let $var := "ABC"
>  return $var castable as xs:QName
>
> But when simple constant propagation is applied,
> yielding a semantically equivalent expression, the expression is
> valid, so I don't think it is a very useful test.

Heh, is it only me that get "You are not authorized to access bug #3773. To 
see this bug, you must first log in to an account with the appropriate 
permissions." when attempting to visit 
http://www.w3.org/Bugs/Public/show_bug.cgi?id=3773?

Anyway, I think the report is incorrect and the test should stay as is. 
Allowing it to pass makes the error reporting conditional on the 
implementation(and we got enough of that in static typing already!). It would 
harm interoperability. As I see it, if that one should be allowed, there's no 
intrinsic reason to why "concat("a", "b")" should be disallowed as argument.

Perhaps, a general constant propagation can be defined for XQuery 1.Next, but 
I'd say implementors for now have to look into doing this kind of error 
detection before applying optimizations.


Cheers,

		Frans

Received on Thursday, 28 September 2006 19:20:32 UTC