Like with numbers, we use ICU for parsing calendars. It seems this is
another case of ICU and and DFDL describing different behaviors for
lenient/strict mode. With numbers, ICU decided that lax behavior is not
tightly specified, and so we can't really depend on a particular
behavior. I suspect the same goes for calendars. I think the DFDL-WG is
working to make that change in the final revision so that DFDL it makes
this more clear.



On 8/19/20 1:22 PM, Roger L Costello wrote:
> The spec says this for calendarCheckPolicy:
> 
> Additional lenient parsing behaviour when in 'lax' mode:
> 
>       Leading and trailing whitespace
>       in the data but not in the pattern
>       is accepted
> 
> The following element declares a lax policy:
> 
> <xs:element name="Birthday" type="xs:date" 
>     dfdl:calendarCheckPolicy="lax"
>     dfdl:calendarPatternKind="explicit"
>     dfdl:calendarPattern="yyyy:MM:dd"
>     dfdl:calendarFirstDayOfWeek="Sunday"
>     dfdl:calendarDaysInFirstWeek="5" 
>     dfdl:calendarTimeZone="UTC+6"
>     dfdl:calendarLanguage="en"
> />
> 
> Daffodil reports an error if I put whitespace following this date:
> 
> 1970:11:06
> 
> The spec says that whitespace should be allowed with a lax policy. I believe 
> this is an error in Daffodil. Do you agree?
> 
> /Roger
> 

Reply via email to