factory.setResourceResolver(new LSResourceResolver() {
public LSInput resolveResource(String type, String namespaceURI, String publicId,
String systemId, String baseURI) {
try {
String resolvedLocation = catalogResolver.resolveSystem(systemId);
if (resolvedLocation == null) {
resolvedLocation = catalogResolver.resolveURI(namespaceURI);
}
if (resolvedLocation == null) {