I am trying to split a delimited string value into a nodeset using the
split verb in DirXML policy (IDM 3.6, edir 8.8 SP3)
the following is the policy -


Code:
--------------------

<actions>
<do-append-xml-element expression="../add" name="add-attr"/>
<do-set-xml-attr expression="../add/add-attr" name="attr-name">
<arg-string>
<token-text xml:space="preserve">someattr</token-text>
</arg-string>
</do-set-xml-attr>
<do-set-local-variable name="var_badgedata" scope="policy">
<arg-string>
<token-attr name="BADGEIDENTIFIER"/>
</arg-string>
</do-set-local-variable>
<do-for-each>
<arg-node-set>
<token-split csv="false" delimiter=",">
<token-local-variable name="var_badgedata"/>
</token-split>
</arg-node-set>
<arg-actions>
<do-append-xml-element expression="../add/add-attr[@attr-name='someattr']" name="value"/>
<do-append-xml-text expression="../add/add-attr[@attr-name='someattr']/value">
<arg-string>
<token-text xml:space="preserve">$current-node$</token-text>
</arg-string>
</do-append-xml-text>
</arg-actions>
</do-for-each>
</actions>

--------------------


th code seems to be working except for one problem -- its appending
values in the <value> </value> node -- below is the level 5 trace.


Code:
--------------------

<input>
<add class-name="INT_STAGING" event-id="56" jdbcerpetrator="abc" jdbc:record-id="56" src-dn="IDVGUID=65781564,table=INT_STAGING">
<association>IDVGUID=65781564,table=INT_STAGING</association>
<add-attr attr-name="someattr">
<value type="string">apple,orange,mango,pearsappleorangem angopears</value>
<value>appleorangemangopears</value>
<value>orangemangopears</value>
<value>mangopears</value>
<value>pears</value>
</add-attr>

--------------------


what I actually want is in this format.

<input>
<add class-name="INT_STAGING" event-id="56" jdbcerpetrator="abc"
jdbc:record-id="56" src-dn="IDVGUID=65781564,table=INT_STAGING">
<association>IDVGUID=65781564,table=INT_STAGING</association>
<ADD-ATTR ATTR-NAME=\"SOMEATTR\">
<VALUE>APPLE</VALUE>
<VALUE>ORANGE</VALUE>
<VALUE>MANGO</VALUE>
<VALUE>PEARS</VALUE>
</add-attr>


Can someone please show me where I am missing.

--edir4ever


--
edir4ever
------------------------------------------------------------------------
edir4ever's Profile: http://forums.novell.com/member.php?userid=28533
View this thread: http://forums.novell.com/showthread.php?t=359618