Reputation: 165
Right now I'm trying to save a template to the variable DatumMoves. When running in debugger, it skips right past the variable for DatumMoves but executes fine when not being assigned to a variable.
<xsl:variable name="SlaveMoves">
<xsl:call-template name="ReadFiles">
<xsl:with-param name="FileType" select="'Slave'"/>
<xsl:with-param name="Activities" select='$slavefile/OLPData/Resource/ActivityList/Activity'/>
<xsl:with-param name="GH_IML_EE" select="$GH_IML_EE"/>
</xsl:call-template>
</xsl:variable>
<!--LOOP THROUGH THE OPERATIONS AND DO A RECURSIVE CALL TO COMBINE ROBOTS-->
<xsl:for-each select="$MasterMoves/Operation">
<xsl:copy><xsl:copy-of select="@*"/>
<!--<Relocation>
<xsl:variable name="relocation" select="$DatumFile/CellProgram/WorkSequence/Operation/Block[@Type = 'WORK' and not(RobotPoint[@Process='NOP'])]"/>
<xsl:for-each select="$relocation/RobotPoint">
<xsl:copy>
<xsl:element name="Target">
<xsl:copy-of select="@RobotIndex"/>
<xsl:copy-of select="Data/@Location"/>
</xsl:element>
</xsl:copy>
</xsl:for-each>
</Relocation>-->
<xsl:variable name="DatumMoves">
<xsl:call-template name="process-next">
<xsl:with-param name="mastermoves" select='Move' tunnel='yes'/>
<xsl:with-param name="slavemoves" select='$SlaveMoves/Operation[@Name=current()/@Name]/Move' tunnel='yes'/>
</xsl:call-template>
</xsl:variable>
<Options RobotIndex="1"><xsl:copy-of select="Options/@*"/></Options>
<Options RobotIndex="2"><xsl:copy-of select="$SlaveMoves/Operation[@Name=current()/@Name]/Options/@*"/></Options>
<xsl:call-template name="process-next">
<xsl:with-param name="mastermoves" select='Move' tunnel='yes'/>
<xsl:with-param name="slavemoves" select='$SlaveMoves/Operation[@Name=current()/@Name]/Move' tunnel='yes'/>
</xsl:call-template>
</xsl:copy>
Upvotes: 0
Views: 70
Reputation: 167676
Make sure the variable value is used somewhere, otherwise the XSLT processor is free not to compute its value at all.
Upvotes: 2