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]

Jumping out a loop


I have the following loop:

<xsl:for-each select="Grasslands/*[position()&gt;3 and text()]">
	<h3><font color="#00007f"><i><xsl:value-of
select="name()"/></i></font></h3>
	<p><font color="#008000"><xsl:value-of select="."/></font></p>
</xsl:for-each>

I want to jump out the loop at two children and perform a different function
for them:
For the Links of Genus child:

 <h3><a NAME="Label0045"></a><font color="#00007F"><i>Links for the
genus:</i></font></h3>
      <ul>
     <xsl:for-each select="Grasslands/LinksForTheGenus/Link">
      <li><font color="#008000"> <xsl:value-of
select="Address"/>;&#xA;<xsl:value-of select="Name"/> </font></li>
      </xsl:for-each>
      </ul>

For The References child:
 <h3><a NAME="Label0045"></a><font
color="#00007F"><i>References:</i></font></h3>

     <xsl:for-each select="Grasslands/References/Ref">
      <font color="#008000"> <xsl:value-of select="Name"/>&#xA;
<xsl:value-of select="Year"/>;&#xA;</font>
      </xsl:for-each>


References and Links for Genus are slightly different than all children of
Grasslands, I figure I need some sort of 'if' statement maybe:

<xsl:if test="Grasslands[LinksForTheGenus]"> do process
<xsl:if test="Grasslands[References]"> do process

Any suggestions.

Tanz


 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]