Changeset 891 for DCWoRMS/trunk/src/test/DEBBTranslator
- Timestamp:
- 02/27/13 13:36:38 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/test/DEBBTranslator/xml/DCWoRMSDEBBUpdater.xsl
r890 r891 91 91 </xsl:variable> 92 92 <!-- <xsl:value-of select="$resourceType"/> --> 93 93 94 94 <!-- Not clear why it does not work this way :/ --> 95 95 <!-- <xsl:variable name="resourceNames"><xsl:value-of select="resources/name"/></xsl:variable> --> … … 186 186 <xsl:variable name="resourceClass" select="../../@class"></xsl:variable> 187 187 <xsl:variable name="resourceType" select="../../@type"></xsl:variable> 188 <xsl:variable name="resourceName " select="../../@name"></xsl:variable>188 <xsl:variable name="resourceNames" select="../../@name"></xsl:variable> 189 189 190 190 <xsl:choose> 191 <xsl:when test="$resourceType != ''"> 192 <!-- resource class and type --> 193 <!-- Add information about energy estimation plugin --> 194 <xsl:apply-templates 195 select="$nestedDoc//energyEstimationPlugin[resources/class = $resourceClass and resources/type = $resourceType]" /> 191 <!-- Resource names are present --> 192 <xsl:when test="count($resourceNames) > 0"> 193 <xsl:for-each select="$resourceNames"> 194 <xsl:variable name="index" select="position()" /> 195 <xsl:variable name="resourceName" select="." /> 196 <xsl:choose> 197 <!-- Resource type is present --> 198 <xsl:when test="$resourceType != ''"> 199 <xsl:apply-templates 200 select="$nestedDoc//energyEstimationPlugin[resources/class=$resourceClass and resources/type=$resourceType and resources/name=$resourceName]" /> 201 </xsl:when> 202 <xsl:otherwise> 203 <xsl:apply-templates 204 select="$nestedDoc//energyEstimationPlugin[resources/class=$resourceClass and resources/name=$resourceName]" /> 205 </xsl:otherwise> 206 </xsl:choose> 207 </xsl:for-each> 196 208 </xsl:when> 209 <!-- No resource names --> 197 210 <xsl:otherwise> 198 <!-- resource class only --> 199 <!-- Add information about energy estimation plugin --> 200 <xsl:apply-templates 201 select="$nestedDoc//energyEstimationPlugin[resources/class = $resourceClass]" /> 211 <xsl:choose> 212 <!-- Resource type is present --> 213 <xsl:when test="$resourceType != ''"> 214 <xsl:apply-templates 215 select="$nestedDoc//energyEstimationPlugin[resources/class=$resourceClass and resources/type=$resourceType]" /> 216 </xsl:when> 217 <xsl:otherwise> 218 <xsl:apply-templates 219 select="$nestedDoc//energyEstimationPlugin[resources/class=$resourceClass]" /> 220 </xsl:otherwise> 221 </xsl:choose> 202 222 </xsl:otherwise> 203 </xsl:choose> 204 <!-- Copy all children of powerProfile --> 223 </xsl:choose><!-- <xsl:choose> <xsl:when test="$resourceType != ''"> resource 224 class and type Add information about energy estimation plugin <xsl:apply-templates 225 select="$nestedDoc//energyEstimationPlugin[resources/class = $resourceClass 226 and resources/type = $resourceType]" /> </xsl:when> <xsl:otherwise> resource 227 class only Add information about energy estimation plugin <xsl:apply-templates 228 select="$nestedDoc//energyEstimationPlugin[resources/class = $resourceClass]" 229 /> </xsl:otherwise> </xsl:choose> --><!-- Copy all children of powerProfile --> 205 230 <xsl:copy-of select="@*|node()" /> 206 231 </xsl:copy>
Note: See TracChangeset
for help on using the changeset viewer.