Hi Jakob,

Just add a line like the following to your library file:

        declare base-uri "http://";;

See also http://www.w3.org/TR/xquery/#id-base-uri-decl

No, as far as I know the functx functions are not distributed (as-is nor 
adapted) along with MarkLogic Server.

And personally I think that the exception does make sense. A relative uri 
cannot be resolved if there is no base available. But I would agree that 
checking this in the syntactic phase of xquery execution is not very handy. I 
am not sure what the W3C group would say about the following case, but I could 
imagine that it should work perfectly fine:

<myelem xml:base="http://";>{
        fn:resolve-uri("some-relative-path")
}</myelem>

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
> Jakob Fix
> Sent: zondag 12 juli 2009 11:17
> To: General Mark Logic Developer Discussion
> Subject: Re: [MarkLogic Dev General] functx library usage with ML
>
> Micah,
>
> it's the "official" distribution from Priscilla Walmsley's
> functx.com website.
>
> from your questionI gather that there is an adapted library
> that can be found among the files in the ML download?  I'll
> have a look.
>
> thanks,
> Jakob.
>
>
>
> On Sun, Jul 12, 2009 at 02:55, Micah
> Dubinko<[email protected]> wrote:
> > Jakob,
> >
> > Is this in the functx library that ships with MarkLogic, or from a
> > separate download?
> >
> > -m
> >
> > On Jul 11, 2009, at 2:33 PM, Jakob Fix wrote:
> >
> >> hi,
> >>
> >> here's a late night question:  I'm trying to use the functx xquery
> >> library in my ML application.
> >>
> >> Firstly, I had to add
> >>
> >> declare default function namespace
> >> "http://www.w3.org/2005/xpath-functions";;
> >>
> >> to the module as it doesn't use the fn: prefix for
> built-in functions.
> >>
> >> Secondly, when including this module I get following
> "compile time" error:
> >>
> >> XDMP-NOBASEURI: (err:FONS0005) resolve-uri($refNode) -- Base uri
> >> undefined in the static context in /app/shared/functx.xqy, on line
> >> 1738, in functx:open-ref-document() [1.0-ml]
> >>
> >> declare function functx:open-ref-document
> >>  ( $refNode as node() )  as document-node() {
> >>
> >>  if (base-uri($refNode))
> >>  then doc(resolve-uri($refNode, base-uri($refNode)))
> >>  else doc(resolve-uri($refNode))                (: <====
> problem is
> >> encountered here :) } ;
> >>
> >> Looking this up on the web reveals that this is an xquery
> "bug" that
> >> has been "fixed" in May 2008 (see
> >> http://www.w3.org/Bugs/Public/show_bug.cgi?id=5207)
> >>
> >> I must say I have trouble figuring out whether the error is due to
> >> the ML implementation, or a problem with the functx
> library.  For the
> >> time being, I can simply comment this function out as I have no
> >> immediate use for it, but in general I'd like to know how
> to make this work.
> >> Probably, ML provides their own implementation of this functx
> >> function?
> >>
> >> Thanks,
> >> Jakob.
> >> _______________________________________________
> >> General mailing list
> >> [email protected]
> >> http://xqzone.com/mailman/listinfo/general
> >
> > _______________________________________________
> > General mailing list
> > [email protected]
> > http://xqzone.com/mailman/listinfo/general
> >
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
>

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to