<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd"
    xmlns:gmi="http://www.isotc211.org/2005/gmi" xmlns:gmx="http://www.isotc211.org/2005/gmx"
    xmlns:gsr="http://www.isotc211.org/2005/gsr" xmlns:gss="http://www.isotc211.org/2005/gss"
    xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:gml="http://www.opengis.net/gml/3.2"
    xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:gfc="http://www.isotc211.org/2005/gfc" xmlns:vmf="http://www.altova.com/MapForce/UDF/vmf"
    xmlns:fn="http://www.w3.org/2005/xpath-functions"
    xmlns:grp="http://www.altova.com/Mapforce/grouping"
    xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
    exclude-result-prefixes="fn grp vmf xs xsi xsl xd" xmlns="http://www.isotc211.org/2005/gmi">
    
    <xsl:import href="../mrf2ISO/01_gmd_fileIdentifier.xsl"/>
    <xsl:import href="../mrf2ISO/02_gmd_language.xsl"/>
    <xsl:import href="../mrf2ISO/03_gmd_characterSet.xsl"/>
    <xsl:import href="../mrf2ISO/03B_gmd_parentIdentifier.xsl"/>
    <xsl:import href="../mrf2ISO/04_gmd_hierarchySet.xsl"/>
    <xsl:import href="../mrf2ISO/05_gmd_contact.xsl"/>
    <xsl:import href="../mrf2ISO/06_gmd_dateStamp.xsl"/>
    <xsl:import href="../mrf2ISO/07_gmd_metadataStandardName.xsl"/>
    <xsl:import href="../mrf2ISO/08_gmd_dataSetURI.xsl"/>
    <xsl:import href="../mrf2ISO/09_gmd_spatialRepresentationInfo.xsl"/>
    <xsl:import href="../mrf2ISO/10_gmd_referenceSystemInfo.xsl"/>
    <xsl:import href="../mrf2ISO/11_gmd_identificationInfo.xsl"/>
    <xsl:import href="../mrf2ISO/12_gmd_contentInfo.xsl"/>
    <xsl:import href="../mrf2ISO/13_gmd_distributionInfo.xsl"/>
    <xsl:import href="../mrf2ISO/14_gmd_dataQualityInfo.xsl"/>
    <xsl:import href="../mrf2ISO/15_metadataMaintenance.xsl"/>
    
    <xd:doc scope="stylesheet">
        <xd:desc>
            <xd:p><xd:b>Created on:</xd:b> Jan 7, 2014</xd:p>
            <xd:p><xd:b>Author:</xd:b> matt</xd:p>
            <xd:p>
            Initial   Date      Change Request ID   Description
            MMC      1/8/2014                       Modified to work on the MRF Format 
            </xd:p>
        </xd:desc>
    </xd:doc>
    
    <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes"/>
    
    <xsl:strip-space elements="*"/>
    
    <xsl:template match="/">
        <xsl:element name="gmi:MI_Metadata">
            <xsl:call-template name="gmdfileIdentifier"/>
            <xsl:call-template name="gmdLanguage"/>
            <xsl:call-template name="gmd_characterSet"/>
            <xsl:call-template name="parentIdentifier"/>
            <xsl:call-template name="hierarchySet"/>
            <xsl:call-template name="contact"/>
            <xsl:call-template name="dateStamp"/>
            <xsl:call-template name="StandardName"/>
            <xsl:call-template name="dataSetURI"/>
            <xsl:call-template name="spatialRepresentationInfo"/>
            <xsl:call-template name="referenceSystemInfo"/>
            <xsl:call-template name="identificationInfo"/>
            <xsl:call-template name="contentInfo"/>
            <xsl:call-template name="distributionInfo"/>
            <xsl:call-template name="dataQualityInfo"/>
            <xsl:call-template name="metadataMaintenance"/>
           
        </xsl:element>
    </xsl:template>
</xsl:stylesheet>