digital-preservation / csv-schema

CSV Schema
http://digital-preservation.github.io/csv-schema
Mozilla Public License 2.0
98 stars 33 forks source link

`XsdDateTimeExpr` mismatch between description and grammar #42

Open mightyCelu opened 1 year ago

mightyCelu commented 1 year ago

The specs describe the xsdDateTimeExpr as having an optional timezone:

[...] as shown, the xDateTime values may, or may not, have a component indicating a specific timezone, here Z (Zulu) for UTC (Greenwich Mean Time)

The grammar, on the other hand mandates its use, as XsdDateTimeExpr implies XsdTimeLiteral which in turn implies XsdTimezoneComponent.

XsdDateTimeExpr ::= "xDateTime" ("(" XsdDateTimeLiteral "," XsdDateTimeLiteral ")")?
XsdDateTimeLiteral ::= XsdDateWithoutTimezoneComponent "T" XsdTimeLiteral
XsdTimeLiteral ::= XsdTimeWithoutTimezoneComponent XsdTimezoneComponent
XsdTimezoneComponent ::= ((\+\|-)(0[1-9]\|1[0-9]\|2[0-4]):(0[0-9]\|[1-5][0-9])\|Z) | /* xgc:regular-expression */

The fact that XsdDateLiteral does utilizes an optional timezone may imply a mistake.

DavidUnderdown commented 1 year ago

@adamretter do you have any thoughts on this one?