Problems with XPATH Query.

I have found a coolsolutions tid regarding Group Membershup

http://wiki.novell.com/index.php/AD_Add_Groups_Policy

<?xml version="1.0" encoding="UTF-8"?>
<policy
xmlns:query="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsQueryProcessor">
<rule>
<description>Add new user to associated groups</description>
<conditions>
<and>
<if-operation op="equal">add</if-operation>
<if-class-name op="equal">User</if-class-name>
</and>
</conditions>
<actions>
<do-set-local-variable name="groupAssociations">
<arg-node-set>
<token-xpath expression="empty"/>
</arg-node-set>
</do-set-local-variable>
<do-for-each>
<arg-node-set>
<token-src-attr name="Group Membership"/>
</arg-node-set>
<arg-actions>
<do-set-local-variable name="groupAssociations">
<arg-node-set>
<token-local-variable name="groupAssociations"/>
<token-xpath expression="query:readObject($srcQueryProcessor, '',
$current-node, 'Group','')/association/text()[. != '']"/>
</arg-node-set>
</do-set-local-variable>
</arg-actions>
</do-for-each>
<do-for-each>
<arg-node-set>
<token-local-variable name="groupAssociations"/>
</arg-node-set>
<arg-actions>
<do-add-dest-attr-value class-name="Group" name="Member">
<arg-association>
<token-local-variable name="current-node"/>
</arg-association>
<arg-value type="string">
<token-dest-dn/>
</arg-value>
</do-add-dest-attr-value>
</arg-actions>
</do-for-each>
</actions>
</rule>
</policy>



I have place the rule in my Command Transformation

however I am recieving the following error in my trace. Could any help
with what I need to change to get it working?

Thanks

