Dates in XML

Home Forums NAACCR XML Standard Dates in XML

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #10636

    I see from the XML dictionary that dates have an XML data type assigned of “date”. Can you please provide a complete definition of what that means? I don’t see anything on the NAACCR XML website that defines this (if there is a resource, please point me there). A simple Google search isn’t 100% clear, but the most frequent answer is that form supports CCYY-MM-DD. Are the hyphens literal? if this is no longer a “text” data type, how are incomplete dates handled in the XML standard?

    AnonymousFabian Depry

    Hello Kathleen,

    The “date” format is defined in the XML Implementation Guide that is posted on the NAACCR website; here is what those specifications say about that format:

    “A NAACCR-style full or partial date (yyyy, yyyymm or yyyymmdd).”

    And here is the regular expression the specifications define for the type:

    And so the following are valid dates (no trailing spaces):

    The format doesn’t allow a known day and unknown year/month or a known day/month and an unknown year.

    Many invalid dates (future dates, or dates with a day that is too high for a given month) will be deemed “valid” by this definition; I think the idea was to be able to use a simple regular expression to define what is acceptable and not acceptable and to let edits deal with corner cases.


    Okay, so the “date” data type specified for the NAACCR XML Standard is a special data type defined by NAACCR and not interoperable with other XML date data type standards? It truly represents the same 8 character space that is currently in the NAACCR ASCII Standard?

    AnonymousFabian Depry

    That’s correct, the “date” type is the same one that is currently used in the fixed-column files (without the trailing spaces). It’s not related to those more complex “XML” date types.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘NAACCR XML Standard’ is closed to new topics and replies.

Copyright © 2018 NAACCR, Inc. All Rights Reserved | naaccr-swoosh-only See NAACCR Partners and Sponsors