[xsd-users] XSD or XSD/e

Boris Kolpackov boris at codesynthesis.com
Tue Oct 7 10:13:26 EDT 2014


Hi Christian,

Christian Sell <christian at gsvitec.com> writes:

> Now could you provide a reason why ever to use XSD and not XSD/e?

XSD has more features, is more powerful, flexible, and convenient. 
However, you pay for that with larger footprint and slightly worse
performance, compared to XSD/e. There is also an external dependency
on the underlying XML parser library (Xerces-C++). It is best
suited for general-purpose development (desktop, server, etc).

While XSD/e is not as powerful as XSD, it is smaller, faster and
external dependency-free. It was also specifically designed for
working in resource-constrained environments, such as mobile and
embedded systems. As a result, there are a number of unique features,
such as partially in-memory and partially event-driven XML processing,
that allow you to handle large documents using a limited amount of
memory.


> We are using embedded schema - does that work with XSD/e (I assume
> it's automatic)?

XSD/e implements validation (for both parsing and serialization) of 
a subset of XML Schema in the generated code. For the list of
XML Schema constructs that are validated, refer to Appendix A in
the Embedded C++/Parser and C++ Serializer mapping guides.


> Do you think Xerces is so much overhead that it precludes deployment
> to Android/iOS devices (with > 1 Gig RAM nowadays)?

I am not sure about runtime overheads, but the biggest obstacle is
actually building Xerces-C++ for Android/iOS. Xerces-C++ is what I
would call a "framework" in a sense that it has (or requires) APIs
for everything from file IO, to concurrency, to network access. As
a result, it has a special layer or code for each operating system
(e.g., Win32, POSIX, Mac OS) that abstract these. I don't believe
there is anything like this for Android or iOS.

But, if you need it badly enough, I am sure Xerces-C++ can be
ported to these mobile platforms. I know I've built it some time
ago for LynxOS.

Boris



More information about the xsd-users mailing list