Changeset 880 for DCWoRMS/trunk/src


Ignore:
Timestamp:
02/20/13 10:16:44 (12 years ago)
Author:
gosiaw
Message:

powerProfile template added

File:
1 edited

Legend:

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

    r876 r880  
    7676                        <!-- TODO: This parameter should be taken from somewhere. --> 
    7777                        <xsl:attribute name="include">false</xsl:attribute> 
     78                         
    7879                        <!-- Find appropriate resources (identified by class, type and name(s)) and add their names here --> 
    7980                        <xsl:variable name="resourceClass"><xsl:value-of select="resources/class"/></xsl:variable> 
     
    104105 
    105106        <xsl:template match="energyEstimationPlugin"> 
     107                <xsl:element name="energyEstimationPlugin"> 
     108                        <xsl:element name="name"> 
     109                                <xsl:value-of select="name" /> 
     110                        </xsl:element> 
     111                </xsl:element> 
    106112        </xsl:template> 
    107113         
     
    115121                        <xsl:apply-templates select="parameter" /> 
    116122                        <!-- profile --> 
    117                         <xsl:apply-templates select="profile" /> 
     123                        <xsl:apply-templates select="profile" />                 
    118124                        <!-- location --> 
    119125                        <xsl:apply-templates select="location" /> 
     
    127133                        <xsl:value-of select="../@name"></xsl:value-of> 
    128134                </xsl:element> 
    129         </xsl:template> 
     135        </xsl:template><!-- 
    130136         
    131         <xsl:template match="resourceUnit | parameter | profile | location"> 
     137        <xsl:template match="powerProfile" mode="addEstimationPlugin"> 
     138                <xsl:element name="energyEstimationPlugin"> 
     139                        <xsl:element name="name"> 
     140                                <xsl:value-of select="name" /> 
     141                        </xsl:element> 
     142                </xsl:element>   
     143        </xsl:template>  
     144         
     145        --><xsl:template match="resourceUnit | parameter | location"> 
    132146                <xsl:copy-of select="." copy-namespaces="no" /> 
    133147        </xsl:template> 
    134148 
    135         <!-- <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*"/>  
    136                 <xsl:apply-templates/> </xsl:copy> </xsl:template> --> 
     149        <xsl:template match="profile"> 
     150                <xsl:copy copy-namespaces="no"> 
     151                        <xsl:copy-of select="@*" /> 
     152                        <xsl:apply-templates select="powerProfile" /> 
     153                </xsl:copy>                                      
     154        </xsl:template> 
     155 
     156        <xsl:template match="powerProfile">      
     157                <xsl:copy copy-namespaces="no"> 
     158                        <xsl:apply-templates select="$nestedDoc//energyEstimationPlugin"/> 
     159                        <xsl:copy-of select="@*|node()" />               
     160                </xsl:copy>      
     161                 
     162        </xsl:template>  
     163         
     164         <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*"/>  
     165                <xsl:apply-templates/> </xsl:copy> </xsl:template>  
    137166 
    138167</xsl:stylesheet> 
Note: See TracChangeset for help on using the changeset viewer.