Wherefore Art Thou, Schema Validation?

By on July 6, 2004

One kink I’ve recently noticed in a number of ‘scripting languages’ geared towards producing web apps is the utter lack of support for XML Schema. I’m surprised by this, since a good Schema validator can save a lot of code when used properly.

Read on for ranting and raving.



  1. Even Perl could use some further development work with respect to validation against XML Schemas. I’d like to see an implementation that doesn’t rely on Xerces. The Xerces C library and associated Perl module can be difficult to build on some platforms (AIX, for example). What would be nice is to have a pure Perl implementation which would be guaranteed to run anywhere there is an installed Perl.

  2. Yes, native support would be a nice option. I imagine Xerces would still be faster, but then you could use Xerces when it’s convenient, and native where it’s not.

  3. Maybe Ruby doesn’t support XSD because it’s a ridiculous standard that will likely be replaced w/ something else soon (e.g. RelaxNG) Never mind Ruby’s excellent built in YAML support and the fundamental conflict between Ruby’s vibe and what’s happened to XML technologies since XML came out (XSD, XSL, etc.)

    I’d argue that validating on the level you are talking about with XSD is of questionable value anyway. Knowing that the document is not going to break the parser at some level is one thing, but knowing that the phone number matches a phone regex, etc., in one command doesn’t save much. Writing the code to deal with the range of errors returned from the XSD validation in a useable manner is basically as much work as doing the validations individually in the first place, plus you had to write and debug your XSD anyway. cf http://c2.com/cgi/wiki?OnceAndOnlyOnce

  4. In Schema validation, 1 i will validate as integer. but if give like this means it will accepting validation. the null must not come to me. please help me.

Comments are closed. If you have something you really want to say, tweet @gadgetopia.