Hi Marco,
I've a few questions related to namespaces. I've noticed that on one of the info panels of the the GUI all the namespaces of the documents stored in a DB are listed. Is there a way to get this information from inside an XQuery?
Something like this may help:
let $names := db:open('db')//*/node-name() let $ns := map:new( for $name in $names return map { prefix-from-QName($name): namespace-uri-from-QName($name) } ) return map:serialize($ns)
Best, Christian
My problem is that I have to perform queries that are dynamically generated on a heterogeneuos set of documents. By now I have to store somewhere an association between one input parameter of the query and a corresponding set of namespaces to be used. This is then transformed into a list of "declare namespace ..." statements. I thought I could pregenerate a declare statement for every namespace in the DB by default thus avoiding to maintain the association. Would there be a significant impact on query or query compilation performance? Thanks, Marco. _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk