<?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output indent="yes"/>
	<xsl:template match="/">
		<JiwaDocument>
			<OrderNo>
				<xsl:value-of select="salesorder/custinfo/ponum"/>
			</OrderNo>
			<EDIDeliverNotBeforeDate>
				<xsl:value-of select="salesorder/custinfo/notbefore"/>
			</EDIDeliverNotBeforeDate>
			<EDIDeliverNotAfterDate>
				<xsl:value-of select="salesorder/custinfo/notafter"/>
			</EDIDeliverNotAfterDate>
			<DeliveryAddressNotes>
				<xsl:value-of select="salesorder/custinfo/comments"/>
			</DeliveryAddressNotes>
			<Debtor>
				<AccountNo>
					<xsl:value-of select="salesorder/custinfo/billto"/>
				</AccountNo>
			</Debtor>
			<Lines>
				<xsl:for-each select="salesorder/iteminfo">
					<xsl:variable name="itemcode" select="itemcode"/>
					<Line>
						<PartNo>
							<xsl:value-of select="document('file:///c:/bug/danny/LookupInventory.XML')/Inventory/row[@Aux2 = $itemcode]/@Partno"/>
						</PartNo>
						<QuantityOrdered>
							<xsl:value-of select="qtyreqd"/>
						</QuantityOrdered>
					</Line>
				</xsl:for-each>
			</Lines>
		</JiwaDocument>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2009. Progress Software Corporation. All rights reserved.

<metaInformation>
	<scenarios>
		<scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="SourceSample.xml" htmlbaseurl="" outputurl="" processortype="msxml" useresolver="no" profilemode="0" profiledepth="" profilelength="" urlprofilexml=""
		          commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
	</scenarios>
	<MapperMetaTag>
		<MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="TargetSalesOrder.xsd" destSchemaRoot="JiwaDocument" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no">
			<SourceSchema srcSchemaPath="SourceSample.xml" srcSchemaRoot="salesorder" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/>
			<SourceSchema srcSchemaPath="LookupInventory.XML" srcSchemaRoot="Inventory" AssociatedInstance="file:///c:/bug/danny/LookupInventory.XML" loaderFunction="document" loaderFunctionUsesURI="no"/>
		</MapperInfo>
		<MapperBlockPosition>
			<template match="/">
				<block path="JiwaDocument/Lines/xsl:for-each" x="103" y="209"/>
			</template>
		</MapperBlockPosition>
		<TemplateContext></TemplateContext>
		<MapperFilter side="source"></MapperFilter>
	</MapperMetaTag>
</metaInformation>
-->