Print

Print


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
>
>
>