[xsd-users] Problem with OGC GML - anyType values

Alexander Yadykin yadykin_a at mail.ru
Tue Oct 13 02:31:49 EDT 2015


 Dear All,

I have a problem with using of Code Synthesis XSD in my project, I hope that you will not refuse to help me a little bit.

I tries to create a simple XML reader\writer for RapidEye remote sensing data products ( http://blackbridge.com/rapideye/all-products/images.htm ).
I checked product specification guide ( http://blackbridge.com/rapideye/upload/RE_Product_Specifications_ENG.pdf , stage 8.1) and found that the XML metadata file based on OGC GML specification.
I downloaded product sample (see product_sample.tar.gz in attachment) and appropriate XSD files (see schema.tar.gz in attachment) from official site.
I created C++\Tree mapping code using Code Synthesis XSD with the following command line parameters:

cxx-tree
--generate-serialization
--generate-polymorphic
--polymorphic-type-all
--generate-comparison
--generate-ostream
--generate-doxygen
--generate-any-type

Generated C++ code was successfully compiled.

So, the substance of my problem.
RapidEye XSD expands OGC XSD according to OGC recommendations and replaces some OGC anyType fields to specific RapidEye types.
For example ogc::metadataProperty can contain any type values, but it contains re::EarthObservationMetadata in our case.
As a result I have a problems with interpretation of anyType values as a specific type during reading & writing XML files.

I successfully solved this problem for XML reading using Code Synthesis examples & FAQ, but I can't solve the problem for XML creation.
I created and filled child element "products::productMetadataSensor::EarthObservationMetaDataType".
But I don't understand how to push it to parent element "gml::MetaDataPropertyType".
I tried various methods but without success - program crashes during execution.
You will find my small code listing in attachment (see source.tar.gz).

Could you please clarify how I can generate & write XML metadata file using code which was generated by Code Synthesis XSD?
Could you please be so kind as to check my method of XML reading - I suppose that it is not optimal solution.
Thanks in advance.  

-- 
Best regards,
Alexander Yadykin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/x-gzip
Size: 30698 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20151013/a5fa28ac/attachment-0003.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/x-gzip
Size: 3983 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20151013/a5fa28ac/attachment-0004.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/x-gzip
Size: 1769 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20151013/a5fa28ac/attachment-0005.bin


More information about the xsd-users mailing list