<commit_before><?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output omit-xml-declaration="yes" indent="no"/>
    <xsl:template match="@* | node()">
      <xsl:copy>
        <xsl:apply-templates select="@* | node()"/>
      </xsl:copy>
    </xsl:template>
    <!-- Remove Brill author from 720-->
    <xsl:template match="datafield[@tag='720' and subfield[@code='a'][.='Brill']]" priority="2"/>

    <!-- Move Author to 100 and 700-->
    <xsl:template match="datafield[@tag='720']" priority="1">
        <xsl:variable name="author_tag">
            <xsl:choose>
                <xsl:when test="boolean(preceding-sibling::datafield[@tag='720'])">700</xsl:when>
                <xsl:otherwise>100</xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
        <xsl:copy>
           <xsl:attribute name="tag">
              <xsl:value-of select="$author_tag"/>
           </xsl:attribute>
           <xsl:attribute name="ind1">
              <xsl:text>1</xsl:text>
           </xsl:attribute>
           <xsl:attribute name="ind2">
              <xsl:text> </xsl:text>
           </xsl:attribute>
           <xsl:copy-of select="node()"/>
        </xsl:copy>
    </xsl:template>

    <!-- Move URL to 856u -->
    <xsl:template match="datafield[@tag='534']">
        <xsl:copy>
           <xsl:attribute name="tag">
               <xsl:value-of select="856"/>
           </xsl:attribute>
           <xsl:attribute name="ind1">
               <xsl:text>4</xsl:text>
           </xsl:attribute>
           <xsl:attribute name="ind2">
               <xsl:text>0</xsl:text>
           </xsl:attribute>
           <subfield code="u">
               <xsl:copy-of select="./subfield[@code='t']/text()"/>
           </subfield>
           <subfield code="z">ZZ</subfield>
        </xsl:copy>
    </xsl:template>

    <!-- Move date to 264c year -->
    <xsl:template match="datafield[@tag='260' and subfield[@code='c']]">
        <xsl:copy>
           <xsl:attribute name="tag">
                <xsl:value-of select="264"/>
           </xsl:attribute>
           <xsl:attribute name="ind1"><commit_msg>Make sure whitespace normalization is also done for authors<commit_after><?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output omit-xml-declaration="yes" indent="no"/>
    <xsl:template match="@* | node()">
      <xsl:copy>
        <xsl:apply-templates select="@* | node()"/>
      </xsl:copy>
    </xsl:template>
    <!-- Remove Brill author from 720-->
    <xsl:template match="datafield[@tag='720' and subfield[@code='a'][.='Brill']]" priority="2"/>

    <!-- Move Author to 100 and 700-->
    <xsl:template match="datafield[@tag='720']" priority="1">
        <xsl:variable name="author_tag">
            <xsl:choose>
                <xsl:when test="boolean(preceding-sibling::datafield[@tag='720'])">700</xsl:when>
                <xsl:otherwise>100</xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
        <xsl:copy>
           <xsl:attribute name="tag">
              <xsl:value-of select="$author_tag"/>
           </xsl:attribute>
           <xsl:attribute name="ind1">
              <xsl:text>1</xsl:text>
           </xsl:attribute>
           <xsl:attribute name="ind2">
              <xsl:text> </xsl:text>
           </xsl:attribute>
           <xsl:apply-templates select="node()"/>
        </xsl:copy>
    </xsl:template>

    <!-- Move URL to 856u -->
    <xsl:template match="datafield[@tag='534']">
        <xsl:copy>
           <xsl:attribute name="tag">
               <xsl:value-of select="856"/>
           </xsl:attribute>
           <xsl:attribute name="ind1">
               <xsl:text>4</xsl:text>
           </xsl:attribute>
           <xsl:attribute name="ind2">
               <xsl:text>0</xsl:text>
           </xsl:attribute>
           <subfield code="u">
               <xsl:copy-of select="./subfield[@code='t']/text()"/>
           </subfield>
           <subfield code="z">ZZ</subfield>
        </xsl:copy>
    </xsl:template>

    <!-- Move date to 264c year -->
    <xsl:template match="datafield[@tag='260' and subfield[@code='c']]">
        <xsl:copy>
           <xsl:attribute name="tag">
                <xsl:value-of select="264"/>
           </xsl:attribute>
           <xsl:attribute name="ind1">
{'fraction_non_alphanumeric': 0.19269406392694063, 'fraction_numerical': 0.027853881278538814, 'mean_word_length': 2.1315225160829163, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 2, '>': 129, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, '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': '4267323', 'n_tokens_mistral': 1542, 'n_tokens_neox': 1330, 'n_words': 225}