net.sf.jasperreports.engine.xml
public class JRReportSaxParserFactory extends java.lang.Object implements JRSaxParserFactory
This factory creates a parser via the default SAX parser factory
(javax.xml.parsers.SAXParserFactory.newInstance()
).
JRXMLs are always validated using W3C XML schemas. Reports that refer the JasperReports DTD (which has been deprecated) are validated using an internal XML schema equivalent to the DTD.
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 java.lang.String |
PACKAGE_PREFIX_SUN_XERCES |
protected static java.lang.String |
PACKAGE_PREFIX_XERCES |
protected static java.lang.String |
POOL_CLASS_SUN_XERCES |
protected static java.lang.String |
POOL_CLASS_XERCES |
static java.lang.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 java.lang.String |
XERCES_PARSER_PROPERTY_GRAMMAR_POOL |
PROPERTY_REPORT_PARSER_FACTORY
Constructor and Description |
---|
JRReportSaxParserFactory() |
Modifier and Type | Method and Description |
---|---|
protected void |
configureParser(javax.xml.parsers.SAXParser parser) |
javax.xml.parsers.SAXParser |
createParser()
Creates a SAX parser.
|
protected javax.xml.parsers.SAXParserFactory |
createSAXParserFactory() |
protected void |
enableSchemaCaching(javax.xml.parsers.SAXParser parser) |
protected java.lang.Object |
getGrammarPoolCacheKey() |
protected java.lang.String |
getResourceURI(java.lang.String resource) |
protected java.util.List |
getSchemaLocations() |
protected void |
setGrammarPoolProperty(javax.xml.parsers.SAXParser parser,
java.lang.String poolClassName) |
public static final java.lang.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 java.lang.String PACKAGE_PREFIX_XERCES
protected static final java.lang.String POOL_CLASS_XERCES
protected static final java.lang.String PACKAGE_PREFIX_SUN_XERCES
protected static final java.lang.String POOL_CLASS_SUN_XERCES
protected static final java.lang.String XERCES_PARSER_PROPERTY_GRAMMAR_POOL
public javax.xml.parsers.SAXParser createParser()
JRSaxParserFactory
createParser
in interface JRSaxParserFactory
protected javax.xml.parsers.SAXParserFactory createSAXParserFactory() throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
protected void configureParser(javax.xml.parsers.SAXParser parser) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected java.util.List getSchemaLocations()
protected java.lang.String getResourceURI(java.lang.String resource)
protected void enableSchemaCaching(javax.xml.parsers.SAXParser parser)
protected void setGrammarPoolProperty(javax.xml.parsers.SAXParser parser, java.lang.String poolClassName)
protected java.lang.Object getGrammarPoolCacheKey()
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com