<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output method="xml" indent="yes"/>
	<xsl:include href="Split.xsl"/>
	<!-- Template for root rule -->
	<xsl:template match="/">
		<employees>
			<xsl:apply-templates/>
		</employees>
	</xsl:template>
	<xsl:template match="employees">
		<xsl:for-each select="employee">
			<employee>
				<xsl:copy-of select="employeename"/>
				<xsl:copy-of select="department"/>
				<!-- Call the template that will trim off right spaces (recursively, of course ) -->
				<computerlanguages>
					<xsl:call-template name="Split">
						<xsl:with-param name="strInput" select="computerlanguages"/>
						<xsl:with-param name="strDelimiter" select="','"/>
					</xsl:call-template>
				</computerlanguages>
			</employee>
		</xsl:for-each>
	</xsl:template>
</xsl:stylesheet>
