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

  <xsl:template match="/">
    <!-- print headers -->
    <xsl:text>Rank</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Rank Last Week</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Weeks on List</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Asterisk</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Dagger</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Primary ISBN10</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Primary ISBN13</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Publisher</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Description</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Price</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Title</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Author</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Contributor</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Contributor Note</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Book Image</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Amazon Product URL</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Age Group</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Book Review Link</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>First Chapter Link</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Sunday Review Link</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Article Chapter Link</xsl:text>
    <xsl:value-of select="$NEWLINE" />

    <xsl:apply-templates
      select="result_set/results/books/book"
    />
  </xsl:template>

  <xsl:template match="book">
    <xsl:for-each select="*">
      <xsl:apply-templates mode="csv" select="." />
      <xsl:if test="position() &lt; last()">
        <xsl:value-of select="$COMMA" />
      </xsl:if>
    </xsl:for-each>
    <xsl:value-of select="$NEWLINE" />
  </xsl:template>

</xsl:stylesheet><commit_msg>Add fields to identify each list, at the start of each record<commit_after><xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="1.0"
>
  <xsl:import href="csv.xsl" />

  <xsl:template match="/">
    <!-- print headers -->
    <xsl:text>List Name</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Bestsellers Date</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Published Date</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Rank</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Rank Last Week</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Weeks on List</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Asterisk</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Dagger</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Primary ISBN10</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Primary ISBN13</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Publisher</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Description</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Price</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Title</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Author</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Contributor</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Contributor Note</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Book Image</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Amazon Product URL</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Age Group</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Book Review Link</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>First Chapter Link</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Sunday Review Link</xsl:text>
    <xsl:value-of select="$COMMA" />
    <xsl:text>Article Chapter Link</xsl:text>
    <xsl:value-of select="$NEWLINE" />

    <xsl:apply-templates
      select="result_set/results/books/book"
    />
  </xsl:template>

  <xsl:template match="book">
    <xsl:value-of select="../../list_name" />
    <xsl:value-of select="$COMMA" />
    <xsl:value-of select="../../bestsellers_date" />
    <xsl:value-of select="$COMMA" />
    <xsl:value-of select="../../published_date" />
    <xsl:value-of select="$COMMA" />

    <xsl:for-each select="*">
      <xsl:apply-templates mode="csv" select="." />
      <xsl:if test="position() &lt; last()">
        <xsl:value-of select="$COMMA" />
      </xsl:if>
    </xsl:for-each>
    <xsl:value-of select="$NEWLINE" />
  </xsl:template>

</xsl:stylesheet>
{'fraction_non_alphanumeric': 0.21563011456628478, 'fraction_numerical': 0.004500818330605565, 'mean_word_length': 3.473010064043916, 'pattern_counts': {'":': 0, '<': 176, '<?xml version=': 0, '>': 176, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '538199', 'n_tokens_mistral': 2018, 'n_tokens_neox': 1808, 'n_words': 260}