Ignore:
Timestamp:
01/24/13 14:04:08 (12 years ago)
Author:
gosiaw
Message:

Generating <profile> section for CoolingDevice? only if it has ThroughputProfile? defined

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/trunk/src/test/DEBBTranslator/xml/DEBBComponentTranslator.xsl

    r696 r795  
    7171                        <xsl:apply-templates select="CoolingDevice" mode="basic" /> 
    7272                        <!-- Air throughput connected, advanced, technical data --> 
    73                         <xsl:element name="profile"> 
    74                                 <xsl:element name="airThroughputProfile"> 
    75                                         <xsl:element name="airThroughputStates"> 
    76                                                 <xsl:apply-templates select="CoolingDevice" 
    77                                                         mode="advanced" /> 
    78                                         </xsl:element> 
    79                                 </xsl:element> 
    80                         </xsl:element> 
     73                        <xsl:if test="CoolingDevice/ThroughputProfile"> 
     74                                <xsl:element name="profile"> 
     75                                        <xsl:element name="airThroughputProfile"> 
     76                                                <xsl:element name="airThroughputStates"> 
     77                                                        <xsl:apply-templates select="CoolingDevice" 
     78                                                                mode="advanced" /> 
     79                                                </xsl:element> 
     80                                        </xsl:element> 
     81                                </xsl:element> 
     82                        </xsl:if> 
    8183                </xsl:if> 
    8284        </xsl:template> 
     
    208210 
    209211        <xsl:template match="CState"> 
    210                 <!-- <xsl:element name="powerState"> --> 
    211                 <!-- <xsl:call-template name="BasicStateParameters" /> --> 
    212                 <!-- </xsl:element> --> 
     212                <xsl:element name="parameter"> 
     213                        <xsl:attribute name="name">pState</xsl:attribute> 
     214                        <xsl:element name="property"> 
     215                                <xsl:attribute name="name">name</xsl:attribute> 
     216                                <xsl:element name="value"> 
     217                                        <xsl:value-of select="State" /> 
     218                                </xsl:element> 
     219                        </xsl:element> 
     220                        <xsl:element name="property"> 
     221                                <xsl:attribute name="name">powerUsage</xsl:attribute> 
     222                                <xsl:element name="value"> 
     223                                        <xsl:value-of select="PowerUsage" /> 
     224                                </xsl:element> 
     225                        </xsl:element> 
     226                </xsl:element> 
    213227        </xsl:template> 
    214228 
     
    331345 
    332346        <xsl:template match="CoolingDevice" mode="advanced"> 
    333                 <xsl:attribute name="name">DummyCoolingDeviceName</xsl:attribute> 
     347                <xsl:attribute name="name"><xsl:value-of select="generate-id()" /></xsl:attribute> 
    334348                <xsl:if test="ThroughputProfile"> 
    335349                        <xsl:apply-templates select="ThroughputProfile" /> 
Note: See TracChangeset for help on using the changeset viewer.