Ignore:
Timestamp:
03/13/13 11:15:14 (12 years ago)
Author:
gosiaw
Message:

Creating templates corrected

File:
1 edited

Legend:

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

    r950 r951  
    1818 
    1919        <!-- Information from which level the translator should start moving information to templates --> 
    20         <xsl:variable name="templateStartLevel" select="''" /> 
     20        <xsl:variable name="templateStartLevel" select="'NodeGroup'" /> 
    2121 
    2222        <!-- Specification of the output document --> 
     
    212212        <xsl:template match="plm:ProductRevisionView" mode="createTemplates"> 
    213213         
     214                <!-- instanceRefs contain space separated ids of nested DEBBs --> 
     215                <xsl:variable name="tokenizedText" select="tokenize(@instanceRefs, ' ')" /> 
     216         
    214217                <xsl:variable name="debbLevel" 
    215218                        select="plm:UserData/plm:UserValue[@title='DEBBLevel']/@value" /> 
     
    273276                 
    274277                                        </xsl:otherwise> 
    275                                 </xsl:choose>                    
     278                                </xsl:choose> 
     279                                 
     280                                <!-- Iterate children and ask them to translate themselves --> 
     281                                <xsl:for-each select="1 to count($tokenizedText)"> 
     282                                        <xsl:variable name="index" select="." /> 
     283                                        <xsl:apply-templates 
     284                                                select="$rootDoc//plm:ProductInstance[@id=$tokenizedText[$index]]" mode="createHierarchy"/> 
     285                                </xsl:for-each>                  
     286                                                         
    276287                        </xsl:element> 
    277288                </xsl:if> 
Note: See TracChangeset for help on using the changeset viewer.