<commit_before><?xml version="1.0"?>
<!--
site2xhtml.xsl is the final stage in HTML page production.  It merges HTML from
document2html.xsl, tab2menu.xsl and book2menu.xsl, and adds the site header,
footer, searchbar, css etc.  As input, it takes XML of the form:

<site>
  <div class="menu">
    ...
  </div>
  <div class="tab">
    ...
  </div>
  <div class="content">
    ...
  </div>
</site>

$Id: site2xhtml.xsl,v 1.23 2003/09/12 19:07:31 cheche Exp $
-->

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:import href="../../../common/xslt/html/site2xhtml.xsl"/>
 
  <xsl:variable name="header-color" select="'#294563'"/>
  <xsl:variable name="menu-border" select="'#4C6C8F'"/>
  <xsl:variable name="background-bars" select="'#CFDCED'"/>

  <xsl:template match="site">
    <html>
      <head>
        <title><xsl:value-of select="div[@class='content']/table/tr/td/h1"/></title>
        <link rel="stylesheet" href="{$root}skin/page.css" type="text/css"/>
      </head>
      <body bgcolor="#FFFFFF" text="#000000">
    <xsl:comment>================= start Navigation Path ==================</xsl:comment>
    <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="navigation path">
      <tr>
        <td height="20" bgcolor="{$background-bars}" valign="middle" nowrap="nowrap">
          <img class="spacer" src="{$spacer}" alt="" width="5" height="1" />
          <xsl:comment>===== breadcrumb trail (javascript-generated) ====</xsl:comment>
          <font face="Arial, Helvetica, Sans-serif" size="2">
              <script type="text/javascript" language="JavaScript" src="{$root}skin/breadcrumbs.js"/>
          </font>
        </td>
      </tr>
      <tr>
        <td height="2" bgcolor="{$menu-border}"><img class="spacer" src="{$spacer}" alt="" width="2" height="2" /></td>
      </tr>
    </table>
    <xsl:comment>================= end Navigation Path ==================</xsl:comment>

    <!-- ================================= top bar with logo's and search box ===================================  -->

    <xsl:comment>================= start Banner ==================</xsl:comment>
    <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="header with logos">
      <tr>

        <xsl:comment>================= start Group Logo ==================</xsl:comment>
        <td bgcolor="{$header-color}">
          <xsl:if test="$config/group-url">
            <xsl:call-template name="renderlogo">
              <xsl:with-param name="name" select="$config/group-name"/>
              <xsl:with-param name="url" select="$config/group-url"/>
              <xsl:with-param name="logo" select="$config/group-logo"/>
              <xsl:with-param name="root" select="$root"/>
              <xsl:with-param name="description" select="$config/group-description"/>
            </xsl:call-template>
          </xsl:if>
        </td>
        <xsl:comment>================= end Group Logo ==================</xsl:comment>
        <xsl:comment>================= start Project Logo ==================</xsl:comment>
        <td bgcolor="{$header-color}" align="center" width="100%">
          <xsl:call-template name="renderlogo">
            <xsl:with-param name="name" select="$config/project-name"/>
            <xsl:with-param name="url" select="$config/project-url"/>
            <xsl:with-param name="logo" select="$config/project-logo"/>
            <xsl:with-param name="root" select="$root"/>
            <xsl:with-param name="description" select="$config/project-description"/>
          </xsl:call-template>
        </td>
        <xsl:comment>================= end Project Logo ==================</xsl:comment>

        <xsl:comment>================= start Search ==================</xsl:comment>
	<!-- Display search box if lucene-search or google-search enabled -->
	<!-- Lucene has precedence over Google (if lucene set, don't use Google) -->
	<xsl:variable name="lucene">
	  <xsl:choose>
	    <xsl:when test="(not($config/disable-lucene) or
            $config/disable-lucene='false')">true</xsl:when>
	    <xsl:otherwise>false</xsl:otherwise>
	  </xsl:choose>
	</xsl:variable>
	<xsl:variable name="google">
	  <xsl:choose>
	    <xsl:when test="$lucene='true'">false</xsl:when>
	    <xsl:when test="not($config/disable-search) or $config/disable-search='false'
	    and $config/searchsite-domain and $config/searchsite-name">true</xsl:when>
	    <xsl:otherwise>false</xsl:otherwise>
	  </xsl:choose>
	</xsl:variable>	

        <td bgcolor="{$header-color}" rowspan="2" valign="top">
          <xsl:if test="$lucene='true'">
	    <xsl:variable name="search-url" select="concat(string($root), 'search.cmd')"/>
	     <form method="get" action="{$search-url}">
              <table bgcolor="{$menu-border}" cellpadding="0" cellspacing="0" border="0" summary="search">
                <tr>
                  <td colspan="3"><img class="spacer" src="{$spacer}" alt="" width="1" height="10" /></td>
                </tr>
                <tr>
                  <td><img class="spacer" src="{$spacer}" alt="" width="1" height="1" /></td>
                  <td nowrap="nowrap">
                    <input type="text" id="query" name="query" size="15"/>
                    <img class="spacer" src="{$spacer}" alt="" width="5" height="1" />
		    <input type="submit" value="Search" name="Search"/> <br />
		    <font color="white" size="2" face="Arial, Helvetica, Sans-serif">
		    <xsl:text>Powered by Apache Lucene</xsl:text></font>

	            <!-- setting search options off for the moment -->
		    <!--
		    <input type="radio" name="web" value="web"/>web site&#160;&#160;
		    <input type="radio" name="mail" value="mail"/>mail lists
		    -->
                  </td>
                  <td><img class="spacer" src="{$spacer}" alt="" width="1" height="1" /></td>
                </tr>
                <tr>
                  <td><img src="{$skin-img-dir}/search-left.gif" width="9" height="10" border="0" alt="" /></td>
                  <td><img class="spacer" src="{$spacer}" alt="" width="1" height="1" /></td>
                  <td><img src="{$skin-img-dir}/search-right.gif" width="9" height="10" border="0" alt="" /></td>
                </tr>
              </table>
            </form>
          </xsl:if>

          <xsl:if test="$google='true'">
            <form method="get" action="http://www.google.com/search" target="_blank">
              <table bgcolor="{$menu-border}" cellpadding="0" cellspacing="0" border="0" summary="search">
                <tr>
                  <td colspan="3"><img class="spacer" src="{$spacer}" alt="" width="1" height="10" /></td>
                </tr>
                <tr>
                  <td><img class="spacer" src="{$spacer}" alt="" width="1" height="1" /></td>
                  <td nowrap="nowrap">
                    <input type="hidden" name="sitesearch" value="{$config/searchsite-domain}"/>
                    <input type="text" id="query" name="q" size="15"/>
                    <img class="spacer" src="{$spacer}" alt="" width="5" height="1" />
		    <input type="submit" value="Search" name="Search"/><br />
		    <font color="white" size="2" face="Arial, Helvetica, Sans-serif">
		    <xsl:text>the </xsl:text><xsl:value-of select="$config/searchsite-name"/><xsl:text> site</xsl:text>
	            </font>

		    <!-- setting search options off for the moment -->
		    <!--
		    <input type="radio" name="web" value="web"/>web site&#160;&#160;
		    <input type="radio" name="mail" value="mail"/>mail lists
		    -->
                  </td>
                  <td><img class="spacer" src="{$spacer}" alt="" width="1" height="1" /></td>
                </tr>
                <tr>
                  <td><img src="{$skin-img-dir}/search-left.gif" width="9" height="10" border="0" alt="" /></td>
                  <td><img class="spacer" src="{$spacer}" alt="" width="1" height="1" /></td>
                  <td><img src="{$skin-img-dir}/search-right.gif" width="9" height="10" border="0" alt="" /></td>
                </tr>
              </table>
            </form>
          </xsl:if>
        </td>
        <xsl:comment>================= start Search ==================</xsl:comment>

        <td bgcolor="{$header-color}"><img class="spacer" src="{$spacer}" alt="" width="10" height="10" /></td>
      </tr>
      <tr>
        <td colspan="2" bgcolor="{$header-color}" valign="bottom">
          <xsl:comment>================= start Tabs ==================</xsl:comment>
          <xsl:apply-templates select="div[@class='tab']"/>
          <xsl:comment>================= end Tabs ==================</xsl:comment>
        </td>
        <td bgcolor="{$header-color}"><img class="spacer" src="{$spacer}" height="1" width="1" alt="" /></td>
      </tr>
      <tr><commit_msg>Revert lucene search patch until someone figures out how to differentiate online and offline rendering<commit_after><?xml version="1.0"?>
