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?



 
> Ahh,  good point, and one for the validation decision tree:  Use a
> Schema/DTD and XML-level validation to enforce constraints that are
> universal across applications that use a specific data format.  Use
> application logic (procedural code?) to enforce constraints that specialized
> applications know about.  For (a quickly contrived) example, a bookstore
> site might need some specialized module that knows about ISBNs and how to
> validate them against a database; most other modules just need to ensure
> that the ISBN value doesn't get lost and "trust" that nobody mucks with the
> value.


So, what schemas can capture are the constraints common to all apps. How 
about the following possibilities?

(a) Each app (in the worst case) may use a slightly different schema to 
validate a given XML document. That is, each schema can capture any 
special constraints local to the app. I see that this contradicts the 
common notion that schemas are global. However, when it is accepted that 
each app can use its own logic to verify the data, why not extend the 
same to schemas?

(b) In the above example, each app has a slightly different set of 
constrtaints for the same data. Can we not extend this argument to say 
that each app has its own view (both structure and constraints) for a 
given document. In this case, each schema may specify only a subset of 
the structure/constraints. I see that the current validating parsers 
won't tolerate this, but how does this sound in theory?

Subbu