[xsd-users] similar schemas and name spaces
Boris Kolpackov
boris at codesynthesis.com
Wed Dec 7 13:00:17 EST 2011
Hi,
B Hart <bhartsb at gmail.com> writes:
> I have two sets of schema files that have some elements and types in
> common, but other elements and types that are not the same. I want to be
> able to use the XSD generated .cxx and .hxx in the same main() program but
> I'm getting linkage type errors. I've tried to make one pair of the .cxx
> and .hxx be in a separate C++ namespace but I'm getting errors. Any advice
> on the correct approach to use is appreciated.
The correct approach is to place the schemas into different C++ namespaces
using the --namespace-map option. If your schemas do not have an XML
namespace (i.e., no tragetNamespace attribute), then use this syntax:
--namespace-map =my_namespace
Boris
More information about the xsd-users
mailing list