Issue Details (XML | Word | Printable)

Key: JDO-319
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Michael Bouschen
Reporter: Michael Bouschen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

Enhance api20 XMLTest so that users can check their own .jdo .orm, and .jdoquery files

Created: 26/Feb/06 07:32 AM   Updated: 07/Mar/06 11:08 PM
Component/s: api2
Affects Version/s: JDO 2 rc1
Fix Version/s: JDO 2 final

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works JDO-319-060225.patch 2006-02-26 08:18 AM Michael Bouschen 9 kB

Resolution Date: 07/Mar/06 11:08 PM


 Description  « Hide
The new XMLTest in the api20 project could be enhanced so users could check their own .jdo .orm, and .jdoquery files.
Today it only runs on the JDO metadat files in api20/test/schema.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Michael Bouschen added a comment - 26/Feb/06 08:18 AM
The attached patch 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.

Craig Russell added a comment - 27/Feb/06 12:36 PM
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.


Michael Bouschen added a comment - 07/Mar/06 11:08 PM
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.