User Defined Tags

Feb 4, 2012 at 4:25 PM

I am trying to create user defined tag for use in the comments.  I followed the instructions in this blog: but it is almost 5 years old. 


<xsl:apply-templates select="/document/comments/preliminary" />
  <xsl:apply-templates select="/document/comments/summary" />
    <xsl:apply-templates select="/document/reference/httpStatusCode" />

  <!-- block sections -->
  <xsl:template match="httpStatusCode">
    <!--Customstyle can be defined in Presentaion.css stylesheet-->
    <div class="HttpStatusCode">
      <xsl:apply-templates />


but I do not get anything.  I am unfamiliar with xsl sheets so any help would be appreciated.  Thanks 

Feb 4, 2012 at 7:29 PM

> <xsl:apply-templates select="/document/reference/httpStatusCode" />

Unless that's a typo, shouldn't that be "/document/comments/httpStatusCode"?  Also, you might check your XML comments file to be sure your custom tags are in it.  If not, you may need to force a rebuild of your project so that it regenerates the comments file.



Feb 4, 2012 at 9:11 PM

I had comments in place of reference before but still wasn't getting the results I expected.  I found three different main_sandcastle.xsl files in my directory under hana, prototyping and vs2005.  I am using vs2010 so which of those should I be editing or am I in the wrong place altogether?


Feb 4, 2012 at 9:57 PM

Okay, got it figured out as far as trying to get the contents/value of the new tag into the file.  I had originally had the select line ahead of the preliminary section when I used "comments".  Then when I changed position I did not do it to the right file.  I finally figured out the right file of the three by trial and error.

What are the hana and prototype directories for?  Just for development purposes?

Thanks for the help. 


Feb 4, 2012 at 10:06 PM

Hana, Prototype, and VS2005 are the three presentation styles.  VS2005 is the only one that's supported anymore since the other two are deprecated due to lack of support for MS Help Viewer output.  Prototype was the original style when Sandcastle was first released.  Hana came out a little later as an experimental style before the VS2005 style was added.  How you select the presentation style depends on whether you're using Sandcastle directly or one of the front-ends like the Sandcastle Help File Builder.  If using SHFB, the presentation style is set using the PresentationStyle project property.  It defaults to VS2005.



Feb 5, 2012 at 1:29 AM

Ah, really good info.  Thanks for the background.  It helps me understand a lot of what is going on. 

And thanks a bunch for the help.  I was finally able to set up a section for my HttpStatusCodes similar to the Exceptions section.