Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Why do we need XML Schemas other than for automatic validation?

From: "Neil Smith [MVP Digital Media]" <neil@------.--->
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent