Or put the following line in the prolog.. declare default function namespace "http://www.w3.org/2005/xpath-functions";
Kind regards, Geert > Drs. G.P.H. Josten Consultant http://www.daidalos.nl/ Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 http://www.daidalos.nl/ KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. > From: [email protected] > [mailto:[email protected]] On Behalf Of > Danny Sokolsky > Sent: donderdag 5 maart 2009 3:43 > To: [email protected]; General Mark Logic Developer Discussion > Subject: RE: [MarkLogic Dev General] Undefined function error() > > This is because the default namespace of the library module > is your library namespace (http://test.com). > > You need to prefix the error function in the library module > with fn, then it works: > > xquery version "1.0"; > module namespace t = "http://test.com"; > declare function t:fun() { > fn:error((), 'bla bla') > }; > > -Danny > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of > Florent Georges > Sent: Wednesday, March 04, 2009 4:11 PM > To: MarkLogic General ML > Subject: [MarkLogic Dev General] Undefined function error() > > > Hi, > > I got an error message I don't understand regarding the > error() function not existing. I put the following in the > file <marklogic>/Modules/test-error.xq: > > xquery version "1.0"; > module namespace t = "http://test.com"; > declare function t:fun() { > error((), 'bla bla') > }; > > and run the following through CQ: > > xquery version "1.0"; > import module namespace t = "http://test.com" > at "/test-error.xq"; > t:fun() > > I get the following error: > > query evaluated in Documents at file::Docs/ as 1.0 (cq v4.0-3) > > [1.0] XDMP-UNDFUN: (err:XPST0017) Undefined function error() > > Stack trace: > > in /test-error.xq line 5: > xdmp:eval("xquery ve [...] > > Thanks in advance. Regards, > > -- > Florent Georges > http://www.fgeorges.org/ > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > General mailing list > [email protected] > http://xqzone.com/mailman/listinfo/general > _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
