This project has moved. For the latest updates, please go here.

Iframe in Topic file

Topics: Developer Forum, User Forum
Dec 28, 2010 at 9:21 PM


In my help site application, I am creating a topic xml which will be processed by sandcastle during the generation of HTML files from dll xml file. I have an iframe in one of the topic files, but when the sandcaslte processes it, it removes the iframe tag and creates the html file. Is there anything i need to do to retain the iframe in the html file? Can anyone provide me some pointers on this issue. Thanks in advance.

 I am using SHFB GUI and the helpfile format is "Website".




Dec 28, 2010 at 9:35 PM

I got this resolved. it was a simple change in the XSLT file.

May 4, 2011 at 10:55 AM

Could you please explain in details how did you resolve this issue. I am experiencing it too.

May 4, 2011 at 4:48 PM

It has been long time since i made this change. But i guess this was what i did. In the xslt file - Prototype.xsl under the location EWSoftware\Sandcastle Help File Builder\Templates\(whic you might be able to find in your program files), in the following line in the xslt add iframe too.

 <!-- Pass through html tags from the body -->
  <xsl:template match="p|ol|ul|li|dl|dt|dd|table|tr|th|td|h1|h2|h3|h4|h5|h6|hr|br|pre|blockquote|div|span|a|img|b|i|strong|em|del|sub|sup|abbr|acronym|u|font|link|script|code|map|area">


<xsl:template match="p|ol|ul|li|dl|dt|dd|table|tr|th|td|h1|h2|h3|h4|h5|h6|hr|br|pre|blockquote|div|span|a|img|b|i|strong|em|del|sub|sup|abbr|acronym|u|font|link|script|code|map|iframe>

See if this works for you.


May 4, 2011 at 7:29 PM

If you are referring to the Sandcastle XSL transformations used for API and MAML topics, you'll need to make the change in the main_sandcastle.xsl file for each presentatation style.  The SHFB template mentioned above is for a deprecated feature of SHFB.