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 them all defined, and it'd be nice to be able to abstract groups of definitions for re-use across queries. So some way to specify "get that bunch of definitions in the current context" would be nice. (But, admittedly, by no means necessary.)
Thanks! Graydon
On Sun, Aug 11, 2019 at 8:36 AM Christian Grün christian.gruen@gmail.com wrote:
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 (*:...); but that answer is actually not part of your question anymore ;)
Best Christian
On Fri, Aug 9, 2019 at 9:14 PM Graydon Saunders graydonish@gmail.com wrote:
Hi --
I'm pretty sure this isn't a thing, but I thought I'd ask.
I have a raft of namespace declarations because I'm pulling information
out of Open Document documents. I'd like to put all thirty-odd of these declarations in their own file and import that, but I'm pretty sure I can't because that imported module would need its own namespace and this would keep its internal namespace declarations from being in scope for the main module, where I actually want them declared.
Is there a way to do this? It's not critical, it's an outbreak of
neatness, but it would be a nice neatness.
Thanks! Graydon