<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" encoding="UTF-8" indent="yes"/>

	<xsl:template match="/">
		<transactions>
			<xsl:apply-templates select="root/order"/>
		</transactions>
	</xsl:template>

	<xsl:template match="order">
		<order>
			<xsl:apply-templates select="following-sibling::customer[1]"/>
			<xsl:if test="following-sibling::adsl[1]/preceding-sibling::order[1] = .">
				<xsl:apply-templates select="following-sibling::adsl[1]"/>
			</xsl:if>
			<xsl:if test="following-sibling::mobile[1]/preceding-sibling::order[1] = .">
				<xsl:apply-templates select="following-sibling::mobile[1]"/>
			</xsl:if>
			<xsl:if test="following-sibling::voip[1]/preceding-sibling::order[1] = .">
				<xsl:apply-templates select="following-sibling::voip[1]"/>
			</xsl:if>
		</order>
	</xsl:template>

	<xsl:template match="field"/>
	<xsl:template match="text()">
		<xsl:if test="normalize-space(.) != ''"><xsl:value-of select="."></xsl:value-of></xsl:if>
	</xsl:template>
	<xsl:template match="*">
		<xsl:copy>
			<xsl:apply-templates select="node()"/>
		</xsl:copy>
	</xsl:template>

</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="adapter:./martin.conv?martin.csv" htmlbaseurl="" outputurl="" processortype="internal" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no" ><SourceSchema srcSchemaPath="adapter:./martin.conv?martin.csv" srcSchemaRoot="root" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/></MapperInfo><MapperBlockPosition><template match="/"></template><template match="Order"></template></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->