I had a client request that all attributes in a text driver be
upper-case. I could do them one at a time I suppose but that still
leaves me with the problem of uppercasing correctly on multivalued
attrs. Here is what I have come up with for the add operation - I am
curious if anyone knows of a more efficient way to do it. This isn't
ideal because I'm going to have trouble with modify-attrs if I use this
same idea. I'd really like to replace anything in a value tag with the
uppercase version of itself, but without using XSLT.

Thanks for any advice.

<rule>
<description>Make everything uppercase</description>
<conditions/>
<actions>
<do-set-local-variable name="attr-names" scope="policy">
<arg-node-set>
<token-xpath expression="add-attr/@attr-name"/>
</arg-node-set>
</do-set-local-variable>
<do-for-each>
<arg-node-set>
<token-local-variable name="attr-names"/>
</arg-node-set>
<arg-actions>
<do-set-local-variable name="current-attr-name" scope="policy">
<arg-string>
<token-local-variable name="current-node"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="current-attr-values" scope="policy">
<arg-node-set>
<token-attr name="$current-attr-name$"/>
</arg-node-set>
</do-set-local-variable>
<do-strip-op-attr name="$current-attr-name$"/>
<do-for-each>
<arg-node-set>
<token-local-variable name="current-attr-values"/>
</arg-node-set>
<arg-actions>
<do-add-dest-attr-value name="$current-attr-name$">
<arg-value>
<token-upper-case>
<token-local-variable name="current-node"/>
</token-upper-case>
</arg-value>
</do-add-dest-attr-value>
</arg-actions>
</do-for-each>
</arg-actions>
</do-for-each>
</actions>
</rule>


--
nate_spears
------------------------------------------------------------------------
nate_spears's Profile: http://forums.novell.com/member.php?userid=7564
View this thread: http://forums.novell.com/showthread.php?t=359232