<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<!--Apply templates - these will be in order of the original XML document. -->
		<xsl:apply-templates/>

		<!--Apply templates in order. Note: this takes longer to process. -->
		<!--
		<xsl:apply-templates select="delta"></xsl:apply-templates>
		<xsl:apply-templates select="delta/candidates"></xsl:apply-templates>
		<xsl:apply-templates select="delta/canvats"></xsl:apply-templates>
		<xsl:apply-templates select="delta/clientorders"></xsl:apply-templates>
		<xsl:apply-templates select="delta/clients"></xsl:apply-templates>
		<xsl:apply-templates select="delta/perminvheaders"></xsl:apply-templates>
		<xsl:apply-templates select="delta/perminvitems"></xsl:apply-templates>
		<xsl:apply-templates select="delta/tsheaders"></xsl:apply-templates>
		<xsl:apply-templates select="delta/tsitems"></xsl:apply-templates>
		-->
	</xsl:template>
	<xsl:template match="candidates">
		<candidates>
			<xsl:apply-templates/>
		</candidates>
	</xsl:template>
	<xsl:template match="candidate">
		<candidate>
			<accname>
				<xsl:value-of select="accname"/>
			</accname>
			<accno>
				<xsl:value-of select="accno"/>
			</accno>
			<address>
				<xsl:value-of select="address"/>
			</address>
			<bankaddr>
				<xsl:value-of select="bankaddr"/>
			</bankaddr>
			<bankcntryid>
				<xsl:value-of select="bankcntryid"/>
			</bankcntryid>
			<bankname>
				<xsl:value-of select="bankname"/>
			</bankname>
			<bankpcode>
				<xsl:value-of select="bankpcode"/>
			</bankpcode>
			<bankref>
				<xsl:value-of select="bankref"/>
			</bankref>
			<bldgsocref>
				<xsl:value-of select="bldgsocref"/>
			</bldgsocref>
			<canfax>
				<xsl:value-of select="canfax"/>
			</canfax>
			<cantel>
				<xsl:value-of select="cantel"/>
			</cantel>
			<chequepayto>
				<xsl:value-of select="chequepayto"/>
			</chequepayto>
			<cmpnyname>
				<xsl:value-of select="cmpnyname"/>
			</cmpnyname>
			<cntryid>
				<xsl:value-of select="cntryid"/>
			</cntryid>
			<crid>
				<xsl:value-of select="crid"/>
			</crid>
			<dob>
				<xsl:value-of select="dob"/>
			</dob>
			<empid>
				<xsl:value-of select="empid"/>
			</empid>
			<firstname>
				<xsl:value-of select="firstname"/>
			</firstname>
			<frq>
				<xsl:value-of select="frq"/>
			</frq>
			<gender>
				<xsl:value-of select="gender"/>
			</gender>
			<iscandvatreg>
				<xsl:value-of select="iscandvatreg"/>
			</iscandvatreg>
			<lastname>
				<xsl:value-of select="lastname"/>
			</lastname>
			<midname>
				<xsl:value-of select="midname"/>
			</midname>
			<nino>
				<xsl:value-of select="nino"/>
			</nino>
			<pmid>
				<xsl:value-of select="pmid"/>
			</pmid>
			<postcode>
				<xsl:value-of select="postcode"/>
			</postcode>
			<sortcode>
				<xsl:value-of select="sortcode"/>
			</sortcode>
			<taxmthd>
				<xsl:value-of select="taxmthd"/>
			</taxmthd>
			<title>
				<xsl:value-of select="title"/>
			</title>
		</candidate>
	</xsl:template>
	<xsl:template match="canvats">
		<xsl:if test="not(/delta/candidates)">
			<!-- use the candidate tag here as canvats are now being processed as if it was a candidate update -->
			<candidates>
				<xsl:apply-templates/>
			</candidates>
		</xsl:if>
	</xsl:template>
	<xsl:template match="canvat">
		<!-- use the candidate tag here as canvats are now being processed as if it was a candidate update -->
		<candidate>
			<companynumber>
				<xsl:value-of select="companynumber"/>
			</companynumber>
			<empid>
				<xsl:value-of select="empid"/>
			</empid>
			<vatnumber>
				<xsl:value-of select="vatnumber"/>
			</vatnumber>
		</candidate>
	</xsl:template>
	<xsl:template match="clientorders">
		<clientorders>
			<xsl:apply-templates/>
		</clientorders>
	</xsl:template>
	<xsl:template match="clientorder">
		<clientorder>
			<orderno>
				<xsl:value-of select="orderno"/>
			</orderno>
			<orderid>
				<xsl:value-of select="orderid"/>
			</orderid>
		</clientorder>
	</xsl:template>
	<xsl:template match="clients">
		<clients>
			<xsl:apply-templates/>
		</clients>
	</xsl:template>
	<xsl:template match="client">
		<client>
			<accntct>
				<xsl:value-of select="accntct"/>
			</accntct>
			<actel>
				<xsl:value-of select="actel"/>
			</actel>
			<acfax>
				<xsl:value-of select="acfax"/>
			</acfax>
			<address>
				<xsl:value-of select="address"/>
			</address>
			<clntname>
				<xsl:value-of select="clntname"/>
			</clntname>
			<cntct>
				<xsl:value-of select="cntct"/>
			</cntct>
			<coregno>
				<xsl:value-of select="coregno"/>
			</coregno>
			<corgid>
				<xsl:value-of select="corgid"/>
			</corgid>
			<creditterms>
				<xsl:value-of select="creditterms"/>
			</creditterms>
			<creditlimit>
				<xsl:value-of select="creditlimit"/>
			</creditlimit>
			<crid>
				<xsl:value-of select="crid"/>
			</crid>
			<erni>
				<xsl:value-of select="erni"/>
			</erni>
			<fax>
				<xsl:value-of select="fax"/>
			</fax>
			<grouptimesheets>
				<xsl:value-of select="grouptimesheets"/>
			</grouptimesheets>
			<invaddress>
				<xsl:value-of select="invaddress"/>
			</invaddress>
			<invclntname>
				<xsl:value-of select="invclntname"/>
			</invclntname>
			<invcu>
				<xsl:value-of select="invcu"/>
			</invcu>
			<invpcode>
				<xsl:value-of select="invpcode"/>
			</invpcode>
			<ltdco>
				<xsl:value-of select="ltdco"/>
			</ltdco>
			<ordreq>
				<xsl:value-of select="ordreq"/>
			</ordreq>
			<sepinv>
				<xsl:value-of select="sepinv"/>
			</sepinv>
			<sitecu>
				<xsl:value-of select="sitecu"/>
			</sitecu>
			<tel>
				<xsl:value-of select="tel"/>
			</tel>
			<vat>
				<xsl:value-of select="vat"/>
			</vat>
			<vatnum>
				<xsl:value-of select="vatnum"/>
			</vatnum>
		</client>
	</xsl:template>
	<xsl:template match="tsheaders">
		<tsheaders>
			<xsl:apply-templates/>
		</tsheaders>
	</xsl:template>
	<xsl:template match="tsheader">
		<tsheader>
			<corgid>
				<xsl:value-of select="corgid"/>
			</corgid>
			<date>
				<xsl:value-of select="date"/>
			</date>
			<description>
				<xsl:value-of select="description"/>
			</description>
			<empid>
				<xsl:value-of select="empid"/>
			</empid>
			<ordid>
				<xsl:value-of select="ordid"/>
			</ordid>
			<tchg>
				<xsl:value-of select="tchg"/>
			</tchg>
			<thrs>
				<xsl:value-of select="thrs"/>
			</thrs>
			<tpay>
				<xsl:value-of select="tpay"/>
			</tpay>
			<tsid>
				<xsl:value-of select="tsid"/>
			</tsid>
		</tsheader>
	</xsl:template>
	<xsl:template match="tsitems">
		<tsitems>
			<xsl:apply-templates/>
		</tsitems>
	</xsl:template>
	<xsl:template match="tsitem">
		<tsitem>
			<crt>
				<xsl:value-of select="crt"/>
			</crt>
			<d1h>
				<xsl:value-of select="d1h"/>
			</d1h>
			<d2h>
				<xsl:value-of select="d2h"/>
			</d2h>
			<d3h>
				<xsl:value-of select="d3h"/>
			</d3h>
			<d4h>
				<xsl:value-of select="d4h"/>
			</d4h>
			<d5h>
				<xsl:value-of select="d5h"/>
			</d5h>
			<d6h>
				<xsl:value-of select="d6h"/>
			</d6h>
			<d7h>
				<xsl:value-of select="d7h"/>
			</d7h>
			<prt>
				<xsl:value-of select="prt"/>
			</prt>
			<ratedesc>
				<xsl:value-of select="ratedesc"/>
			</ratedesc>
			<tchg>
				<xsl:value-of select="tchg"/>
			</tchg>
			<thrs>
				<xsl:value-of select="thrs"/>
			</thrs>
			<tpy>
				<xsl:value-of select="tpy"/>
			</tpy>
			<tsid>
				<xsl:value-of select="tsid"/>
			</tsid>
			<tsitm>
				<xsl:value-of select="tsitm"/>
			</tsitm>
		</tsitem>
	</xsl:template>
	<xsl:template match="perminvheaders">
		<perminvheaders>
			<xsl:apply-templates/>
		</perminvheaders>
	</xsl:template>
	<xsl:template match="perminvheader">
		<perminvheader>
			<corgid>
				<xsl:value-of select="corgid"/>
			</corgid>
			<date>
				<xsl:value-of select="date"/>
			</date>
			<ordid>
				<xsl:value-of select="ordid"/>
			</ordid>
			<perminvid>
				<xsl:value-of select="perminvid"/>
			</perminvid>
			<time>
				<xsl:value-of select="time"/>
			</time>
			<total>
				<xsl:value-of select="total"/>
			</total>
		</perminvheader>
	</xsl:template>
	<xsl:template match="perminvitems">
		<perminvitems>
			<xsl:apply-templates/>
		</perminvitems>
	</xsl:template>
	<xsl:template match="perminvitem">
		<perminvitem>
			<charge>
				<xsl:value-of select="charge"/>
			</charge>
			<description>
				<xsl:value-of select="description"/>
			</description>
			<empid>
				<xsl:value-of select="empid"/>
			</empid>
			<percentcharge>
				<xsl:value-of select="percentcharge"/>
			</percentcharge>
			<perminv>
				<xsl:value-of select="perminv"/>
			</perminv>
			<perminvoiceitems>
				<xsl:value-of select="perminvoiceitems"/>
			</perminvoiceitems>
			<salary>
				<xsl:value-of select="salary"/>
			</salary>
			<startdate>
				<xsl:value-of select="startdate"/>
			</startdate>
		</perminvitem>
	</xsl:template>
	<xsl:template match="delta">
		<delta>
			<xsl:apply-templates/>
		</delta>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2004. Sonic Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="lsm.xml" htmlbaseurl="" outputurl="tester.xml" processortype="internal" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="DeltaXML_20051013.xml" destSchemaRoot="delta" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no" ><SourceSchema srcSchemaPath="lsm.xml" srcSchemaRoot="delta" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/></MapperInfo><MapperBlockPosition><template match="/"><block path="xsl:apply&#x2D;templates" x="247" y="0"/><block path="xsl:apply&#x2D;templates[1]" x="287" y="0"/><block path="xsl:apply&#x2D;templates[2]" x="207" y="0"/><block path="xsl:apply&#x2D;templates[3]" x="167" y="0"/><block path="xsl:apply&#x2D;templates[4]" x="127" y="0"/><block path="xsl:apply&#x2D;templates[5]" x="87" y="0"/><block path="xsl:apply&#x2D;templates[6]" x="47" y="0"/><block path="xsl:apply&#x2D;templates[7]" x="247" y="0"/><block path="xsl:apply&#x2D;templates[8]" x="247" y="0"/></template><template match="candidates"><block path="candidates/xsl:apply&#x2D;templates" x="247" y="72"/></template><template match="canvats"><block path="xsl:if" x="287" y="73"/><block path="xsl:if/candidates/xsl:apply&#x2D;templates" x="247" y="72"/></template><template match="clientorders"><block path="clientorders/xsl:apply&#x2D;templates" x="247" y="19"/></template><template match="clientorder"></template><template match="client"></template><template match="tsitems"></template><template match="tsheader"></template><template match="tsheaders"></template><template match="clients"></template><template match="canvat"></template><template match="candidate"></template><template match="accname"></template><template match="perminvitems"></template><template match="perminvitem"></template><template match="perminvheader"></template><template match="perminvheaders"></template><template match="tsitem"></template></MapperBlockPosition></MapperMetaTag>
</metaInformation>
-->