<commit_before><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:template match="/">

    <fits xmlns="http://hul.harvard.edu/ois/xml/ns/fits/fits_output">
		<identification>
			<identity>
				<xsl:attribute name="format">
					<xsl:choose>
			       		<xsl:when test="/JPG/EXIF">
			        		<xsl:value-of select="'JPEG EXIF'"/>
			       		</xsl:when>
						<xsl:when test="/JPG/JFIF/IDENTIFIER='JFIF'">
			        		<xsl:value-of select="'JPEG File Interchange Format'"/>
			       		</xsl:when>
		       		</xsl:choose>
				</xsl:attribute>
				<xsl:attribute name="mimetype">
					<xsl:value-of select="JPG/METADATA/TYPE" />
				</xsl:attribute>
				<xsl:if test="JPG/JFIF/MAJORVERSION">
					<version>
        				<xsl:value-of select="concat(JPG/JFIF/MAJORVERSION,'.',JPG/JFIF/MINORVERSION)"/>
        			</version>
        		</xsl:if><commit_msg>NLNZ tool: don't identify file as EXIF if empty EXIF XML element.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:template match="/">

    <fits xmlns="http://hul.harvard.edu/ois/xml/ns/fits/fits_output">
		<identification>
			<identity>
				<xsl:attribute name="format">
					<xsl:choose>
						<xsl:when test="/JPG/EXIF and not(string-length(/JPG/EXIF) = 0)">
			        		<xsl:value-of select="'JPEG EXIF'"/>
			       		</xsl:when>
						<xsl:when test="/JPG/JFIF/IDENTIFIER='JFIF'">
			        		<xsl:value-of select="'JPEG File Interchange Format'"/>
			       		</xsl:when>
		       		</xsl:choose>
				</xsl:attribute>
				<xsl:attribute name="mimetype">
					<xsl:value-of select="JPG/METADATA/TYPE" />
				</xsl:attribute>
				<xsl:if test="JPG/JFIF/MAJORVERSION">
					<version>
        				<xsl:value-of select="concat(JPG/JFIF/MAJORVERSION,'.',JPG/JFIF/MINORVERSION)"/>
        			</version>
        		</xsl:if>
{'fraction_non_alphanumeric': 0.19147843942505133, 'fraction_numerical': 0.010780287474332649, 'mean_word_length': 2.7625482625482625, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 2, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, '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': '914086', 'n_tokens_mistral': 915, 'n_tokens_neox': 721, 'n_words': 99}