HI.
Is there some way that you could possibly transform your input data.
The issue you are seeing is not specifically about MarkLogic. The XML
Schema itself defines date and dateTimes as:
http://en.wikipedia.org/wiki/ISO_8601
Overall, things may be easier if your XML were already storing your
dates in your XML in a way that the functions in the xs namespace are
expecting.
Kind Regards,
David
On 06/02/14 12:25, [email protected] wrote:
Hi
I want to sort my content using sort operator for newsdate element,
but my date format is dd-mm-yyyy. But Marklogic date comparison works
on yyyy-mm-dd
sort : dateAscending
<operator name="sort">
<state name="dateAscending">
<sort-order direction="ascending" type="xs:date"
<element ns="" name="newsdate" />
</sort-order>
</state>
</operator>
Getting 500 internal server error XDMP-CAST: (err:FORG0001)
xs:date(($result/descendant::newsdate)[1]) -- Invalid cast:
"03-12-2013" cast as xs:date
Thanks,
Vikas Singh
This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If you are not the intended recipient(s), please reply to
the sender and destroy all copies of the original message. Any
unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email, and/or any action taken in reliance
on the contents of this e-mail is strictly prohibited and may be
unlawful.
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
--
David Ennis
Content Engineer
HintTech Mastering the value of content <http://www.hinttech.com>
Mastering the value of content
creative | technology |content
Delftechpark 37i
2628 XJ Delft
The Netherlands
T: +31 88 268 25 00
M: +31 6 000 000 00
Website <http://www.hinttech.com> Twitter
<https://twitter.com/HintTech> Facebook
<http://www.facebook.com/HintTech> LinkedIn
<http://www.linkedin.com/company/HintTech>
HintTech Mastering the value of content <http://www.dayon.nl>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general