[xsd-users] --namespace-map and xs:include

Boris Kolpackov boris at codesynthesis.com
Thu Dec 12 01:41:09 EST 2013


Hi Chris,

Chris Delnooz <Chris.Delnooz at hydrix.com> writes:

> Is there any way to tell the generator to prefix the stuff it got via
> the xs:include with A and the rest with B?

No, this is not supported. What you are trying to do is map the same
XML namespace (in this case the "empty namespace") to two different
C++ namespaces. IMO, this is just looking for problems down the road.

If you need two different C++ namespaces then you will need to have
two different XML namespace. XML namespaces affect instance documents
so what you can do, for example, is have A.xsd and B.xsd defined XML
namespaces but contain only types. Then have C.xsd without any namespace
that imports A.xsd and B.xsd and defines all the global elements for
the vocabulary.

Boris



More information about the xsd-users mailing list