[xsde-users] Supporting multiple versions of a schema that are
not completely backward compatible
raviraja at qti.qualcomm.com
Wed Jul 8 18:30:31 EDT 2015
Sorry, if you received multiple copies of my original request for multiple schemas with same namespace. I will read through the evolution examples. But I am quite clear on how to use --namespace-map compiler flag.
1. How exactly should I use --namespace-map in our makefile such that namespace for old schema is scheduleDescriotion_v1 and namespace for newer schema is scheduleDescriptionv3 ?
2. If we add a flag in our makefile, it'd be common for all files compiled under that directory, right? Did you mean I move newer schema to a different dir and have a different makefile for it?
Thanks again for your help.
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Wednesday, July 08, 2015 9:14 AM
To: Rangarajan, Ravi_Sowmian
Cc: xsde-users at codesynthesis.com
Subject: Re: [xsde-users] Supporting multiple versions of a schema that are not completely backward compatible
Rangarajan, Ravi_Sowmian <raviraja at qti.qualcomm.com> writes:
> - Is it possible to change name space for say the newer schema
> so both can co-exist and application code can call respective
> schema's APIs a run time? If yes, how can I achieve that?
Yes, use the --namespace-map (or --namespace-regex) option.
> - If changing namespace for the newer schema is not possible, then other
> approach might be to use newer schema alone and whenever an XM file needs
> to be constructed per old schema, one may have to remove/reset/set few
> fields to mock old schema, but am not quite sure how to go about those
> steps needed for the same. Any tips on how to use single schema and mock
> support for both versions of the schemas?
XSD/e includes support for schema evolution. I am not sure how applicable it will be to your case, but it may be worth familiarizing yourself with it; see the examples in the 'evolution' directory.
More information about the xsde-users