Error HXC3031: keywords for KTable exceeds 4,096 bytes.

Feb 13, 2008 at 1:09 PM
I'm curious if anyone else has seen this behavior on large assemblies:
My project is pretty simple and straightforward. Compile a HtmlHelp2 file from a single DLL+XML file.
No additional content.
The DLL has a bunch of inner classes and static members, a few generics, and is written in C#.
This log is from the SHFB build, but I get the same error when running through the generic GUI in Sandcastle, so this appears to be a problem with the prototype transform. I get the same error using the HANA style (actually, there I get 3 errors instead of 2).

The error turns out to be caused by the code generation we do for our Data-Access objects -- they all have the same Load + Save methods on them, which leads to a couple of hundred classes with the same Load+Save method signatures on them. This leads to a few hundred "Load method" references in the generated HTML files, which in turn leads to the HXC compiler complaining.

Any suggestiongs on how to fix this?
I am tempted to modify the Prototype XSL file to generate more specific keywords: "Load method on FooRow" instead of just "Load method"

=========================begin log===================
Info: Saving topic 45681: /html/ffecd749-bb99-0849-e584-bd2b7329f125.htm
Info: Saving file: SO.Server.Data.hxc
Info: Saving file: SO.Server.Data.HxF
Info: Saving file: SO.Server.Data.HxT
Info: Saving file: SO.Server.Data_A.HxK
Info: Saving file: SO.Server.Data_K.HxK
Info: Saving file: SO.Server.Data_F.HxK
Info: Saving file: SO.Server.Data_N.HxK
Info: Saving file: SO.Server.Data_S.HxK
Info: Saving file: SO.Server.Data_B.HxK
Info: Saving file: SO.Server.Data_NamedURLIndex.HxK
Error HXC3031: A group of keywords for a single Help link or KTable exceeds 4,096 bytes.
Error HXC3031: A group of keywords for a single Help link or KTable exceeds 4,096 bytes.
Info: Number of Topics: 45681.
Info: Number of URLs: 45681.
Info: Processing complete.
Info: Number of errors: 2.
Feb 17, 2008 at 9:17 AM
I have the same problem as you. Our project has the same structure as yours and is of the same size. It works without any problems with the HtmlHelp1 and WebSite but there are two errors when the HtmlHelp2 is built.

Tried to change the index from "Load method" -> "Load method on FooRow" and that solves the probelm. Cannot find any problems with this and the HXC works with the Help Integration in VS 2008.

However is this the "correct solution" ? If so - is it possible to have a setting within SandCastle and SHFB?
This would give the user the possibility to change the keywords of the project without changing the logics of SandCastle.
Feb 17, 2008 at 11:37 PM
Since a change in the way the index keywords are produced requires modifications to the Sandcastle transformations, it would be better to open an issue to have the problem corrected. It's not something that can be fixed using a project property in SHFB.

Feb 18, 2008 at 7:42 AM
I´ve created a WorkItem within the sandCastle project, so hopefully this will be solved.

It is a SandCastle problem and not a SHFB problem I agree with that - I wrote as I did since one of the possible solutions is a setting within SandCastle and it would be really nice if SHFB could handle this. Obviously SHFB couldn´t be changed if SandCastle isn´t changed first.

Best regards
Feb 19, 2008 at 3:02 PM
I created a Build Component that caps the number of keywords by removing excess Keyword nodes using a post-transform component.

The source code is at - hopefully the component will be absorbed into the Sandcastle Extension project.

This seems to abate the problem, but it does mean that the "Load method" keyword will have 100 random entries in it, rather than all 1000 entires, but I doubt this is a problem.

The component could be tweaked to modify the excess keywords to the "Load method on FooRow" instead of just removing them.