<?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<EANCOM>
			<UNB>
				<UNB01-SyntaxIdentifier>
					<UNB0101-SyntaxIdentifier>
						<xsl:value-of select="root/region/UNB/SYNTAXIDENTIFIER"/>
					</UNB0101-SyntaxIdentifier>
					<UNB0102-SyntaxVersionNumber>
						<xsl:value-of select="root/region/UNB/SYNTAXVERSION"/>
					</UNB0102-SyntaxVersionNumber>
				</UNB01-SyntaxIdentifier>
				<UNB02-InterchangeSender>
					<UNB0201-SenderIdentification>
						<xsl:value-of select="root/region/UNB/LMSEDINO"/>
					</UNB0201-SenderIdentification>
				</UNB02-InterchangeSender>
				<UNB03-InterchangeRecipient>
					<UNB0301-RecipientIdentification>
						<xsl:value-of select="root/region/UNB/CUSTOMEREDINO"/>
					</UNB0301-RecipientIdentification>
				</UNB03-InterchangeRecipient>
				<UNB04-DateTimeOfPreparation>
					<UNB0401-DateOfPreparation>
						<xsl:value-of select="root/region/UNB/DATE"/>
					</UNB0401-DateOfPreparation>
					<UNB0402-TimeOfPreparation>
						<xsl:value-of select="root/region/UNB/TIME"/>
					</UNB0402-TimeOfPreparation>
				</UNB04-DateTimeOfPreparation>
				<UNB05-InterchangeControlReference>
					<xsl:value-of select="root/region/UNB/INTERCHANGEREF"/>
				</UNB05-InterchangeControlReference>
				<UNB06-RecipientsReferencePassword>
					<UNB0601-RecipientsReferencePassword>
						<xsl:value-of select="root/region/UNB/CUSTOMERREF"/>
					</UNB0601-RecipientsReferencePassword>
				</UNB06-RecipientsReferencePassword>
				<UNB07-ApplicationReference>
					<xsl:value-of select="root/region/UNB/APPREF"/>
				</UNB07-ApplicationReference>
			</UNB>
			<QUOTES>
				<UNH>
					<UNH01-MessageReferenceNumber>
						<xsl:value-of select="root/region/UNH/MESSAGEREFNO"/>
					</UNH01-MessageReferenceNumber>
					<UNH02-MessageIdentifier>
						<UNH0201-MessageType>
							<xsl:value-of select="root/region/UNH/MESSAGETYPE"/>
						</UNH0201-MessageType>
						<UNH0202-MessageVersionNumber>
							<xsl:value-of select="root/region/UNH/MESSAGEVERSIONNO"/>
						</UNH0202-MessageVersionNumber>
						<UNH0203-MessageReleaseNumber>
							<xsl:value-of select="root/region/UNH/MESSAGERELEASENO"/>
						</UNH0203-MessageReleaseNumber>
						<UNH0204-ControllingAgency>
							<xsl:value-of select="root/region/UNH/CONTROLLINGAGENCY"/>
						</UNH0204-ControllingAgency>
						<UNH0205-AssociationAssignedCode>
							<xsl:value-of select="root/region/UNH/ASSOCIATIONCODE"/>
						</UNH0205-AssociationAssignedCode>
					</UNH02-MessageIdentifier>
				</UNH>
				<BGM>
					<BGM01-DocumentMessageName>
						<BGM0101-DocumentMessageNameCoded>
							<xsl:value-of select="root/region/BGM/DOCMESSAGENAME"/>
						</BGM0101-DocumentMessageNameCoded>
						<BGM0103-CodeListResponsibleAgencyCoded>
							<xsl:value-of select="root/region/BGM/CODELISTAGENCY"/>
						</BGM0103-CodeListResponsibleAgencyCoded>
					</BGM01-DocumentMessageName>
					<BGM02-DocumentMessageNumber>
						<xsl:value-of select="root/region/BGM/MESSAGENO"/>
					</BGM02-DocumentMessageNumber>
					<BGM03-MessageFunctionCoded>
						<xsl:value-of select="root/region/BGM/MESSAGEFUNCTIONCODED"/>
					</BGM03-MessageFunctionCoded>
				</BGM>
				<DTM>
					<DTM01-DateTimePeriod>
						<DTM0101-DateTimePeriodQualifier>
							<xsl:value-of select="root/region/DTM/DATETIMEPERIODQUALIFIER"/>
						</DTM0101-DateTimePeriodQualifier>
						<DTM0102-DateTimePeriod>
							<xsl:value-of select="root/region/DTM/DATETIMEPERIOD"/>
						</DTM0102-DateTimePeriod>
						<DTM0103-DateTimePeriodFormatQualifier>
							<xsl:value-of select="root/region/DTM/DATETIMEFORMATQUALIFIER"/>
						</DTM0103-DateTimePeriodFormatQualifier>
					</DTM01-DateTimePeriod>
				</DTM>
				<GROUP_1>
					<RFF>
						<RFF01-Reference>
							<RFF0101-ReferenceQualifier>ON</RFF0101-ReferenceQualifier>
							<RFF0102-ReferenceNumber>
								<xsl:value-of select="root/region/RFF/REFERENCENUMBER"/>
							</RFF0102-ReferenceNumber>
						</RFF01-Reference>
					</RFF>
				</GROUP_1>
				<GROUP_4>
					<CUX>
						<CUX01-CurrencyDetails>
							<CUX0101-CurrencyDetailsQualifier>
								<xsl:value-of select="root/region/CUX/CURRENCYDETAILSQUALIFIER"/>
							</CUX0101-CurrencyDetailsQualifier>
							<CUX0102-CurrencyCoded>
								<xsl:value-of select="root/region/CUX/CURRENCYCODED"/>
							</CUX0102-CurrencyCoded>
							<CUX0103-CurrencyQualifier>
								<xsl:value-of select="root/region/CUX/CURRENCYQUALIFIER"/>
							</CUX0103-CurrencyQualifier>
						</CUX01-CurrencyDetails>
					</CUX>
				</GROUP_4>
				<GROUP_11>
					<xsl:for-each select="root/region/NAD">
						<NAD>
							<NAD01-PartyQualifier>
								<xsl:value-of select="PARTYQUALIFIER"/>
							</NAD01-PartyQualifier>
							<NAD02-PartyIdentificationDetails>
								<NAD0201-PartyIdIdentification>
									<xsl:value-of select="PARTYID"/>
								</NAD0201-PartyIdIdentification>
								<NAD0203-CodeListResponsibleAgencyCoded>
									<xsl:value-of select="CODELISTAGENCY"/>
								</NAD0203-CodeListResponsibleAgencyCoded>
							</NAD02-PartyIdentificationDetails>
						</NAD>
					</xsl:for-each>
				</GROUP_11>
				<xsl:for-each select="root/region/DETAIL">
					<GROUP_27>
						<xsl:for-each select=".">
							<LIN>
								<LIN01-LineItemNumber>
									<xsl:value-of select="ITEMNO"/>
								</LIN01-LineItemNumber>
								<LIN03-ItemNumberIdentification>
									<LIN0301-ItemNumber>
										<xsl:value-of select="BARCODE"/>
									</LIN0301-ItemNumber>
									<LIN0302-ItemNumberTypeCoded>EN</LIN0302-ItemNumberTypeCoded>
								</LIN03-ItemNumberIdentification>
							</LIN>
						</xsl:for-each>
						<PIA>
							<PIA01-ProductIdFunctionQualifier>5</PIA01-ProductIdFunctionQualifier>
							<PIA02-ItemNumberIdentification>
								<xsl:value-of select="CTLGNO"/>
							</PIA02-ItemNumberIdentification>
						</PIA>
						<xsl:for-each select=".">
							<IMD>
								<IMD01-ItemDescriptionTypeCoded>L</IMD01-ItemDescriptionTypeCoded>
								<IMD02-ItemCharacteristicCoded>
									<xsl:value-of select="ITEMCHAR050"/>
								</IMD02-ItemCharacteristicCoded>
								<IMD03-ItemDescription>
									<IMD0304-ItemDescription>
										<xsl:value-of select="TITLE"/>
									</IMD0304-ItemDescription>
								</IMD03-ItemDescription>
							</IMD>
						</xsl:for-each>
						<IMD>
							<IMD01-ItemDescriptionTypeCoded>L</IMD01-ItemDescriptionTypeCoded>
							<IMD02-ItemCharacteristicCoded>
								<xsl:value-of select="ITEMCHAR120"/>
							</IMD02-ItemCharacteristicCoded>
							<IMD03-ItemDescription>
								<IMD0301-ItemDescriptionIdentification>
									<xsl:value-of select="FORMAT"/>
								</IMD0301-ItemDescriptionIdentification>
							</IMD03-ItemDescription>
						</IMD>
						<IMD>
							<IMD01-ItemDescriptionTypeCoded>L
							</IMD01-ItemDescriptionTypeCoded>
							<IMD02-ItemCharacteristicCoded>
								<xsl:value-of select="ITEMCHAR170"/>
							</IMD02-ItemCharacteristicCoded>
							<IMD03-ItemDescription>
								<IMD0301-ItemDescriptionIdentification>
									<xsl:value-of select="RELEASEDATE"/>
								</IMD0301-ItemDescriptionIdentification>
							</IMD03-ItemDescription>
						</IMD>
						<QTY>
							<QTY01-QuantityDetails>
								<QTY0101-QuantityQualifier>1</QTY0101-QuantityQualifier>
								<QTY0102-Quantity>
									<xsl:value-of select="QTY"/>
								</QTY0102-Quantity>
							</QTY01-QuantityDetails>
						</QTY>
						<GIR>
							<GIR01-SetIdentificationQualifier/>
							<GIR02-IdentificationNumber>xxxx
							<GIR0201-IdentityNumber>
									<xsl:value-of select="GIRLLO"/>
								</GIR0201-IdentityNumber>
							</GIR02-IdentificationNumber>
						</GIR>
						<GROUP_31>
							<PRI>
								<PRI01-PriceInformation>
									<PRI0101-PriceQualifier>AAE</PRI0101-PriceQualifier>
									<PRI0102-Price>
										<xsl:value-of select="PRICE"/>
									</PRI0102-Price>
								</PRI01-PriceInformation>
							</PRI>
						</GROUP_31>
						<GROUP_32>
							<RFF>
								<RFF01-Reference>
									<RFF0102-ReferenceNumber>
										<xsl:value-of select="REFQUALIFIER"/>
									</RFF0102-ReferenceNumber>QLI
									
								</RFF01-Reference>
							</RFF>
						</GROUP_32>
					</GROUP_27>
				</xsl:for-each>
				<UNS>
					<UNS01-SectionIdentification>
						<xsl:value-of select="root/region/S/UNS"/>
					</UNS01-SectionIdentification>
				</UNS>
				<CNT>
					<CNT01-Control>
						<CNT0101-ControlQualifier>
							<xsl:value-of select="root/region/CNT/CNTRLQUALIFIER"/>
						</CNT0101-ControlQualifier>
						<CNT0102-ControlValue>
							<xsl:value-of select="root/region/CNT/CONTROLVALUE"/>
						</CNT0102-ControlValue>
					</CNT01-Control>
				</CNT>
				<UNT>
					<UNT01-NumberOfSegmentsInTheMessage>
						<xsl:value-of select="root/region/UNT/UNTNOSEGMENTS"/>
					</UNT01-NumberOfSegmentsInTheMessage>
					<UNT02-MessageReferenceNumber>
						<xsl:value-of select="root/region/UNT/MESSAGENO"/>
					</UNT02-MessageReferenceNumber>
				</UNT>
			</QUOTES>
			<UNZ>
				<UNZ01-InterchangeControlCount>
					<xsl:value-of select="root/region/UNZ/UNZICHANGECTLCOUNT"/>
				</UNZ01-InterchangeControlCount>
				<UNZ02-InterchangeControlReference>
					<xsl:value-of select="root/region/UNZ/ICHANGECTLREF"/>
				</UNZ02-InterchangeControlReference>
			</UNZ>
		</EANCOM>
	</xsl:template>
	



