}
}
private void digestImport(Element importElement, URI baseURI) throws SAXException, URISyntaxException, SmooksConfigurationException {
String file = DomUtils.getAttributeValue(importElement, "file");
URIResourceLocator resourceLocator;
InputStream resourceStream;
if (file == null) {
throw new IllegalStateException("Invalid resource import. 'file' attribute must be specified.");
}
resourceLocator = new URIResourceLocator();
resourceLocator.setBaseURI(baseURI);
try {
URI fileURI = resourceLocator.resolveURI(file);
// Add the resource URI to the list. Will fail if it was already loaded
pushConfig(file, fileURI);
try {
if (logger.isDebugEnabled()) {
logger.debug("Importing resource configuration '" + file + "' from inside '" + configStack.peek().configFile + "'.");
}
resourceStream = resourceLocator.getResource(file);
try {
List<Element> importParams = DomUtils.getElements(importElement, "param", null);
if(!importParams.isEmpty()) {
// Inject parameters into import config...
String importConfig = StreamUtils.readStreamAsString(resourceStream);