Hi,

I'm trying to get the DN of an object that meets some criteria, and then set
that DN as the "Owner" of another object. I do that in some older drivers
with a query that sets a local variable, based on retrieving a node-set and
then using XPATH to pull out the @src-dn value.

I am using the new "query" function in argument builder to pull back a
node-set result, but can't quite figure the syntax to grab the @src-dn out
of the returned results.

In the sample below I'm setting a local variable as a node-set, with the
result of the query, and then hoping to use an XPATH statement to grab the
attribute (though that is the syntax I'm missing). Is this necessary, or
should I be able to do a "Set Destination Attribute Value" directly, without
setting a variable?

Thanks,
R.
CCPS-AD-VOIP : Applying rule 'Assign'.

CCPS-AD-VOIP : Action:
do-set-local-variable("qODN",scope="policy",arg-node-set(token-query(class-name="User",arg-match-attr("Given
Name"),arg-match-attr("Surname")))).

CCPS-AD-VOIP :
arg-node-set(token-query(class-name="User",arg-match-attr("Given
Name"),arg-match-attr("Surname")))

CCPS-AD-VOIP : token-query(class-name="User",arg-match-attr("Given
Name"),arg-match-attr("Surname"))

CCPS-AD-VOIP : arg-match-attr("Given Name")

CCPS-AD-VOIP : arg-match-attr("Surname")

CCPS-AD-VOIP : Query from policy

CCPS-AD-VOIP :

<nds dtdversion="3.5" ndsversion="8.x">

<source>

<product version="?.?.?.?">DirXML</product>

<contact>Novell, Inc.</contact>

</source>

<input>

<query class-name="User" dest-dn="\CCPSIDV\data\res\pho\62215"
scope="subtree">

<search-class class-name="User"/>

<search-attr attr-name="Given Name">

<value naming="true" type="string">Vacancy</value>

</search-attr>

<search-attr attr-name="Surname">

<value naming="true" type="string">Hotline</value>

</search-attr>

<read-attr/>

</query>

</input>

</nds>

CCPS-AD-VOIP : Query from policy result

CCPS-AD-VOIP :

<nds dtdversion="3.5" ndsversion="8.x">

<source>

<product version="3.5.0.20070315 ">DirXML</product>

<contact>Novell, Inc.</contact>

</source>

<output>

<instance class-name="User" qualified-src-dn="O=data\OU=usr\CN=hotliva"
src-dn="\CCPSIDV\data\usr\hotliva" src-entry-id="33126"/>

<status level="success"/>

</output>

</nds>

CCPS-AD-VOIP : Token Value: {<instance> @class-name = "User"
@qualified-src-dn = "O=data\OU=usr\CN=hotliva" @src-dn =
"\CCPSIDV\data\usr\hotliva" @src-entry-id = "33126"}.

CCPS-AD-VOIP : Arg Value: {<instance> @class-name = "User" @qualified-src-dn
= "O=data\OU=usr\CN=hotliva" @src-dn = "\CCPSIDV\data\usr\hotliva"
@src-entry-id = "33126"}.