Changeset 846 for DCWoRMS/trunk/src/test


Ignore:
Timestamp:
02/08/13 16:09:48 (12 years ago)
Author:
gosiaw
Message:
 
File:
1 edited

Legend:

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

    r845 r846  
    6868                        <!-- TODO: This parameter should be taken from somewhere. --> 
    6969                        <xsl:attribute name="include">false</xsl:attribute> 
    70                         <xsl:element name="resourceName"> 
    71                                 RESOURCENAME 
    72                         </xsl:element> 
     70                        <!-- Find appropriate resources (identified by class, type and name(s)) and add their names here --> 
     71                        <xsl:variable name="resourceClass"><xsl:value-of select="resources/class"/></xsl:variable> 
     72<!--                    <xsl:value-of select="$resourceClass"/>--> 
     73                        <xsl:variable name="resourceType"><xsl:value-of select="resources/type"/></xsl:variable> 
     74<!--                    <xsl:value-of select="$resourceType"/>--> 
     75                        <xsl:variable name="resourceNames"><xsl:value-of select="resources/name"/></xsl:variable> 
     76                        <xsl:variable name="xpath">$rootDoc//computingResource[@class=<xsl:value-of select="$resourceClass"/> and @type=<xsl:value-of select="$resourceType"/>]</xsl:variable> 
     77<!--                    <xsl:value-of select="$xpath"></xsl:value-of>--> 
     78                        <xsl:apply-templates select="$rootDoc//computingResource[@class=$resourceClass and @type=$resourceType]" mode="addResorceName"/> 
    7379                </xsl:element> 
    7480        </xsl:template> 
     
    9197        </xsl:template> 
    9298 
     99        <xsl:template match="computingResource" mode="addResorceName"> 
     100                <xsl:element name="resourceName"> 
     101                        <xsl:value-of select="../@name"></xsl:value-of> 
     102                </xsl:element> 
     103        </xsl:template> 
     104         
    93105        <xsl:template match="resourceUnit | parameter | profile | location"> 
    94106                <xsl:copy-of select="." copy-namespaces="no" /> 
Note: See TracChangeset for help on using the changeset viewer.