[xsd-users] can xsd compile schema its structure includes
reference to external schema?
Boris Kolpackov
boris at codesynthesis.com
Wed Apr 29 12:09:47 EDT 2009
Hi Jeffrey,
Jeffrey Yu <jeffrey.yu at panpacificinvestment.com> writes:
> Can someone let me know if this is doable with this xsd?
Yes, this is doable. You just need to tell XSD how to map your new XML
namespaces to C++ namespaces. For example, you can add the following
options to the respective command lines:
--namespace-map http://www.product.org=product
--namespace-map http://www.person.org=person
--namespace-map http://www.company.org=company
Which will make XSD place the generated code into product, person, and
company C++ namespaces, respectively. Or, you can generate everything
into the global namespace (this is what you probably had before the
split):
--namespace-map http://www.product.org=
--namespace-map http://www.person.org=
--namespace-map http://www.company.org=
See Section 3.3, "Namespace Mapping" in the C++/Tree Mapping Getting
Started Guide for more information:
http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#3.3
Boris
More information about the xsd-users
mailing list