Can anyone tell me why the xpath does not work.

I have two examples:

Example: 1
xpath("/nds/input[1]/modify[1]/modify-attr[6]/add-value[1]/value[1]/text()"))

Example: 2 xpath("modify-attr[@attr-name='NGW: File
ID']/add-value/value/text()")).

I have two examples of xpath expressions - both work with the input
document when I test it through designer - but when I actually run it
through it doesn't:

Assistance is appreciated.

First is the input document then the resulting policy.


<nds dtdversion="2.0" ndsversion="8.x">
<source>
<product build="20051017_1812" instance="Grpdev" version="2.2
(nlm)">DirXML Driver for GroupWise</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<add-association
dest-dn="SSFC-IDVAULTIDVAULTRyan_DevFlemingBrealeyStaffgbrightf"
dest-entry-id="37558"
event-id="gw4">BRDOM.BRSFPO.gbrightf{106}2440DDC0-0D22-0000-890C-77CFF11BFA4B</add-association>
<modify class-name="User" event-id="gw5" src-dn="BRDOM.BRSFPO.gbrightf">
<association>BRDOM.BRSFPO.gbrightf{106}2440DDC0-0D22-0000-890C-77CFF11BFA4B</association>
<modify-attr attr-name="NGW: Mailbox Expiration Time">
<remove-all-values/>
</modify-attr>
<modify-attr attr-name="EMail Address">
<add-value>
<value type="structured">
<component name="eMailType">7</component>
<component name="eMailAddr">gbrightf@BRDOM.BRSFPO</component>
</value>
</add-value>
</modify-attr>
<modify-attr attr-name="Internet EMail Address">
<remove-all-values/>
<add-value>
<value>gbrightf@flemingc.on.ca</value>
</add-value>
</modify-attr>
<modify-attr attr-name="NGW: Visibility">
<remove-all-values/>
<add-value>
<value type="int">2</value>
</add-value>
</modify-attr>
<modify-attr attr-name="NGW: GroupWise ID">
<remove-all-values/>
<add-value>
<value
type="string">BRDOM.BRSFPO.gbrightf{106}2440DDC0-0D22-0000-890C-77CFF11BFA4B</value>
</add-value>
</modify-attr>
<modify-attr attr-name="NGW: File ID">
<remove-all-values/>
<add-value>
16:23:05 8F54A440 Drvrs: <value type="string">yiq</value>
</add-value>
</modify-attr>
<modify-attr attr-name="NGW: Object ID">
<remove-all-values/>
<add-value>
<value type="string">gbrightf</value>
</add-value>
</modify-attr>
<modify-attr attr-name="NGW: Post Office">
<remove-all-values/>
<add-value>
<value type="dn">SSFC-IDVAULTIDVAULTGroupwiseBRSFPO</value>
</add-value>
</modify-attr>
</modify>
</input>
</nds>
16:23:05 8F54A440 Drvrs: Grpdev PT: Applying publisher filter.
16:23:05 8F54A440 Drvrs: Grpdev PT: Publisher processing add-association
for .
16:23:05 8F54A440 Drvrs: Grpdev PT: Applying command transformation
policies.
16:23:05 8F54A440 Drvrs: Grpdev PT: Applying policy:
JMAddofGroupwiseAccount.
16:23:05 8F54A440 Drvrs: Grpdev PT: Applying to add-association #1.
16:23:05 8F54A440 Drvrs: Grpdev PT: Evaluating selection criteria for rule
'Test for add-assoc'.
16:23:05 8F54A440 Drvrs: Grpdev PT: (if-operation equal "add-association")
= TRUE.
16:23:05 8F54A440 Drvrs: Grpdev PT: Rule selected.
16:23:05 8F54A440 Drvrs: Grpdev PT: Applying rule 'Test for add-assoc'.
16:23:05 8F54A440 Drvrs: Grpdev PT: Action:
do-set-op-property("addisgood",token-dest-dn()).
16:23:05 8F54A440 Drvrs: Grpdev PT: arg-string(token-dest-dn())
16:23:05 8F54A440 Drvrs: Grpdev PT: token-dest-dn()
16:23:05 8F54A440 Drvrs: Grpdev PT: Token Value:
"SSFC-IDVAULTIDVAULTRyan_DevFlemingBrealeyStaffgbrightf" .
16:23:05 8F54A440 Drvrs: Grpdev PT: Arg Value:
"SSFC-IDVAULTIDVAULTRyan_DevFlemingBrealeyStaffgbrightf" .
16:23:05 8F54A440 Drvrs: Grpdev PT: Action:
do-set-op-property("GWinfo",token-xpath("/nds/input[1]/modify[1]/modify-attr[6]/add-value[1]/value[1]/text()")).
16:23:05 8F54A440 Drvrs: Grpdev PT:
arg-string(token-xpath("/nds/input[1]/modify[1]/modify-attr[6]/add-value[1]/value[1]/text()"))
16:23:05 8F54A440 Drvrs: Grpdev PT:
token-xpath("/nds/input[1]/modify[1]/modify-attr[6]/add-value[1]/value[1]/text()")
16:23:05 8F54A440 Drvrs: Grpdev PT: Token Value: "".
16:23:05 8F54A440 Drvrs: Grpdev PT: Arg Value: "".
16:23:05 8F54A440 Drvrs: Grpdev PT: Policy returned:
16:23:05 8F54A440 Drvrs: Grpdev PT:

Example 2:
<nds dtdversion="2.0" ndsversion="8.x">
<source>
<product build="20051017_1812" instance="Grpdev" version="2.2
(nlm)">DirXML Driver for GroupWise</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<add-association
dest-dn="SSFC-IDVAULTIDVAULTRyan_DevFlemingBrealeyStaffgbrightf"
dest-entry-id="37556"
event-id="gw4">BRDOM.BRSFPO.gbrightf{106}2440DDC0-0D22-0000-890C-77CFF11BFA4B</add-association>
<modify class-name="User" event-id="gw5" src-dn="BRDOM.BRSFPO.gbrightf">
<association>BRDOM.BRSFPO.gbrightf{106}2440DDC0-0D22-0000-890C-77CFF11BFA4B</association>
<modify-attr attr-name="NGW: Mailbox Expiration Time">
<remove-all-values/>
</modify-attr>
<modify-attr attr-name="EMail Address">
<add-value>
<value type="structured">
<component name="eMailType">7</component>
<component name="eMailAddr">gbrightf@BRDOM.BRSFPO</component>
</value>
</add-value>
</modify-attr>
<modify-attr attr-name="Internet EMail Address">
<remove-all-values/>
<add-value>
<value>gbrightf@flemingc.on.ca</value>
</add-value>
</modify-attr>
<modify-attr attr-name="NGW: Visibility">
<remove-all-values/>
<add-value>
<value type="int">2</value>
</add-value>
</modify-attr>
<modify-attr attr-name="NGW: GroupWise ID">
<remove-all-values/>
<add-value>
<value
type="string">BRDOM.BRSFPO.gbrightf{106}2440DDC0-0D22-0000-890C-77CFF11BFA4B</value>
</add-value>
</modify-attr>
<modify-attr attr-name="NGW: File ID">
<remove-all-values/>
<add-value>
16:15:29 90A65460 Drvrs: <value type="string">9t1</value>
</add-value>
</modify-attr>
<modify-attr attr-name="NGW: Object ID">
<remove-all-values/>
<add-value>
<value type="string">gbrightf</value>
</add-value>
</modify-attr>
<modify-attr attr-name="NGW: Post Office">
<remove-all-values/>
<add-value>
<value type="dn">SSFC-IDVAULTIDVAULTGroupwiseBRSFPO</value>
</add-value>
</modify-attr>
</modify>
</input>
</nds>
16:15:29 90A65460 Drvrs: Grpdev PT: Applying publisher filter.
16:15:29 90A65460 Drvrs: Grpdev PT: Publisher processing add-association
for .
16:15:29 90A65460 Drvrs: Grpdev PT: Applying command transformation
policies.
16:15:29 90A65460 Drvrs: Grpdev PT: Applying policy:
JMAddofGroupwiseAccount.
16:15:29 90A65460 Drvrs: Grpdev PT: Applying to add-association #1.
16:15:29 90A65460 Drvrs: Grpdev PT: Evaluating selection criteria for rule
'Test for add-assoc'.
16:15:29 90A65460 Drvrs: Grpdev PT: (if-operation equal "add-association")
= TRUE.
16:15:29 90A65460 Drvrs: Grpdev PT: Rule selected.
16:15:29 90A65460 Drvrs: Grpdev PT: Applying rule 'Test for add-assoc'.
16:15:29 90A65460 Drvrs: Grpdev PT: Action:
do-set-op-property("addisgood",token-dest-dn()).
16:15:29 90A65460 Drvrs: Grpdev PT: arg-string(token-dest-dn())
16:15:29 90A65460 Drvrs: Grpdev PT: token-dest-dn()
16:15:29 90A65460 Drvrs: Grpdev PT: Token Value:
"SSFC-IDVAULTIDVAULTRyan_DevFlemingBrealeyStaffgbrightf" .
16:15:29 90A65460 Drvrs: Grpdev PT: Arg Value:
"SSFC-IDVAULTIDVAULTRyan_DevFlemingBrealeyStaffgbrightf" .
16:15:29 90A65460 Drvrs: Grpdev PT: Action:
do-set-op-property("GWinfo",token-xpath("modify-attr[@attr-name='NGW: File
ID']/add-value/value/text()")).
16:15:29 90A65460 Drvrs: Grpdev PT:
arg-string(token-xpath("modify-attr[@attr-name='NGW: File
ID']/add-value/value/text()"))
16:15:29 90A65460 Drvrs: Grpdev PT:
token-xpath("modify-attr[@attr-name='NGW: File
ID']/add-value/value/text()")
16:15:29 90A65460 Drvrs: Grpdev PT: Token Value: "".
16:15:29 90A65460 Drvrs: Grpdev PT: Arg Value: "".
16:15:29 90A65460 Drvrs: Grpdev PT: Policy returned: