// little function, lots of functionality
private synchronized TocTree getTocTree(URL docUrl) throws Exception {
Object value = _tocTreeCache.get(docUrl);
if (value == null) {
Node docRoot = getDocumentTree(docUrl);
Transform tocTransform = getTocTransformForDoc(docUrl);
TocTree tree = TocTree.makeTocTree(docRoot, tocTransform, this);
TocTree.TocNode tocRoot = tree.getRoot();
_tocTreeCache.put(docUrl, tree);
establishCorrespondence(docRoot, tocRoot);
return tree;