Hi,

Im trying to get login disable datetime from users in my Vault. I did
this:

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

<do-for-each>
<arg-node-set>
<token-query class-name="User" datastore="src">
<arg-dn>
<token-global-variable name="drv.userRootContainer"/>
</arg-dn>
<arg-string>
<token-text xml:space="preserve">CN</token-text>
</arg-string>
<arg-string>
<token-text xml:space="preserve">Full Name</token-text>
</arg-string>
<arg-string>
<token-text xml:space="preserve">Login Disabled</token-text>
</arg-string>
</token-query>
</arg-node-set>
<arg-actions>
<do-trace-message>
<arg-string>
<token-xpath expression='$current-node/attr[attr-name="CN"]/value'/>
<token-text xml:space="preserve">;</token-text>
<token-xpath expression='$current-node/attr[attr-name="Full Name"]/value'/>
<token-text xml:space="preserve">;</token-text>
<token-xpath expression='$current-node/attr[attr-name="Login Disabled"]/value'/>
<token-text xml:space="preserve">;</token-text>
<token-xpath expression='$current-node/attr[attr-name="Login Disabled"]/@timestamp'/>
<token-text xml:space="preserve">;</token-text>
<token-xpath expression="$current-node/@src-dn"/>
</arg-string>
</do-trace-message>
</arg-actions>
</do-for-each>

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


Result is fine:

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

<instance class-name="User" qualified-src-dn="O=ACME\OU=ID\CN=1234" src-dn="\ACMETST\ACME\ID\1234" src-entry-id="44493">
<attr attr-name="CN">
<value naming="true" timestamp="1331758100#33" type="string">1234</value>
</attr>
<attr attr-name="Full Name">
<value timestamp="1331758100#13" type="string">First User</value>
</attr>
<attr attr-name="Login Disabled">
<value timestamp="1331758161#22" type="state">true</value>
</attr>
</instance>
<instance class-name="User" qualified-src-dn=" O=ACME\OU=ID\CN=12345" src-dn="\ACMETST\ACME\ID\12345" src-entry-id="44449">
<attr attr-name="CN">
<value naming="true" timestamp="1331154191#33" type="string">12345</value>
</attr>
<attr attr-name="Full Name">
<value timestamp="1331154191#13" type="string">Second User</value>
</attr>
<attr attr-name="Login Disabled">
<value timestamp="1331304088#28" type="state">true</value>
</attr>
</instance>

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


But only the $current-node/@src-dn part of code is working.
$current-node prints all attributes together.

1) How can I get these values?
2) How can I transform timestamp value in user friendly format?


--
agorian
------------------------------------------------------------------------
agorian's Profile: http://forums.novell.com/member.php?userid=53023
View this thread: http://forums.novell.com/showthread.php?t=454091