[tdwg-content] date elements in Darwin Core XML schemas

Donald.Hobern at csiro.au Donald.Hobern at csiro.au
Sun Jul 24 15:45:39 CEST 2011


John,

I think the hesitation around ISO 8601 may date back as far as 2002.  I remember serious discussion of it in an ABCD Schema working group meeting in Singapore.  All present really believed that xs:dateTimeISO would nicely cover some of the incomplete dates or date ranges present in specimen labels, etc., but felt that the unavailability at that time of software libraries or (I believe) XML Schema validation to handle the full range of possible values would be problematic.  

Can you provide any insight on the following:

1 - If we use the full ISO 8601 specification, are there readily accessible libraries for Java, PHP, Python, etc. for handling the range of possible values?

2 - What about database support - particularly for building indexes of xs:dateTimeISO values?

I may be off-track with all this, but a technical assessment of the feasibility of using xs:dateTimeISO would be nice.

Thanks,

Donald


Donald Hobern, Director, Atlas of Living Australia
CSIRO Ecosystem Sciences, GPO Box 1700, Canberra, ACT 2601
Phone: (02) 62464352 Mobile: 0437990208 
Email: Donald.Hobern at csiro.au
Web: http://www.ala.org.au/ 

-----Original Message-----
From: tdwg-content-bounces at lists.tdwg.org [mailto:tdwg-content-bounces at lists.tdwg.org] On Behalf Of John Wieczorek
Sent: Wednesday, 20 July 2011 9:03 AM
To: TDWG Content Mailing List
Subject: [tdwg-content] date elements in Darwin Core XML schemas

Geoffrey Allen has asked for a clarification about the date fields in Darwin Core. Commentary about the problem is recorded in Issue 118
(http://code.google.com/p/darwincore/issues/detail?id=118) in the Darwin Core Issue Tracker. Below is an excerpt of my explanation. The bottom line for this mailing list is that I believe Geoffrey has revealed an error in the XML Schema http://darwincore.googlecode.com/svn/trunk/xsd/tdwg_dwcterms.xsd that should be amended. I'm posting it here for commentary to see if there is/was any good reason for restricting the dateTime elements in Darwin Core more than in the recommendation in the definition of the terms.
If not, this is a proposal to change the types in that schema from xs:dateTime to dateTimeISO.

Commentary from Issue 118 follows:

Through the date terms (eventDate, dateIdentified, relationshipEstablishedDate, measurementDeterminedDate,
dcterms:modified) in the Darwin Core recommend the ISO 8601 standard for dates, the XML application schema published at http://darwincore.googlecode.com/svn/trunk/xsd/tdwg_dwcterms.xsd
implements the more restrictive xs:dateTime type for these terms. For example,

<xs:element name="eventDate" type="xs:dateTime"
substitutionGroup="dwc:anyEventTerm"/>

I'm not sure what the rationale was for implementing these terms as xs:dateTime rather than the less restrictive type dateTimeISO (see
below) defined in
http://darwincore.googlecode.com/svn/trunk/xsd/tdwg_basetypes.xsd,
especially since
http://darwincore.googlecode.com/svn/trunk/xsd/tdwg_dwcterms.xsd
imports that bastypes schema and has a comment specifically about the use of dateTimeISO, which it doesn't actually use. I believe this is an unintentional error in tdge_dwcterms.xsd, but will post this to the tdwg_content list to see if there is any dissenting opinion about "correcting" it.

<xs:simpleType name="dateTimeISO">
<xs:annotation>
<xs:documentation xml:lang="en">
The date and time expressed in a way conforming to a subset of ISO 8601. Meant to be exactly the same as DateTimeISO defined in ABCD.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="\d\d\d\d(\-(0[1-9]|1[012])(\-((0[1-9])|1\d|2\d|3[01])(T(0\d|1\d|2[0-3])(:[0-5]\d){0,2})?)?)?|\-\-(0[1-9]|1[012])(\-(0[1-9]|1\d|2\d|3[01]))?|\-\-\-(0[1-9]|1\d|2\d|3[01])"></xs:pattern>
</xs:restriction>
</xs:simpleType>
_______________________________________________
tdwg-content mailing list
tdwg-content at lists.tdwg.org
http://lists.tdwg.org/mailman/listinfo/tdwg-content


More information about the tdwg-content mailing list