<commit_before><xsl:stylesheet exclude-result-prefixes="#all"
                version="2.0"
                xmlns:dir="http://apache.org/cocoon/directory/2.0"
                xmlns:kiln="http://www.kcl.ac.uk/artshums/depts/ddh/kiln/ns/1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:import href="../defaults.xsl"/>
  <xsl:include href="cocoon://_internal/url/reverse.xsl" />

  <xsl:template match="/aggregation/dir:directory" mode="#all">
    <xsl:param name="directory" />
    <xsl:param name="header" />

    <h3><xsl:value-of select="$header" /></h3>

    <table>
      <thead>
        <tr>
          <th scope="col">File</th>
          <th colspan="2" scope="col">Reports</th>
          <th scope="col">Search</th>
          <th scope="col">RDF</th>
          <th scope="col">View</th>
        </tr>
      </thead>
      <tbody>
        <xsl:apply-templates mode="#current"
                             select=".//dir:directory[@name=$directory]" />
      </tbody>
    </table>
  </xsl:template>

  <xsl:template match="/aggregation/dir:directory" mode="authority">
    <xsl:param name="directory" />
    <xsl:param name="header" />

    <h3><xsl:value-of select="$header" /></h3>

    <table>
      <thead>
        <tr>
          <th scope="col">File</th>
          <th scope="col">RDF</th>
        </tr>
      </thead>
      <tbody>
        <xsl:apply-templates mode="authority" select=".//dir:directory[@name=$directory]" />
      </tbody>
    </table>
  </xsl:template>

  <xsl:template match="/aggregation/dir:directory" mode="indices">
    <xsl:param name="directory" />
    <xsl:param name="header" />

    <h3><xsl:value-of select="$header" /></h3>

    <p>Each index file specifies (by way of its filename) which
    subdirectory in content/xml the indices it defines apply to. The
    index link for a file will index all documents in the appropriate
    directory according to all of the indices defined in that
    file.</p>

    <table>
      <thead>
        <tr>
          <th scope="col">File</th>
          <th scope="col">Index</th>
        </tr>
      </thead>
      <tbody>
        <xsl:apply-templates mode="indices" select=".//dir:directory[@name=$directory]" />
      </tbody>
    </table>
  </xsl:template>

  <xsl:template match="dir:directory" mode="#all">
    <xsl:param name="path"/><commit_msg>Added disambiguating priority attributes to save inconsistently appearing errors.<commit_after><xsl:stylesheet exclude-result-prefixes="#all"
                version="2.0"
                xmlns:dir="http://apache.org/cocoon/directory/2.0"
                xmlns:kiln="http://www.kcl.ac.uk/artshums/depts/ddh/kiln/ns/1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:import href="../defaults.xsl"/>
  <xsl:include href="cocoon://_internal/url/reverse.xsl" />

  <xsl:template match="/aggregation/dir:directory" mode="#all">
    <xsl:param name="directory" />
    <xsl:param name="header" />

    <h3><xsl:value-of select="$header" /></h3>

    <table>
      <thead>
        <tr>
          <th scope="col">File</th>
          <th colspan="2" scope="col">Reports</th>
          <th scope="col">Search</th>
          <th scope="col">RDF</th>
          <th scope="col">View</th>
        </tr>
      </thead>
      <tbody>
        <xsl:apply-templates mode="#current"
                             select=".//dir:directory[@name=$directory]" />
      </tbody>
    </table>
  </xsl:template>

  <xsl:template match="/aggregation/dir:directory" mode="authority"
                priority="10">
    <xsl:param name="directory" />
    <xsl:param name="header" />

    <h3><xsl:value-of select="$header" /></h3>

    <table>
      <thead>
        <tr>
          <th scope="col">File</th>
          <th scope="col">RDF</th>
        </tr>
      </thead>
      <tbody>
        <xsl:apply-templates mode="authority" select=".//dir:directory[@name=$directory]" />
      </tbody>
    </table>
  </xsl:template>

  <xsl:template match="/aggregation/dir:directory" mode="indices"
                priority="10">
    <xsl:param name="directory" />
    <xsl:param name="header" />

    <h3><xsl:value-of select="$header" /></h3>

    <p>Each index file specifies (by way of its filename) which
    subdirectory in content/xml the indices it defines apply to. The
    index link for a file will index all documents in the appropriate
    directory according to all of the indices defined in that
    file.</p>

    <table>
      <thead>
        <tr>
          <th scope="col">File</th>
          <th scope="col">Index</th>
        </tr>
      </thead>
      <tbody>
        <xsl:apply-templates mode="indices" select=".//dir:directory[@name=$directory]" />
      </tbody>
    </table>
  </xsl:template>

  <xsl:template match="dir:directory" mode="#all">
    <xsl:param name="path"/>
{'fraction_non_alphanumeric': 0.18228736581337737, 'fraction_numerical': 0.008257638315441783, 'mean_word_length': 2.3645833333333335, 'pattern_counts': {'":': 0, '<': 149, '<?xml version=': 0, '>': 149, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 8}, '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': '828422', 'n_tokens_mistral': 1653, 'n_tokens_neox': 1519, 'n_words': 295}