On 22.05.2007 17:07, Helma van der Linden wrote:
// Create the SAX parser and set the features so it creates the events
we need
SAXParser parser =
(SAXParser)manager.lookup(SAXParser.ROLE);
if( parser instanceof Parameterizable ) {
Parameters params = new Parameters();
params.setParameter("namespace-prefixes","true");
((Parameterizable)parser).parameterize(params);
}
but I'm wondering if that is the correct place to do that.
OTOH, if it's done at a more global scale, would that have unwanted
side-effects?
I don't know how SAXParsers are set up. But if they are pooled, even
this change has side effects since the SAXParser is returned to the pool
parameterized. Anyway this code smells. No idea how to do it otherwise
though.
Joerg