Hi Florent, 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. Thanks, -Danny -----Original Message----- From: Florent Georges [mailto:[email protected]] 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 functions, http://www.w3.org/2005/xpath-functions Of course, an implementation can define a different namespace as stated in the appendix C.1, but this is "not recommended" <http://www.w3.org/TR/xquery/#id-xq-static-context-components>. Do you have any pointer in the REC or in the MarkLogic documentation about default function namespace and library modules? Regards, -- Florent Georges http://www.fgeorges.org/
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
