I found the following snippet in the class FOFileHandler:
===============================================================
/**
* @see org.apache.fop.apps.InputHandler#getParser()
*/
public XMLReader getParser() throws FOPException {
return createParser();
}
===============================================================
and the createParser() method
===============================================================
/**
* Creates <code>XMLReader</code> object using default
* <code>SAXParserFactory</code>
* @return the created <code>XMLReader</code>
* @throws FOPException if the parser couldn't be created or
configured for proper operation.
*/
protected static XMLReader createParser() throws FOPException {
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
factory.setFeature(
"http://xml.org/sax/features/namespace-prefixes", true);
return factory.newSAXParser().getXMLReader();
<snip/>
===============================================================
Now it would seem to me that a 'getter' method should not go around
creating objects every time it needs to. It hust doesn't look right.
I assume that SAXParserFactory is thread-safe.
--
John Austin <[EMAIL PROTECTED]>