docs: function(next) {
              var doc = jsdom.jsdom(tocHtml, {});
              
              var navs = doc.getElementsByTagName("nav");
              var thenav;
              for (var navno = 0; navno < navs.length; navno++) {
                  if (navs[navno].id === config.akashacmsEPUB.bookmetadata.toc.id) {
                      thenav = navs[navno];
                      break;
                  }
              }
              if (!thenav) {
                  return next(new Error('no <nav id="'+ config.akashacmsEPUB.bookmetadata.toc.id +'">'));
              }
              // logger.info('found nav');
              
              var topol;
              for (var navchild = 0; navchild < thenav.childNodes.length; navchild++) {
                  if (thenav.childNodes[navchild].nodeName
                   && thenav.childNodes[navchild].nodeName.toUpperCase() === 'ol'.toUpperCase()
                   && thenav.childNodes[navchild].hasAttributes()
                   && thenav.childNodes[navchild].getAttribute('start')
                   && thenav.childNodes[navchild].getAttribute('type')) {
                      topol = thenav.childNodes[navchild];
                      break;
                  }
              }
              if (!topol) {
                  return next(new Error('no <nav><ol type= start=></ol></nav>'));
              }
              // logger.info('found topol');
              
              
              // cover image/file manifest and opfspine entries are added in _makeCoverFiles
              
              // Add specific manifest and opfspine entries for TOC and NCX files
              
              config.akashacmsEPUB.manifest.push({
                  id: config.akashacmsEPUB.bookmetadata.toc.id,
                  properties: "nav",
                  type: "application/xhtml+xml",
                  href: config.akashacmsEPUB.bookmetadata.toc.href
              });
              config.akashacmsEPUB.opfspine.push({
                  idref: config.akashacmsEPUB.bookmetadata.toc.id,
                  linear: "yes"
              });
              // logger.trace('_scanForBookMetadata '+ util.inspect(config.akashacmsEPUB.manifest));
              if (config.akashacmsEPUB.bookmetadata.ncx) {
                  config.akashacmsEPUB.manifest.push({
                      id: config.akashacmsEPUB.bookmetadata.ncx.id,
                      type: "application/x-dtbncx+xml",
                      href: config.akashacmsEPUB.bookmetadata.ncx.href
                  });
              }
              
              // Scan the nested tree of ol's to capture data for .manifest .opfspine and .chapters
              var spineorder = 0;
              function scanOL(ol) {
                  // logger.info('scanOL ol.length='+ ol.childNodes.length);
                  var chaps = [];
                  for (var olno = 0; olno < ol.childNodes.length; olno++) {
                      var olchild = ol.childNodes[olno];
                      // logger.info('olchild.nodeName '+ olchild.nodeName);
                      if (olchild.nodeName && olchild.nodeName.toUpperCase() === 'li'.toUpperCase()) {
                          var section; // section refers to chapters or subchapters
                          var subchapters;
                          section = undefined;
                          subchapters = undefined;
                          for (var childno = 0; childno < olchild.childNodes.length; childno++) {
                              // logger.info('olchild.childNodes[childno].nodeName '+ olchild.childNodes[childno].nodeName);
                              if (olchild.childNodes[childno].nodeName
                               && olchild.childNodes[childno].nodeName.toUpperCase() === 'ol'.toUpperCase()) {
                                  subchapters = scanOL(olchild.childNodes[childno]);
                              } else if (olchild.childNodes[childno].nodeName
                                      && olchild.childNodes[childno].nodeName.toUpperCase() === 'a'.toUpperCase()) {
                                  var anchor = olchild.childNodes[childno];
                                  
                                  config.akashacmsEPUB.manifest.push({
                                      id: anchor.getAttribute('id'),
                                      type: "application/xhtml+xml",
                                      href: anchor.getAttribute('href')
                                  });
                                  
                                  config.akashacmsEPUB.opfspine.push({
                                      idref: anchor.getAttribute('id'),
                                      linear: "yes"
                                  });
                                  
                                  section = {
                                      id: anchor.getAttribute('id'),
                                      title: anchor.nodeValue,
                                      href: anchor.getAttribute('href'),
                                      type: "application/xhtml+xml",
                                      navclass: "book",
                                      spineorder: ++spineorder
                                  };
                              }
                          }
                          if (!section) {
                              return next(new Error('<li> has no <a> children'))
                          }
                          if (subchapters) section.subchapters = subchapters;
                          chaps.push(section);
                      }
                  }
                  // logger.info(util.inspect(chaps));
                  return chaps;
              };
              config.akashacmsEPUB.chapters = [];
              config.akashacmsEPUB.chapters = scanOL(topol);
              
              // logger.info(util.inspect(config.akashacmsEPUB.chapters));
              
              next();
          }