Ignore:
Timestamp:
11/20/12 11:41:42 (12 years ago)
Author:
gosiaw
Message:

More comments added

File:
1 edited

Legend:

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

    r633 r634  
    3030 
    3131        <xsl:template match="plm:InstanceGraph"> 
     32                <!-- Finding root DEBB --> 
    3233                <xsl:variable name="rootRef" select="@rootRefs" /> 
    3334                <xsl:apply-templates select="plm:ProductInstance[@id=$rootRef]" /> 
     
    3637        <xsl:template match="plm:ProductInstance"> 
    3738                <xsl:variable name="partRef" select="@partRef" /> 
    38                 <!-- Get rid of # at the begining --> 
     39                <!-- Get rid of # at the beginning --> 
    3940                <xsl:variable name="productInstanceId" select="translate($partRef, '#', '')" /> 
    4041 
     
    4445                                <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute> 
    4546                                 
     47                                <!-- Find corresponding ProductRevisionView and let it translate itself --> 
    4648                                <xsl:apply-templates select="//plm:ProductRevisionView[@id=$productInstanceId]" />                       
    4749                                         
    48                                 <!-- Add hostnames, labels, sequences, etc. --> 
     50                                <!-- Add hostnames, labels, locations, sequences, etc. --> 
    4951                                <xsl:variable name="debbHostname" 
    5052                                        select="plm:UserData/plm:UserValue[@title='hostname']/@value" /> 
     
    6769                                        </xsl:element> 
    6870                                </xsl:if> 
     71                                <xsl:variable name="debbLocation" 
     72                                        select="plm:UserData/plm:UserValue[@title='location']/@value" /> 
     73                                <xsl:if test="debbLocation != ''"> 
     74                                        <xsl:element name="parameter"> 
     75                                                <xsl:attribute name="name">location</xsl:attribute> 
     76                                                <xsl:element name="value"> 
     77                                                        <xsl:value-of select="$debbLocation" /> 
     78                                                </xsl:element> 
     79                                        </xsl:element> 
     80                                </xsl:if>                                
    6981                                <xsl:variable name="debbSequence" 
    7082                                        select="plm:UserData/plm:UserValue[@title='sequence']/@value" /> 
     
    8294 
    8395        <xsl:template match="plm:ProductRevisionView"> 
     96                <!-- instanceRefs contain space separated ids of nested DEBBs --> 
    8497                <xsl:variable name="tokenizedText" select="tokenize(@instanceRefs, ' ')" /> 
     98                 
    8599                <!-- DEBBLevel --> 
    86100                <xsl:variable name="debbLevel" 
     
    103117                <!-- Add DEBB information from DEBB Components file --> 
    104118                <xsl:choose> 
     119                        <!-- DEBB Components file is defined --> 
    105120                        <xsl:when test="debbComponentFile != ''"> 
    106121                                <xsl:variable name="nestedDoc" select="document($debbComponentFile)" /> 
    107122                                <xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]" /> 
    108123                        </xsl:when> 
     124                        <!-- DEBB Components file is not defined. Use default one. --> 
    109125                        <xsl:otherwise> 
    110126                                <xsl:variable name="nestedDoc" 
Note: See TracChangeset for help on using the changeset viewer.