Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - XSL loop help [Thread Next] Re: XSL loop helpTo: NULL Date: 11/5/2005 11:29:00 AM Try this. <xsl:variable name="ROLES">ROLE1ROLE2</xsl:variable> <xsl:for-each select="//NAV_ITEM/ROLE_ACCESS[contains($ROLES,.)]"> <xsl:if test="position()=1"> <xsl:value-of select="."/> </xsl:if> </xsl:for-each> thanks, John Chacko johns221b@g... <veenakj@g...> wrote in message news:1131059442.451438.289400@o...... > Hi, > > 1) I have a string in the XSL > <xsl:variable name="ROLES">ROLE1ROLE2</xsl:variable> > > 2) I have to a set of nodes in XML like below > <NAV_ITEM id="1"> > <ROLE_ACCESS>ROLE1</ROLE_ACCESS> > <ROLE_ACCESS>ROLE2</ROLE_ACCESS> > <ROLE_ACCESS>ROLE3</ROLE_ACCESS> > </NAV_ITEM> > > 3) My requirement is i have to check if ROLES string contains any of > the ROLE_ACCESS. > As soon as it find the first i have to do something with that > NAV_ITEM and i should stop checking the containment of other > ROLE_ACCESS. > > Any help is greatly appreciated. > Thanks > VKJ > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
