<?xml version='1.0' ?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
	
	<!-- make things somewhat pretty -->
	<xsl:output indent = 'yes'/>

	<!-- match the root -->
	<xsl:template match='/'>
		<markers>
			<xsl:for-each select='//water'>
				<marker>
					<xsl:attribute name='lat'><xsl:value-of select='name/@lat'/></xsl:attribute>
					<xsl:attribute name='lng'><xsl:value-of select='name/@lng'/></xsl:attribute>
					<xsl:attribute name='html'>&lt;table width='180'&gt;&lt;tr valign='top'&gt;&lt;td&gt;&lt;img src='http://www.infomotions.com/water/thumbnails/<xsl:value-of select='substring-before(./name, " ")' />-<xsl:value-of select='name/@water_id'/>.jpg' height='80' align='left' width='60'&gt;&lt;/td&gt;&lt;td&gt;&lt;a href='http://www.infomotions.com/water/index.xml?cmd=getwater&amp;id=<xsl:value-of select='name/@water_id'/>'&gt;<xsl:value-of select='name'/>&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</xsl:attribute>
				</marker>
			</xsl:for-each>
		</markers>
	</xsl:template>

</xsl:stylesheet>
