<xsl:stylesheet
   version="2.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>


<!--
   Name:  FGDC2mif_edges.xsl
   Author:  Matthew J. McCready
   Date:  20080111
   Description:  The master XSLT stylesheet that directs the transformation of
                  a FGDC input file in the Edges format into a mif file
   Modification History:
      Initial   Date      Change Request ID   Description
      MMC       20070115   N/A                Initial Version (Made as the Vector Profile)
      MMC       20080111   N/A                Coped over form the Vector profile and modified to make an edges profile
                                               mif file. This entailed changing the <xsl:attribute name ="profile_type">
                                               element to "edges". 
-->









   <xsl:import href="01_idinfo.xsl"/>
   <xsl:import href="02_dataqual.xsl"/>
   <xsl:import href="03_spdoinfo.xsl"/>
  <xsl:import href="04_spref.xsl"/>
    <xsl:import href="05_eainfo.xsl"/>
   <xsl:import href="06_distinfo.xsl"/>
  <xsl:import href="07_metainfo.xsl"/>

   <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes"/>

   <xsl:strip-space elements="*"/>

   <xsl:template match="/">
     <xsl:element name="MIF">
     <xsl:attribute name ="profile_type">edgesEnhanced</xsl:attribute>
       <xsl:if test="metadata/idinfo">
         <xsl:call-template name="idinfo" />
       </xsl:if>
      
       <xsl:if test="/metadata/dataqual">
         <xsl:call-template name="dataqual" />
       </xsl:if>
       <xsl:if test="/metadata/spdoinfo">
         <xsl:call-template name="spdoinfo" />
       </xsl:if>
        <xsl:if test="/metadata/spref">
         <xsl:call-template name="spref" />
       </xsl:if>
       <xsl:if test="/metadata/eainfo">
         <xsl:call-template name="eainfo" />
       </xsl:if>
      <xsl:if test="/metadata/distinfo">
         <xsl:call-template name="distinfo" />
       </xsl:if>
      <xsl:if test="/metadata/metainfo">
         <xsl:call-template name="metainfo" />
       </xsl:if>
     </xsl:element>
   </xsl:template>

</xsl:stylesheet>
