Hi Reece,
Thanks for your reply; I immediately thought that such an extension
would have various effects on external tools, such as your XQuery
plugin. And I strongly agree that we should further discuss this on
the xpath-ng project if the proposal should gain some momentum,
because there are
Can you put an include in an include?
The difficulty I'd have with
import prolog namespaces a, b, c from "path/to/module.xqm"
is that'd be up to ,mm or ,nn and that doesn't help with neatness of
expression.
If I could go
include prolog namespaces from "path/to/module.xqm"
and get all
Hi Christian,
Would that allow just prolog header statements (import statements,
declarations), or also allow prolog body statements (functions, variables,
options, etc.)?
Would that include imported schema types from the included modules schema
import statements?
If it is just a simple string
Hi Graydon,
We could possibly introduce an include statement:
include 'path/to/module.xqm';
In contrast to 'import module', the contents of the addressed file would
simply be inserted as string into the original module. The inserted string
could contain any other declarations that are allowed
Hi Christian --
Appreciate the confirmation!
Any chance of some syntactic sugar for this in a future BaseX release?
The use case is writing a bunch of distinct queries to pull stuff out of
complex formats like OOXML or Opendocument; there are many namespaces
involved, it's important to have
Hi Graydon,
Your assumptions were correct: If namespaces are declared in another
module, they will be only valid in the scope of that module, and not
in the importing module.
If your local element names are unique, and if you prefer short path
expressions, you can always use a wildcard prefix
6 matches
Mail list logo