Closed rosslamont closed 7 years ago
I think, we should be particularly clear in the distinction between DTD, and Schema. As it is, JAXP does either support the SAXParser(Factory).setValidating(boolean) method, which enforces the presence of a DTD, or the use of an XML (or other) schema. When I wrote the plugin, I wasn't aware of that distinction, so it isn't present in the parameters. In retrospect, it clearly should. As soon as we have tht distinction, I am more than open for new error conditions.
This should probably be an error condition, but a better solution would be to allow the validation to be inferred from each xml file using XSI information if available.
Unfortunately this might result in backward compatibility issues.
Perhaps the validation set should be required to have at least one of publicId, systemId or schemaLanguage. publicId or systemId would work as currently, if only schemaLanguage were provided, then the plugin would use the special zero arg Schema constructor on SchemaFactory.