<commit_before><?xml version="1.0"?>

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

<xsl:import href="../../../../xslt/search/search-and-results.xsl"/>

<xsl:template name="html-title">
Search
</xsl:template>

<xsl:template name="admin-url">
<xsl:param name="prefix"/>
<span class="breadcrumb">Apache Lenya</span>
</xsl:template>

<xsl:template name="body">
<xsl:apply-templates select="/oscom/search-and-results"/>
</xsl:template>

<xsl:template match="search-and-results">
  <form>
<table bgcolor="#f0f0f0" width="100%" cellpadding="4" border="1">
<tr><td>
<table>
<tr><td>
Search within: 
<select name="publication-id">
    <xsl:for-each select="configuration/publication">
      <xsl:choose>
        <xsl:when test="@pid = ../@checked-pid">
          <option><xsl:attribute name="value"><xsl:value-of select="@pid"/></xsl:attribute><xsl:attribute name="selected"/><xsl:value-of select="name"/></option>
        </xsl:when>
        <xsl:otherwise>
          <option><xsl:attribute name="value"><xsl:value-of select="@pid"/></xsl:attribute><xsl:value-of select="name"/></option>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:for-each>
</select>
</td></tr>
<tr><td>
    <input type="text" name="queryString" size="60">
      <xsl:attribute name="value"><xsl:value-of select="search/query-string"/></xsl:attribute>
    </input>
</td></tr>
<tr><td>
Limit your search to field:  
    <select name="fields">
      <option value="all">
        <xsl:if test="search/fields='all'">
          <xsl:attribute name="selected">selected</xsl:attribute>
        </xsl:if>
        Contents (Title or Body)
      </option>
      <option value="title">
        <xsl:if test="search/fields='title'">
          <xsl:attribute name="selected">selected</xsl:attribute>
        </xsl:if>
        Title
      </option>
    </select>
</td></tr>
<tr><td align="right">
    <input type="submit" name="find" value="Search"/>
</td></tr>
<tr><td align="left">
    <font size="-2"><a href="http://jakarta.apache.org/lucene/" class="navigationwhite">Powered by Apache Lucene</a></font>
</td></tr>
</table>
</td></tr>
</table>
  </form>



  <xsl:apply-templates select="search/exception"/>
  <xsl:apply-templates select="results"/>
</xsl:template>

<xsl:template match="results">
  <h3>Search Results (within <xsl:value-of select="../search/publication-name"/>)</h3>
  <xsl:choose>
    <xsl:when test="hits">
<p>
      <xsl:value-of select="pages/page[@type='current']/@start"/> - <xsl:value-of select="pages/page[@type='current']/@end"/> of <xsl:value-of select="@total-hits"/> results
</p>
      <table width="100%" border="0">
      <xsl:apply-templates select="hits/hit"/>
      </table>
    </xsl:when>
    <xsl:otherwise><commit_msg>Apache link highlighted<commit_after><?xml version="1.0"?>

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

<xsl:import href="../../../../xslt/search/search-and-results.xsl"/>

<xsl:template name="html-title">
Search
</xsl:template>

<xsl:template name="admin-url">
<xsl:param name="prefix"/>
<span class="breadcrumb">Apache Lenya</span>
</xsl:template>

<xsl:template name="body">
<xsl:apply-templates select="/oscom/search-and-results"/>
</xsl:template>

<xsl:template match="search-and-results">
  <form>
<table bgcolor="#f0f0f0" width="100%" cellpadding="4" border="1">
<tr><td>
<table>
<tr><td>
Search within: 
<select name="publication-id">
    <xsl:for-each select="configuration/publication">
      <xsl:choose>
        <xsl:when test="@pid = ../@checked-pid">
          <option><xsl:attribute name="value"><xsl:value-of select="@pid"/></xsl:attribute><xsl:attribute name="selected"/><xsl:value-of select="name"/></option>
        </xsl:when>
        <xsl:otherwise>
          <option><xsl:attribute name="value"><xsl:value-of select="@pid"/></xsl:attribute><xsl:value-of select="name"/></option>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:for-each>
</select>
</td></tr>
<tr><td>
    <input type="text" name="queryString" size="60">
      <xsl:attribute name="value"><xsl:value-of select="search/query-string"/></xsl:attribute>
    </input>
</td></tr>
<tr><td>
Limit your search to field:  
    <select name="fields">
      <option value="all">
        <xsl:if test="search/fields='all'">
          <xsl:attribute name="selected">selected</xsl:attribute>
        </xsl:if>
        Contents (Title or Body)
      </option>
      <option value="title">
        <xsl:if test="search/fields='title'">
          <xsl:attribute name="selected">selected</xsl:attribute>
        </xsl:if>
        Title
      </option>
    </select>
</td></tr>
<tr><td align="right">
    <input type="submit" name="find" value="Search"/>
</td></tr>
<tr><td align="left">
    <font size="-2"><a href="http://jakarta.apache.org/lucene/">Powered by Apache Lucene</a></font>
</td></tr>
</table>
</td></tr>
</table>
  </form>



  <xsl:apply-templates select="search/exception"/>
  <xsl:apply-templates select="results"/>
</xsl:template>

<xsl:template match="results">
  <h3>Search Results (within <xsl:value-of select="../search/publication-name"/>)</h3>
  <xsl:choose>
    <xsl:when test="hits">
<p>
      <xsl:value-of select="pages/page[@type='current']/@start"/> - <xsl:value-of select="pages/page[@type='current']/@end"/> of <xsl:value-of select="@total-hits"/> results
</p>
      <table width="100%" border="0">
      <xsl:apply-templates select="hits/hit"/>
      </table>
    </xsl:when>
    <xsl:otherwise>
{'fraction_non_alphanumeric': 0.22624681470695304, 'fraction_numerical': 0.009464870768110666, 'mean_word_length': 3.9683544303797467, 'pattern_counts': {'":': 0, '<': 223, '<?xml version=': 2, '>': 223, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '408072', 'n_tokens_mistral': 2017, 'n_tokens_neox': 1837, 'n_words': 312}