UserPreferences

PaceDatesXSD


Abstract

Instead of referencing RFC 3339 for Date Constructs, reference XML Schema Part 2.

Status

New proposal.

Rationale

Atom is an XML vocabulary and off-the-shelf XML tools are much more likely to have libraries that easily and directly support xsd:dateTime than RFC 3339 date-times.

Proposal

Change 3.3 to read:

        A Date construct is an element whose content MUST conform to the dateTime type
        defined in [W3C.xmlschema-2]. In addition, Date constructs MUST contain time 
        zone information and match the following regular expression:

                [0-9]{8}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?(Z|[\+\-][0-9]{2}:[0-9]{2})

Add a new reference:

[W3C.xmlschema-2]
       Byron, P. and Malhotra, A, "XML Schema Part 2: Datatypes Second Edition",
       W3C xmlschema-2, October 2004

Impacts

Only the details of validating Date Constructs.

Notes

To avoid the problem of dates without timezones, which has been the source of some discomfiture, we could add the constraint that a Date Construct must also match this regular expression:

        [0-9]{8}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?(Z|[\+\-][0-9]{2}:[0-9]{2})

how is this different from above?

Although personally, I have some reservation about using pattern facets on non-string types.

SamRuby:


CategoryProposals