<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>

<!-- Map Viewer (Third Edition) by Howie Sternberg at howies@snet.net. Map Viewer is placed in the public domain and is "Freeware". Map Viewer may be freely used and redistributed, is provided "AS-IS" without warranty of any kind, and there is no technical support provided. --> 

<!-- Return delimeted string of default map tool and map option. See mapviewer.xml. Delimeter is vertical bar: | -->
<xsl:template match="/">
	<xsl:apply-templates select="mapviewer/viewer/maptool"/>
	<xsl:apply-templates select="mapviewer/viewer/mapoption"/>		
</xsl:template>

<xsl:template match="mapviewer/viewer/maptool">
	<xsl:variable name="mTool">
		<xsl:choose>
		<xsl:when test="@default">
			<xsl:value-of select="@default"/>
		</xsl:when>
		<xsl:otherwise>
			<xsl:value-of select="zoomin"/>
		</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>						
	<xsl:value-of select="$mTool"/>
	<text>|</text>
</xsl:template>

<xsl:template match="mapviewer/viewer/mapoption">
	<xsl:variable name="mOption">
		<xsl:choose>
		<xsl:when test="@default">
			<xsl:value-of select="@default"/>
		</xsl:when>
		<xsl:otherwise>
			<xsl:value-of select="none"/>
		</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>						
	<xsl:value-of select="$mOption"/>
</xsl:template>
	
</xsl:stylesheet>