[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SV: [xml-dev] When to Validate XML?
- From: "Jens Jakob Andersen, PDI" <firstname.lastname@example.org>
- To: "Champion, Mike" <Mike.Champion@SoftwareAG-USA.com>, email@example.com
- Date: Tue, 06 Nov 2001 15:02:38 +0100
With the danger of stepping on somoebodies toes, I'll dive straight into
* When to Validate XML?
I thinkt that the question could be rephrased as:
"Why Validate XML?"
1. In B2B (A2A) scenarios based on XML as the format for the messages,
we would like to ensure that our services doesn't act on garbage.
2. By validating the XML against i.e. DTD or Schema, we can validate the
structure, but we will still have to validate the _content_ !
If I would build a web.service, I guess that I would validate the
structure of incoming messages against a DTD, and then I would validate
the content. Of course I could in some areas use XML Scema for some of
this validation (i.e. simple range validations?), but I would still need
some app.logic to do the final validation.
Some might argue, that RDF-S or DAML+OIL can be used to describe the
ontologies for doing the app.level validation, but this might be a bit
out of the envelope at the moment.
If I look at the RDBMS world, and the database level validation used
there, i.e. triggers, rules etc., these are in fact mostly used at the
development and testing time, to make sure that the RDBMS will generate
a runtime error when the program tries to insert invalid data, i.e. out
of range data.