[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Validation API, was: Regarding the vote on XML Schema.
I think this discussion has happened before. IIRC, the consensus was that more is needed than a 'pluggable validator' API; each schema technology brings its own infoset contributions. 'Validation' can be seen as a special case of an infoset contribution. What's needed is a mechanism to plug-n-play infoset annotations into a document processing stream. Example: I have this XMLDocument. I want to validate a fragment of it against this DTD I've got (this also fills in some default attributes I need). I want to use an XML Schema to 'paint' data types onto the doc. I run an XSLT2 transform on the document, keeping the datatype information intact in the output document. I want to overwrite _some_ of the datatype information in the new document, with some specific rules I hacked up. I want to validate the document using a set of Schematron rules. I also want to do this without scribbling on the document instance, because it's on a read-only medium and it's huge. Maybe that is too hard. I think people are still trying to narrow down what these 'infoset contributions' are, and what they look like. Then we can talk about an architecture for providing them. -Wayne Steele >From: Tony Coates <Tony.Coates@r...> > >On 24/04/2001 07:06:48 Rick Jelliffe wrote: > > >Merely saying "XML Schemas bad! RELAX good!" keeps the cart before the > >horse. If there is no modularity or ability to plug-n-play with >different > >kinds of schema, then every little engineering trade-off has to be >subjected > >to exhaustive discussion (as in XML Schemas) with no guarantee that the > >result will satisfy everyone. > >Agreed. What would help us more is a validation API that allows pluggable >validators, and that allows (multiple) validation of any part of an XML >document, not just the whole document. If your Schema wraps a legacy DTD, >why >shouldn't the legacy tags be validated using the DTD? If you have >validation >code in your application (and there is always some, doing the things that >DTDs/Schemas can't do), separate it out and build your own pluggable >validator. >That will make your application architecture cleaner. > >My major concern in achieving this is that Schemas can be applied to a DOM >tree >(which is very nice), but I'm not sure what tricks there might be in trying >to >do the same with DTDs, which were not designed with that in mind. Of >course, >you would want not just these two, but also TREX/RELAX, Schematron, and any >other likely suspects that might come along. > >All of this said, is anyone else interested in being able to do this kind >of >thing, or is it all too hard? My impression is that for a lot of the >world, >DTDs are the now, XML Schemas will do what most people need for the future >(remembering that most people aren't on the "xml-dev" list ...), and >anything >else tends to be marginalised as a toy for XML weenies. The existence of a >good >API could change that (just as SAX and DOM made XML parsers accessible and >acceptable by removing the lock-in), but I'm interested to know whether the >rest >of you see things the same way. All comments gratefully received. > > Cheers, > Tony. >======== >Anthony B. Coates >Leader of XML Architecture & Design >Chief Technology Office >Reuters Plc, London. >tony.coates@r... >======== _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
|
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
|