[xsd-users] FpML schema - C++ compilation

Boris Kolpackov boris at codesynthesis.com
Wed Mar 17 11:13:05 EDT 2010


Hi Mukesh,

Mukesh Sharma <mukesh.s at pyxis-it.com> writes:

> The output was a single C++ file; which seemed to contain all the class
> objects. But when we do FpML schema compilation in Java using JAXB, it
> creates a whole hierarchy of small-small classes. 
>
> (1)     Can anyone let us know if this is expected OR in C++ also we should
> be getting the class hierarchy similar to Java? 

Yes, this is expected. By default XSD produces a set of C++ source files 
(that is, a header file and an implementation files) for each schema file 
instead of a set of files for each type as in Java. Also note that you 
will need to compile each schema file separately or you can use *.xsd
as the XSD compiler argument to compiler every schema file in the
current directory.


> (2)     Do we need any additional steps other then mentioned in the above
> link?

No, that's all you need. For your reference, here are the options that
we use to compile the FpML schemas in our tests:

--generate-polymorphic 
--root-element FpML 
--namespace-map http://www.fpml.org/2009/FpML-4-7=FpML_4_7 
--namespace-map http://www.w3.org/2000/09/xmldsig#=XMLDSig

Boris



More information about the xsd-users mailing list