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


<!--
   Name:  03_spdoinfo.xsl
   Author:  Matthew J. McCready
   Date:  20070115
   Description:  XSLT stylesheet that transforms Section 3 of an
                 FGDC format file into a mif file
   Modification History:
      Initial   Date      Change Request ID   Description
      MMC       20070115   N/A                Initial Version
-->











<xsl:stylesheet version = "1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes"/>

<xsl:template name="spdoinfo" match="/">

<xsl:if test="//spdoinfo" >

<xsl:element name="Indirect_Spatial_Reference"> <!-- mif name -->
<xsl:apply-templates select="//spdoinfo/indspref"/> <!-- FGDC path -->
</xsl:element>

<xsl:element name="Direct_Spatial_Reference_Method"> <!-- mif name -->
<xsl:apply-templates select="//spdoinfo/direct"/> <!-- FGDC path -->
</xsl:element>

 <xsl:for-each select="//spdoinfo/ptvctinf/sdtsterm">

<xsl:element name="SDTS_Point_and_Vector_Object_Type"> <!-- mif name -->
<xsl:attribute name ="gid1">1</xsl:attribute>
<xsl:apply-templates select="sdtstype"/> <!-- FGDC path -->
</xsl:element>

<xsl:if test="ptvctcnt">
<xsl:element name="Point_and_Vector_Object_Count"> <!-- mif name -->
<xsl:attribute name ="gid1">1</xsl:attribute>
<xsl:apply-templates select="ptvctcnt"/> <!-- FGDC path -->
</xsl:element>
</xsl:if>

</xsl:for-each>


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