[xsd-users] can xsd compile schema its structure includes reference to external schema?

Jeffrey Yu jeffrey.yu at panpacificinvestment.com
Wed Apr 29 11:51:16 EDT 2009


Hi I run into this problem and hope I can get some help here.

 

In order to simplify the schema structure, I am looking to break the schema
into three pieces:  Product.xsd, Person.xsd, and Company.xsd.

By doing this, I can reuse types defined inside of Product.xsd, for
instance, individually in other applications.

 

I got following error messages when compiling these xsd:

Product.xsd:5:46: error: unable to map XML Schema namespace
'http://www.product.org' to C++ namespace

Product.xsd:5:46: info: use the --namespace-map or --namespace-regex option
to provide custom mapping

Person.xsd:5:46: error: unable to map XML Schema namespace
'http://www.person.org' to C++ namespace

Person.xsd:5:46: info: use the --namespace-map or --namespace-regex option
to provide custom mapping

Company.xsd:7:48: error: unable to map XML Schema namespace
'http://www.company.org' to C++ namespace

Company.xsd:7:48: info: use the --namespace-map or --namespace-regex option
to provide custom mapping

 

On the command line, I have:

$(XSD_DIR)\bin\xsd cxx-tree --root-element Product --generate-serialization
--guard-prefix p Product.xsd

$(XSD_DIR)\bin\xsd cxx-tree --root-element Person --generate-serialization
--guard-prefix p Person.xsd

$(XSD_DIR)\bin\xsd cxx-tree --root-element Company --generate-serialization
--guard-prefix p Company.xsd

 

Can someone let me know if this is doable with this xsd?

 

Thanks!

 

 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Product.xsd
Type: application/xml
Size: 385 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20090429/81007cf8/Product.xml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Company.xml
Type: text/xml
Size: 391 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20090429/81007cf8/Company.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Company.xsd
Type: application/xml
Size: 856 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20090429/81007cf8/Company.xml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Person.xsd
Type: application/xml
Size: 432 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20090429/81007cf8/Person.xml


More information about the xsd-users mailing list