This project has moved. For the latest updates, please go here.

Problem with HierarchicalTocPlugIn

Topics: Developer Forum, User Forum
Jul 4, 2008 at 10:55 AM
Hi Eric,

first of all, I have to say that I love your program. I integrated it in our build process and it is working excellent.

Today I began using the HierarchicalTocPlugIn. I tried to use it for creating a Documentation website, but it was failing when creating the index.html with an ArgumentNullException.

So I looked into the code of the SandcastleHtmlExtract-Project (line 840 in SandcastleHtmlExtract.cs) and found the reason for the exception. If the file-attribute is missing within the topic-node the call of titles.ContainsKey fails. It's failing for all nodes, that are created to represent a namespace hierarchy.

So for myself I did the following: When the HierarchicalTocPlugIn creates a new entry for a namespace I add an title-attribute with the value of the id-attribute to the node. Then I check in the SandcastleHtmlExtract if the key-attribute is null. If this is the case I use the title-attribute instead (as you already did, but I moved the code a bit around :) ).

Hope this helps, if somebody has the same problem.

Kind regards

Jul 4, 2008 at 3:30 PM
A fix is available for this in the following work item: