enhancements to namespace archive
Brought to you by:
pabigot
Archive should include the set of schema locations and the version attribute from each schema. There should be an ability to restrict archive loads based on version (since some people don't encode this in the namespace).
Also need to support cases where the same namespace is imported in schemas for different namespaces, but each from a local copy which is different from the others. I.e., though values in that namespace are stored in the archive, the archive should not be used when it is necessary to resolve that namespace.
Turns out we need this to support namespace profiles (like GML as used in DDMS). We'll mark namespaces in each archive as being private or public; only public ones enter the archive as a potential source for loading.
Need the schema location only because version numbers are associated with schema, not namespaces. #20 remains open for support of absent namespaces in archives.
Delayed to next beta.
Done as of [1705]. The scope of changes to the Namespace model was huge. Now all relevant information is stored in a ModuleRecord, which holds the components that were added to the namespace in a given code generation event. This means that the same namespace can have components stored in multiple archives; see tests/complex/nsext for a situation where an application extends another namespace with its own enhancements.
Still don't have the ability to restrict import based on schema version, but pyxbgen has several arguments that allow preload and filtering archives as well as marking specific namespaces public or private in an archive.