include html file in xslt presentation template

Hi All,


xslt + DCR --generates : footer.html


xslt+ DCR -- generates : header.html


I want to include html files (header.html and footer.html ) in xslt presentation template + DCR (provides the center content) to generate the o/p html file having both header, footer and center content in the HTML o/p.


Please let me know how to get this done in teamsite (formpublisher).






  • That is a question you should ask Google


    In a short answer you have two choices.  create either another XSL rather than HTML (which is basically HTML  in the XSL wrapper),  or use an include. 

  • Thanks for response nipper


    but I want to include external HTML file (header.html and footer.html) in xslt presentation template to generate the o/p file in formpublisher.


    any sample xsl example.

  • try this


    <xsl:comment>#include virtual="/directory/included.html"</xsl:comment>



    I tried this  <xsl:comment>#include virtual="/directory/included.html"</xsl:comment> , but its not working...

  • Can you post your xsl code in short? what's the xslSmiley Surprisedutput?
  • xsl code ....



    <?xml version="1.0" encoding="UTF-8"?>

    <xslSmiley Surprisedutput method="html"/>

    <xsl:template match="/">
    <link rel="stylesheet" type="text/css" href="/assets/css/mssb.css"/>
    <div class="mb_logo">
    <a id="lnkLogo" href="">
    <img src="/assets/images/mb_logo.gif" alt="google"
    title="google" border="0" /></a>

    <xsl:apply-templates select="General/generic"/>

    <div id="footer">
    <span id="contentFooterHtml">
    <xsl:comment>#include virtual="/html/footer/cfooter.html" </xsl:comment>

    <xsl:template match="generic">

    <xsl:if test="Headers!='' or header!=''">
    <xsl:for-each select="Headers">
    <xsl:when test="header-type='header1'">
    <div id="pageheader">
    <h1><xsl:value-of select="header" disable-output-escaping="yes"/></h1>
    <xsl:when test="header-type='header2'">
    <h2><xsl:value-of select="header" disable-output-escaping="yes"/></h2>
    <xsl:when test="header-type='header3'">
    <h3><xsl:value-of select="header" disable-output-escaping="yes"/></h3>
    <xsl:when test="header-type='header4'">
    <h4><xsl:value-of select="header" disable-output-escaping="yes"/></h4>

    <xsl:if test="Paragraphs!='' or paragraph!=''">
    <xsl:for-each select="Paragraphs">
    <p class="bodytext">
    <xsl:value-of select="paragraph" disable-output-escaping="yes"/></p>



  • Looking for similar implementation, any updates on this post?

  • Hi, I suppose it is possible now unless xslt parser in TeamSite can parse the HTML tags.
    Below link by Microsoft for reference:

  • I would suggest a new post with what you have tried and we can offer assistance.

  • Thank you all! i was able to resolve it!

TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
OpenText CE Products