Relationship Between Data Processing, Data Versioning, and Data Validation
- Validating data is different from processing data.
- Just because an application can validate some data doesn't mean it can process the data.
- Just because an application can process some data that it validated doesn't mean that any data it validates can be processed.
- A backward-compatible XML Schema means that a new version of the XML Schema can validate instance documents conforming to an
old version of the XML Schema. Consider an application that is designed to process the old instance documents, and
suppose that it has obtained the new, backward-compatible XML Schema. Now it can validate both old instance documents
as well as new instance documents. However, just because it can validate the new instance documents doesn't mean it can process them.
- A forward-compatible XML Schema means that an old version of the XML Schema can validate instance documents conforming to a
new version of the XML Schema. Consider an application that is designed to process the old instance documents.
It can validate both old instance documents as well as new instance documents. However, just because it can validate
the new instance documents doesn't mean it can process them.
The following items are targeted at this scenario: a web service has unknown clients (anyone can use the service); the data it
makes available to clients is described by an XML Schema (identified in a WSDL document) and some English prose (in a web page);
periodically the data is changed (i.e. new version). See the Amazon web service for an example.
- Versioning the data made available by the web service based on backward- or forward-compatible XML Schemas imposes severe
restrictions on the types of changes permitted; these restrictions may not be consistent with the needs of the business
(the "business" is all the technical, political, and managerial stuff that went into funding, creating, deploying, and
maintaining the web service).
- Don't base your web service data versioning strategy on a data validation strategy. Decouple your data versioning strategy
from your data validation strategy.
- Base your web service data versioning strategy on business needs.
The above statements identify XML Schemas as the validation language, but the statements apply to any validation language,
such as RELAX NG, DTD, or Schematron.
The following people contributed to the creation of this document:
- David Carver
- Roger Costello
- Bruce Cox
- Derek Denny-Brown
- Fraser Goffin
- Ian Graham
- Stephen Green
- Greg Hunt
- Michael Kay
- Thomas Lord
- Bryan Rasmussen
Last Updated: December 28, 2007