Douglas Campbell wrote:
> Roland,
>
>
>>>>[log in to unmask] 31/03/03 21:30:52 >>>
>>>
>>>Therefore, does anyone have suggestions/experience in encoding old dates?
>>
>>Have you tried xml-schema-part2 date and time datatypes?
>
>
> Ah hah! You can tell I haven't delved deep enough into XML Schemas yet...
>
> XSD certainly does offer negative years plus unlimited digits in the year, however it appears I need to select the particular datatype depending on the granularity of each date (unlike ISO8601/W3CDTF where one size fits all), ie.
>
> http://www.w3.org/2001/XMLSchema-datatypes#date for -0800-01-01
> http://www.w3.org/2001/XMLSchema-datatypes#gYearMonth for -0800-01
> http://www.w3.org/2001/XMLSchema-datatypes#gYear for -0800
If you were using XML Schemas you could do something like this:
<xs:simpleType name="W3CDTF">
<xs:union memberTypes="xs:gYear xs:gYearMonth xs:date xs:dateTime"/>
</xs:simpleType>
creating a custom datatype which is a union of the different XML Schema date
types which would allow the various different granularities of dates to be
used interchangeably. We've done this for various of the XML Schema we have
developed for DC.
Not sure how this might work in relation to what is happening with the RDF
datatyping work, however.
--
Thomas Habing
Research Programmer, Digital Library Projects
University of Illinois at Urbana-Champaign
>
> It also means I might have multiple encoding schemes for dates in my data, eg for a modern painting of old stuff:
> <rdf:Description>
> <dcq:created>
> <dcq:W3CDTF>
> <rdf:value>1950</rdf:value>
> </dcq:W3CDTF>
> </dcq:created>
> <dcq:temporal>
> <xsd:gYear>
> <rdf:value>-0200</rdf:value>
> </xsd:gYear>
> </dcq:temporal>
> </rdf:Description>
>
> The nicest way (for me) would be if W3CDTF happened to cater for the ISO 8601:2000 extensions...
>
> Thanx,
> Douglas
>
>
|