try {
parser.parse(syntaxSchema, systemId);
XSSchema mySchema = parser.getSchema();
parser.createSubstitutionGroups(mySchema);
mySchema.validate();
finished = true;
} catch (IOException e) {
throw new SAXException(e);
} catch (ParserConfigurationException e) {
throw new SAXException(e);