if (_uri != null) {
Path linkPath = _document.getRealPath(_uri);
if (linkPath.exists() && linkPath.getPath().endsWith(".xtp")) {
Config config = new Config();
config.setEL(false);
try {
config.configure(_document, linkPath);
if (_document.getHeader() != null)
_fullDescription = _document.getHeader().getDescription();
else
_fullDescription = new Description(_document);
} catch (NullPointerException e) {
log.info("error configuring " + linkPath + ": " + e);
} catch (Exception e) {
log.info("error configuring " + linkPath + ": " + e);
}
if (_atocDescend) {
Path linkRoot = linkPath.getParent();
if (linkRoot.equals(_navigation.getRootPath().getParent()))
return;
Path subToc = linkPath.getParent().lookup("toc.xml");
if (subToc.exists()) {
_child = new Navigation(_navigation,
_uri,
linkRoot,
_depth + 1);
try {
config.configure(_child, subToc);
} catch (Exception e) {
log.info("Failed to configure " + subToc + ": " + e);
}
} else {
log.info(subToc + " does not exist!");