This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The range of gYear and gYearMonth are implementation defined (XQuery 5.3.4). Section 17.1.1 of functions and operators says (re. casting from strings): In casting to a date or time value, if the value is too large or too small to be represented by the implementation, error [err:FODT0001] is raised. In casting to a duration value, if the value is too large or too small to be represented by the implementation, error [err:FODT0002] is raised. For xs:anyURI, the extent to which an implementation validates the lexical form of xs:anyURI is ·implementation dependent·. If the cast fails for any other reason, error [err:FORG0001] is raised. If the phrase "date or time value" was intended to include gYear and gYearMonth, then this could have been phrased more clearly. Otherwise it does not seem desirable to raise a FORG0001 error when a value is too large for gYear or gYearMonth (especially since this case is covered for all other types with implementation defined limits). Ideally this should be either covered by FODT0001, or by a new error code (e.g. FODT0004).
I propose changing the sentence from In casting to a date or time value, if the value is too large or too small to be represented by the implementation, error [err:FODT0001] is raised. to In casting to xs:date, xs:dateTime, xs:gYear, or xs:gYearMonth (or types derived from these), if the value is too large or too small to be represented by the implementation, error [err:FODT0001] is raised.
On 27 May 2008 (recorded in the minutes but sadly not here), the joint WGs agreed to accept the change proposed in comment #1. Oliver, if you accept this resolution, I would be grateful if you would mark the bug as closed. This will be the subject of erratum E28
I agree with this resolution. Thanks.