Aleksander Slominski wrote:
> how one could run conformance tests - are they part of xerces-2?
> i could not find any information about it on
> http://xml.apache.org/xerces2-j/index.html
The conformance tests that I was referring to are the ones
donated by numerous companies and individuals and compiled
and maintained at OASIS[1]. Unfortunately there are a few
bugs in the configuration and test files but, even still,
it is very useful to see if a change you've made causes a
regression.
The download from OASIS is only the set of tests. You still
need to download a driver program that can run through the
series of tests and produce a meaningful report. Most people
using these tests run them with David Brownell's program[2].
The documentation for using the driver isn't very good so
I'll give you a few pointers.
First, download the tests and the latest driver program. Or
you could checkout the code from the SourceForge repository
and build it yourself. If you download the pre-built code,
though, be sure to grab the latest "utilities.jar" file.
Next, since this is just the code, it would be useful to
write a batch file (or shell script) to invoke the tests
using the driver. To invoke the driver, do the following:
java -cp utilities.jar;xerces.jar xml.testing.Driver
The Driver program takes four (or five) arguments: the test
suite file; the SAX parser class name; the report template;
"nv" or "val" for non-validating and validating, respectively;
and an optional parser description. The test suite file comes
with the OASIS tests (e.g. "xmlconf.xml"). The parser name
can just be "org.apache.xerces.parsers.SAXParser". The report
template, however, is another issue.
To get a suitable report template, you will need to browse
the SourceForge CVS repository for the Driver[3] and download
the "template.xml" file. Once you get all of these pieces
together, you should be able to run the conformance tests.
The test will be run, printing progress results to standard
error. Once done, the generated report will be written to
standard out which can then be redirected to an HTML file.
For example, here is how I run the conformance tests (even
though I've broken it apart, it should be typed in as a
single command):
java -cp utilities.jar;xerces.jar
xml.testing.Driver
xmlconf.xml
org.apache.xerces.parsers.SAXParser
template.xml
nv
"Xerces2"
> xerces2-nv.html
I hope this helps. Good luck!
[1] http://www.oasis-open.org/committees/xml-conformance/
[2] http://xmlconf.sourceforge.net/
[3] http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/xmlconf/xml/
--
Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]