Changeset 1032 for DCWoRMS/branches/coolemall/src/test/DEBBTranslator/xml
- Timestamp:
- 03/28/13 09:51:43 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/test/DEBBTranslator/xml/DEBBComponentTranslator.xsl
r1027 r1032 76 76 <!-- Base cooling device data --> 77 77 <xsl:apply-templates select="CoolingDevice" mode="basic" /> 78 78 79 <!-- Air throughput connected, advanced, technical data --> 79 <xsl:if test="CoolingDevice/ ThroughputProfile">80 <xsl:if test="CoolingDevice/AirThroughputProfile or CoolingDevice/WaterThroughputProfile"> 80 81 <xsl:element name="profile"> 81 <xsl:element name="airThroughputProfile"> 82 <xsl:element name="airThroughputStates"> 83 <xsl:apply-templates select="CoolingDevice" 84 mode="advanced" /> 85 </xsl:element> 86 </xsl:element> 82 <xsl:if test="CoolingDevice/AirThroughputProfile"> 83 <xsl:element name="airThroughputProfile"> 84 <xsl:element name="airThroughputStates"> 85 <xsl:apply-templates select="CoolingDevice" 86 mode="air" /> 87 </xsl:element> 88 </xsl:element> 89 </xsl:if> 90 91 <!-- TODO: DCWoRMS schema cannot handle water cooled devices. The code below should be enabled as soon it can.--> 92 <!-- <xsl:if test="CoolingDevice/WaterThroughputProfile">--> 93 <!-- <xsl:element name="waterThroughputProfile">--> 94 <!-- <xsl:element name="waterThroughputStates">--> 95 <!-- <xsl:apply-templates select="CoolingDevice"--> 96 <!-- mode="water" />--> 97 <!-- </xsl:element>--> 98 <!-- </xsl:element> --> 99 <!-- </xsl:if>--> 87 100 </xsl:element> 88 101 </xsl:if> … … 205 218 206 219 <xsl:if test="CState"> 207 <!-- If any CState is pr sent add powerStates element -->220 <!-- If any CState is present add powerStates element --> 208 221 <xsl:element name="powerStates"> 209 222 <xsl:apply-templates select="CState" /> … … 422 435 </xsl:template> 423 436 424 <xsl:template match="CoolingDevice" mode="advanced"> 425 <xsl:attribute name="name"><xsl:value-of select="generate-id()" /></xsl:attribute> 426 <xsl:if test="ThroughputProfile"> 427 <xsl:apply-templates select="ThroughputProfile" /> 428 </xsl:if> 429 </xsl:template> 430 431 <xsl:template match="ThroughputProfile"> 432 <xsl:apply-templates select="FlowState" /> 433 </xsl:template> 434 435 <xsl:template match="FlowState"> 437 <xsl:template match="CoolingDevice" mode="air"> 438 <xsl:if test="AirThroughputProfile"> 439 <xsl:attribute name="name"><xsl:value-of select="AirThroughputProfile/Name" /></xsl:attribute> 440 <xsl:apply-templates select="AirThroughputProfile" /> 441 </xsl:if> 442 </xsl:template> 443 444 <xsl:template match="CoolingDevice" mode="water"> 445 <xsl:if test="WaterThroughputProfile"> 446 <xsl:attribute name="name"><xsl:value-of select="WaterThroughputProfile/Name" /></xsl:attribute> 447 <xsl:apply-templates select="WaterThroughputProfile" /> 448 </xsl:if> 449 </xsl:template> 450 451 452 <xsl:template match="AirThroughputProfile"> 453 <xsl:apply-templates select="FlowState" mode="air"/> 454 </xsl:template> 455 456 <xsl:template match="WaterThroughputProfile"> 457 <xsl:apply-templates select="FlowState" mode="water"/> 458 </xsl:template> 459 460 <xsl:template match="FlowState" mode="air"> 436 461 <xsl:element name="airThroughputState"> 462 <xsl:element name="name"> 463 <xsl:value-of select="State" /> 464 </xsl:element> 465 <xsl:if test="Flow"> 466 <xsl:element name="value"> 467 <xsl:value-of select="Flow" /> 468 </xsl:element> 469 </xsl:if> 470 <xsl:if test="PowerUsage"> 471 <xsl:element name="powerUsage"> 472 <xsl:value-of select="PowerUsage" /> 473 </xsl:element> 474 </xsl:if> 475 <xsl:if test="Transition"> 476 <xsl:apply-templates select="Transition" /> 477 </xsl:if> 478 </xsl:element> 479 </xsl:template> 480 481 <xsl:template match="FlowState" mode="water"> 482 <xsl:element name="waterThroughputState"> 437 483 <xsl:element name="name"> 438 484 <xsl:value-of select="State" /> … … 717 763 </xsl:element> 718 764 765 <!-- TODO --> 719 766 <!-- Transform ignored --> 720 767
Note: See TracChangeset
for help on using the changeset viewer.