Novell is now a part of Micro Focus

Stripping Null Values from IDM Operations

Novell Cool Solutions: Tip
By William C Schneider

Digg This - Slashdot This

Posted: 14 Nov 2007


A Forum reader recently asked:

"Is there any way, without resorting to XSLT, to strip all null values from all operations, either at the Input, Output, the Command or both?"

And here's the response from Will Schneider ...


I use these rules:

<description>Strimp Empty Values [Add]</description>
    <if-operation mode="case" op="equal">add</if-operation>
    <do-strip-xpath expression="add-attr[value='']"/>
    <do-strip-xpath expression="add-attr[not(*)]"/>

<description>Strimp Empty Values [Modify]</description>
    <if-operation mode="case" op="equal">modify</if-operation>
    <if-operation mode="case" op="equal">sync</if-operation>
    <do-strip-xpath expression="modify-attr/add-value[value='']"/>
    <do-strip-xpath expression="modify-attr[not(*)]"/>

Although there is probably a more efficient way to do this, it does work well.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates