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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Testability and Schema validity

[ Lists Home | Date Index | Thread Index ]


In the "OWL and DTDs" thread, some strong claims about schemas being 
necessary for an XML application to be testable were made. That sounds 
sensible, and probably is usually very practical, but I'm not at all sure 
it's logically true.

For example, consider a purchase order format definition.  It will 
undoubtably define the element names and attributes and content model(s) 
that are legal, and at least Schematron is capable of defining some fairly 
robust models that won't break in the face of change, extra 
information,etc. But a real test regime will require constraints that 
aren't expressible in any XML schema language AFAIK:

The <part_number> attribute value on each <item> element must match [a 
product in our catalog]"

"The <quantity> element value must be less than or equal to the [number 
currently in stock according to ERP system]"

"The <total_price> element value must [approved by the credit checking 
service given the credit card number, expiration date, cardholders name]"

"The <key> element value must be a prime number represented by at least 20 
decimal digits"  [OK, that's totally contrived in the purchase order 
context, sorry]

Given that the test suite definition us going to have to specify how to do 
all this database lookup or web service invocation or calculation or 
whatever, why is a schema for the syntax really and truly necessary?  If 
one has enough confidence in one's testing regime, it could be the "real" 
definition of validity, no?

-- 
 




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS