Hi!
I'm trying to remove instances from a query node-set variable by trying
to set up a new variable using XPath to only get the nodes that contain
all the attributes I need.

This is what the variable $lv-activeroles contains:


Code:
--------------------
Arg Value: {<instance> @class-name = "pidEmployee" @event-id = "0" @qualified-src-dn = "O=meta\OU=Meta\OU=Identities\CN=XXXXXXXXXXXX\CN=2 0000102563-334700-2901" @src-dn = "\META\meta\Meta\Identities\XXXXXXXXXXXX\200001025 63-334700-2901" @src-entry-id = "142035",<instance> @class-name = "pidEmployee" @event-id = "0" @qualified-src-dn = "O=meta\OU=Meta\OU=Identities\CN=XXXXXXXXXXXX\CN=2 0000102563-334700-2901xxx" @src-dn = "\META\meta\Meta\Identities\XXXXXXXXXXXX\200001025 63-334700-2901xxx" @src-entry-id = "142116",<instance> @class-name = "pidEmployee" @event-id = "0" @qualified-src-dn = "O=meta\OU=Meta\OU=Identities\CN=XXXXXXXXXXXX\CN=2 0000102563-334700-2901yyy" @src-dn = "\META\meta\Meta\Identities\XXXXXXXXXXXX\200001025 63-334700-2901yyy" @src-entry-id = "142132"}.
--------------------
I then use the following XPath:


Code:
--------------------
Action: do-set-local-variable("lv-activerolesfixed",scope="policy",arg-node-set(token-xpath("$lv-activeroles[attr[@attr-name='pidLocation'] and attr[@attr-name='pidAdministrationCode']
and attr[@attr-name='pidDepartment'] and attr[@attr-name='pidEmpType']
]")))
--------------------
It looks good since the "yyy" instance is gone from the result:


Code:
--------------------
Arg Value: {<instance> @class-name = "pidEmployee" @event-id = "0" @qualified-src-dn = "O=meta\OU=Meta\OU=Identities\CN=XXXXXXXXXXXX\CN=2 0000102563-334700-2901" @src-dn = "\META\meta\Meta\Identities\XXXXXXXXXXXX\200001025 63-334700-2901" @src-entry-id = "142035",<instance> @class-name = "pidEmployee" @event-id = "0" @qualified-src-dn = "O=meta\OU=Meta\OU=Identities\CN=XXXXXXXXXXXX\CN=2 0000102563-334700-2901xxx" @src-dn = "\META\meta\Meta\Identities\XXXXXXXXXXXX\200001025 63-334700-2901xxx" @src-entry-id = "142116"}.
--------------------
Then I need to do some work on the $lv-activerolesfixed node-set:


Code:
--------------------
Action: do-for-each(arg-node-set(token-xpath("$lv-activerolesfixed/../instance[@src-dn != $lv-destdn]")))
--------------------
But the above XPath gives me this, as you can see the yyy instance is
back in the game, any idea what I'm doing wrong?:


Code:
--------------------
Token Value: {<instance> @class-name = "pidEmployee" @event-id = "0" @qualified-src-dn = "O=meta\OU=Meta\OU=Identities\CN=XXXXXXXXXXXX\CN=2 0000102563-334700-2901xxx" @src-dn = "\META\meta\Meta\Identities\XXXXXXXXXXXX\200001025 63-334700-2901xxx" @src-entry-id = "142116",<instance> @class-name = "pidEmployee" @event-id = "0" @qualified-src-dn = "O=meta\OU=Meta\OU=Identities\CN=XXXXXXXXXXXX\CN=2 0000102563-334700-2901yyy" @src-dn = "\META\meta\Meta\Identities\XXXXXXXXXXXX\200001025 63-334700-2901yyy" @src-entry-id = "142132"}.
09:45:52 923A5480 Drvrs: Heroma PT: Arg Value: {<instance> @class-name = "pidEmployee" @event-id = "0" @qualified-src-dn = "O=meta\OU=Meta\OU=Identities\CN=XXXXXXXXXXXX\CN=2 0000102563-334700-2901xxx" @src-dn = "\META\meta\Meta\Identities\XXXXXXXXXXXX\200001025 63-334700-2901xxx" @src-entry-id = "142116",<instance> @class-name = "pidEmployee" @event-id = "0" @qualified-src-dn = "O=meta\OU=Meta\OU=Identities\CN=XXXXXXXXXXXX\CN=2 0000102563-334700-2901yyy" @src-dn = "\META\meta\Meta\Identities\XXXXXXXXXXXX\200001025 63-334700-2901yyy" @src-entry-id = "142132"}.
--------------------


--
alekz
------------------------------------------------------------------------
alekz's Profile: http://forums.novell.com/member.php?userid=1936
View this thread: http://forums.novell.com/showthread.php?t=347711