<commit_before><?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
    xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg">
<xsl:output method="xml" indent="yes"
    doctype-public="-//W3C//DTD SVG 1.0//EN"
    doctype-system="http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"/>

<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy> 
</xsl:template>

<xsl:template match="svg:svg">
  <svg xmlns="http://www.w3.org/2000/svg">
    <!-- Order is important here, so the attributes below overrides the 
         originals, which are copied "wholesale" -->
    <xsl:apply-templates select="@*" />
 
    <defs>
      <linearGradient id="white" x1="0%" y1="0%" x2="0%" y2="0%">
         <stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/>
      </linearGradient>

      <linearGradient id="lightgrey" x1="0%" y1="0%" x2="100%" y2="100%">
         <stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/>
         <stop offset="100%" style="stop-color:rgb(128,128,128);stop-opacity:1"/>
      </linearGradient>

      <linearGradient id="lightblue" x1="0%" y1="0%" x2="100%" y2="100%">
         <stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/>
         <stop offset="100%" style="stop-color:rgb(128,128,255);stop-opacity:1"/>
      </linearGradient>

      <linearGradient id="none" x1="0%" y1="0%" x2="100%" y2="100%">
         <stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/>
         <stop offset="100%" style="stop-color:rgb(255,255,255);stop-opacity:1"/>
      </linearGradient>
    </defs>

    <xsl:apply-templates />
  </svg>
</xsl:template>

<!-- Match the top most "g" -->
<xsl:template match="/svg:svg/svg:g"> 
  <g>
    <xsl:apply-templates select="@*"/>
    <!-- Graphviz uses a polygon as the background. Don't want a gradient there -->
    <xsl:for-each select="svg:polygon">
      <xsl:copy><xsl:apply-templates select="@*" /></xsl:copy>
    </xsl:for-each>
    <xsl:apply-templates select="svg:title|svg:g" />
  </g>
</xsl:template> 
 

<xsl:template match="svg:text">
   <text style="font-size:10px; font-family:Verdana">
     <xsl:apply-templates select="@*|text()" />
   </text>
</xsl:template> 


<xsl:template match="svg:g">
  <xsl:copy>
    <xsl:apply-templates select="@*" />
  </xsl:copy>

  <xsl:for-each select="svg:polygon|svg:ellipse">
    <xsl:call-template name="poly-shadow" />
  </xsl:for-each>
  
  <xsl:for-each select="svg:path">
    <xsl:call-template name="path-shadow" />
  </xsl:for-each>
  
  <xsl:for-each select="svg:polygon|svg:ellipse|svg:polyline">
    <xsl:call-template name="poly-main" />
  </xsl:for-each>

  <xsl:for-each select="svg:path">
    <xsl:call-template name="path-main" />
  </xsl:for-each>
  
  <xsl:apply-templates select="svg:text" />

</xsl:template>

<xsl:template name="poly-shadow">
        <xsl:element name="{name()}">
          <xsl:apply-templates select="@*"/><commit_msg>Text fix from <NAME><commit_after><?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
    xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg">
<xsl:output method="xml" indent="yes"
    doctype-public="-//W3C//DTD SVG 1.0//EN"
    doctype-system="http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"/>

<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy> 
</xsl:template>

<xsl:template match="svg:svg">
  <svg xmlns="http://www.w3.org/2000/svg">
    <!-- Order is important here, so the attributes below overrides the 
         originals, which are copied "wholesale" -->
    <xsl:apply-templates select="@*" />
 
    <defs>
      <linearGradient id="white" x1="0%" y1="0%" x2="0%" y2="0%">
         <stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/>
      </linearGradient>

      <linearGradient id="lightgrey" x1="0%" y1="0%" x2="100%" y2="100%">
         <stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/>
         <stop offset="100%" style="stop-color:rgb(128,128,128);stop-opacity:1"/>
      </linearGradient>

      <linearGradient id="lightblue" x1="0%" y1="0%" x2="100%" y2="100%">
         <stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/>
         <stop offset="100%" style="stop-color:rgb(128,128,255);stop-opacity:1"/>
      </linearGradient>

      <linearGradient id="none" x1="0%" y1="0%" x2="100%" y2="100%">
         <stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/>
         <stop offset="100%" style="stop-color:rgb(255,255,255);stop-opacity:1"/>
      </linearGradient>
    </defs>

    <xsl:apply-templates />
  </svg>
</xsl:template>

<!-- Match the top most "g" -->
<xsl:template match="/svg:svg/svg:g"> 
  <g>
    <xsl:apply-templates select="@*"/>
    <!-- Graphviz uses a polygon as the background. Don't want a gradient there -->
    <xsl:for-each select="svg:polygon">
      <xsl:copy><xsl:apply-templates select="@*" /></xsl:copy>
    </xsl:for-each>
    <xsl:apply-templates select="svg:title|svg:g" />
  </g>
</xsl:template> 
 

<xsl:template match="svg:text">
  <text>
    <xsl:apply-templates select="@*" />
    <xsl:attribute name="style">font-size:10px; font-family:Verdana</xsl:attribute> 
    <xsl:apply-templates select="text()"/>
  </text>
</xsl:template> 


<xsl:template match="svg:g">
  <xsl:copy>
    <xsl:apply-templates select="@*" />
  </xsl:copy>

  <xsl:for-each select="svg:polygon|svg:ellipse">
    <xsl:call-template name="poly-shadow" />
  </xsl:for-each>
  
  <xsl:for-each select="svg:path">
    <xsl:call-template name="path-shadow" />
  </xsl:for-each>
  
  <xsl:for-each select="svg:polygon|svg:ellipse|svg:polyline">
    <xsl:call-template name="poly-main" />
  </xsl:for-each>

  <xsl:for-each select="svg:path">
    <xsl:call-template name="path-main" />
  </xsl:for-each>
  
  <xsl:apply-templates select="svg:text" />

</xsl:template>

<xsl:template name="poly-shadow">
        <xsl:element name="{name()}">
          <xsl:apply-templates select="@*"/>
{'fraction_non_alphanumeric': 0.22729480330257407, 'fraction_numerical': 0.055366682855755224, 'mean_word_length': 3.781733746130031, 'pattern_counts': {'":': 0, '<': 149, '<?xml version=': 2, '>': 149, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, 'xml': 12}, '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': '6024752', 'n_tokens_mistral': 2647, 'n_tokens_neox': 2261, 'n_words': 349}