[xsd-users] XSD Vs XSD/e differences
Boris Kolpackov
boris at codesynthesis.com
Mon Jul 17 09:05:18 EDT 2017
Iain Sharp <isharp at atis.org> writes:
> * Export and import the data model to/from a DOM to allow serialization
> and parsing in protocols other than XML (the prototype uses Xerces in
> addition to XSD tree output)
This will be pretty hard to achieve in XSD/e since it doesn't have an
intermediate representation like this.
> I built an initial trial based on XSD which works OK, but even with
> the best optimizations I can find the code size is rather large -
> this seems to be mostly due to the large number of objects defined
> in the XSD.
>
> Would swapping to XSD/e be expected to reduce the code size?
Highly unlikely. XSD/e will generate even more code for each schema type
(for parser and serializer), especially if you don't disable validation.
Another thing you can try is look through --suppress-* options in XSD
to eliminate features you don't need. Plus --generate-inline is a
good idea. Finally, if desperate, you may want to disable generation
of parsing/serialization functions (--root-element-none) and set this
up yourself. In fact, generating these for all the global elements is
usually a source of huge (and usually unnecessary) bloat.
> Is there a guide to the functional differences between XSD and XSD/e?
There is no feature-by-feature comparison. Generally, XSD has more
features, is more powerful, flexible, and convenient. My recommendation
would be to go with XSD unless you have a good reason to prefer XSD/e
and are prepared for a "spartan" object model. In your case I believe
XSD is a better choice.
Boris
More information about the xsd-users
mailing list