We could use a Document Type Definition, or DTD. Unfortunately, DTDs have a verbose, clunky syntax, and they can't say anything about the information in the document. They can specify the structure, but they can't see past it. Also, DTDs don't support namespaces.
We could use an XML Schema. They support some content type checking, but they, too, have problems. They are written in XML, which is both a blessing and a curse. It's a blessing because XML is easy to parse; it's a curse because the format is so verbose that your fingers will ache with pain and you will get carpal tunnel syndrome if you type too much of it. Also, it lacks some more powerful and dangerous features, such as full use of Common Lisp in the validation process. Schemas and DTDs both share the disadvantage that they aren't part of Lisp, and are not designed to be used from Lisp processes.
I wanted to do some sanity checking on XML documents from a Common Lisp program I'm writing. I didn't want to use DTDs or Schemas for the reasons above. I wanted to be able to write the specifications for XML structures in a lispy syntax. I wanted enough power to grow. So, I wrote xml-psychiatrist.
This page is linked from: Peter Scott
CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively