Search code examples
xquerymarklogic

Xquery version 0.9-ml to xquery version 1.0-ml updation


We have used these two files from marklogic community/common i.e cookies.xqy and dateparser.xqy

https://github.com/marklogic-community/commons/tree/master/http

https://github.com/marklogic-community/commons/tree/master/dates

now we are looking to switch to the latest version of marklogic i.e 10.0-2.1 and xquery verion 0.9-ml is deprecated in it . so we have to manually do the changes in these files or do we get it from anywhere.


Solution

  • The statefull-cookies.xqy file is in 1.0-ml syntax already, so you only need to rewrite cookies.xqy which would be minor changes, like replacing define with declare and some extra semi-colons.

    The date library might a bit more work, although you could consider using this package instead. It is not an exact match, but pretty powerful, and thoroughly tested in the field:

    https://github.com/grtjn/ml-datetime

    Feel free to open tickets against it if there is functionality in commons/date lacking in ml-datetime.

    HTH!