Here's some code with a "for each" on a node set. In this case its in an
AD driver and its removing group membership in AD when a matching value
is removed from a custom attribute in eDirectory. Its precisely elegant
code, and it depends a lot on stuff that I haven't included like local
variables, but I hope it helps.


<do-for-each>
<arg-node-set>
<token-removed-attr name="SCC:WisdomGroups"/>
</arg-node-set>
<arg-actions>
<do-trace-message color="drgrey">
<arg-string>
<token-text xml:space="preserve">Processing Wisdom Group
$current-node$ Membership removal.</token-text>
</arg-string>
</do-trace-message>
<do-set-local-variable name="target-Wisdomgroup" scope="policy">
<arg-string>
<token-text
xml:space="preserve">cn=$current-node$,~WisdomGroupsOU~</token-text>
</arg-string>
</do-set-local-variable>
<do-if>
<arg-conditions>
<and>
<if-local-variable name="target-Wisdomgroup" op="available"/>
</and>
</arg-conditions>
<arg-actions>
<do-trace-message color="drgrey">
<arg-string>
<token-text xml:space="preserve">Removing membership of Wisdom
group </token-text>
<token-local-variable name="target-Wisdomgroup"/>
<token-text xml:space="preserve"> from DN </token-text>
<token-dest-dn/>
</arg-string>
</do-trace-message>
<do-remove-dest-attr-value class-name="Group" name="Member"
when="after">
<arg-dn>
<token-local-variable name="target-Wisdomgroup"/>
</arg-dn>
<arg-value type="string">
<token-dest-dn/>
</arg-value>
</do-remove-dest-attr-value>
</arg-actions>
<arg-actions/>
</do-if>
</arg-actions>
</do-for-each>


--
jimc
------------------------------------------------------------------------
jimc's Profile: http://forums.novell.com/member.php?userid=6130
View this thread: http://forums.novell.com/showthread.php?t=454747