MetaAttributeComponent can't find XML node?

Feb 14, 2008 at 3:36 PM
I'm trying to use SHFB and the Extensions.
I've downloaded the source and re-compiled it against the version.
I've copied the Extension DLL to the Sandcastle folder, and added the DLL to the Sandcastle.config file.
The components show up in the SHFB Component Configuration dialog - I have successfully added the MetaAttributeComponent to my SHFB project, so SHFB adds the right configuration sections to the Sandcastle.config
The build loads and instantiates the component - i can see its messages in the output window in SHFB.
The problem is that the log messages are uniformly "Unable to find XML node."
I'm using the PROTOTYPE style, but the XML node is in the same place no matter what style is used -- so this shouldn't be a problem.

Creating Sandcastle configuration file...
Last step completed in 00:00:00.0938
Merging custom build component configurations
Replacing default configuration for 'Code Block Component' with the custom configuration
Replacing default configuration for 'Post-transform Component' with the custom configuration
Replaced configuration for 'Microsoft.Ddue.Tools.ResolveReferenceLinksComponent2' (instance 1) with configuration for 'Cached MSDN URL References'
Added configuration for 'Meta Attribute Component' to the start of the configuration file
Last step completed in 00:00:05.0626
Building help topics...
D:\crm\SDK\Expander SDK\SO.Server.Data\work\BuildHelpTopics.bat
BuildAssembler (v2.4.10111.0)
Copyright c Microsoft 2006
Info: MetaAttributeComponent: Instantiating component.
Info: MetaAttributeComponent:
Meta Attribute Component * Sandcastle Extensions, version]
Copyright c 2007, Martin Darilek,
Info: MetaAttributeComponent: Loaded 3 meta attribute definition(s)
Info: BuildAssembler: Building topic T:SuperOffice.DoneNotDoneSplitter`1
Warn: MetaAttributeComponent: <xml> element not found. Meta attributes cannot be added
Info: BuildAssembler: Building topic M:SuperOffice.DoneNotDoneSplitter`1.#ctor(SuperOffice.CRM.ArchiveLists.ActivityArchiveKind)
Warn: MetaAttributeComponent: <xml> element not found. Meta attributes cannot be added

So my question is: what the heck does the document parameter contain?
It obviously isn't the HTML document in the work folder.
Feb 15, 2008 at 11:48 AM
Hello mogens,

if You are using MetaAttributeCoponent only in SHFB, just copy SandcastleExtensions.Components.dll and SandcastleExtentensions.Components.config into {SHFBFolder}\BuildComponents directory. That's all. You do not need modify SHFB templates (config files) nor Sandcastle config files.

I will release an updated version shortly

Feb 18, 2008 at 6:02 PM
Thanks for the pointer to the SHFB-BuildComponents folder. That set me on the right track.
I finally figured it out - the position you configure for the component in the SHFB build pipeline has a lot to say for the contents in the XmlDocument that's passed in.

<insert placement="before" type="Microsoft.Ddue.Tools.SaveComponent" />
means that you get the transformed HTML result.

<insert placement="after" id="Post-transform Component" />
worked for me - but the HTML isn't quite baked yet - the Keyword nodes I'm trying to delete were not quite finished transforming, so I had to do a bit of debugging to figure out what I had.

Turns out I had
<MSHelp:Keyword Index="K" xmlns:MSHelp="">
<includeAttribute name="Term" item="propertyIndexEntry">

instead of just a
<MSHelp:Keyword Index="K" Term="Competitor" />

Anyway, thanks to your examples and hints, I now have a build component that strips out excessive Keyword nodes from the generated documentation, so that thousands of ToString methods do not break the HXS build.

Is there somewhere I can send the source code for inclusion in a future release?
Feb 19, 2008 at 7:58 AM
Hello mogens,

You can upload your sources at "Source Code" tab > "Patch" hyperlink. I will explore your code, what your build component exactly does :-)

Feb 19, 2008 at 4:42 PM
Feb 20, 2008 at 12:13 PM
Edited Feb 20, 2008 at 12:29 PM

mogens wrote:

I will include your patch into Sandcastle Extensions in next release. With Your approval, I will change namespaces to unify Sandcastle Extensions sources. Can You send me copyright info, which You would like to see in plugin info? :-)

Feb 20, 2008 at 12:21 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.