<commit_before><?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:px="urn:panax"
	>
	<!-- 
		Model (px:data)
	-->

	<xsl:template match="*" mode="model">
		[
			<xsl:apply-templates select="px:data/*" mode="model" />
		]
	</xsl:template>

	<xsl:template match="px:dataRow" mode="model">
		<xsl:if test="position()&gt;1">,</xsl:if>
		{
			"rowNumber": "<xsl:value-of select="@rowNumber"/>",
			<xsl:apply-templates select="*" mode="model.dataField" />
		}
	</xsl:template>

	<xsl:template match="*" mode="model.dataField">
		<xsl:if test="position()&gt;1">,</xsl:if>
		"<xsl:value-of select="key('fields',@fieldId)/@fieldName"/>": "<xsl:value-of select="@value"/>"
		<!-- 
			ToDo: JSON value can be string, or number, boolean, etc. 
			According to @FIELDS
			See json.org 
		-->
	</xsl:template>

</xsl:stylesheet><commit_msg>XSL asf: model pair's<commit_after><?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:px="urn:panax"
	>
	<!-- 
		Model (px:data)
	-->

	<xsl:template match="*" mode="model">
		[
			<xsl:apply-templates select="px:data/*" mode="model" />
		]
	</xsl:template>

	<xsl:template match="px:dataRow" mode="model">
		<xsl:if test="position()&gt;1">,</xsl:if>
		{
			"rowNumber": "<xsl:value-of select="@rowNumber"/>",
			<xsl:apply-templates select="*" mode="model.pair" />
		}
	</xsl:template>

	<xsl:template match="*" mode="model.pair">
		<xsl:variable name="fieldName" select="key('fields',@fieldId)/@fieldName" />
		<xsl:variable name="dataType" select="key('fields',@fieldId)/@dataType" />
		<xsl:if test="position()&gt;1">,</xsl:if>
		"<xsl:value-of select="$fieldName"/>":
		<xsl:choose>
			<xsl:when test="$dataType='int' or $dataType='float' or $dataType='money'">
				<xsl:value-of select="@value"/>
			</xsl:when>
			<xsl:when test="$dataType='bit'">
				<xsl:if test="@value='1'">true</xsl:if>
				<xsl:if test="@value!='1'">false</xsl:if>
			</xsl:when>
			<xsl:when test="$dataType='date' or $dataType='datetime' or $dataType='time'">
				"<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.24782608695652175, 'fraction_numerical': 0.011304347826086957, 'mean_word_length': 4.9, 'pattern_counts': {'":': 4, '<': 60, '<?xml version=': 2, '>': 60, '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': '868783', 'n_tokens_mistral': 1040, 'n_tokens_neox': 879, 'n_words': 130}