private static Schema getSchema() throws IOException { schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); schemaFactory.setResourceResolver(new IDFedLSInputResolver()); schemaFactory.setErrorHandler(new CustomErrorHandler()); Schema schemaGrammar = null; try { schemaGrammar = schemaFactory.newSchema(sources()); } catch (SAXException e) { log.error("Cannot get schema", e); } return schemaGrammar; }
private static Schema getSchema() throws IOException { schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); schemaFactory.setResourceResolver(new IDFedLSInputResolver()); schemaFactory.setErrorHandler(new CustomErrorHandler()); Schema schemaGrammar = null; try { schemaGrammar = schemaFactory.newSchema(sources()); } catch (SAXException e) { log.error("Cannot get schema", e); } return schemaGrammar; }
scFact.setResourceResolver(new IDFedLSInputResolver());
scFact.setResourceResolver(new IDFedLSInputResolver());
scFact.setResourceResolver(new IDFedLSInputResolver());
scFact.setResourceResolver(new IDFedLSInputResolver());
scFact.setResourceResolver(new IDFedLSInputResolver());
private static Schema getSchema() throws IOException { boolean tccl_jaxp = SystemPropertiesUtil.getSystemProperty(GeneralConstants.TCCL_JAXP, "false").equalsIgnoreCase("true"); ClassLoader prevTCCL = SecurityActions.getTCCL(); try { if (tccl_jaxp) { SecurityActions.setTCCL(JAXPValidationUtil.class.getClassLoader()); } schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); schemaFactory.setResourceResolver(new IDFedLSInputResolver()); schemaFactory.setErrorHandler(new CustomErrorHandler()); } finally { if (tccl_jaxp) { SecurityActions.setTCCL(prevTCCL); } } Schema schemaGrammar = null; try { schemaGrammar = schemaFactory.newSchema(sources()); } catch (SAXException e) { logger.xmlCouldNotGetSchema(e); } return schemaGrammar; }
private static Schema getSchema() throws IOException { boolean tccl_jaxp = SystemPropertiesUtil.getSystemProperty(GeneralConstants.TCCL_JAXP,"false").equalsIgnoreCase("true"); ClassLoader prevTCCL = SecurityActions.getTCCL(); try{ if(tccl_jaxp){ SecurityActions.setTCCL(JAXPValidationUtil.class.getClassLoader()); } schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); schemaFactory.setResourceResolver(new IDFedLSInputResolver()); schemaFactory.setErrorHandler(new CustomErrorHandler()); } finally{ if(tccl_jaxp){ SecurityActions.setTCCL(prevTCCL); } } Schema schemaGrammar = null; try { schemaGrammar = schemaFactory.newSchema(sources()); } catch (SAXException e) { logger.xmlCouldNotGetSchema(e); } return schemaGrammar; }
private static Schema getSchema() throws IOException { boolean tccl_jaxp = SystemPropertiesUtil.getSystemProperty(GeneralConstants.TCCL_JAXP, "false").equalsIgnoreCase("true"); ClassLoader prevTCCL = SecurityActions.getTCCL(); try { if (tccl_jaxp) { SecurityActions.setTCCL(JAXPValidationUtil.class.getClassLoader()); } schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); schemaFactory.setResourceResolver(new IDFedLSInputResolver()); schemaFactory.setErrorHandler(new CustomErrorHandler()); } finally { if (tccl_jaxp) { SecurityActions.setTCCL(prevTCCL); } } Schema schemaGrammar = null; try { schemaGrammar = schemaFactory.newSchema(sources()); } catch (SAXException e) { logger.xmlCouldNotGetSchema(e); } return schemaGrammar; }