/** * DefaultConstructor. */ private RootEntityResolver() { entityResolver = ParserEntityResolver.getDefaultResolver(); }
/** * Initializes the simple parser and registers this handler with the parser base module. * * @throws ModuleInitializeException * if initializing the module failes. */ public void performInit() throws ModuleInitializeException { final ParserEntityResolver res = ParserEntityResolver.getDefaultResolver(); final URL urlReportDTD = ObjectUtilities.getResource( "org/pentaho/reporting/engine/classic/core/modules/parser/simple/resources/report-085.dtd", SimpleParserModuleInit.class ); res.setDTDLocation( SimpleParserModuleInit.PUBLIC_ID_SIMPLE, SimpleParserModuleInit.SYSTEM_ID, urlReportDTD ); res.setDTDLocation( SimpleParserModuleInit.PUBLIC_ID_SIMPLE_084, SimpleParserModuleInit.SYSTEM_ID, urlReportDTD ); res.setDeprecatedDTDMessage( SimpleParserModuleInit.PUBLIC_ID_SIMPLE_084, "The given public identifier for the XML document is deprecated. " + "Please use the current document type declaration instead: \n" + " <!DOCTYPE report PUBLIC \n" + " \"-//JFreeReport//DTD report definition//EN//simple/version 0.8.5\"\n" + " \"http://jfreereport.sourceforge.net/report-085.dtd\">" ); } }
/** * Initializes the ext-parser and registers it at the parser base module. * * @throws org.pentaho.reporting.libraries.base.boot.ModuleInitializeException * if an error ocurres. */ public void performInit() throws ModuleInitializeException { final ParserEntityResolver res = ParserEntityResolver.getDefaultResolver(); final URL urlExtReportDTD = ObjectUtilities.getResource( "org/pentaho/reporting/engine/classic/core/modules/parser/ext/resources/extreport-085.dtd", ExtParserModuleInit.class ); res.setDTDLocation( ExtParserModuleInit.PUBLIC_ID_EXTENDED, ExtParserModuleInit.SYSTEM_ID, urlExtReportDTD ); res.setDTDLocation( ExtParserModuleInit.PUBLIC_ID_EXTENDED_084, ExtParserModuleInit.SYSTEM_ID, urlExtReportDTD ); res.setDeprecatedDTDMessage( ExtParserModuleInit.PUBLIC_ID_EXTENDED_084, "The given public identifier for the XML document is deprecated. " + "Please use the current document type declaration instead: \n" + " <!DOCTYPE report PUBLIC \n" + " \"-//JFreeReport//DTD report definition//EN//extended/version 0.8.5\"\n" + " \"http://jfreereport.sourceforge.net/extreport-085.dtd\">" ); } }
dbf.setValidating( false ); final DocumentBuilder db = dbf.newDocumentBuilder(); db.setEntityResolver( ParserEntityResolver.getDefaultResolver() ); db.setErrorHandler( new LoggingErrorHandler() ); final ResourceDataInputSource input = new ResourceDataInputSource( data, manager );