[xsd-users] Re: Multiple imports - (Re: Different C++ namespace for
included schema)
Boris Kolpackov
boris at codesynthesis.com
Tue Sep 23 09:52:35 EDT 2008
Hi Matt,
Matt Burnham <mburnham at gblsys.com> writes:
> I've converted over to using namespaces in the schemas and using import
> instead of include, but I now have a problem with multiple imports. If
> I have 2 schemas (same namespace) and import them both into a third
> (different namespace), then when I reference them, I get an error of
> "Type not found" for the second one imported.
When you import a schema for a namespace, XML Schema processors
are allowed (and in fact most of them do it this way) to assume
that this schema provides the complete description of the vocabulary.
As a result any subsequent imports for this namespace are ignored.
For cases where your vocabulary consist of multiple schemas the
industry-standard practice is to have a top-level schema that
includes all the individual schemas. Then the clients of your
vocabulary import this top-level schema.
Boris
More information about the xsd-users
mailing list