Index: DCWoRMS/branches/coolemall/src/test/DEBBTranslator/xml/DEBBComponentTranslator.xsl
===================================================================
--- DCWoRMS/branches/coolemall/src/test/DEBBTranslator/xml/DEBBComponentTranslator.xsl	(revision 1027)
+++ DCWoRMS/branches/coolemall/src/test/DEBBTranslator/xml/DEBBComponentTranslator.xsl	(revision 1032)
@@ -76,13 +76,26 @@
 			<!-- Base cooling device data -->
 			<xsl:apply-templates select="CoolingDevice" mode="basic" />
+			
 			<!-- Air throughput connected, advanced, technical data -->
-			<xsl:if test="CoolingDevice/ThroughputProfile">
+			<xsl:if test="CoolingDevice/AirThroughputProfile or CoolingDevice/WaterThroughputProfile">
 				<xsl:element name="profile">
-					<xsl:element name="airThroughputProfile">
-						<xsl:element name="airThroughputStates">
-							<xsl:apply-templates select="CoolingDevice"
-								mode="advanced" />
-						</xsl:element>
-					</xsl:element>
+						<xsl:if test="CoolingDevice/AirThroughputProfile">
+							<xsl:element name="airThroughputProfile">
+								<xsl:element name="airThroughputStates">
+									<xsl:apply-templates select="CoolingDevice"
+										mode="air" />
+								</xsl:element>
+							</xsl:element>						
+						</xsl:if>
+						
+						<!-- TODO: DCWoRMS schema cannot handle water cooled devices. The code below should be enabled as soon it can.-->
+<!--						<xsl:if test="CoolingDevice/WaterThroughputProfile">-->
+<!--							<xsl:element name="waterThroughputProfile">-->
+<!--								<xsl:element name="waterThroughputStates">-->
+<!--									<xsl:apply-templates select="CoolingDevice"-->
+<!--										mode="water" />-->
+<!--								</xsl:element>-->
+<!--							</xsl:element>							-->
+<!--						</xsl:if>-->
 				</xsl:element>
 			</xsl:if>
@@ -205,5 +218,5 @@
 						
 						<xsl:if test="CState">
-							<!-- If any CState is prsent add powerStates element -->
+							<!-- If any CState is present add powerStates element -->
 							<xsl:element name="powerStates">
 								<xsl:apply-templates select="CState" />
@@ -422,17 +435,50 @@
 	</xsl:template>
 
-	<xsl:template match="CoolingDevice" mode="advanced">
-		<xsl:attribute name="name"><xsl:value-of select="generate-id()" /></xsl:attribute>
-		<xsl:if test="ThroughputProfile">
-			<xsl:apply-templates select="ThroughputProfile" />
-		</xsl:if>
-	</xsl:template>
-
-	<xsl:template match="ThroughputProfile">
-		<xsl:apply-templates select="FlowState" />
-	</xsl:template>
-
-	<xsl:template match="FlowState">
+	<xsl:template match="CoolingDevice" mode="air">	
+		<xsl:if test="AirThroughputProfile">
+			<xsl:attribute name="name"><xsl:value-of select="AirThroughputProfile/Name" /></xsl:attribute>
+			<xsl:apply-templates select="AirThroughputProfile" />	
+		</xsl:if>		
+	</xsl:template>
+
+	<xsl:template match="CoolingDevice" mode="water">	
+		<xsl:if test="WaterThroughputProfile">
+			<xsl:attribute name="name"><xsl:value-of select="WaterThroughputProfile/Name" /></xsl:attribute>
+			<xsl:apply-templates select="WaterThroughputProfile" />										
+		</xsl:if>
+	</xsl:template>
+
+
+	<xsl:template match="AirThroughputProfile">
+		<xsl:apply-templates select="FlowState" mode="air"/>
+	</xsl:template>
+
+	<xsl:template match="WaterThroughputProfile">
+		<xsl:apply-templates select="FlowState" mode="water"/>
+	</xsl:template>
+
+	<xsl:template match="FlowState" mode="air">
 		<xsl:element name="airThroughputState">
+			<xsl:element name="name">
+				<xsl:value-of select="State" />
+			</xsl:element>
+			<xsl:if test="Flow">
+				<xsl:element name="value">
+					<xsl:value-of select="Flow" />
+				</xsl:element>
+			</xsl:if>
+			<xsl:if test="PowerUsage">
+				<xsl:element name="powerUsage">
+					<xsl:value-of select="PowerUsage" />
+				</xsl:element>
+			</xsl:if>
+			<xsl:if test="Transition">
+				<xsl:apply-templates select="Transition" />
+			</xsl:if>
+		</xsl:element>
+	</xsl:template>
+
+	<xsl:template match="FlowState" mode="water">
+		<xsl:element name="waterThroughputState">
 			<xsl:element name="name">
 				<xsl:value-of select="State" />
@@ -717,4 +763,5 @@
 		</xsl:element>
 		
+		<!-- TODO -->
 		<!-- Transform ignored -->
 		
