|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How much run-time validation do you do?
On Mon, 20 Dec 2004 09:19:54 -0500, Roger L. Costello <costello@m...> wrote: > Hi Folks, > > Suppose that you have an application which exchanges XML instance documents > (instance data) with trading partners. I'd like to get a feel for how > people are addressing these issues: > > 1. Do you validate outgoing instance data? Do you validate incoming > instance data? > > 2. What criteria do you use for deciding whether or not to do run-time > validation? I suppose this question was partly motivated by my "I'll write no schema before it's time" comment, so even though I've mostly explained what we do I'll try and expand. Since we already have a complete set of metadata that is used for generation of both the instance document and the Schema there really isn't any point in validating on the outgoing side. We'd be validating that we know how to wriite a Schema from our metadata (which I'm not 100% sure we do) as much as we'd be validating the document instance. Internally we use Schematron for data validation, but that's a different issue. So other than check for well-formed documents the main other check is against the metadata which can take many forms. Theoretically we're doing the equivalent of building a PSVI in memory, but it's our own object model and doesn't conform to any interfaces one might expect. I guess it's something to look at down the line as we continue to open the system up, which leads ot the incoming data question... At the moment we only import data via JDBC to a internal mapping tool. This mapping tool is used to build up relationships between the incoming data and the metadata. These mappings can be saved and reused against new instances of the same source. In theory this mapping data could be used to generate a Schema to validate any incoming XML. To date we have no incoming XML data sources so it hasn't been an issue. (The next project on the books in this regard is a patient monitoring device that dumps humugous CSV formatted files, nothing exciting there, we'll just handle them as JDBC sources.) -- Peter Hunsberger
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








