View stylesheet

XML schema http://dd.eionet.europa.eu/schemas/WFD2016/GML_ProtectedArea_2016.xsd
Output type HTML
Description HTML table
XSL file ProtectedArea.xslt (Last modified: 01 May 2016 21:08 )
<?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>ProtectedArea</title>
			</head>
			<body>
				<h1>ProtectedArea</h1>
				<table border="1" style="border-collapse:collapse;">
					<xsl:apply-templates select="wfdgml:FeatureCollection/wfdgml:featureMember/wfdgml:ProtectedArea"/>
				</table>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="wfdgml:FeatureCollection/wfdgml:featureMember/wfdgml:ProtectedArea">
		<xsl:if test="position()=1">
			<xsl:call-template name="header"/>
		</xsl:if>
		<tr>
			<td>
				<xsl:value-of select="wfdgml:inspireIdLocalId"/>
			</td>
			<td><xsl:value-of select="wfdgml:inspireIdNamespace"/></td>
			<td><xsl:value-of select="wfdgml:inspireIdVersionId"/></td>
			<td><a target="_blank" href="{concat('http://dd.eionet.europa.eu/vocabularyconcept/wise/WFDProtectedArea/', wfdgml:thematicIdIdentifierScheme, '.', wfdgml:thematicIdIdentifier)}"><xsl:value-of select="wfdgml:thematicIdIdentifierScheme"/>.<xsl:value-of select="wfdgml:thematicIdIdentifier"/></a></td>
			<td><xsl:value-of select="wfdgml:beginLifespanVersion"/></td>
			<td><xsl:value-of select="wfdgml:endLifespanVersion"/></td>
			<td>
				<xsl:choose>			
					<xsl:when test="wfdgml:predecessorsIdentifier != ''">
		                <xsl:call-template name="tokenizeString">
		                    <xsl:with-param name="list" select="wfdgml:predecessorsIdentifier"/>
		                    <xsl:with-param name="delimiter" select="','"/>
		                    <xsl:with-param name="scheme" select="wfdgml:predecessorsIdentifierScheme"/>
		                </xsl:call-template>
		            </xsl:when>	
				</xsl:choose>		         		
			</td>			
			<td>
				<xsl:choose>			
					<xsl:when test="wfdgml:successorsIdentifier != ''">
		                <xsl:call-template name="tokenizeString">
		                    <xsl:with-param name="list" select="wfdgml:successorsIdentifier"/>
		                    <xsl:with-param name="delimiter" select="','"/>
		                    <xsl:with-param name="scheme" select="wfdgml:successorsIdentifierScheme"/>
		                </xsl:call-template>
		            </xsl:when>	
				</xsl:choose>		            			
			</td>				
			<td><xsl:value-of select="wfdgml:wiseEvolutionType"/></td>	
			<td><xsl:value-of select="wfdgml:nameTextInternational"/></td>	
			<td><xsl:value-of select="wfdgml:nameText"/></td>	
			<td><xsl:value-of select="wfdgml:nameLanguage"/></td>	
			<td><xsl:value-of select="wfdgml:designationPeriodBegin"/></td>
			<td><xsl:value-of select="wfdgml:designationPeriodEnd"/></td>
			<td><xsl:value-of select="wfdgml:zoneType"/></td>
			<td><xsl:value-of select="wfdgml:specialisedZoneType"/></td>	
			<td><xsl:value-of select="wfdgml:legalBasisName"/></td>	
			<td><a target="_blank" href="{wfdgml:legalBasisLink}"><xsl:value-of select="wfdgml:legalBasisLink"/></a></td>
			<td><xsl:value-of select="wfdgml:legalBasisLevel"/></td>	
			<td><xsl:value-of select="wfdgml:sizeValue"/></td>		
			<td><xsl:value-of select="wfdgml:sizeUom"/></td>						
	

		</tr>
	</xsl:template>
	<xsl:template name="header">
		<tr>
			<th>inspireIdLocalId</th>
			<th>inspireIdNamespace</th>
			<th>inspireIdVersionId</th>
			<th>thematicIdIdentifier</th>
			<th>beginLifespanVersion</th>
			<th>endLifespanVersion</th>
			<th>predecessorsIdentifier</th>		
			<th>successorsIdentifier</th>
			<th>wiseEvolutionType</th>
			<th>nameTextInternational</th>	
			<th>nameText</th>
			<th>nameLanguage</th>
			<th>designationPeriodBegin</th>
			<th>designationPeriodEnd</th>
			<th>zoneType</th>
			<th>specialisedZoneType</th>		
			<th>legalBasisName</th>	
			<th>legalBasisLink</th>	
			<th>legalBasisLevel</th>
			<th>sizeValue</th>	
			<th>sizeUom</th>
		</tr>
	</xsl:template>
 	<xsl:template name="tokenizeString">
        <xsl:param name="list"/>
        <xsl:param name="delimiter"/>
        <xsl:param name="scheme"/>
        <xsl:choose>
            <xsl:when test="contains($list, $delimiter)">                
  				<a target="_blank" href="{concat('http://dd.eionet.europa.eu/vocabularyconcept/wise/WFDProtectedArea/', $scheme, '.', substring-before($list,$delimiter))}"><xsl:value-of select="$scheme"/>.<xsl:value-of select="substring-before($list,$delimiter)"/></a>
			    <br/>                 
                <xsl:call-template name="tokenizeString">
                    <xsl:with-param name="list" select="substring-after($list,$delimiter)"/>
                    <xsl:with-param name="delimiter" select="$delimiter"/>
                    <xsl:with-param name="scheme" select="$scheme"/>
                </xsl:call-template>
            </xsl:when>
            <xsl:otherwise>
                <xsl:choose>
                    <xsl:when test="$list = ''">
                        <xsl:text/>
                    </xsl:when>
                    <xsl:otherwise>
						<a target="_blank" href="{concat('http://dd.eionet.europa.eu/vocabularyconcept/wise/WFDProtectedArea/', $scheme, '.', $list)}"><xsl:value-of select="$scheme"/>.<xsl:value-of select="$list"/></a> 			     
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>		
</xsl:stylesheet>