<?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" encoding="ISO-8859-1"/>
	<xsl:template match="/">
		<bex:DocumentEnvelope xmlns:bex="urn:schemas-bex-biz:DocumentEnvelope-v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
			<bex:DocumentHeader>
				<bex:DocumentFrom>0000078810</bex:DocumentFrom>
				<bex:DocumentTo>152</bex:DocumentTo>
				<bex:DocumentService>beX</bex:DocumentService>
				<bex:DocumentId>
					<xsl:value-of select="concat('0000078810',root/Region1/Filhdr/time_stamp)"/>
				</bex:DocumentId>
				<bex:DocumentTime>
					<xsl:value-of select="root/Region1/Filhdr/time_stamp"/>
				</bex:DocumentTime>
				<bex:DocumentType>INVOICE</bex:DocumentType>
			</bex:DocumentHeader>
			<bex:Documents>
				<xsl:for-each select="root/Region1/Invhdr">
					<Invoice xmlns="urn:schemas-bex-biz:Invoice-v3">
						<InvoiceNumber>
							<xsl:value-of select="invoiceID"/>
						</InvoiceNumber>
						<InvoiceDate>
							<xsl:value-of select="tax_point_dt"/>
						</InvoiceDate>
						<TaxPointDate>
							<xsl:value-of select="tax_point_dt"/>
						</TaxPointDate>
						<xsl:for-each select="../Invlin">
							<InvoiceLine>
								<InvoiceLineNumber>
									<xsl:value-of select="invoice_item"/>
								</InvoiceLineNumber>
								<SuppliersProductCode>
									<xsl:value-of select="material"/>
								</SuppliersProductCode>
							</InvoiceLine>
						</xsl:for-each>
					</Invoice>
				</xsl:for-each>
			</bex:Documents>
			<bex:DocumentTrailer>
				<bex:NumberOfDocuments>
					<xsl:value-of select="root/Region1/Filtlr/invoice_count"/>
				</bex:NumberOfDocuments>
			</bex:DocumentTrailer>
		</bex:DocumentEnvelope>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2005. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="cnv_lilly_bex_invoices.xml" userelativepaths="yes" externalpreview="no" url="cnv_lilly_bex_invoices.xml" htmlbaseurl="" outputurl="upload_beX_lilly_invoice.xml" 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="beX_lilly_invoice.xml" destSchemaRoot="DocumentEnvelope" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no" ><SourceSchema srcSchemaPath="cnv_lilly_bex_invoices.xml" srcSchemaRoot="root" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/></MapperInfo><MapperBlockPosition><template match="/"><block path="bex:DocumentEnvelope/bex:DocumentHeader/bex:DocumentId/xsl:value&#x2D;of" x="163" y="144"/><block path="bex:DocumentEnvelope/bex:Documents/xsl:for&#x2D;each" x="107" y="138"/><block path="bex:DocumentEnvelope/bex:Documents/xsl:for&#x2D;each/Invoice/xsl:for&#x2D;each" x="129" y="151"/></template></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->