<?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<Client>
			<Name>
				<xsl:value-of select="dataroot/Client/Name"/>
			</Name>
			<Profiles>
				<xsl:for-each select="dataroot/Client/Profile">
					<Profile>
						<ProfileName>
							<xsl:value-of select="ProfileName"/>
						</ProfileName>
					</Profile>
				</xsl:for-each>
			</Profiles>
			<Features>
				<xsl:for-each select="dataroot/Client/Predefined">
					<Predefined>
						<Name>
							<xsl:value-of select="Name"/>
						</Name>
						<Profiles>
							<xsl:for-each select="Profiles">
								<Profile>
									<ProfileName>
										<xsl:value-of select="ProfileName"/>
									</ProfileName>
								</Profile>
							</xsl:for-each>
						</Profiles>
						<Values>
							<xsl:for-each select="Values">
								<Value>
									<xsl:value-of select="Value"/>
								</Value>
							</xsl:for-each>
						</Values>
					</Predefined>
				</xsl:for-each>
				<xsl:for-each select="dataroot/Client/MultiDimension">
					<MultiDimension>
						<Name>
							<xsl:value-of select="Name"/>
						</Name>
						<Profiles>
							<xsl:for-each select="Profiles">
								<Profile>
									<ProfileName>
										<xsl:value-of select="ProfileName"/>
									</ProfileName>
								</Profile>
							</xsl:for-each>
						</Profiles>
						<Attributes>
							<xsl:for-each select="Attribute">
								<Attribute>
									<Name>
										<xsl:value-of select="Name"/>
									</Name>
									<DataType>
										<xsl:value-of select="DataType"/>
									</DataType>
								</Attribute>
							</xsl:for-each>
						</Attributes>

						<xsl:variable name="a_count" select="count(Attribute)"/> 
						<AttributeCollections>
								<xsl:for-each select="AttributeCollection[position() mod $a_count = 1]">
										<AttributeCollection>
											<xsl:variable name="p" select="position()"/> 
											<xsl:for-each select="following-sibling::AttributeCollection[position() &lt; $a_count]">
												<Value>
													<xsl:value-of select="Value"/>
												</Value>
											</xsl:for-each>
										</AttributeCollection>
								</xsl:for-each>
						</AttributeCollections>
					</MultiDimension>
				</xsl:for-each>
			</Features>
		</Client>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2009. Progress Software Corporation. All rights reserved.

<metaInformation>
	<scenarios>
		<scenario default="yes" name="Client Test 2" userelativepaths="yes" externalpreview="no" url="Clienteeee.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="xsltVersion" value="2.0"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
	</scenarios>
	<MapperMetaTag>
		<MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="ClientFeaturesImportMaster.xml" destSchemaRoot="Client" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no">
			<SourceSchema srcSchemaPath="Clienteeee.xml" srcSchemaRoot="dataroot" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/>
		</MapperInfo>
		<MapperBlockPosition>
			<template match="/">
				<block path="Client/Profiles/xsl:for-each" x="267" y="72"/>
				<block path="Client/Features/xsl:for-each" x="267" y="162"/>
				<block path="Client/Features/xsl:for-each/Predefined/Profiles/xsl:for-each" x="267" y="216"/>
				<block path="Client/Features/xsl:for-each/Predefined/Values/xsl:for-each" x="307" y="288"/>
				<block path="Client/Features/xsl:for-each[1]" x="267" y="306"/>
				<block path="Client/Features/xsl:for-each[1]/MultiDimension/Profiles/xsl:for-each" x="267" y="360"/>
				<block path="Client/Features/xsl:for-each[1]/MultiDimension/Attributes/xsl:for-each" x="307" y="199"/>
				<block path="Client/Features/xsl:for-each[1]/MultiDimension/AttributeCollections/AttributeCollection/xsl:for-each" x="227" y="199"/>
			</template>
		</MapperBlockPosition>
		<TemplateContext></TemplateContext>
		<MapperFilter side="source"></MapperFilter>
	</MapperMetaTag>
</metaInformation>
-->