Is there a way either in the saxon api or from xpath to get all the namespaces and then to get all prefixes that are used or not for those namespaces?
Is there a way to migrate all the namespace definitions onto a root node at very little cost in terms of performance?