<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" ><xsl:output method="html" indent="yes"/>
<xsl:include href="TrimL.xsl" />


<xsl:include href="Style1.xsl" />



<!-- Template for root rule -->
<xsl:template match="/">
	<!-- Set Formatting Characteristics -->
	<xsl:call-template name="Style1"/>
	<xsl:apply-templates/>
</xsl:template>


<xsl:template match="employees">
	<h1>Employee listing with leading spaces removed.</h1>
	<h2>view source code of this page to see...</h2>

	<!-- Table Header Creation -->
	<table border="1">
	<tr>
	<th>Name</th>
	<th>Department</th>
	<th>Name(trimmed)</th>
	<th>Department(trimmed)</th>
	</tr>

	
	<xsl:for-each select="employee">
		<tr>			
			<td><xsl:value-of select="employeename" /></td>
			<td><xsl:value-of select="department" /></td>

			<td> <!-- Call the template that will trim off right spaces (recursively, of course ) -->
			<xsl:call-template name="TrimL" >
				<xsl:with-param name="strInput" select="employeename"/>
			</xsl:call-template>
			</td>
			
			<td> <!-- Call the template that will trim off right spaces (recursively, of course ) -->
			<xsl:call-template name="TrimL" >
				<xsl:with-param name="strInput" select="department"/>
			</xsl:call-template>
			</td>

		</tr>
	</xsl:for-each>




	<!-- End of Table -->
	</table>

</xsl:template>






</xsl:stylesheet>

