This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

exit <xsl:for-each> or change <xsl:variable>


Hi

Is it possible to change the value of a <xsl:variable> tag to something else
than it is declared to?:

<xsl:variable name="var">true</xsl:variable>
<xsl:template match="/">
<xsl:for-each select="root">
  <xsl:if test="@value='new'"> 
    <!-- change $var to false -->
  </xsl:if>
  <xsl:if test="$var='true'"> 
     <!-- do something  --> 
 </xsl:if>
</xsl:for-each>



Is it possibe to exit a <xsl:for-loop>. Like this: 

<xsl:for-each select="root">
  <xsl:if test="@value='new'"> 
    <!-- exit for-each -->  
 </xsl:if>
 <!-- do something  --> 
</xsl:for-each>


:matts:

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]