public abstract class BaseSaxParserFactory extends Object implements JRSaxParserFactory
This factory creates a parser via the default SAX parser factory
(javax.xml.parsers.SAXParserFactory.newInstance()).
To improve performance, XML schemas can be cached when using a Xerces
SAX parser. See PROPERTY_CACHE_SCHEMAS.
| Modifier and Type | Field and Description |
|---|---|
protected static String |
PACKAGE_PREFIX_SUN_XERCES |
protected static String |
PACKAGE_PREFIX_XERCES |
protected static String |
POOL_CLASS_SUN_XERCES |
protected static String |
POOL_CLASS_XERCES |
static String |
PROPERTY_CACHE_SCHEMAS
A property that determines whether XML schemas/grammars are to be cached
so that they are not read/initialized each time a report is compiled.
|
protected static String |
XERCES_PARSER_PROPERTY_GRAMMAR_POOL |
PROPERTY_PRINT_PARSER_FACTORY, PROPERTY_REPORT_PARSER_FACTORY| Constructor and Description |
|---|
BaseSaxParserFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureParser(SAXParser parser) |
SAXParser |
createParser()
Creates a SAX parser.
|
protected SAXParserFactory |
createSAXParserFactory() |
protected void |
enableSchemaCaching(SAXParser parser) |
protected Object |
getGrammarPoolCacheKey() |
protected String |
getResourceURI(String resource) |
protected abstract List<String> |
getSchemaLocations() |
protected abstract boolean |
isValidating() |
protected void |
setGrammarPoolProperty(SAXParser parser,
String poolClassName) |
public static final String PROPERTY_CACHE_SCHEMAS
Currently, setting this property is only effective when a Xerces XML parser is used (either a stock one from Apache or one embedded into a SUN JDK).
protected static final String PACKAGE_PREFIX_XERCES
protected static final String POOL_CLASS_XERCES
protected static final String PACKAGE_PREFIX_SUN_XERCES
protected static final String POOL_CLASS_SUN_XERCES
protected static final String XERCES_PARSER_PROPERTY_GRAMMAR_POOL
public SAXParser createParser()
JRSaxParserFactorycreateParser in interface JRSaxParserFactoryprotected SAXParserFactory createSAXParserFactory() throws ParserConfigurationException, SAXException
protected abstract boolean isValidating()
protected void configureParser(SAXParser parser) throws SAXException
SAXExceptionprotected void enableSchemaCaching(SAXParser parser)
protected void setGrammarPoolProperty(SAXParser parser, String poolClassName)
protected Object getGrammarPoolCacheKey()
Copyright © 2012. All Rights Reserved.