Scott Lamb asks:
What's the preferred way to make regression tests? I noticed the xml-xalan/test/tests/bugzilla directory, but there haven't been any tests added there in 15 months. Is there a new system?
Typically, we prefer to write a "conformance" or "acceptance" test that is small and focuses on one unique detail. A test qualifies as "conformance" if all XSLT processors are required to behave the same way. Often, tests in the tests/bugzilla directory are ones that have not been narrowed down. .................David Marston
Okay, that makes sense. I don't see the behavior in the spec, though. (Maybe it's not there; maybe I'm just missing it.). I'm looking at bug ids 717 and now 1251 (which seems to already have a regression test, but maybe I should move it to a conformance one.) Is there an authoritative correct behavior when a SAXResult throws an exception (either SAXException or a RuntimeException)? My best guess is:
- If you call Transformer.transform, it does an ErrorListener.fatalError(new TransformerException(..., e)). (or error? Is a SAXException from there fatal?) If that's rethrown from there, it must pass through transform back to your code.
- If you use it as a TransformerHandler, I'm not sure. Clearly the current behavior (losing all but the message of RuntimeExceptions and ignoring SAXExceptions entirely) is not good, though.
Thanks, Scott Lamb