<xsl:template name="test">
<xsl:param name="s"/>

<xsl:choose>

<xsl:when test="$s &gt; 1">

<xsl:copy-of select="//GIR"/>

<xsl:call-template name="test">

<xsl:with-param name="s" select="$s - 1"></xsl:with-param>

</xsl:call-template>

</xsl:when>

<xsl:otherwise>

<xsl:copy-of select="//GIR"/>

</xsl:otherwise>

</xsl:choose>
</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="LMSSAMPLEQUOTEFILE01.xml" htmlbaseurl="" outputurl="" processortype="saxon8" useresolver="yes" 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="EANCOM1997QUOTES.xsd" destSchemaRoot="EANCOM" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no">
			<SourceSchema srcSchemaPath="LMSSAMPLEQUOTEFILE01.xml" srcSchemaRoot="root" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/>
		</MapperInfo>
		<MapperBlockPosition>
			<template match="/">
				<block path="EANCOM/QUOTES/GROUP_11/xsl:for-each" x="187" y="9"/>
				<block path="EANCOM/QUOTES/xsl:for-each" x="168" y="2"/>
				<block path="EANCOM/QUOTES/xsl:for-each/GROUP_27/xsl:for-each" x="173" y="2"/>
				<block path="EANCOM/QUOTES/xsl:for-each/GROUP_27/xsl:for-each[1]" x="168" y="1"/>
				<block path="EANCOM/QUOTES/xsl:for-each/GROUP_27/xsl:if/&gt;[0]" x="80" y="9"/>
				<block path="EANCOM/QUOTES/xsl:for-each/GROUP_27/xsl:if" x="126" y="11"/>
			</template>
		</MapperBlockPosition>
		<TemplateContext></TemplateContext>
		<MapperFilter side="source"></MapperFilter>
	</MapperMetaTag>
</metaInformation>
-->