[Bug 3312] XPST0080, XPST0003 and XPST0051 overlaps

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


frans.englich@telia.com changed:

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




------- Comment #2 from frans.englich@telia.com  2006-08-04 10:46 -------
I don't think sufficient changes has been done, so I reopen.

Apart from that invalid casting combinations are discussed in 3.12.3 Cast and
3.12.4 Castable, it is also mentioned in 17.1 Casting from primitive types to
primitive types:

<quote>
[XML Schema Part 2: Datatypes Second Edition] defines xs:NOTATION as an
abstract type. Thus, casting to xs:NOTATION from any other type including
xs:NOTATION is not permitted. However, casting from one subtype of xs:NOTATION
to another subtype of xs:NOTATION is permitted.

Casting is not supported to or from xs:anySimpleType. Thus, there is no row or
column for this type in the table below. For any node that has not been
validated or has been validated as xs:anySimpleType, the typed value of the
node is an atomic value of type xs:untypedAtomic. There are no atomic values
with the type annotation xs:anySimpleType at runtime.

Similarly, casting is not supported to or from xs:anyAtomicType. There are no
atomic values with the type annotation xs:anyAtomicType at runtime, although
this can be a statically inferred type.

An attempt to cast to any of the above three type raises a static error
[err:XPST0080]XP
</quote>

That is, as I see it F&O specifies a behavior that contradicts what was
implemented in this report.

I guess the actual problem is that the XQuery and F&O specs duplicate each
other. I think the proper solution is to fix that. However, the easiest and
least intrusive way, is probably to remove the last paragraph, "An attempt to
cast to any of the above three type raises a static error", and add [errorcode]
markups inline in accordance with how 3.12.3 Cast and 3.12.4 Castable was
edited.

This was brought to my attention by Ying Lu in private mail.

Also, I don't think the changes proposed in the original comment is implemented
in the internally publicized drafts, but I presume that's expected.


Frans

Received on Friday, 4 August 2006 10:46:36 UTC