<commit_before><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet exclude-result-prefixes="#all" version="2.0"
	xmlns:x="http://www.jenitennison.com/xslt/xspec" xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<!--
		This stylesheet transforms a template of Ant build file into a working build file.
		The basic transformation is done by the imported stylesheet.
		In addition to the imported basic transformation, this stylesheet creates some Ant
		nodes to normalize the XSpec report files.
	-->

	<!-- Import: Some may be overridden -->
	<xsl:import href="../../base/worker/generate.xsl" />

	<!--
		Overrides an imported template for document node
		
		Rejects specific Saxon versions
	-->
	<xsl:template as="document-node(element(project))" match="document-node()">
		<xsl:if test="x:saxon-version() lt x:pack-version(9, 9, 0, 2)">
			<xsl:message terminate="yes">
				<xsl:text>Saxon version is </xsl:text>
				<xsl:value-of select="system-property('xsl:product-version')" />
				<xsl:text>. Generating the expected files on Saxon 9.9.0.1 or less will produce unrelated changes. You have to generate the expected files on 9.9.0.2 or later.</xsl:text>
			</xsl:message>
		</xsl:if>

		<xsl:apply-imports />
	</xsl:template>

	<!--
		Overrides an imported named template
		
		Inserts <normalize-xspec-report> into the default <post-task>.
		Context node is in each .xspec file's /x:description/@*.
	-->
	<xsl:template as="element(normalize-xspec-report)+" name="on-post-task">
		<xsl:context-item as="attribute()" use="required"
			use-when="element-available('xsl:context-item')" />

		<xsl:param as="element(reports)" name="reports" required="yes" />

		<!-- Normalize the actual report files -->
		<xsl:for-each select="$reports/element()">
			<normalize-xspec-report actual-report-url="{@actual}"
				normalized-report-url="{@expected}"
				normalizer-xsl-url="{resolve-uri('normalize.xsl', @processor-dir)}" />
		</xsl:for-each>
	</xsl:template><commit_msg>test: block generating end-to-end expected results on Saxon 10 (#850)<commit_after><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet exclude-result-prefixes="#all" version="2.0"
	xmlns:x="http://www.jenitennison.com/xslt/xspec" xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<!--
		This stylesheet transforms a template of Ant build file into a working build file.
		The basic transformation is done by the imported stylesheet.
		In addition to the imported basic transformation, this stylesheet creates some Ant
		nodes to normalize the XSpec report files.
	-->

	<!-- Import: Some may be overridden -->
	<xsl:import href="../../base/worker/generate.xsl" />

	<!--
		Overrides an imported template for document node
		
		Rejects specific Saxon versions
	-->
	<xsl:template as="document-node(element(project))" match="document-node()">
		<xsl:if
			test="
				not(
				(x:saxon-version() ge x:pack-version(9, 9, 0, 2))
				and
				(x:saxon-version() lt x:pack-version(10, 0, 0, 0))
				)">
			<xsl:message terminate="yes">
				<xsl:text>Saxon version is </xsl:text>
				<xsl:value-of select="system-property('xsl:product-version')" />
				<xsl:text>. To generate the expected files, Saxon version must be ge 9.9.0.2 and lt 10. Other versions will produce unrelated changes.</xsl:text>
			</xsl:message>
		</xsl:if>

		<xsl:apply-imports />
	</xsl:template>

	<!--
		Overrides an imported named template
		
		Inserts <normalize-xspec-report> into the default <post-task>.
		Context node is in each .xspec file's /x:description/@*.
	-->
	<xsl:template as="element(normalize-xspec-report)+" name="on-post-task">
		<xsl:context-item as="attribute()" use="required"
			use-when="element-available('xsl:context-item')" />

		<xsl:param as="element(reports)" name="reports" required="yes" />

		<!-- Normalize the actual report files -->
		<xsl:for-each select="$reports/element()">
			<normalize-xspec-report actual-report-url="{@actual}"
				normalized-report-url="{@expected}"
				normalizer-xsl-url="{resolve-uri('normalize.xsl', @processor-dir)}" />
		</xsl:for-each>
	</xsl:template>
{'fraction_non_alphanumeric': 0.16919374247894103, 'fraction_numerical': 0.014921780986762936, 'mean_word_length': 4.143564356435643, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 2, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 8}, 'pii_count': 3, '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': '6343178', 'n_tokens_mistral': 1576, 'n_tokens_neox': 1325, 'n_words': 333}