Changeset 953 for DCWoRMS/branches/coolemall/src
- Timestamp:
- 03/14/13 09:13:01 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/test/DEBBTranslator/xml/DCWoRMSDEBBUpdater.xsl
r948 r953 148 148 </xsl:template> 149 149 150 <!-- <xsl:template match="energyEstimationPlugin"> 151 <xsl:variable name="pluginName" select="name" /> 152 153 Find appropriate resources (identified by class, type and name(s)) 154 and add their names here 155 <xsl:variable name="resourceClass"> 156 <xsl:value-of select="resources/class" /> 157 </xsl:variable> 158 <xsl:value-of select="$resourceClass"/> 159 <xsl:variable name="resourceType"> 160 <xsl:value-of select="resources/type" /> 161 </xsl:variable> 162 <xsl:value-of select="$resourceType"/> 163 164 Not clear why it does not work this way :/ 165 <xsl:variable name="resourceNames"><xsl:value-of select="resources/name"/></xsl:variable> 166 <xsl:variable name="resourceNames" 167 select="$nestedDoc//energyEstimationPlugin[name=$pluginName]/resources/name" /> 168 169 <xsl:choose> 170 Resource names are present 171 <xsl:when test="count($resourceNames) > 0"> 172 <xsl:for-each select="$resourceNames"> 173 <xsl:variable name="index" select="position()" /> 174 <xsl:variable name="resourceName" select="." /> 175 <xsl:choose> 176 Resource type is present 177 <xsl:when test="$resourceType != ''"> 178 <xsl:apply-templates 179 select="$rootDoc//computingResource[@class=$resourceClass and @type=$resourceType and @name=$resourceName]" 180 mode="addEnergyEstimationPlugin" /> 181 </xsl:when> 182 <xsl:otherwise> 183 <xsl:apply-templates 184 select="$rootDoc//computingResource[@class=$resourceClass and @name=$resourceName]" 185 mode="addEnergyEstimationPlugin" /> 186 </xsl:otherwise> 187 </xsl:choose> 188 </xsl:for-each> 189 </xsl:when> 190 No resource names 191 <xsl:otherwise> 192 <xsl:choose> 193 Resource type is present 194 <xsl:when test="$resourceType != ''"> 195 <xsl:apply-templates 196 select="$rootDoc//computingResource[@class=$resourceClass and @type=$resourceType]" 197 mode="addEnergyEstimationPlugin" /> 198 </xsl:when> 199 <xsl:otherwise> 200 <xsl:apply-templates 201 select="$rootDoc//computingResource[@class=$resourceClass]" 202 mode="addEnergyEstimationPlugin" /> 203 </xsl:otherwise> 204 </xsl:choose> 205 </xsl:otherwise> 206 </xsl:choose> 207 </xsl:template> --> 208 209 <xsl:template match="computingResource"> 150 151 <xsl:template match="computingResource | computingResourceTemplate"> 210 152 <xsl:copy copy-namespaces="no"> 211 153 <xsl:copy-of select="@*" /> … … 251 193 <!-- location --> 252 194 <xsl:apply-templates select="location" /> 195 253 196 <!-- computingResource --> 254 197 <xsl:apply-templates select="computingResource" /> 198 199 <!-- templateId --> 200 <xsl:apply-templates select="templateId" /> 201 255 202 </xsl:copy> 256 203 </xsl:template>
Note: See TracChangeset
for help on using the changeset viewer.