HTTP and FTP URIs certainly don't work with filesystem paths. File: URIs only 
do by convention, and there are (somewhat hand-wavy) rules for mapping 
filesystem paths to file: URIs. But a filesystem path is-not-a file: URI, and 
so a filesystem path is never an appropriate argument for fn:resolve-uri() or 
in fact for any other function defined by XQuery F&O.

Also, URLs are no different than URIs except that URLs are expected to directly 
point to a resource, where a generic URI may simply name the resource. But they 
follow the same rules. Neither of them have any relationship to filesystem 
paths. I'm not saying this is good or bad, it's simply true. And Zorba most 
certainly works with full URIs, not just URLs.

file:path-to-uri() is documented to resolve relative filesystem paths using the 
current working directory as the base. So you're seeing your RBKT dir because 
that's the current working directory for testdriver, I suspect. Again, I'm not 
saying this is good or bad, it's simply true. I would certainly support you if 
you wanted to say that there should be a two-argument form of this function 
that allowed you to supply a different base URI or path, but you'll need to run 
that through the EXPath process (whatever that is).

Finally, regarding fn:encode-for-uri():

It only escapes *characters* in a string which are illegal in the path segment 
of a URI. It is not intended in any way to convert a filesystem path to a valid 
URI (relative or otherwise).
Your team Zorba Coders is subscribed to branch lp:zorba.

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to