|
It would be nice to check the contents of the file to see whether it's defined using dtd or xsd. One fewer thing to have the user worry about.
This could be done by scanning the input file looking for a pattern that identified it as dtd or xsd. Checked in (see revision 383687) a new utility class test/javax/jdo/util/XMLTestUtil.java that may be used as standalone tool to check .jdo, .orm or jdoquery files. Please check the new goal xmltest in the api20 maven.xml file for details.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JDO-219-060225.patch includes the first version of the XMLTest enhancement for discussion.It adds a new goal xmltest to the maven.xml in the api20 project. This goal runs the XMLTest test class on all JDO metadata files specified using the system property metadata. The system property is a comma separated list of JDO metadata files or directories containing such files. The boolean system property dtd specifies whether to use a DTD or XSD XML parser (defaults to false). Example calls:
- maven -Ddtd=true -Dmetadata=mypackage.jdo xmltest
Runs the parser on the local file mypackage.jdo using a DTD XML parser.
- maven -Dmetadata=dir1,dir2 xmltest
Runs the parser on all .jdo, .orm and .jdoquery files in directories dir1 and dir2 using a XSD XML parser.