Hi Folks, Acknowledgement: Some of the below text and idea comes from section 4.2 of RFC 7493 (http://www.rfc-editor.org/rfc/rfc7493.txt)
It is frequently the case that changes to XML Schemas are required after they have been put in production. XML Schemas that allow the introduction of new elements in a way that does not disrupt the operation of existing software have proven
advantageous in practice. This can be referred to as a "Must-Ignore" policy, meaning that when an implementation encounters an element that it does not recognize, it should treat the rest of the document as if the new element simply did not appear, and in particular,
the implementation must not treat this as an error condition. The converse "Must-Understand" policy does not tolerate the introduction of new elements, and while this has proven necessary in certain designs, in general it has been found to be overly restrictive
and brittle. A good way to support the use of Must-Ignore in XML designs is to require that the root element must contain a list of key/value pairs where each key is unique, and to specify that keys whose names are unrecognized must be ignored. Example. Here is an XML document where the root element contains a list of key/value pairs and each key is unique: <Book> This example shows simple values for each key. Of course the values could be complex. Suppose that at a later date the XML Schema is extended to include a NumPages element. Now XML instances contain this: <Book> If a consumer of this XML has not been coded to understand that new key/value pair, the consumer must ignore it. Recap: design your XML so that the root element contains a list of key/value pairs where each key is unique. Notify consumers that over time the set of root element keys will expand and they should ignore any root element keys they do not
understand. /Roger |