簡體   English   中英

變量未賦值

[英]Variable not being assigned value

現在我正在嘗試將模板保存到變量DatumMoves。 在調試器中運行時,它會跳過DatumMoves的變量,但在未分配給變量時執行正常。

                <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>

確保在某處使用變量值,否則XSLT處理器可以完全不計算其值。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM