<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes">
<xsl:template match="/">

		<Budget_History_struct>
			<xsl:for-each select="leb_connect/Budget">
			 
			<Budget_history>
			
 

					

					<xsl:variable name="mtrNumber" select="Matter/@mtrNumber"/>
					<xsl:variable name="editTimestamp" select="EditHistoryList/EditHistory/@editTimestamp"/>
					<xsl:variable name="editDescription" select="EditHistoryList/EditHistory/@editDescription"/>
					<xsl:for-each select="EditHistoryList/EditHistory/User">
						<xsl:element name="User">
						    
							<xsl:variable name="employeeID" select="@employeeID"/>
							<xsl:variable name="firstName" select="@firstName"/>
							<xsl:variable name="middleName" select="@middleName"/>
							<xsl:variable name="lastName" select="@lastName"/>
							<xsl:variable name="userName" select="@userName"/>
							<xsl:variable name="activeDate" select="@activeDate"/>
														<xsl:attribute name="clientBudgetID"><xsl:value-of select="translate(string str:decode($clientBudgetID), 'left', ' ')"/></xsl:attribute>
							<xsl:attribute name="mtrNumber"><xsl:value-of select="$mtrNumber"/></xsl:attribute>
							<xsl:attribute name="editTimestamp"><xsl:value-of select="$editTimestamp"/></xsl:attribute>
							<xsl:attribute name="editDescription"><xsl:value-of select="$editDescription"/></xsl:attribute>
							<xsl:attribute name="employeeID"><xsl:value-of select="$employeeID"/></xsl:attribute>
							<xsl:attribute name="firstName"><xsl:value-of select="$firstName"/></xsl:attribute>
							<xsl:attribute name="middleName"><xsl:value-of select="$middleName"/></xsl:attribute>
							<xsl:attribute name="lastName"><xsl:value-of select="$lastName"/></xsl:attribute>
							<xsl:attribute name="userName"><xsl:value-of select="$userName"/></xsl:attribute>
							<xsl:attribute name="activeDate"><xsl:value-of select="$activeDate"/></xsl:attribute>
							
							</xsl:element>
					</xsl:for-each>
				</Budget_history>
			</xsl:for-each>
		</Budget_History_struct>
	</xsl:template>
</xsl:stylesheet>