Technical Tip

Stripping Null Values from IDM Operations

Author Info

14 November 2007 - 6:33am
Submitted by: descent

tip
Reads:

569

Score:
3
3
4
 
Comments:

0

Problem

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 ...

Solution

I use these rules:

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

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

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


Author Info

14 November 2007 - 6:33am
Submitted by: descent




User Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <p> <a> <em> <i> <cite> <code> <img> <ul> <ol> <li> <div> <dl> <dt> <dd> <b> <strong> <h1> <h2> <h3> <pre> <table> <td> <tr> <th> <blockquote>
  • Lines and paragraphs break automatically.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
3 + 16 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

© 2008 Novell, Inc. All Rights Reserved.