[MarkLogic Dev General] Undefined function error()
dsokolsky at marklogic.com
Thu Mar 5 20:27:12 PST 2009
This is an implementation-defined behavior in MarkLogic Server, which is allowed according to the spec. This allows you to define functions and variables in the library module without prefixing them, which trumped being able to run the XQuery standard functions in library modules without prefixing them (some would say prefixing the standard functions is good practice anyway, but that is a matter of style...).
As of 4.0-4, the XQuery Reference Guide (http://developer.marklogic.com/pubs/4.0/books/xquery.pdf)
now specifies this implementation-defined behavior on page 20 in the "Implementation-Defined Semantics" section of the "MarkLogic Server Enhanced XQuery Language" chapter.
From: Florent Georges [mailto:lists at fgeorges.org]
Sent: Thursday, March 05, 2009 2:48 AM
To: Danny Sokolsky
Cc: MarkLogic General ML
Subject: Re: [MarkLogic Dev General] Undefined function error()
Danny Sokolsky wrote:
> This is because the default namespace of the library module is your
> library namespace (http://test.com).
Thanks, Danny. However, I didn't find that rule in the REC. The
only relevant text I found is the definition of a default function
namespace decl. <http://www.w3.org/TR/xquery/#id-default-namespace>
which tells that:
If no default function namespace declaration is present, the
default function namespace is the namespace of XPath/XQuery
Of course, an implementation can define a different namespace as
stated in the appendix C.1, but this is "not recommended"
Do you have any pointer in the REC or in the MarkLogic documentation
about default function namespace and library modules?
More information about the General