How do I validate documents against Schematron schema in Java?
As far as I know, jaxp by default supports W3C XML schema and relax ng from Java 6
I can do it at Schematron Some APIs can be seen on the com links page, mainly experimental or incomplete
Is there a way to verify that Schematron in Java is complete, efficient and can be used with jaxp API?
Solution
Jing supports ISO Schematron pre validation (note that Jing's implementation is also based on XSLT)
There are also XSLT implementations that can be easily invoked from Java You need to identify the Schematron version you are interested in, and then get the appropriate stylesheet – all of which should come from Schematron com. This process is very simple and basically involves two steps:
>Apply the framework XSLT on the Schematron schema to get a new XSLT stylesheet that represents the Schematron schema in XSLT > apply the obtained XSLT to your instance document or document to validate them
Jaxp is just an API. It does not need to support relax ng from the implementation You need to check the specific implementation used to see if relax ng is supported