Пример #1
0
        public IEnumerable <NavigationPoint> ExtractNavigationPoints(
            XmlStructureFile xHtmlToc, IEnumerable <File> files)
        {
            var navigationOrderProcessor = NavigationOrderProcessor.Create();
            var navElement = GetRootOrderedList(xHtmlToc.Doc);

            return(ProcessOrderedListRecursive(
                       navElement, navigationOrderProcessor, EpubPathHelper.GetDirectoryName(xHtmlToc.Path), files).ToArray());
        }
Пример #2
0
        public IEnumerable <NavigationPoint> ExtractNavigationPoints(XmlStructureFile ncx, IEnumerable <File> files)
        {
            var root     = ncx.Doc.Root;
            var basePath = EpubPathHelper.GetDirectoryName(ncx.Path);

            var navMap = root.Elements()
                         .Single(element => element.Name.Equals(XmlNamespaces.Ncx + NcxXmlNames.NavMapElementName));
            var orderProcessor = NavigationOrderProcessor.Create(navMap);

            return(FilterAndSelectChildNavPoints(navMap, orderProcessor, basePath, files));
        }