qiuwei / jing-trang

Automatically exported from code.google.com/p/jing-trang
Other
1 stars 1 forks source link

Support javax.xml.validation #21

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
JDK 1.5 introduced the javax.xml.validation package.  We should support this.

Original issue reported on code.google.com by jjc.jclark.com on 27 Oct 2008 at 1:05

GoogleCodeExporter commented 8 years ago
Started. Still to do:

testing
supporting Source that isn't SAXSource
factor out into separate module with its own lean 'n' mean jar
property for DatatypeLibraryFactory
ID/IDREF DTD compatibility support, including infoset modification
feasible schema support
documentation
resolve nits with JAXP spec
rename package from javax to jaxp

Original comment by jjc.jclark.com on 8 Nov 2008 at 10:23

GoogleCodeExporter commented 8 years ago
To validate a document with JAXP in Java 1.6, I had to add the following:

System.setProperty(SchemaFactory.class.getName() + ":" + 
XMLConstants.RELAXNG_NS_URI,
"com.thaiopensource.relaxng.jaxp.CompactSyntaxSchemaFactory");
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.RELAXNG_NS_URI);

This allows me to use Jing to validate an XML document against a Compact RELAX 
NG
schema. Full example attached.

Original comment by rwald...@gmail.com on 20 Jan 2010 at 6:54

Attachments: