Just noticed a server error when running a script that had been working
fine. It turns out that until this release, the following code worked
fine, returning the ML version number:

xquery version "1.0-ml";
declare function local:handle-ref() as item()* { };
xdmp:version()

With 4.2-2, it throws a syntax error. It must be rewritten as

xquery version "1.0-ml";
declare function local:handle-ref() as item()* { () };
xdmp:version()

with the explicit null item.

Obviously this is a tightening to bring behavior in line with the XQuery
language spec. We're probably not the only MarkLogic shop in the world
to have an unfinished function declaration like the above lying around
somewhere in their code, so I thought I would mention it as something to
watch out for.

David

-- 
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 400314, Charlottesville, VA 22904-4314 USA
Email: dsew...@virginia.edu   Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to