Hi

I'm trying to write a rule in a loopback driver that checks if users
have an association with a particular driver.

The xpath rule I'm using is:
(if-xpath
op="true")add-attr[@attr-name='DirXML-Associations'](/if-xpath)

which returns true so I then tried:
(if-xpath
op="true")add-attr[@attr-name='DirXML-Associations']/component[@name='volume'](/if-xpath)

which returns false but I don't see why it does.

Ideally I'd then use the following as the complete code.
(if-xpath
op="true")add-attr[@attr-name='DirXML-Associations']/component[@name='volume']/text()='\org1\IDM\driver-set1\Loopback-driver'(/if-xpath)

Below is a level 3 trace of the code in action, any ideas where I'm
going wrong?


(nds dtdversion="3.5" ndsversion="8.x")
(source)
(product version="3.5.10.20070918 ")DirXML(/product)
(contact)Novell, Inc.(/contact)
(/source)
(input)
(add class-name="User" event-id="server1#20090116180403#11#1"
qualified-src-dn="O=org1\ou=dept1\CN=user1" src-dn="\org1\dept1\user1"
src-entry-id="64740")
(association state="migrate")(/association)
(add-attr attr-name="CN")
(value naming="true" timestamp="1130824770#14"
type="string")user1(/value)
(/add-attr)
(add-attr attr-name="DirXML-Associations")
(value timestamp="1187617976#1" type="structured")
(component name="nameSpace")1(/component)
(component name="volume")\org1\IDM\driver-set1\edir-driver(/component)
(component
name="path"){30745ECF-C3D7-db01-80C7-001185EAA533}(/component)
(/value)
(value timestamp="1232129029#2" type="structured")
(component name="nameSpace")4(/component)
(component
name="volume")\org1\IDM\driver-set1\Loopback-driver(/component)
(component name="path"/)
(/value)
(/add-attr)
(/add)
(/input)
(/nds)
18:04:03 6C2EBBB0 Drvrs: Loopback ST:No object matching policies.
18:04:03 6C2EBBB0 Drvrs: Loopback ST:No object creation policies.
18:04:03 6C2EBBB0 Drvrs: Loopback ST:No object placement policies.
18:04:03 6C2EBBB0 Drvrs: Loopback ST:Submitting add to subscriber
shim.
18:04:03 6C2EBBB0 Drvrs: Loopback ST:Applying command transformation
policies.
18:04:03 6C2EBBB0 Drvrs: Loopback ST:Applying policy: check
DirXML-Associations.
18:04:03 6C2EBBB0 Drvrs: Loopback ST: Applying to add #1.
18:04:03 6C2EBBB0 Drvrs: Loopback ST: Evaluating selection criteria for
rule 'Check DirXML-Associations'.
18:04:03 6C2EBBB0 Drvrs: Loopback ST: (if-xpath true
"add-attr[@attr-name='DirXML-Associations']") = TRUE.
18:04:03 6C2EBBB0 Drvrs: Loopback ST: (if-xpath true
"add-attr[@attr-name='DirXML-Associations']/component[@name='volume']")
= FALSE.
18:04:03 6C2EBBB0 Drvrs: Loopback ST: Rule rejected.
18:04:03 6C2EBBB0 Drvrs: Loopback ST:Policy returned:


--
Mike
Manchester Metropolitan University
------------------------------------------------------------------------
mikepreece's Profile: http://forums.novell.com/member.php?userid=611
View this thread: http://forums.novell.com/showthread.php?t=357151