- Timestamp:
- 11/20/12 11:41:42 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/test/DEBBTranslator/xml/PLMXMLTranslator.xsl
r633 r634 30 30 31 31 <xsl:template match="plm:InstanceGraph"> 32 <!-- Finding root DEBB --> 32 33 <xsl:variable name="rootRef" select="@rootRefs" /> 33 34 <xsl:apply-templates select="plm:ProductInstance[@id=$rootRef]" /> … … 36 37 <xsl:template match="plm:ProductInstance"> 37 38 <xsl:variable name="partRef" select="@partRef" /> 38 <!-- Get rid of # at the begin ing -->39 <!-- Get rid of # at the beginning --> 39 40 <xsl:variable name="productInstanceId" select="translate($partRef, '#', '')" /> 40 41 … … 44 45 <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute> 45 46 47 <!-- Find corresponding ProductRevisionView and let it translate itself --> 46 48 <xsl:apply-templates select="//plm:ProductRevisionView[@id=$productInstanceId]" /> 47 49 48 <!-- Add hostnames, labels, sequences, etc. -->50 <!-- Add hostnames, labels, locations, sequences, etc. --> 49 51 <xsl:variable name="debbHostname" 50 52 select="plm:UserData/plm:UserValue[@title='hostname']/@value" /> … … 67 69 </xsl:element> 68 70 </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> 69 81 <xsl:variable name="debbSequence" 70 82 select="plm:UserData/plm:UserValue[@title='sequence']/@value" /> … … 82 94 83 95 <xsl:template match="plm:ProductRevisionView"> 96 <!-- instanceRefs contain space separated ids of nested DEBBs --> 84 97 <xsl:variable name="tokenizedText" select="tokenize(@instanceRefs, ' ')" /> 98 85 99 <!-- DEBBLevel --> 86 100 <xsl:variable name="debbLevel" … … 103 117 <!-- Add DEBB information from DEBB Components file --> 104 118 <xsl:choose> 119 <!-- DEBB Components file is defined --> 105 120 <xsl:when test="debbComponentFile != ''"> 106 121 <xsl:variable name="nestedDoc" select="document($debbComponentFile)" /> 107 122 <xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]" /> 108 123 </xsl:when> 124 <!-- DEBB Components file is not defined. Use default one. --> 109 125 <xsl:otherwise> 110 126 <xsl:variable name="nestedDoc"
Note: See TracChangeset
for help on using the changeset viewer.