use of org.apache.xerces.xni.XNIException in project iaf by ibissource.
the class ValidatorHandlerImpl method endElement.
public void endElement(QName element, Augmentations augs) throws XNIException {
if (fContentHandler != null) {
try {
fTypeInfoProvider.beginEndElement(augs);
fContentHandler.endElement((element.uri != null) ? element.uri : XMLSymbols.EMPTY_STRING, element.localpart, element.rawname);
} catch (SAXException e) {
throw new XNIException(e);
} finally {
fTypeInfoProvider.finishEndElement();
}
}
}
use of org.apache.xerces.xni.XNIException in project iaf by ibissource.
the class ClassLoaderXmlEntityResolver method resolveEntity.
@Override
public XMLInputSource resolveEntity(XMLResourceIdentifier resourceIdentifier) throws XNIException, IOException {
if (log.isDebugEnabled())
log.debug("resolveEntity publicId [" + resourceIdentifier.getPublicId() + "] baseSystemId [" + resourceIdentifier.getBaseSystemId() + "] expandedSystemId [" + resourceIdentifier.getExpandedSystemId() + "] literalSystemId [" + resourceIdentifier.getLiteralSystemId() + "] namespace [" + resourceIdentifier.getNamespace() + "]");
if (resourceIdentifier.getBaseSystemId() == null && resourceIdentifier.getExpandedSystemId() == null && resourceIdentifier.getLiteralSystemId() == null && resourceIdentifier.getNamespace() == null && resourceIdentifier.getPublicId() == null) {
// return null.
return null;
}
String base = resourceIdentifier.getBaseSystemId();
String href = resourceIdentifier.getLiteralSystemId();
if (href == null) {
// Ignore import with namespace but without schemaLocation
return null;
}
Resource resource;
try {
resource = resolveToResource(href, base);
} catch (TransformerException e) {
throw new XNIException(e);
}
return resource.asXMLInputSource();
}
Aggregations