Refined grammar, generated working DTDs and XSDs.