View stylesheet

XML schemas http://dd.sdr.edw.ro/GetSchema?id=TBL7212
Output type TEXT
Description CSV file
XSL file sdr-lakes-station-csv2.xsl (Last modified: 20 Apr 2011 10:04 )
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dd715="http://dd.sdr.edw.ro/namespace.jsp?ns_id=715" xmlns:dd716="http://dd.sdr.edw.ro/namespace.jsp?ns_id=716">
	<xsl:output method="text"/>
	<xsl:template match="/">
		<xsl:apply-templates select="dd715:StationsLakes/dd715:Row"/>
	</xsl:template>

	<xsl:template match="dd715:StationsLakes/dd715:Row">
		<xsl:if test="position()=1">
			<xsl:call-template name="header"/>
		</xsl:if>
		<xsl:for-each select="*">
			<xsl:value-of select="."/>
			<xsl:if test="position() != last()">,</xsl:if>
		</xsl:for-each>
		<xsl:text>&#10;</xsl:text>
	</xsl:template>

	<xsl:template name="header">
		<xsl:for-each select="*">
			<xsl:value-of select="local-name()"/>
			<xsl:if test="position() != last()">,</xsl:if>
		</xsl:for-each>
		<xsl:text>&#10;</xsl:text>
	</xsl:template>
</xsl:stylesheet>