Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Why do we need XML Schemas other than for automatic validation? >Thread Next - Re: Why do we need XML Schemas other than for automatic validation? Re: Why do we need XML Schemas other than for automatic validation?To: NULL Date: 7/8/2008 9:52:00 PM On Tue, 8 Jul 2008 10:26:30 -0500, "Duane" <nospam@a...> wrote: >> > I've written DTDs so far and read about XML Schemas. I understand that >> > they are a replacement of the DTD fundamentally, and therefore allow >> > for the validation of an XML document. >> > > >If I may further add to or clarify the question: >If one is not using tools for creating XML or XSLT documents, if one is >programmatically creating the XML, is in full control of the creation and >translation, not needing to verify outside sources of XML, is there any need >for creating a schema? Well, we had to do that this month as part of our unit tests when migrating a web service from one version to a very much upgraded one. The schema was invaluable for providing confirmation of expectations that response elements corresponded between versions, and catching config settings which differed between the services (but should have matched). Although it was relatively time consuming to do, it added a great degree of confidence in the rollout procedure between the new and old systems to generate the service responses. Not all the possible conditions were possible to validate (easily) using the XSD, so additional validation using PHPUnit included MD5 matching of nodesets, where our service responds with elements which aren't required to be in a specific order. Of course, it also allows customers to validate our response if they need to raise a maintenance ticket, so benefits all round. It also provided a degree of focus in discovering elements which were deprecated in the response but still being generated - when removing these items from the schema, the unit tests fail until the unneccessary code is completely removed, which helped in the upgrade. Cheers - Neil ------------------------------------------------ Digital Media MVP : 2004-2008 http://mvp.support.microsoft.com/mvpfaqs | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
