<commit_before><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:gmd="http://www.isotc211.org/2005/gmd"
	xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opengis.net/gml"
	xmlns:geonet="http://www.fao.org/geonetwork" xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

	<xsl:template match="csw:GetRecordsResponse/csw:SearchResults">
		<xsl:element name="response">
			<xsl:attribute name="totalcount"><xsl:value-of
				select="@numberOfRecordsMatched" /></xsl:attribute>
			<xsl:attribute name="success">true</xsl:attribute>
			<xsl:apply-templates select="./gmd:MD_Metadata" />
		</xsl:element>
	</xsl:template>

	<xsl:template match="gmd:MD_Metadata">
	<xsl:element name="item">
	<xsl:element name="id">
		<xsl:value-of select="gmd:fileIdentifier/gco:CharacterString" /></xsl:element>
		<xsl:apply-templates select="./gmd:identificationInfo/gmd:MD_DataIdentification" />
		<xsl:apply-templates select="./gmd:contentInfo"></xsl:apply-templates>
		<xsl:apply-templates select="./gmd:distributionInfo//gmd:transferOptions"></xsl:apply-templates>
	</xsl:element>
	</xsl:template>

	<xsl:template match="gmd:MD_DataIdentification">
		<xsl:element name="title"><xsl:value-of select="./gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString" /></xsl:element>
		<xsl:element name="summary"><xsl:value-of select="./gmd:abstract/gco:CharacterString" /></xsl:element>
		<xsl:element name="institution"><xsl:value-of select="./gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString" /></xsl:element>
		<xsl:element name="creator_url"><xsl:value-of select="./gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL" /></xsl:element>
		<xsl:element name="data_type"><xsl:value-of select="./gmd:spatialRepresentationType/gmd:MD_SpatialRepresentationTypeCode" /></xsl:element>
		<xsl:element name="icos_domain"><xsl:value-of select="./gmd:topicCategory/gmd:MD_TopicCategoryCode" /></xsl:element>
		<xsl:apply-templates select="./gmd:extent/gmd:EX_Extent" />
	</xsl:template>

	<xsl:template match="gmd:EX_Extent">
		<xsl:apply-templates select="./gmd:geographicElement/gmd:EX_GeographicBoundingBox" />
		<xsl:apply-templates select="./gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod" />
	</xsl:template>

	<xsl:template match="gmd:EX_GeographicBoundingBox">
		<xsl:variable name="norte" select="./gmd:northBoundLatitude/gco:Decimal" />
		<xsl:variable name="sur" select="./gmd:southBoundLatitude/gco:Decimal" /><commit_msg>Modified response2client.xsl to transform GetRecordById response<commit_after><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:gmd="http://www.isotc211.org/2005/gmd"
	xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opengis.net/gml"
	xmlns:geonet="http://www.fao.org/geonetwork" xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

	<xsl:template match="csw:GetRecordsResponse/csw:SearchResults">
		<xsl:element name="response">
			<xsl:attribute name="totalcount"><xsl:value-of
				select="@numberOfRecordsMatched" /></xsl:attribute>
			<xsl:attribute name="success">true</xsl:attribute>
			<xsl:apply-templates select="./gmd:MD_Metadata" />
		</xsl:element>
	</xsl:template>
	
	<xsl:template match="csw:GetRecordByIdResponse">
        <xsl:element name="response">
            <!-- <xsl:attribute name="totalcount"><xsl:value-of
                select="@numberOfRecordsMatched" /></xsl:attribute> -->
            <xsl:attribute name="success">true</xsl:attribute>
            <xsl:apply-templates select="./gmd:MD_Metadata" />
        </xsl:element>
    </xsl:template>

	<xsl:template match="gmd:MD_Metadata">
	<xsl:element name="item">
	<xsl:element name="id">
		<xsl:value-of select="gmd:fileIdentifier/gco:CharacterString" /></xsl:element>
		<xsl:apply-templates select="./gmd:identificationInfo/gmd:MD_DataIdentification" />
		<xsl:apply-templates select="./gmd:contentInfo"></xsl:apply-templates>
		<xsl:apply-templates select="./gmd:distributionInfo//gmd:transferOptions"></xsl:apply-templates>
	</xsl:element>
	</xsl:template>

	<xsl:template match="gmd:MD_DataIdentification">
		<xsl:element name="title"><xsl:value-of select="./gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString" /></xsl:element>
		<xsl:element name="summary"><xsl:value-of select="./gmd:abstract/gco:CharacterString" /></xsl:element>
		<xsl:element name="institution"><xsl:value-of select="./gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString" /></xsl:element>
		<xsl:element name="creator_url"><xsl:value-of select="./gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL" /></xsl:element>
		<xsl:element name="data_type"><xsl:value-of select="./gmd:spatialRepresentationType/gmd:MD_SpatialRepresentationTypeCode" /></xsl:element>
		<xsl:element name="icos_domain"><xsl:value-of select="./gmd:topicCategory/gmd:MD_TopicCategoryCode" /></xsl:element>
		<xsl:apply-templates select="./gmd:extent/gmd:EX_Extent" />
	</xsl:template>

	<xsl:template match="gmd:EX_Extent">
		<xsl:apply-templates select="./gmd:geographicElement/gmd:EX_GeographicBoundingBox" />
		<xsl:apply-templates select="./gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod" />
	</xsl:template>

	<xsl:template match="gmd:EX_GeographicBoundingBox">
		<xsl:variable name="norte" select="./gmd:northBoundLatitude/gco:Decimal" />
		<xsl:variable name="sur" select="./gmd:southBoundLatitude/gco:Decimal" />
{'fraction_non_alphanumeric': 0.18615951742627346, 'fraction_numerical': 0.01089142091152815, 'mean_word_length': 6.9269588313413015, 'pattern_counts': {'":': 0, '<': 118, '<?xml version=': 2, '>': 118, 'https://': 0, 'lorem ipsum': 0, 'www.': 14, 'xml': 16}, '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': '248197', 'n_tokens_mistral': 2406, 'n_tokens_neox': 2126, 'n_words': 193}