try { final InputStream schemaIn = schemaReader == null ? null : schemaReader.getSchemaAsStream(schemaPath); if (schemaIn == null) { schema = schemaFactory.newSchema(schemaLocation.toURL());
try { final InputStream schemaIn = schemaReader == null ? null : schemaReader.getSchemaAsStream(schemaPath); if (schemaIn == null) { schema = schemaFactory.newSchema(schemaLocation.toURL());
@Override public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) { InputStream stream = schemaReader.getSchemaAsStream(systemId); if (stream == null) { return null; } final LSInput input = new LSInputI(); input.setPublicId(publicId); input.setSystemId(systemId); input.setBaseURI(baseURI); try { input.setCharacterStream(new InputStreamReader(stream, "UTF-8")); } catch (UnsupportedEncodingException e) { LOGGER.warn("no UTF-8 character encoding available"); return null; } return input; } };
@Override public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) { InputStream stream = schemaReader.getSchemaAsStream(systemId); if (stream == null) { return null; } final LSInput input = new LSInputI(); input.setPublicId(publicId); input.setSystemId(systemId); input.setBaseURI(baseURI); try { input.setCharacterStream(new InputStreamReader(stream, "UTF-8")); } catch (UnsupportedEncodingException e) { LOGGER.warn("no UTF-8 character encoding available"); return null; } return input; } };