I have a local variable containing a list of several hundred values.
If another variable that holds the user name contains the text in one of
the values I have to empty it and generate a new user name.

Right now I do a for-each on that variable comparing each node with the
user name variable. Is there a better/more effecient way to perform the


This is the code:

<token-local-variable name="BadNames"/>
<if-xpath op="true">contains($var-UserID, $current-node)</if-xpath>
<do-set-local-variable name="var-UserID" scope="policy">
<token-text xml:space="preserve"/>