Ignore:
Timestamp:
03/13/13 11:41:00 (12 years ago)
Author:
gosiaw
Message:

Unnecessary code removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/test/DEBBTranslator/xml/PLMXMLTranslator.xsl

    r951 r952  
    1818 
    1919        <!-- Information from which level the translator should start moving information to templates --> 
    20         <xsl:variable name="templateStartLevel" select="'NodeGroup'" /> 
     20        <xsl:variable name="templateStartLevel" select="'Node'" /> 
    2121 
    2222        <!-- Specification of the output document --> 
     
    313313                </xsl:apply-templates> 
    314314 
    315                 <xsl:text>END</xsl:text> 
    316          
    317          
    318         </xsl:function> 
    319          
    320         <!-- 
    321          
    322         <xsl:template match="plm:ProductRevisionView" mode="createTemplates"> 
    323                  
    324                  instanceRefs contain space separated ids of nested DEBBs  
    325                 <xsl:variable name="tokenizedText" select="tokenize(@instanceRefs, ' ')" /> 
    326                  
    327                  DEBBLevel  
    328                 <xsl:variable name="debbLevel" 
    329                         select="plm:UserData/plm:UserValue[@title='DEBBLevel']/@value" /> 
    330                  DEBBComponentId  
    331                 <xsl:variable name="debbComponentId" 
    332                         select="plm:UserData/plm:UserValue[@title='DEBBComponentId']/@value" /> 
    333                  DEBBComponentFile  
    334                 <xsl:variable name="debbComponentFile" 
    335                         select="plm:UserData/plm:UserValue[@title='DEBBComponentFile']/@value" /> 
    336  
    337                 <xsl:attribute name="class"> 
    338                         <xsl:value-of select="$debbLevel" /> 
    339                 </xsl:attribute> 
    340  
    341                 <xsl:if test="$debbComponentId != ''"> 
    342                         <xsl:attribute name="type"> 
    343                                 <xsl:value-of select="$debbComponentId" /> 
    344                         </xsl:attribute> 
    345                 </xsl:if> 
    346  
    347                  
    348                  Add DEBB information from DEBB Components file  
    349                 <xsl:attribute name="test">choose</xsl:attribute> 
    350                 <xsl:choose> 
    351                          DEBB Components file is defined  
    352                         <xsl:when test="$debbComponentFile != ''"> 
    353                                 <xsl:comment> 
    354                                         DEBB Component file is 
    355                                         <xsl:value-of select="$debbComponentFile" /> 
    356                                 </xsl:comment> 
    357                                 <xsl:variable name="nestedDoc" select="document($debbComponentFile)" /> 
    358                                 <xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]" /> 
    359  
    360                                 <xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]"> 
    361                                         <xsl:with-param name="computingResourceClasses"> 
    362                                                 <xsl:value-of select="$computingResourceClasses" /> 
    363                                         </xsl:with-param> 
    364                                         <xsl:with-param name="resourceUnitClasses"> 
    365                                                 <xsl:value-of select="$resourceUnitClasses" /> 
    366                                         </xsl:with-param> 
    367                                 </xsl:apply-templates> 
    368                          
    369                                 <xsl:call-template name="translateDEBBComponent"> 
    370                                         <xsl:with-param name="nestedDoc"><xsl:value-of select="$nestedDoc"/></xsl:with-param> 
    371                                         <xsl:with-param name="debbComponentId"><xsl:value-of select="$debbComponentId"/></xsl:with-param> 
    372                                 </xsl:call-template> 
    373                         </xsl:when> 
    374                          DEBB Components file is not defined. Use default one.  
    375                         <xsl:otherwise> 
    376                                 <xsl:comment> 
    377                                         DEBB Component file is 
    378                                         <xsl:value-of select="$defaultDEBBComponentsFileName" /> 
    379                                 </xsl:comment> 
    380                                 <xsl:variable name="nestedDoc" 
    381                                         select="document($defaultDEBBComponentsFileName)" /> 
    382  
    383  
    384                                 <xsl:call-template name="translateDEBBComponent"> 
    385                                         <xsl:with-param name="nestedDoc"><xsl:value-of select="$nestedDoc"/></xsl:with-param> 
    386                                         <xsl:with-param name="debbComponentId"><xsl:value-of select="$debbComponentId"/></xsl:with-param> 
    387                                 </xsl:call-template> 
    388                                          
    389                                 <xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]"> 
    390                                         <xsl:with-param name="computingResourceClasses"> 
    391                                                 <xsl:value-of select="$computingResourceClasses" /> 
    392                                         </xsl:with-param> 
    393                                         <xsl:with-param name="resourceUnitClasses"> 
    394                                                 <xsl:value-of select="$resourceUnitClasses" /> 
    395                                         </xsl:with-param> 
    396                                 </xsl:apply-templates> 
    397                                          
    398                         </xsl:otherwise> 
    399                 </xsl:choose> 
    400                  
    401                  
    402  
    403                  Iterate children and ask them to translate themselves  
    404                 <xsl:for-each select="1 to count($tokenizedText)"> 
    405                         <xsl:variable name="index" select="." /> 
    406                         <xsl:apply-templates 
    407                                 select="$rootDoc//plm:ProductInstance[@id=$tokenizedText[$index]]" /> 
    408                 </xsl:for-each> 
    409         </xsl:template> 
    410          
    411         --> 
    412                  
     315                <xsl:text>END</xsl:text>         
     316        </xsl:function>          
    413317         
    414318        <xsl:function name="fun:containsTemplates"> 
Note: See TracChangeset for help on using the changeset viewer.