W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2003

Re: [XQuery] What dynamic error does treat expression raise?

From: Don Chamberlin <chamberl@almaden.ibm.com>
Date: Fri, 21 Nov 2003 10:09:48 -0800
To: "Priscilla Walmsley" <priscilla@walmsley.com>
Cc: public-qt-comments@w3.org, w3c-query-editors@w3.org
Message-ID: <OFD0E3CFF0.E882BDAD-ON88256DE5.0063309F-88256DE5.006340C9@us.ibm.com>
Fixed by changing XP0006 to XP0050 (the more specific error code). Thanks!
--Don Chamberlin





"Priscilla Walmsley" <priscilla@walmsley.com>
Sent by: public-qt-comments-request@w3.org
11/21/2003 07:21 AM
 
        To:     <public-qt-comments@w3.org>
        cc: 
        Subject:        [XQuery] What dynamic error does treat expression 
raise?



The description of the treat expression in the XQuery language draft says:

"During expression evaluation: If expr1 matches type1, using the
SequenceType Matching rules in 2.4 Types, the treat expression returns the
value of expr1; otherwise, it raises a dynamic error.[err:XP0006] "

Then later it says:

"The static type of $myaddress may be element(*, Address), a less specific
type than element(*, USAddress). However, at run-time, the value of
$myaddress must match the type element(*, USAddress) using SequenceType
Matching rules; otherwise a dynamic error is raised.[err:XP0050]"

These seem like the same situation with 2 different error messages (XP0006
and XP0050).

Does the draft contradict itself, or am I misreading?

Thanks,
Priscilla
Received on Friday, 21 November 2003 13:09:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:28 GMT