Re: Finalizing the File Module

Hi Christian, 

I find both functions useful, especially current-dir(). It stands to reason 
that an XQuery application may be very interested in the current directory, 
in order to be able to resolve relative paths against the current dir. It 
should also be noted that file:list resolves relative paths against the 
current dir, so that subsequent use of the listed file names as URI 
argument in doc() simply MUST explicitly resolve against the current 
directory, as the implicit resolving performed by doc() is against the base 
URI of the query, which means the documents are not found (unless the query 
is contained by the current directory).

Also noteworthy is that retrieval of the current directoy via file:parent 
requires a different argument than '.', as using '.' yields the parent 
directory of the current directory, rather than the current directory. This 
in turn means that retrieval of the current directory via file:parent 
requires the use of some arbitrary (and possibly fake) file name as 
argument, like so

   file:parent('dummy')

It is very desirable that retrieval of the current directory can be 
achieved in a straightforward way, rather than the "tricky" way via 
file:parent.

Kind regards,
Hans-Jürgen

Received on Monday, 24 March 2014 22:03:36 UTC