Jan 18, 2008

XML schema forever!

Recently I've redesigned a configuration file for one of my projects. It is an XML file and was designed in a hurry. Now I have implemented it in a proper way, I believe, with some structure changes and with a custom XML schema. I am using, by the way, the xerces-c DOMBuilder interface. DOMBuilder - an interface introduced by the W3C DOM Level 3.0 Abstract Schemas and Load and Save Specification (http://www.w3.org/TR/2002/WD-DOM-Level-3-ASLS-20020409/).
Once again it was proven that with a properly written schema one can avoid a lot of "stupid" errors (when user or third-party application modifies XML configuration files) and improve security of the application. That's simply because the configuration file is validated and checked for errors even before the application starts to read configuration entries from it.
XML Schema 1.1 is a really powerful language, you can describe XML files in a very precise manner. I always thought that and once again it appeared to be a very true! I actually can't imagine someone doing XML development without using the schema. It will be a nightmare.

Unfortunately if your development platform is Linux you will face some leak of good XML editors - by "good", I also mean "free". :)
And, worth to be mentioned, a leak of tools for XML schema documentation generation. I found so-far only one tool, which is free and does generate HTML documentation from "*.xsd" files. Its name is xsddoc. And that all :(
May be I misused google, but I didn't find anything comparable for Linux. The output of xsddoc is not very sharming, as I would expect it, but at least it does the job and does it very well.

No comments: