OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [xml-dev] When to Validate XML?




I think an important question to ask before deciding to turn on validation
at DTD/Schema level is "How can I report back the appropriate non-conforming
error in the XML file to the sender?".

If my application has better reporting capability then I would turn off
DTD/Schema validation. If in conjunction, I can use DTD/Schema validation as
"invariant", nothing like it. And of course, if I am able to report
non-conforming error using DTD/Schema validation then I would turn it on.

Thanks,

Ajay

-----Original Message-----
From: xml-dev-errors@lists.xml.org [mailto:xml-dev-errors@lists.xml.org]On
Behalf Of Max Dunn
Sent: Thursday, November 01, 2001 8:52 AM
To: 'Magick, Brian'; xml-dev@lists.xml.org
Subject: RE: [xml-dev] When to Validate XML?


A simple example where validation seems like it should always be done:  when
an application that depends on its XML conforming to a particular schema
receives XML from an external source.  In the real world, we receive XML
purchase orders conforming to the cXML spec over HTTP from a different
organization.  Validation quickly gets us started with the processing of the
PO.

In such a case validation accomplishes the important task of assuring a
basic level of conformance to some specs of the application, and typical
applications will additionally check the message in ways that DTDs or
Schemas couldn't necessarily help with, but that is not to say DTDs or
Schemas are incomplete.

At the other end of the spectrum would be the pointless tactic of validating
the same file validated 20 seconds ago, the same application validating the
same file sitting on the same server.

If you are talking about publisher and subscriber applications, the big
question is how close are the two systems to each other?  What organization,
what network, what machine, what file? It would range from two distinct
applications at different organizations to two modules of a single
application accessing a single file, and at the one extreme you should
validate and the other you shouldn't.

Max


-----Original Message-----
From: Magick, Brian [mailto:Brian.Magick@COMPAQ.com]
Sent: Wednesday, October 31, 2001 6:25 PM
To: xml-dev@lists.xml.org
Subject: [xml-dev] When to Validate XML?


Anyone interested in sharing their thoughts on under what circumstances you
should validate XML?

I think this board has really had some good discussions lately (i.e.
Database Decision Tree, Determining ID-ness in XML) and this is one issue
that still seems to draw the most debate in the inner-circles of my company.

Some folks feel that validation should ALWAYS be done regardless of the
circumstance (a bit radical it may seem). Others feel that XML validation is
simply a waste of time.  Some groups feel that schemas are not advanced yet
to do validation very intelligently (i.e. problems validating date formats),
and that the applications are still the best choice to validate your data.
People involved with integration feel that if the publisher and the
subscriber applications/databases BOTH do validation that XML validation is
an extreme misuse of resources.  And on and on..

With out nit-picking the examples I just laid out on the table can we share
some general thoughts on When to Validate and When Not to Validate XML?

Who knows, if this is a successful conversation perhaps we can give Leigh
Dodds enough ammo for next week's article.  J


Brian Magick