<?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="../mrf2ea/01_name.xsl"/>
    <xsl:import href="../mrf2ea/02_scope.xsl"/>
    <xsl:import href="../mrf2ea/03_version.xsl"/>
    <xsl:import href="../mrf2ea/04_LanguageCharacterset.xsl"/>
    <xsl:import href="../mrf2ea/05_gmd_contact.xsl"/>
    <xsl:import href="../mrf2ea/06_gfc_featureType.xsl"/>


    <xd:doc scope="stylesheet">
        <xd:desc>
            <xd:p><xd:b>Created on:</xd:b> Dec 17, 2013</xd:p>
            <xd:p><xd:b>Author:</xd:b> matt</xd:p>
            <xd:p>List of stylesheets and templates Template Stylesheet </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:if test="/MRF/Entity_and_Attribute_Information[1]/Detailed_Description[1]">
            <xsl:element name="gfc:FC_FeatureCatalogue">
                
                <!-- inserts the xlinx namspace -->
                <xsl:copy-of select="document('')/*/namespace::*[name()='gmx']"/>
                <!-- inserts the gco namespace -->
                <xsl:copy-of select="document('')/*/namespace::*[name()='gco']"/>
                <!-- inserts the gmd namespace -->
                <xsl:copy-of select="document('')/*/namespace::*[name()='gmd']"/>
                <!-- inserts the xlinx namspace -->
                <xsl:copy-of select="document('')/*/namespace::*[name()='xlink']"/>
                <!-- inserts the gml namespace -->
                <xsl:copy-of select="document('')/*/namespace::*[name()='gml']"/>
                
                <xsl:call-template name="gmxName"/>
                <xsl:call-template name="gmxscope"/>
                <xsl:call-template name="gmxversion"/>
                <xsl:call-template name="gmxlanguage"/>
                <xsl:call-template name="gmxcharacterSet"/>
                <xsl:call-template name="contact"/>
                <xsl:call-template name="gfc_featureType"/>
            </xsl:element>
        </xsl:if>
    </xsl:template>
</xsl:stylesheet>
