View stylesheet

XML schema http://dd.eionet.europa.eu/schemas/WFD2016/GML_SurfaceWaterBodyCentreline_2016.xsd
Output type HTML
Description HTML table
XSL file SurfaceWaterBodyCentreLine.xslt (Last modified: 01 May 2016 21:25 )
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wfdgml="http://dd.eionet.europa.eu/schemas/WFD2016/wfdgml" version="2.0">
	<xsl:output method="html" indent="yes"/>
	<xsl:template match="/">
		<html>
			<head>
				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
				<title>SurfaceWaterBodyCentreline</title>
			</head>
			<body>
				<h1>SurfaceWaterBodyCentreline</h1>
				<table border="1" style="border-collapse:collapse;">
					<xsl:apply-templates select="wfdgml:FeatureCollection/wfdgml:featureMember/wfdgml:SurfaceWaterBodyCentreline"/>
				</table>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="wfdgml:FeatureCollection/wfdgml:featureMember/wfdgml:SurfaceWaterBodyCentreline">
		<xsl:if test="position()=1">
			<xsl:call-template name="header"/>
		</xsl:if>
		<tr>
			<td>
			<xsl:choose>
			    <xsl:when test="wfdgml:thematicIdIdentifierScheme != ''">
			        <a target="_blank" href="{concat('http://dd.eionet.europa.eu/vocabularyconcept/wise/WaterBody/', wfdgml:thematicIdIdentifierScheme, '.', wfdgml:thematicIdIdentifier)}"><xsl:value-of select="wfdgml:thematicIdIdentifierScheme"/>.<xsl:value-of select="wfdgml:thematicIdIdentifier"/></a>
				</xsl:when>
			</xsl:choose>
			</td>		
			
			<td><xsl:value-of select="wfdgml:hydroIdLocalId"/></td>	
			<td><xsl:value-of select="wfdgml:hydroIdNamespace"/></td>	
			<td><xsl:value-of select="wfdgml:geographicalNameText"/></td>	
			<td><xsl:value-of select="wfdgml:geographicalNameLanguage"/></td>	
			<td><xsl:value-of select="wfdgml:continua"/></td>	
			
		</tr>
	</xsl:template>
	<xsl:template name="header">
		<tr>
			<th>thematicIdIdentifier</th>
			<th>hydroIdLocalId</th>
			<th>hydroIdNamespace</th>
			<th>geographicalNameText</th>		
			<th>geographicalNameLanguage</th>
			<th>continua</th>			
		</tr>
	</xsl:template>
</xsl:stylesheet>