<commit_before><xsl:stylesheet
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        version="1.0">
        <xsl:output method="text" /> 

        <xsl:template match="/xsd:schema">
                <xsl:apply-templates select="xsd:simpleType"/>
        </xsl:template>
        
        <xsl:template match="xsd:simpleType">
                <xsl:text>structure </xsl:text>
                <xsl:value-of select="@name"/>
                <xsl:text> = struct&#10; </xsl:text>
                <xsl:apply-templates select="*"/>
                <xsl:text>end&#10;&#10;</xsl:text>
        </xsl:template>

        <xsl:template match="xsd:restriction">
                <xsl:variable name="t" select="substring-after(@base, ':')"/>
                <xsl:choose>
                        <xsl:when test="xsd:enumeration">
                                <xsl:text>datatype t = </xsl:text>
                                <xsl:apply-templates select="*"/>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:string'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:hexBinary'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:token'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:NCName'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:integer'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:unsignedInt'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:unsignedLong'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:otherwise>
                                <xsl:text>type t = </xsl:text>
                                <xsl:value-of select="$t"/>
                                <xsl:text>.t</xsl:text>
                        </xsl:otherwise>
                </xsl:choose>
                <xsl:text>&#10;</xsl:text>
        </xsl:template>

        <xsl:template match="xsd:union">
                <xsl:text>type t = string&#10;</xsl:text>
        </xsl:template>

        <xsl:template match="xsd:enumeration">
                <xsl:choose>
                        <xsl:when test="position() != 1">
                                <xsl:text> | </xsl:text>
                        </xsl:when>
                </xsl:choose>
                <xsl:choose>
                        <xsl:when test="@value = ''">
                                <xsl:text>Blank</xsl:text>
                        </xsl:when>
                        <xsl:otherwise>
                                <xsl:value-of select="@value"/>
                        </xsl:otherwise>
                </xsl:choose>
        </xsl:template>
</xsl:stylesheet>
<commit_msg>Add alphabet prefix if constructor begins with number<commit_after><xsl:stylesheet
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        version="1.0">
        <xsl:output method="text" /> 

        <xsl:template match="/xsd:schema">
                <xsl:apply-templates select="xsd:simpleType"/>
        </xsl:template>
        
        <xsl:template match="xsd:simpleType">
                <xsl:text>structure </xsl:text>
                <xsl:value-of select="@name"/>
                <xsl:text> = struct&#10; </xsl:text>
                <xsl:apply-templates select="*"/>
                <xsl:text>end&#10;&#10;</xsl:text>
        </xsl:template>

        <xsl:template match="xsd:restriction">
                <xsl:variable name="t" select="substring-after(@base, ':')"/>
                <xsl:choose>
                        <xsl:when test="xsd:enumeration">
                                <xsl:text>datatype t = </xsl:text>
                                <xsl:apply-templates select="*"/>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:string'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:hexBinary'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:token'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:NCName'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:integer'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:unsignedInt'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:when test="@base = 'xsd:unsignedLong'">
                                <xsl:text>type t = string</xsl:text>
                        </xsl:when>
                        <xsl:otherwise>
                                <xsl:text>type t = </xsl:text>
                                <xsl:value-of select="$t"/>
                                <xsl:text>.t</xsl:text>
                        </xsl:otherwise>
                </xsl:choose>
                <xsl:text>&#10;</xsl:text>
        </xsl:template>

        <xsl:template match="xsd:union">
                <xsl:text>type t = string&#10;</xsl:text>
        </xsl:template>

        <xsl:template match="xsd:enumeration">
                <xsl:choose>
                        <xsl:when test="position() != 1">
                                <xsl:text> | </xsl:text>
                        </xsl:when>
                </xsl:choose>
                <xsl:choose>
                        <xsl:when test="@value = ''">
                                <xsl:text>Blank</xsl:text>
                        </xsl:when>
                        <xsl:when test="number(substring(@value, 1, 1))">
                                <xsl:text>C_</xsl:text>
                                <xsl:value-of select="@value"/>
                        </xsl:when>
                        <xsl:otherwise>
                                <xsl:value-of select="@value"/>
                        </xsl:otherwise>
                </xsl:choose>
        </xsl:template>
</xsl:stylesheet>

{'fraction_non_alphanumeric': 0.14641434262948208, 'fraction_numerical': 0.006829823562891292, 'mean_word_length': 1.0588752196836555, 'pattern_counts': {'":': 0, '<': 176, '<?xml version=': 0, '>': 176, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '7298838', 'n_tokens_mistral': 2163, 'n_tokens_neox': 1743, 'n_words': 267}