Error: Topic Management - "Active Content not allowed"

Topics: General Discussion, General Questions
Mar 12, 2008 at 8:53 PM
When I chose a new template in the Topic Management the shows me on the top the message that "active content" dind´t allowed. How can allow them?

I using Visual Studio 2005 - Sandcastle January 2008 - DocProject 1.10.1

BTW: I want to insert the user documentation in DocProject-Project. Is that the right place (with the Topic Management)? How can I change the topic "Namespaces" to "API of MyApplication"?

Thank you very much!!!
Mar 12, 2008 at 10:14 PM
Hi,

The template preview is actually just a web browser control displaying a raw XML file. The message that you're seeing in the yellow warning bar at the top is the same thing that appears in IE7 when you try to view a web page that is using an unsafe control or script. The only thing that IE is preventing in this case, I think, is that the individual XML element nodes cannot be collapsed. If you choose to allow the unsafe content, you'll be able to collapse the nodes.

You're on the right track if you want to add user documentation. Simply choose a template (forget about the active content warning) and click OK. A new topic file will be created, added to the TOC and opened in Visual Studio's XML editor. For IntelliSense to work you may have to open the Help\Schemas\developer.xsd file once to give VS a kick, but then you can close it immediately.

The Namespaces topic is created by Sandcastle. If you set the Generate root API topic project option to false (the default value in 1.10.1) then the Namespaces topic will not be generated. To create your own, add a new conceptual topic to the TOC and then drag & drop the Namespaces topic under it.

If you'd rather rename the auto-generated Namespaces topic, make sure Generate root API topic is true. Open the Topic Designer, choose the reference_content document and then update the following content items:
  • rootIndexEntry
  • rootLink
  • rootTopicTitle
  • namespacesTitle
Only the last two seem to be used, but you may want to update all four just in case.

Note: To enable Generate root API topic you must first install Eric Woodruff's Sandcastle Presentation File Patches and then create a new DocProject or DocSite from scratch. Alternatively, you can fix the bug yourself in your existing project via Eric's suggestion:


In the VS2005 copy of utilities_reference.xsl, insert the following just above the </xsl:choose> line that appears just before the <xsl:text>TopicTitle</xsl:text> line in the topicTitlePlain and topicTitleDecorated templates:

<xsl:otherwise>
<xsl:value-of select="$topic-group" />
</xsl:otherwise>

In other words, if you're using the Visual Studio 2005 presentation style then open the Help\Presentation\Style\Transforms\utilities_reference.xsl file and apply the change to the two templates so that the result looks like this in both:

          <xsl:when test="$topic-group='list'">
            <!-- the topic subgroup (e.g. "methods") determines the title -->
            <xsl:value-of select="$topic-subgroup" />
          </xsl:when>
 
     <!-- Add this: --->
          <xsl:otherwise>
            <xsl:value-of select="$topic-group" />
          </xsl:otherwise>
    <!-- End add -->
 
        </xsl:choose>
        <xsl:text>TopicTitle</xsl:text>
      </xsl:attribute>

- Dave
Mar 15, 2008 at 10:59 AM
Thank you very much for your eplenations. There would be very helpfull.

Now I can start with my first documentation with DocProject. ;-)

One small question: I see the href-tag of Images are GUIDs. How insert you on easy way a picture in your docu? Must I generate a name? And on with place I must save the picture there embedded in the docu?

Thank you for your help and your precious application


Mar 15, 2008 at 3:45 PM
Hi,

You'll probably want to add images to your project's Help\Art folder. To reference them in conceptual documentation, you must use the following markup:

<para>Some picture:</para>
<mediaLink>
  <image xlink:href="any-unique-id" />
</mediaLink>
Then you must define any-unique-id in your project's Help\Settings\conceptual_art.xml file:

<item id="any-unique-id">
  <image file="mypic.jpg">
    <altText>My picture.</altText>
  </image>
</item>
The conceptual_art.xml file provides more information.

- Dave