Allow <code> tag beeing closed by </code>

Topics: Developer Forum, User Forum
Apr 7, 2007 at 6:17 PM
Hi,

the documentation (in section "Importing and Colorizing Code from Source Files") states:


The tag is always self-closing and contains no content.

Since I am using an XSTL stylesheet to produce the additional content files I am not able to produce an empty <code> tag. The reason for this is that I have to specify stylesheet output as html (see below why):

<xsl:output method="html" />

In this mode the XSLT engine will convert my tags from this

<code lang="cs" source="..\Samples\CustomAggregate\CustomAggregate.cs" region="Aggregate Declaration" title="Creating a Custom Aggregate" />
<code lang="cs" source="..\Samples\CustomAggregate\Form1.cs" region="Usage" title="Using a Custom Aggregate" />

to this

<code lang="cs" source="..\Samples\CustomAggregate\CustomAggregate.cs" region="Aggregate Declaration" title="Creating a Custom Aggregate"></code>
<code lang="cs" source="..\Samples\CustomAggregate\Form1.cs" region="Usage" title="Using a Custom Aggregate"></code>

As you can see, the empty tags are converted to tags with no content.

Using the XML XSLT ouput method

<xsl:output omit-xml-declaration="yes" method="xml" encoding="utf-8" />

would solve this problem but in this case the HHC.exe will produce a help file in which all my additional content files just show as blank pages. I assume this is a problem with HHC as it does not seem to support XHTML files.

So, my suggestion is that you change the CodeBlockComponent so that it also accepts tags that are terminated by </code>.

Thanks!
Coordinator
Apr 7, 2007 at 7:59 PM
This discussion has been copied to Work Item 9430. You may wish to continue further discussion there.
Apr 8, 2007 at 4:44 PM
Thanks :-)