Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - For-each statement [Thread Next] Re: For-each statementTo: NULL Date: 3/24/2008 3:07:00 PM
Tambrosi wrote:
> I am real new to XSL processing, Hope somebody can help me out. I
> have this code and would only like process the first element of the
> for-each statement. I am not sure how to do that and I have been
> searching for a solution. Any help would be appreciated.
> Terry
>
> <h2>Shipping Address</h2>
> - <table cellspacing="0" border="1" cellpadding="3" width="600">
> - <tr>
> <td class="heading">Name</td>
> </tr>
> - <xsl:for-each select="ActionItems">
> - <xsl:for-each select="ActionItem">
Well you can do
<xsl:for-each select="ActionItems[1]">
to process only the first 'ActionItems' element or you can do
<xsl:for-each select="ActionItems">
<xsl:if test="position() = 1">
<!-- put here what you want to do with first item -->
</xsl:if>
</xsl:for-each>
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
