[xsd-users] XSD uses a lot of memory
Maxim Maslennikov
maxim.maslennikov at gmail.com
Wed Mar 18 15:16:56 EDT 2015
Hi Boris,
Thank you for the clarification.
Best Regards,
Maxim
> On Mar 17, 2015, at 2:01 PM, Boris Kolpackov <boris at codesynthesis.com> wrote:
>
> Hi Maxim,
>
> Maxim Maslennikov <maxim.maslennikov at gmail.com> writes:
>
>> I again attached the files.
>
> The mailing list software strips your attachments for some reason.
>
> In any case, I got them, so let's see:
>
> 1. XSD stores string-based enums as both strings and C++ enums
> (that's the "requirement", so to speak, of XML Schema). You
> store them as C++ enums only.
>
> 2. There are 4 choice elements for which XSD has separate
> data members while you have one member (imagine they were
> all of different types).
>
> 3. XSD, in order to support things like polymorphism, stores
> elements as separately-allocated nodes (unless they are of
> C++ fundamental types) while your object model does it by-
> value.
>
> The bottom line is this: you will always be able to produce
> much more efficient and optimized object model by hand since
> you can make all kinds of situation-specific assumptions that
> XSD can't.
>
> Also, another thing that you can try is XSD/e and its C++/Hybrid
> mapping. I am pretty sure it will be a lot closer to your object
> model since it doesn't try to be as flexible and "dynamic" as
> XSD.
>
> Boris
More information about the xsd-users
mailing list