Now when we receive a change request to add a description to each product, we can publish a new schema with an additional Description element that the provider inserts into the extension container. This allows the ProductSearch service to return results that include product descriptions and consumers using the new schema to validate the entire document. Consumers using the old schema will not break, though they will not process the description. The new results documents look like this:
<?xml version=”1.0” encoding=”utf-8”?>
<Products xmlns=”urn:example.com:productsearch:products”>
<Product>
<CatalogueID>101</CatalogueID>
<Name>Widget</Name>
<Price>10.99</Price>
<Manufacturer>Company A</Manufacturer>
<InStock>Yes</InStock>
<Extension>
<Description>Our top of the range widget</Description>
</Extension>
</Product>
<Product>
<CatalogueID>300</CatalogueID>
<Name>Fooble</Name>
<Price>2.00</Price>
<Manufacturer>Company B</Manufacturer>
<InStock>No</InStock>
<Extension>
<Description>Our bargain fooble</Description>
</Extension>
</Product>
</Products>