Print

Print


<date when-iso="2001-00-00">some time in 2001</date> is valid.

Reason being that the data type for data.temporal.iso includes various W3C date 
types but also any token matching regular expression "[0-9.,DHMPRSTWYZ/:+\-]+", 
without checking to see that it is a legitimate date representation.

So <date when-iso="ST00P1D:W1Z"> is valid against the TEI schema.

Bug? Feature?

David

On Thu, 5 Jun 2014, Lou Burnard wrote:

> Ah yes. Is that true also of @when-iso ?
>
>
> On 05/06/14 16:38, David Sewell wrote:
>> Actually, <date when="2001-00-00"> should produce a validation error 
>> against the TEI P5 schema, no?  @when is constrained to be a valid temporal 
>> expression:
>> 
>> http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-data.temporal.w3c.html 
>> 
>> so one would have to use @when-custom to use pseudo-date formats (which I 
>> agree are often easier to process),
>> 
>> David
>> 
>> On Thu, 5 Jun 2014, Jakob Fix wrote:
>> 
>>> xs:date("2001-00-00") throws a
>>> 
>>> XDMP-CAST: (err:FORG0001) xs:date("2001-00-00") -- Invalid cast:
>>> "2001-00-00" cast as xs:date
>>> 
>>> quite rightly, it seems to me.
>>> 
>>> cheers,
>>> Jakob.
>>> 
>>> 
>>> On Thu, Jun 5, 2014 at 5:18 PM, Lou Burnard <[log in to unmask]>
>>> wrote:
>>>
>>>>  I am not sure if this correct practice, but my personal practice is to
>>>> use zeroes for parts of a normalised dates that are missing.
>>>> 
>>>> @when="2001-00-00" for example
>>>> 
>>>> Of course it's possible that marklogic will then complain that 0 is not 
>>>> in
>>>> the range 1-12
>>>> 
>>>> On 04/06/14 15:37, Jonathan Greenberg wrote:
>>>>
>>>>  Hello all,
>>>>
>>>>  We have created a TEI P5 schema for marking up Die Musik in Geschichte
>>>> und Gegenwart, a large encyclopedia about music. We building a CMS with
>>>> MarkLogic to manage the publication (which will be published online in
>>>> 2017), and I'm running into a problem with indexing dates in MarkLogic.
>>>>
>>>>  The (mostly birth- and death-) dates in MGG are not all the same: some
>>>> have a month and day, others just a year. So  in the markup, some look 
>>>> like
>>>> this:
>>>>
>>>>  <birth><date when="2001-09-11">11. Sept 2001</date></birth>
>>>>
>>>>  while others look like this: <date when="2001">2001</date>
>>>>
>>>>  The problem is that is seems that MarkLogic cannot create a range index
>>>> of these dates, because they are not all in the same format. The only
>>>> solution I have come up with is to add a second attribute that would be
>>>> normalized (perhaps a custom @year attribute), but wonder if there are 
>>>> any
>>>> better solutions. Anyone have experience with this?
>>>>
>>>>  Jonathan
>>>> 
>>>> 
>>>> 
>>> 
>> 
>

-- 
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 400314, Charlottesville, VA 22904-4314 USA
Email: [log in to unmask]   Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/