[xsde-users] Migration from XSD to XSD/e
kelvin manoj
kelvinmanoj at gmail.com
Thu Apr 4 07:21:02 EDT 2019
Hi,
I am trying to migrate from XSD to XSD/e for the below project available in
github. This I am doing for reducing the memory usage. XSD consuming lot of
memory with xerces.
So I believe if I migrate the project to XSD/e I can save some memory.
Is it possible to migrate the XSD to XSD/e if some application already
using XSD. I don't wanted to modify the application code.
Project I am trying to migrate:
https://github.com/epri-dev/OpenADR-VEN-Library
I have compiled the schema files using XSD/e but after including in the
project I am seeing lot of things are missing. Some places where I am
getting errors commonly are given below.
XSD:
typedef ::icalendar_2_0::DateTimeType date_time_type;
XSD/e:
Here there is no such inner typedef. So I am getting bellow error while
building my application
error C2039: 'date_time_type' : is not a member of 'icalendar_2_0::dtstart'
If I try to resolve the above error by replacing the date_time_type with
::icalendar_2_0::DateTimeType I am getting below issue related to that.
XSD:
template <typename C, typename B>
inline date_time<C, B>::
date_time (int year, unsigned short month, unsigned short day,
unsigned short hours, unsigned short minutes, double
seconds,
short zone_h, short zone_m)
: time_zone (zone_h, zone_m),
year_ (year), month_ (month), day_ (day),
hours_ (hours), minutes_ (minutes), seconds_ (seconds)
{
}
XSD/e:
inline date_time::
date_time (int year, unsigned short month, unsigned short day,
unsigned short hours, unsigned short minutes, double seconds,
short zone_h, short zone_m)
: time_zone (zone_h, zone_m),
year_ (year), month_ (month), day_ (day),
hours_ (hours), minutes_ (minutes), seconds_ (seconds)
{
}
Here template is missing so it throws below error
error C2664: 'icalendar_2_0::DateTimeType::DateTimeType(const
icalendar_2_0::DateTimeType &)' : cannot convert argument 1 from
'xsde::cxx::date_time' to 'const icalendar_2_0::DateTimeType &'
I am not sure If i am missing any options in the compile command. Here is
the command I used to compile:
xsde cxx-hybrid --root-element oadrPayload --file-per-type
--generate-parser --generate-serializer --generate-polymorphic
--polymorphic-type ItemBaseType --polymorphic-type EnergyItemType
--polymorphic-type PowerItemType --polymorphic-type PayloadBaseType
--polymorphic-type StreamPayloadBaseType --polymorphic-type UidType
--output-dir ../2b/ --namespace-map
http://openadr.org/oadr-2.0b/2012/07=oadr2b::oadr --namespace-map
http://docs.oasis-open.org/ns/energyinterop/201110=oadr2b::ei
--namespace-map http://www.opengis.net/gml/3.2=oadr2b::gml --namespace-map
http://docs.oasis-open.org/ns/emix/2011/06=oadr2b::emix --namespace-map
http://www.w3.org/2009/xmldsig11#=oadr2b::dsig11 --namespace-map
http://www.w3.org/2000/09/xmldsig#=oadr2b::sig --namespace-map
http://openadr.org/oadr-2.0b/2012/07/xmldsig-properties=oadr2b::dsp
oadr_20b.xsd oadr_atom.xsd oadr_ei_20b.xsd oadr_emix_20b.xsd
oadr_gml_20b.xsd oadr_greenbutton.xsd
oadr_ISO_ISO3AlphaCurrencyCode_20100407.xsd oadr_power_20b.xsd
oadr_pyld_20b.xsd oadr_siscale_20b.xsd oadr_strm_20b.xsd oadr_xcal_20b.xsd
oadr_xml.xsd oadr_xmldsig-properties-schema.xsd oadr_xmldsig.xsd
oadr_xmldsig11.xsd
--
Regards,
J.Kelvin Manoj
Chennai.
9940522974.
More information about the xsde-users
mailing list