private Schema initSchema(SchemaFactory factory, XmlSchema[] schemas) { StreamSource[] sources = null; try { sources = loadXsds(schemas); return factory.newSchema(sources); } catch (SAXException e) { XmlLogger.LOG.warnf("Error initializing schema from %s", Arrays.toString(schemas)); return null; } finally { if (sources != null) { for (StreamSource source : sources) { try { source.getInputStream().close(); } catch (IOException e) { XmlLogger.LOG.warn("Error closing schema resource", e); } } } } }
private Schema initSchema(SchemaFactory factory, XmlSchema[] schemas) { StreamSource[] sources = null; try { sources = loadXsds(schemas); return factory.newSchema(sources); } catch (SAXException e) { XmlLogger.LOG.warnf("Error initializing schema from %s", Arrays.toString(schemas)); return null; } finally { if (sources != null) { for (StreamSource source : sources) { try { source.getInputStream().close(); } catch (IOException e) { XmlLogger.LOG.warn("Error closing schema resource", e); } } } } }
private Schema initSchema(SchemaFactory factory, XmlSchema[] schemas) { StreamSource[] sources = null; try { sources = loadXsds(schemas); return factory.newSchema(sources); } catch (SAXException e) { XmlLogger.LOG.warnf("Error initializing schema from %s", Arrays.toString(schemas)); return null; } finally { if (sources != null) { for (StreamSource source : sources) { try { source.getInputStream().close(); } catch (IOException e) { XmlLogger.LOG.warn("Error closing schema resource", e); } } } } }
private Schema initSchema(SchemaFactory factory, XmlSchema[] schemas) { StreamSource[] sources = null; try { sources = loadXsds(schemas); return factory.newSchema(sources); } catch (SAXException e) { XmlLogger.LOG.warnf("Error initializing schema from %s", Arrays.toString(schemas)); return null; } finally { if (sources != null) { for (StreamSource source : sources) { try { source.getInputStream().close(); } catch (IOException e) { XmlLogger.LOG.warn("Error closing schema resource", e); } } } } }
private Schema initSchema(SchemaFactory factory, XmlSchema[] schemas) { StreamSource[] sources = null; try { sources = loadXsds(schemas); return factory.newSchema(sources); } catch (SAXException e) { XmlLogger.LOG.warnf("Error initializing schema from %s", Arrays.toString(schemas)); return null; } finally { if (sources != null) { for (StreamSource source : sources) { try { source.getInputStream().close(); } catch (IOException e) { XmlLogger.LOG.warn("Error closing schema resource", e); } } } } }