My intent was that "parser-basex" be private. Although this bughttps://github.com/BaseXdb/basex/issues/133makes this area problematic at the moment.
I had a look at the pkg spec, but I couldn't find this explained
explicitly. I was sure I had seen a statement to this effect in the spec, then when I looked again I could find it.
/Andy On Sat, Feb 25, 2012 at 11:52 PM, Florent Georges lists@fgeorges.orgwrote:
Rositsa Shadura wrote:
Hi,
as your module parser-basex.xq is part of the package, it must be registered in the package descriptor:
<xquery> <namespace>parser-basex</namespace> <file>parser-basex.xq</file> </xquery>
and thus the import statement in pacman.xq shall not specify its location:
import module namespace p="parser-basex";
Actually, that's more complex than that. The components registered in the package descriptor can be accessed from the outside of the package, using their public URIs (for XQuery libraries, that is their target namespace). But inside the same package, components can import and reference each others by relative references. This is even the recommended way.
The idea is that some components are not intended at all to be used by the outside world, they are just private components (I don't know the details of this particular package, but it could be the case that the parser is completely private, so Andy's usage looks like completly legitimate).
I had a look at the pkg spec, but I couldn't find this explained explicitly. Maybe I should add it to the spec, at least as a note...
Regards,
-- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/