Hi

I have been attempting to create an xpath that converts the phone
number to a extension, based on a earlier posting for text inversion

However, at the same time I found that the MutltiValue Telephone
number wasnt converting

The operational attribute contains data, I set up a local attribute
from phone which shows the first entry

Any help would be apreciated

Regards

Mark Casey
Pegasus Technology Pty Ltd
www.pegasustech.com.au


?xml version="1.0" encoding="UTF-8"?><policy
xmlns:dformat="http://www.novell.com/nxsl/java/java.text.SimpleDateFormat"
xmlns:jStringB="http://www.novell.com/nxsl/java/java.lang.StringBuffer"
xmlns:jdate="http://www.novell.com/nxsl/java/java.util.Date"
xmlns:jsystem="http://www.novell.com/nxsl/java/java.lang.System"
xmlns:syb="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.jdbc.db.Sybase"
xmlns:util="http://www.novell.com/nxsl/java/com.novell.ldap.util.Base64">
<rule>
<description>User - convert multi-valued Telephone to
single value</description>
<conditions>
<and>
<if-class-name
op="equal">indirect.usr</if-class-name>
<if-op-attr name="PHONE"
op="changing"/>
</and>
</conditions>
<actions>
<do-set-local-variable name="phone-number">
<arg-string>
<token-xpath
expression="./add-attr[@attr-name='PHONE']/value[1]"/>
</arg-string>
</do-set-local-variable>
<do-strip-op-attr name="PHONE"/>
<do-set-dest-attr-value name="PHONE">
<arg-value type="string">
<token-local-variable
name="phone-number"/>
</arg-value>
</do-set-dest-attr-value>
</actions>
</rule>





<rule disabled="true">
<description>Extension From Telephone</description>
<conditions>
<and>
<if-class-name
op="equal">indirect.usr</if-class-name>
<if-op-attr name="PHONE"
op="changing"/>
</and>
</conditions>
<actions>
<do-set-local-variable name="extValue">
<arg-string>
<token-dest-attr
name="PHONE"/>
</arg-string>
</do-set-local-variable>
<do-set-dest-attr-value name="ext">
<arg-value type="string">
<token-xpath
expression="jStringB:toString(jStringB:delete(1,jS tringB:length(jStringb:new(string($extValue))),jSt ringb:new(string($extValue))))"/>
</arg-value>
</do-set-dest-attr-value>
</actions>
</rule>
</policy>