Friday, February 3, 2012

Novell IDM Convert Structured Attribute


Every time I need to work with structured attributes on a driver I land up googling for that same page of how to convert a structured attribute to a string and vice verse. Thus to save time I decide to post a link to the forum   here

The meat of the what you need to do to convert from a structured attribute to a string and back again is below, just remember to replace the attribute and component names as required:

Output Transform (struct -> string):
<do-reformat-op-attr name="faxnumber">
<arg-value>
<token-xpath expression='$current-value/component[@name="faxNumber"]/text()'/>
</arg-value>
</do-reformat-op-attr>

Input Transform (string -&gt; struct): 
<do-reformat-op-attr name="faxnumber">
<arg-value type="structured">
<arg-component name="faxNumber">
<token-local-variable name="current-value"/>
</arg-component>
<arg-component name="faxBitCount">
<token-text xml:space="preserve">0</token-text>
</arg-component>
<arg-component name="faxParameters">
<token-text/>
</arg-component>
</arg-value>
</do-reformat-op-attr>

No comments:

Followers