<!--
site2xhtml.xsl is the final stage in HTML page production.  It merges HTML from
document2html.xsl, tab2menu.xsl and book2menu.xsl, and adds the site header,
footer, searchbar, css etc.  As input, it takes XML of the form:

<site>
  <div class="menu">
    ...
  </div>
  <div class="tab">
    ...
  </div>
  <div class="content">
    ...
  </div>
</site>

$Id: site2xhtml.xsl,v 1.24 2003/09/20 06:49:46 jefft Exp $
-->

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:import href="../../../common/xslt/html/site2xhtml.xsl"/>
 
  <xsl:variable name="header-color" select="'#294563'"/>
  <xsl:variable name="menu-border" select="'#4C6C8F'"/>
  <xsl:variable name="background-bars" select="'#CFDCED'"/>

  <xsl:template match="site">
    <html>
      <head>
        <title><xsl:value-of select="div[@class='content']/table/tr/td/h1"/></title>
        <link rel="stylesheet" href="{$root}skin/page.css" type="text/css"/>
      </head>
      <body bgcolor="#FFFFFF" text="#000000">
    <xsl:comment>================= start Navigation Path ==================</xsl:comment>
    <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="navigation path">
      <tr>
        <td height="20" bgcolor="{$background-bars}" valign="middle" nowrap="nowrap">
          <img class="spacer" src="{$spacer}" alt="" width="5" height="1" />
          <xsl:comment>===== breadcrumb trail (javascript-generated) ====</xsl:comment>
          <font face="Arial, Helvetica, Sans-serif" size="2">
              <script type="text/javascript" language="JavaScript" src="{$root}skin/breadcrumbs.js"/>
          </font>
        </td>
      </tr>
      <tr>
        <td height="2" bgcolor="{$menu-border}"><img class="spacer" src="{$spacer}" alt="" width="2" height="2" /></td>
      </tr>
    </table>
    <xsl:comment>================= end Navigation Path ==================</xsl:comment>

    <!-- ================================= top bar with logo's and search box ===================================  -->

    <xsl:comment>================= start Banner ==================</xsl:comment>
    <table cellspacing="0" cellpadding="0" border="0" width="100%" summary="header with logos">
      <tr>

        <xsl:comment>================= start Group Logo ==================</xsl:comment>
        <td bgcolor="{$header-color}">
          <xsl:if test="$config/group-url">
            <xsl:call-template name="renderlogo">
              <xsl:with-param name="name" select="$config/group-name"/>
              <xsl:with-param name="url" select="$config/group-url"/>
              <xsl:with-param name="logo" select="$config/group-logo"/>
              <xsl:with-param name="root" select="$root"/>
              <xsl:with-param name="description" select="$config/group-description"/>
            </xsl:call-template>
          </xsl:if>
        </td>
        <xsl:comment>================= end Group Logo ==================</xsl:comment>
        <xsl:comment>================= start Project Logo ==================</xsl:comment>
        <td bgcolor="{$header-color}" align="center" width="100%">
          <xsl:call-template name="renderlogo">
            <xsl:with-param name="name" select="$config/project-name"/>
            <xsl:with-param name="url" select="$config/project-url"/>
            <xsl:with-param name="logo" select="$config/project-logo"/>
            <xsl:with-param name="root" select="$root"/>
            <xsl:with-param name="description" select="$config/project-description"/>
          </xsl:call-template>
        </td>
        <xsl:comment>================= end Project Logo ==================</xsl:comment>

        <xsl:comment>================= start Search ==================</xsl:comment>
        <td bgcolor="{$header-color}" rowspan="2" valign="top">
          <xsl:if test="not($config/disable-search) or
            $config/disable-search='false' and $config/searchsite-domain and
            $config/searchsite-name">
            <form method="get" action="http://www.google.com/search" target="_blank">
              <table bgcolor="{$menu-border}" cellpadding="0" cellspacing="0" border="0" summary="search">
                <tr>
                  <td colspan="3"><img class="spacer" src="{$spacer}" alt="" width="1" height="10" /></td>
                </tr>
                <tr>
                  <td><img class="spacer" src="{$spacer}" alt="" width="1" height="1" /></td>
                  <td nowrap="nowrap">
                    <input type="hidden" name="sitesearch" value="{$config/searchsite-domain}"/>
                    <input type="text" id="query" name="q" size="15"/>
                    <img class="spacer" src="{$spacer}" alt="" width="5" height="1" />
                    <input type="submit" value="Search" name="Search"/>
                    <br />
                    <font color="white" size="2" face="Arial, Helvetica, Sans-serif">
                      the <xsl:value-of select="$config/searchsite-name"/> site
                      <!-- setting search options off for the moment -->
                      <!--
                      <input type="radio" name="web" value="web"/>web site&#160;&#160;<input type="radio" name="mail" value="mail"/>mail lists
                      -->
                    </font>
                  </td>
                  <td><img class="spacer" src="{$spacer}" alt="" width="1" height="1" /></td>
                </tr>
                <tr>
                  <td><img src="{$skin-img-dir}/search-left.gif" width="9" height="10" border="0" alt="" /></td>
                  <td><img class="spacer" src="{$spacer}" alt="" width="1" height="1" /></td>
                  <td><img src="{$skin-img-dir}/search-right.gif" width="9" height="10" border="0" alt="" /></td>
                </tr>
              </table>
            </form>
          </xsl:if>
        </td>
        <xsl:comment>================= start Search ==================</xsl:comment>

        <td bgcolor="{$header-color}"><img class="spacer" src="{$spacer}" alt="" width="10" height="10" /></td>
      </tr>
      <tr>
        <td colspan="2" bgcolor="{$header-color}" valign="bottom">
          <xsl:comment>================= start Tabs ==================</xsl:comment>
          <xsl:apply-templates select="div[@class='tab']"/>
          <xsl:comment>================= end Tabs ==================</xsl:comment>
        </td>
        <td bgcolor="{$header-color}"><img class="spacer" src="{$spacer}" height="1" width="1" alt="" /></td>
      </tr>
      <tr>
{'fraction_non_alphanumeric': 0.24938733393525087, 'fraction_numerical': 0.016380755836450406, 'mean_word_length': 2.673773987206823, 'pattern_counts': {'":': 0, '<': 362, '<?xml version=': 2, '>': 362, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '674940', 'n_tokens_mistral': 5037, 'n_tokens_neox': 4501, 'n_words': 955}