Ticket #47 (new defect)

Opened 3 years ago

Last modified 3 years ago

Validation Service (actually more a problem with specification)

Reported by: iztok.kavkler@… Owned by: bramv
Priority: minor Component: ARIADNE Validation Service
Version: Keywords:
Cc:

Description

I believe there is a problem with specification of datetimes. The regexp you use

([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]|[0-9][1-9][0-9]{2}|[1-9][0-9]{3})(\-(0[1-9]|1[0-2])(\-(0[1-9]|[1-2][0-9]|3[0-1])(T([0-1][0-9]|2[0-3])(:[0-5][0-9](:[0-5][0-9](\.[0-9]{1,}(Z|((\+|\-)([0-1][0-9]|2[0-3]):[0-5][0-9]))?)?)?)?)?)?)?

requires that every datetime that contains time part and timezone specification includes hours, minutes, seconds and fractions of second. In my opinion this is ridiculous, since repository timestamps never need millisecond precision. On the other hand, timezone specification is obviously important for international exchange. The correct regex for ISO 8601 datetime (with timezone required) is

([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]|[0-9][1-9][0-9]{2}|[1-9][0-9]{3})(\-(0[1-9]|1[0-2])(\-(0[1-9]|[1-2][0-9]|3[0-1])(T([0-1][0-9]|2[0-3])(:[0-5][0-9](:[0-5][0-9](\.[0-9]{1,}?)?)?)?(Z|((\+|\-)([0-1][0-9]|2[0-3]):[0-5][0-9])))?)?)?

Change History

comment:1 Changed 3 years ago by bramv

Hi iztok,

Could you let me know which validation scheme you were trying ? Most of the validation scheme use existing specifications regarding datetimes (for eg OAI-PMH and LOM, with their official xsds). So while I agreed with your reasoning, depending on the scheme you refer to, it is not something the validation service can solve.

greetings, Bram

Note: See TracTickets for help on using tickets.