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

<!--
   Name: EA_Citation.xsl 
   Author:  Matthew J. McCready
   Date:  20110601
   Description:  XSLT stylesheet that transforms the Metadata_Language from section 7 of the FGDC standard into the gmd:language ISO element.
                 
   Modification History:
      Initial   Date      Change Request ID   Description

-->



<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:gss="http://www.isotc211.org/2005/gss"
xmlns:gss="http://www.isotc211.org/2005/gts"
xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:gfc="http://www.isotc211.org/2005/gfc" 
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:gmx="http://www.isotc211.org/2005/gmx"
xmlns:gsr="http://www.isotc211.org/2005/gsr"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>

<xsl:template name ="EA_Citation">

<xsl:element name="gfc:definitionReference">
<xsl:element name="gfc:FC_DefinitionReference">
<xsl:element name="gfc:definitionSource">
<xsl:element name="gfc:FC_DefinitionSource">
<xsl:element name="gfc:source">
<xsl:element name="gmd:CI_Citation">

<xsl:element name="gmd:title">
<xsl:attribute name="gco:nilReason">inapplicable</xsl:attribute>
</xsl:element>

<xsl:element name="gmd:date">
<xsl:attribute name="gco:nilReason">unknown</xsl:attribute> 
</xsl:element>

<xsl:element name="gmd:citedResponsibleParty">
<xsl:element name="gmd:CI_ResponsibleParty">

<xsl:element name="gmd:organisationName">
<xsl:element name="gco:CharacterString"><xsl:value-of select="/metadata/eainfo/detailed/enttyp/enttypds"/> </xsl:element><!-- gco:CharacterString -->
</xsl:element>

<xsl:element name="gmd:role">
<xsl:element name="gmd:CI_RoleCode">
<xsl:attribute name="codeList">http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode</xsl:attribute>
<xsl:attribute name="codeListValue">resourceProvider</xsl:attribute>
<xsl:attribute name="codeSpace">001</xsl:attribute>
resourceProvider
</xsl:element>
</xsl:element><!-- gmd:role -->

</xsl:element> <!-- gmd:CI_ResponsibleParty -->
</xsl:element> <!-- gmd:citedResponsibleParty --> 

</xsl:element> <!-- gmd:CI_Citation -->
</xsl:element> <!-- gfc:source -->
</xsl:element> <!-- gfc:FC_DefinitionSource -->
</xsl:element> <!-- gfc:definitionSource -->
</xsl:element> <!-- gfc:FC_DefinitionReference -->
</xsl:element> <!-- gfc:definitionReference -->

</xsl:template>
</xsl:stylesheet>
