Hello,

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
comparison?

Thanks.

This is the code:

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