[xsd-users] versioned xsd files

Boris Kolpackov boris at codesynthesis.com
Wed Oct 14 09:38:27 EDT 2015


Hi Ryan,

Ryan Lewis <me at ryanlewis.net> writes:

> I am wondering what the best way is to handle versioned xml files? Does XSD
> do this?

XML Schema itself doesn't provide any mechanisms for schema evolution. So
the commonly used approach is to generate mapping code for different
versions of your vocabulary into different C++ namespaces, detect which
version is being parsed (e.g., by doing XML-to-DOM parsing stage yourself
and examining the root element namespace or some such; see the 'multiroot'
example for details), and dispatching to the corresponding generated code.

Boris



More information about the xsd-users mailing list