Determine whether an XML file update is required
Some schema updates will require you to update your XML instance documents to ensure they conform to the new schema. Other updates require no action and can be ignored.
The following checklist will help you to determine the types of schema updates that will need to be reflected in your XML files. Note: Updates can affect elements, attributes, simpleTypes, complexTypes, and groups; the schema update descriptions in the table apply to any of these constructs.
Table 2: Schema updates requiring XML instance document updates
|Schema update description||Action required|
|Updates to constructs (elements, attributes, simpleTypes, complexTypes, groups)|
|A required construct was added||You must add the new required construct to the XML instance documents.|
|An optional construct was added||No action is required. If you have data values for the optional construct that could be used, you might consider adding the new construct to the XML instance documents if you have time.|
|A required or optional construct was removed||You must remove the construct from the XML instance documents.|
|A previously required construct is now optional||No action is required.|
|A previously optional construct is now required||You must add the new required construct to those XML instance documents that don't already have it.|
|A construct was renamed or resequenced||You must rename or resequence the construct within the XML instance documents that contain it.|
|Updates to construct data values (values of elements, attributes, simpleTypes, complexTypes, groups)|
|A data value was added to an enumeration list||No action is required.|
|A data value was deleted from an enumeration list||You must delete that value wherever it occurs in your XML instance documents. If the construct with this data value is required, you must determine an acceptable data value to be used instead of the old one.|
|A data value has been changed in an enumeration list||You must change that value accordingly wherever it occurs in your XML instance documents.|
|General note: If an update affects a simpleType or complexType construct, the elements or attributes based on this construct might also be affected. For example, if three elements get their definition from the same complexType construct, and the complexType definition was updated with a new required attribute, then those three elements must be updated with the new attribute wherever they appear in your XML documents.|
If you have multiple XML instance documents that adhere to different versions of the schema (or different schemas), you'll need to address the possible differences between the updated schema and the other versions. Imagine that situation for a minute. It shouldn't take long for you to see the benefit of keeping all the XML documents compliant with the same (current) schema when schema updates are necessary.
By applying this checklist to each schema update you listed in the previous step, you have the basis for creating the XSLT stylesheet templates necessary to update your XML instance documents.