Sorry, Eric: that's XQuery 1.0 syntax vs MarkLogic syntax. I've been
trying to learn 1.0 syntax. Apparently I've succeeded - but as already
mentioned on this list, we should be using the MarkLogic syntax (aka
draft 2005-03, aka 0.9-ml) for now.
-- Mike
Eric Palmitesta wrote:
Firstly, there must be some syntax-based problem I don't yet know about,
because the following gives me an XDMP-UNEXPECTED error:
declare variable $ACCEPT-XML as xs:boolean :=
(: Opera says that it accepts xhtml+xml, but does not. :)
contains(xdmp:get-request-header('accept'), 'application/xhtml+xml')
and not(contains(xdmp:get-request-header('user-agent'), 'Opera'))
;
XDMP-UNEXPECTED: Unexpected token syntax error, unexpected QName_,
expecting $end
I found the syntax that works is:
define variable $ACCEPT-XML as xs:boolean {
(: Opera says that it accepts xhtml+xml, but does not. :)
contains(xdmp:get-request-header('accept'), 'application/xhtml+xml')
and not(contains(xdmp:get-request-header('user-agent'), 'Opera'))
}
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general