09:46:39 65C11260 Drvrs: <operation-data
unmatched-src-dn="CN=wed6,OU=ACTIVE,OU=INTERNAL"/>
</add>
</input>
</nds>
09:46:39 65C11260 Drvrs: AD DRIVER ST: Submitting add to subscriber shim.
09:46:39 65C11260 Drvrs: AD DRIVER ST: Applying command transformation
policies.
09:46:39 65C11260 Drvrs: AD DRIVER ST: Applying policy: Group Attribute Check.
09:46:39 65C11260 Drvrs: AD DRIVER ST: Applying to add #1.
09:46:39 65C11260 Drvrs: AD DRIVER ST: Evaluating selection criteria for
rule 'Add new user to associated groups'.
09:46:39 65C11260 Drvrs: AD DRIVER ST: (if-operation equal "add") = TRUE.
09:46:39 65C11260 Drvrs: AD DRIVER ST: (if-class-name equal "User") = TRUE.
09:46:39 65C11260 Drvrs: AD DRIVER ST: Rule selected.
09:46:39 65C11260 Drvrs: AD DRIVER ST: Applying rule 'Add new user to
associated groups'.
09:46:39 65C11260 Drvrs: AD DRIVER ST: Action:
do-set-local-variable("groupAssociations",arg-node-set(token-xpath("empty"))).
09:46:39 65C11260 Drvrs: AD DRIVER ST: arg-node-set(token-xpath("empty"))
09:46:39 65C11260 Drvrs: AD DRIVER ST: token-xpath("empty")
09:46:39 65C11260 Drvrs: AD DRIVER ST: Token Value: {}.
09:46:39 65C11260 Drvrs: AD DRIVER ST: Arg Value: {}.
09:46:39 65C11260 Drvrs: AD DRIVER ST: Action:
do-for-each(arg-node-set(token-src-attr("Group
Membership")),arg-actions(do-set-local-variable("groupAssociations",arg-node-set(token-local-variable("groupAssociations")+token-xpath("query:readObject($srcQueryProcessor,
'', $current-node, 'Group','')/association/text()[. != '']"))))).
09:46:39 65C11260 Drvrs: AD DRIVER ST: arg-node-set(token-src-attr("Group
Membership"))
09:46:39 65C11260 Drvrs: AD DRIVER ST: token-src-attr("Group Membership")
09:46:39 65C11260 Drvrs: AD DRIVER ST: Query from policy
09:46:39 65C11260 Drvrs: AD DRIVER ST:
<nds dtdversion="3.0" ndsversion="8.x">
<source>
<product version="3.0.0.20051118 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<query class-name="User" dest-dn="\OSR_VTEST\IDENTITY\INTERNAL\ACTIVE\wed6"
dest-entry-id="33093" scope="entry">
<read-attr attr-name="Group Membership"/>
</query>
</input>
</nds>
09:46:39 65C11260 Drvrs: AD DRIVER ST: Pumping XDS to eDirectory.
09:46:39 65C11260 Drvrs: AD DRIVER ST: Performing operation query for
\OSR_VTEST\IDENTITY\INTERNAL\ACTIVE\wed6.
09:46:39 65C11260 Drvrs: AD DRIVER ST: Query from policy result
09:46:39 65C11260 Drvrs: AD DRIVER ST:
<nds dtdversion="3.0" ndsversion="8.x">
<source>
<product version="3.0.0.20051118 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<instance class-name="User"
qualified-src-dn="O=IDENTITY\OU=INTERNAL\OU=ACTIVE\CN=wed6"
src-dn="\OSR_VTEST\IDENTITY\INTERNAL\ACTIVE\wed6" src-entry-id="33093">
<association state="pending"></association>
<attr attr-name="Group Membership">
<value timestamp="1148426033#34"
type="dn">\OSR_VTEST\IDENTITY\INTERNAL\IDMGROUPS\A DGROUPS\test4</value>
</attr>
</instance>
<status level="success"></status>
</output>
</nds>
09:46:39 65C11260 Drvrs: AD DRIVER ST: Token Value: {<value> @timestamp =
"1148426033#34" @type = "dn"}.
09:46:39 65C11260 Drvrs: AD DRIVER ST: Arg Value: {<value> @timestamp =
"1148426033#34" @type = "dn"}.
09:46:39 65C11260 Drvrs: AD DRIVER ST:
arg-actions(do-set-local-variable("groupAssociations",arg-node-set(token-local-variable("groupAssociations")+token-xpath("query:readObject($srcQueryProcessor,
'', $current-node, 'Group','')/association/text()[. != '']"))))
09:46:39 65C11260 Drvrs: AD DRIVER ST: Performing actions for
local-variable(current-node) = <value> @timestamp = "1148426033#34" @type =
"dn".
09:46:39 65C11260 Drvrs: AD DRIVER ST: Action:
do-set-local-variable("groupAssociations",arg-node-set(token-local-variable("groupAssociations")+token-xpath("query:readObject($srcQueryProcessor,
'', $current-node, 'Group','')/association/text()[. != '']"))).
09:46:39 65C11260 Drvrs: AD DRIVER ST:
arg-node-set(token-local-variable("groupAssociations")+token-xpath("query:readObject($srcQueryProcessor,
'', $current-node, 'Group','')/association/text()[. != '']"))
09:46:39 65C11260 Drvrs: AD DRIVER ST:
token-local-variable("groupAssociations")
09:46:39 65C11260 Drvrs: AD DRIVER ST: Token Value: {}.
09:46:39 65C11260 Drvrs: AD DRIVER ST:
token-xpath("query:readObject($srcQueryProcessor, '', $current-node,
'Group','')/association/text()[. != '']")
09:46:39 65C11260 Drvrs: AD DRIVER ST: Processing returned document.
09:46:39 65C11260 Drvrs: AD DRIVER ST: Processing operation <status> for .
09:46:39 65C11260 Drvrs: AD DRIVER ST:
DirXML Log Event -------------------
Driver: \OSR_VTEST\ADMIN\IDMDriverSet\Active Directory
Channel: Subscriber
Object: \OSR_VTEST\IDENTITY\INTERNAL\ACTIVE\wed6
Status: Error
Message: Code(-9131) Error in
vnd.nds.stream://OSR_VTEST/ADMIN/IDMDriverSet/Active
Directory/Subscriber/Group Attribute Check#XmlData:45 : Error evaluating
XPATH expression 'token-xpath("query:readObject($srcQueryProcessor, '',
$current-node, 'Group','')/association/text()[. != '']")' :
com.novell.xml.xpath.XPathEvaluationException: function 'query:readObject'
not found.
09:46:39 65C11260 Drvrs: AD DRIVER ST: End transaction.