[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: When to Validate XML?

  • From: Subrahmanyam Allamaraju <subbu@b...>
  • To: xml-dev@l...
  • Date: Thu, 01 Nov 2001 10:14:00 -0700

determining xml schema violations

Some form of validation is necessary at both the sender and
receiver's end. In the pre-XML days, the validation is done via
'application logic' on both ends. However, IMHO, XML complicated
matters here.

For most starters, schemas seem to be a place to keep all their
validation logic - however schemas are not expressive enough for this
purpose. So, I've often heard complaints that one has to do to lot more
validation besides what the schemas offer. So, there is some logic in
the applications, and some more in the schemas. I don't see anything 
wrong in this - each of these validations may in fact be serving 
different purposes.


> Another consideration is the cost of rejecting a "semantically" valid
> document that happens to have some syntax out of place.  My favorite
> (hypothetical) example is a $1000000 purchase order with a private attribute
> in it somewhere; would you really reject it?  If "reject" means turn it over
> to a human, sure ...But if you're using human or programmed business logic
> look the documents over anyway, why bother validating the XML in the first
> place? 


Good example. Such a document may be "invalid" as per a schema or DTD. 
But it is perfectly valid from the business sense. So, how to deal with 
such documents when the sender and receiver wanted (for whatever 
reasons) schema-based validation (in addition to application level 
validation)? The all-or-none style parsers die on such documents.

Do we need a different kind of parsers which can process "invalid" 
documents, and tell us at the end what the violations are?


> Another impression I've received over the years is that validation (via
> DTDs, Schemas, or whatever) tends to be more of an "audit time" activity
> than a real-time activity. The DTD or schema represents a "contract" between


Precisely. However, the sender/receiver should be able to apply some 
discretion. In the above $1000000 purchase order example, the receiver 
may want to process it just because there are big bucks with it - the 
receiver can do so as long as there is "enough" information to process 
the purchase-order.

Subbu


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.