I was doing a recruit platform, in Java, and within there I was currently writing the spec and mechanism for format definition file for IT Skills.
Then I came upon our good old friend XML and it’s companion, the grammar definition XSD (XML Schema definition). These two have a relationship: Since XML files in general must be validly constructed (not “broken”), the validation happens by checking programmatically a XML file against the rules in a XSD file.
The XSD itself is also a language, and it’s quite flexible: you can write your own custom grammars to validate XML against. So a question arises: How is XSD defined, then?
Just enough down the rabbit hole: XSD structure
I’d first written just a text file, ad hoc, about some of the learning I needed to do.
The file had tags, sure, but grammar was not yet there. In order to make the writing easier, it’s useful to have autocompletion in the text editor.
Needs so far:
- valid XML
- schema for XML captured as a XSD
- a validator tool for XML – takes XSD, XML -> shows results
- editor’s autocomplete mechanism for writing compliant XML