<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns="http://www.fgdc.gov/framework/gc" xmlns:saxon="http://icl.com/saxon">
	<xsl:output method="xml" standalone="yes" omit-xml-declaration="no" encoding="ISO-8859-1"/>
	<xsl:param name="list"/>
	<xsl:param name="first"/>
	<xsl:template match="/">
		<ControlPoints xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns="http://www.fgdc.gov/framework/gc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
		http://www.fgdc.gov/framework/geodeticControl http://maps.sco.wisc.edu/cgi-bin/fullwfs3.pl?service=wfs&amp;version=1.0.0&amp;request=DescribeFeatureType">
			<gml:boundedBy>
				<gml:Envelope>
					<xsl:attribute name="srsName"><xsl:value-of select="gc:msFeatureCollection/gml:boundedBy/gml:Envelope/@srsName"/></xsl:attribute>
					<xsl:apply-templates select="gc:msFeatureCollection/gml:boundedBy/gml:Envelope/gml:pos"/>
				</gml:Envelope>
			</gml:boundedBy>
			<xsl:for-each select="gc:msFeatureCollection/gml:featureMember">
				<ControlPoint>
					<gml:boundedBy>
						<gml:Envelope>
							<xsl:attribute name="srsName"><xsl:value-of select="gc:ngs/gml:boundedBy/gml:Envelope/@srsName"/></xsl:attribute>
							<gml:lowerCorner>
								<xsl:value-of select="gc:ngs/gml:boundedBy/gml:Envelope/gml:pos"/>
							</gml:lowerCorner>
							<gml:upperCorner>
								<xsl:value-of select="gc:ngs/gml:boundedBy/gml:Envelope/gml:pos"/>
							</gml:upperCorner>
						</gml:Envelope>
					</gml:boundedBy>
					<uniqueID>
						<identifier>
							<xsl:value-of select="gc:ngs/gc:contribpid"/>
						</identifier>
						<idAuthority>
							<xsl:value-of select="gc:ngs/gc:category"/>
						</idAuthority>
						<description>
							<xsl:value-of select="gc:ngs/gc:contribpname"/>
						</description>
					</uniqueID>
					<horizontalPosition>
						<gml:Point>
							<xsl:attribute name="srsName"><xsl:value-of select="gc:ngs/gc:lldatum"/></xsl:attribute>
							<gml:pos>
								<xsl:value-of select="gc:ngs/gc:displaylat"/>
								<xsl:text> </xsl:text>
								<xsl:value-of select="gc:ngs/gc:displaylong"/>
							</gml:pos>
						</gml:Point>
					</horizontalPosition>
					<localHorizontalAccuracy>
						<DQ_Element>
							<nameOfMeasure/>
							<measureIdentification/>
							<measureDescription/>
							<evaluationMethodType/>
							<evaluationMethodDescription/>
							<evaluationProcedure/>
							<dateTime/>
							<result/>
						</DQ_Element>
					</localHorizontalAccuracy>
					<networkHorizontalAccuracy>
						<DQ_Element>
							<nameOfMeasure/>
							<measureIdentification/>
							<measureDescription/>
							<evaluationMethodType/>
							<evaluationMethodDescription/>
							<evaluationProcedure/>
							<dateTime/>
							<result/>
						</DQ_Element>
					</networkHorizontalAccuracy>
					<horizontalReferenceSystem>
						<projection>
							<code/>
							<codespace/>
							<version/>
						</projection>
						<ellipsoid>
							<code/>
							<codespace/>
							<version/>
						</ellipsoid>
						<datum>
							<code>
								<xsl:value-of select="gc:ngs/gc:lldatum"/>
							</code>
						</datum>
					</horizontalReferenceSystem>
					<link>
						<url>
							<xsl:value-of select="gc:ngs/gc:url"/>
						</url>
					</link>
					<xsl:apply-templates select="gc:ngs/gc:orthoheight"/>
					<xsl:apply-templates select="gc:ngs/gc:ellipheight"/>
				</ControlPoint>
			</xsl:for-each>
		</ControlPoints>
	</xsl:template>
	<xsl:template match="gc:msFeatureCollection/gml:boundedBy/gml:Envelope/gml:pos">
		<gml:pos>
			<xsl:value-of select="."/>
		</gml:pos>
		<xsl:if test="not(. = preceding::gc:msFeatureCollection/gml:boundedBy/gml:Envelope/gml:pos)">
			<xsl:copy>
				<xsl:apply-templates select="@*|node()"/>
			</xsl:copy>
		</xsl:if>
	</xsl:template>
	<xsl:template match="@*|node()">
		<xsl:copy>
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	</xsl:template>
	<xsl:template match="gc:ngs/gc:orthoheight">
		<xsl:choose>
			<xsl:when test=". = ''">
    </xsl:when>
			<xsl:otherwise>
				<vertical>
					<height>
						<xsl:attribute name="uom">http://en.wikipedia.org/wiki/Metre
								    </xsl:attribute>
						<xsl:value-of select="."/>
					</height>
					<heightType>orthometric</heightType>
					<localVerticalAccuracy>
						<DQ_Element>
							<nameOfMeasure/>
							<measureIdentification/>
							<measureDescription/>
							<evaluationMethodType/>
							<evaluationMethodDescription/>
							<evaluationProcedure/>
							<dateTime/>
							<result/>
						</DQ_Element>
					</localVerticalAccuracy>
					<networkVerticalAccuracy>
						<DQ_Element>
							<nameOfMeasure/>
							<measureIdentification/>
							<measureDescription/>
							<evaluationMethodType/>
							<evaluationMethodDescription/>
							<evaluationProcedure/>
							<dateTime/>
							<result/>
						</DQ_Element>
					</networkVerticalAccuracy>
					<verticalReferenceSystem>
						<projection>
							<code/>
							<codespace/>
							<version/>
						</projection>
						<ellipsoid>
							<code/>
							<codespace/>
							<version/>
						</ellipsoid>
						<datum>
							<code>NAVD 88</code>
							<version>2003.0</version>
						</datum>
					</verticalReferenceSystem>
				</vertical>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="gc:ngs/gc:ellipheight">
		<xsl:choose>
			<xsl:when test=". = ''">
    </xsl:when>
			<xsl:otherwise>
				<vertical>
					<height>
						<xsl:attribute name="uom">http://en.wikipedia.org/wiki/Metre
								    </xsl:attribute>
						<xsl:value-of select="."/>
					</height>
					<heightType>ellipsoidal</heightType>
					<localVerticalAccuracy>
						<DQ_Element>
							<nameOfMeasure/>
							<measureIdentification/>
							<measureDescription/>
							<evaluationMethodType/>
							<evaluationMethodDescription/>
							<evaluationProcedure/>
							<dateTime/>
							<result/>
						</DQ_Element>
					</localVerticalAccuracy>
					<networkVerticalAccuracy>
						<DQ_Element>
							<nameOfMeasure/>
							<measureIdentification/>
							<measureDescription/>
							<evaluationMethodType/>
							<evaluationMethodDescription/>
							<evaluationProcedure/>
							<dateTime/>
							<result/>
						</DQ_Element>
					</networkVerticalAccuracy>
					<verticalReferenceSystem>
						<projection>
							<code/>
							<codespace/>
							<version/>
						</projection>
						<ellipsoid>
							<code/>
							<codespace/>
							<version/>
						</ellipsoid>
						<datum>
							<code>NAVD 88 </code>
							<version>2003.0</version>
						</datum>
					</verticalReferenceSystem>
				</vertical>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet>
<!-- Stylus Studio meta-information - (c) 2004-2005. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="no" externalpreview="no" url="file:///c:/Documents and Settings/jpchapiewsky/Desktop/test.xml" htmlbaseurl="" outputurl="" processortype="internal" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no" ><SourceSchema srcSchemaPath="..\..\..\Documents and Settings\jpchapiewsky\Desktop\test.xml" srcSchemaRoot="FeatureCollection" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/></MapperInfo><MapperBlockPosition><template match="/"><block path="ControlPoints/gml:featureMember/xsl:for&#x2D;each" x="328" y="192"/></template></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->
