Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSL loop help

From: "Praveen" <praveen@---------.------>
To: 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
> 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent