<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--

	master_sdss.xsl
	
	XSL stylesheet that takes a SAML 2.0 metadata master file containing
	a trust fabric and optional entities, and makes an SDSS federation
	master file by tweaking appropriately and inserting the combined
	entities file.
	
	Author: <NAME> <<EMAIL>>

	$Id: master_sdss.xsl,v 1.3 2006/11/07 20:36:31 iay Exp $
-->
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
	xmlns:shibmeta="urn:mace:shibboleth:metadata:1.0"
	xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:wayf="http://sdss.ac.uk/2006/06/WAYF"
	xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
	exclude-result-prefixes="wayf">

	<!--
		Version information for this file.  Remember to peel off the dollar signs
		before dropping the text into another versioned file.
	-->
	<xsl:param name="cvsId">$Id: master_sdss.xsl,v 1.3 2006/11/07 20:36:31 iay Exp $</xsl:param>

	<!--
		Add a comment to the start of the output file.
	-->
	<xsl:template match="/">
		<xsl:comment>
			<xsl:text>&#10;&#9;***DO NOT EDIT THIS FILE***&#10;&#10;</xsl:text>
			<xsl:text>&#9;Generated by:&#10;&#10;&#9;</xsl:text>
			<xsl:value-of select="substring-before(substring-after($cvsId, ': '), '$')"/>
			<xsl:text>&#10;</xsl:text>
		</xsl:comment>
		<xsl:comment>
			<xsl:text>&#10;&#9;S D S S   F E D E R A T I O N   M E T A D A T A&#10;</xsl:text>
		</xsl:comment>
		<xsl:apply-templates/>
	</xsl:template>

	<!--Force UTF-8 encoding for the output.-->
	<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/>

	<!--
		Root EntitiesDescriptor element.
		
		Copy all attributes and nested elements to the output, then
		insert the entities from the entities file at the end.
	-->
	<xsl:template match="/md:EntitiesDescriptor">
		<xsl:copy>
			<xsl:apply-templates select="node()|@*"/>
			<xsl:apply-templates select="document('../xml/entities.xml')/*/md:EntityDescriptor"/>
		</xsl:copy>
	</xsl:template>

	<!--
		Drop any explicit xsi:schemaLocation attributes from imported entity fragments.
	-->
	<xsl:template match="@xsi:schemaLocation[parent::md:EntityDescriptor]">
		<!-- nothing -->
	</xsl:template>
	
	<!--
		Drop any dummy entities.
	-->
	<xsl:template match="md:EntityDescriptor[@entityID='dummy']">
		<!-- nothing -->
	</xsl:template>
	
	<!--By default, copy text blocks, comments and attributes unchanged.-->
	<xsl:template match="text()|comment()|@*">
		<xsl:copy/>
	</xsl:template>
	
	<!--By default, copy all elements from the input to the output, along with their attributes and contents.-->
	<xsl:template match="*">
		<xsl:copy>
			<xsl:apply-templates select="node()|@*"/>
		</xsl:copy>
	</xsl:template>
	
</xsl:stylesheet><commit_msg>Separate SDSS and UK Federation metadata by looking for an EntityDescriptor ID attribute threshold of 1000.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--

	master_sdss.xsl
	
	XSL stylesheet that takes a SAML 2.0 metadata master file containing
	a trust fabric and optional entities, and makes an SDSS federation
	master file by tweaking appropriately and inserting the combined
	entities file.
	
	Author: <NAME> <<EMAIL>>

	$Id: master_sdss.xsl,v 1.4 2006/11/15 16:10:06 iay Exp $
-->
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
	xmlns:shibmeta="urn:mace:shibboleth:metadata:1.0"
	xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:wayf="http://sdss.ac.uk/2006/06/WAYF"
	xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
	exclude-result-prefixes="wayf">

	<!--
		Version information for this file.  Remember to peel off the dollar signs
		before dropping the text into another versioned file.
	-->
	<xsl:param name="cvsId">$Id: master_sdss.xsl,v 1.4 2006/11/15 16:10:06 iay Exp $</xsl:param>

	<!--
		Add a comment to the start of the output file.
	-->
	<xsl:template match="/">
		<xsl:comment>
			<xsl:text>&#10;&#9;***DO NOT EDIT THIS FILE***&#10;&#10;</xsl:text>
			<xsl:text>&#9;Generated by:&#10;&#10;&#9;</xsl:text>
			<xsl:value-of select="substring-before(substring-after($cvsId, ': '), '$')"/>
			<xsl:text>&#10;</xsl:text>
		</xsl:comment>
		<xsl:comment>
			<xsl:text>&#10;&#9;S D S S   F E D E R A T I O N   M E T A D A T A&#10;</xsl:text>
		</xsl:comment>
		<xsl:apply-templates/>
	</xsl:template>

	<!--Force UTF-8 encoding for the output.-->
	<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/>

	<!--
		Root EntitiesDescriptor element.
		
		Copy all attributes and nested elements to the output, then
		insert the entities from the entities file at the end.
	-->
	<xsl:template match="/md:EntitiesDescriptor">
		<xsl:copy>
			<xsl:apply-templates select="node()|@*"/>
			<xsl:apply-templates select="document('../xml/entities.xml')/*/md:EntityDescriptor"/>
		</xsl:copy>
	</xsl:template>

	<!--
		Drop any explicit xsi:schemaLocation attributes from imported entity fragments.
	-->
	<xsl:template match="@xsi:schemaLocation[parent::md:EntityDescriptor]">
		<!-- nothing -->
	</xsl:template>
	
	<!--
		Drop any dummy entities.
	-->
	<xsl:template match="md:EntityDescriptor[@entityID='dummy']">
		<!-- nothing -->
	</xsl:template>
	
	<!--
		Drop any entities defined after the UK Federation went live.
	-->
	<xsl:template match="md:EntityDescriptor[number(substring-after(@ID, 'uk'))>=1000]">
		<!-- nothing -->
	</xsl:template>
	
	<!--By default, copy text blocks, comments and attributes unchanged.-->
	<xsl:template match="text()|comment()|@*">
		<xsl:copy/>
	</xsl:template>
	
	<!--By default, copy all elements from the input to the output, along with their attributes and contents.-->
	<xsl:template match="*">
		<xsl:copy>
			<xsl:apply-templates select="node()|@*"/>
		</xsl:copy>
	</xsl:template>
	
</xsl:stylesheet>
{'fraction_non_alphanumeric': 0.1843255970400269, 'fraction_numerical': 0.03161789438277834, 'mean_word_length': 4.286222222222222, 'pattern_counts': {'":': 0, '<': 115, '<?xml version=': 2, '>': 116, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 26}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6304583', 'n_tokens_mistral': 2397, 'n_tokens_neox': 2063, 'n_words': 505}