Hi,

I'm trying to strip the future events from the following:

<input>
<modify class-name="User" dest-dn="data\users\amartinez"
dest-entry-id="44269"
event-id="DrvSAPHR:O_100_0000000000050008:P+00000771:PRO "
src-dn="00000771" timestamp="20140121">
<association
xmlns:query="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsQueryProcessor">00 000771</association>
<modify-attr attr-name="costCenter">
<add-value>
<value seqnr="000"
timestamp="30000101-99991231">0000000200</value>
</add-value>
</modify-attr>
<modify-attr attr-name="accessCardNumber">
<remove-all-values/>
<add-value>
<value seqnr="000" timestamp="20140122-99991231">01</value>
</add-value>
</modify-attr>
<modify-attr attr-name="Description">
<remove-all-values/>
<add-value>
<value seqnr="000"
timestamp="20140122-99991231">20140122</value>
</add-value>
</modify-attr>
</modify>
</input>

I'm using:

<do-strip-xpath
expression="modify-attr/add-value/value[(es:getSeconds(substring-before(@timestamp,
'-'), 'yyyyMMdd') > $lvFechaTope) and
(string-length(substring-before(@timestamp, '-')) > 0)]"/>

The result I got is:

<input>
<modify class-name="User" dest-dn="data\users\amartinez"
dest-entry-id="44269"
event-id="DrvSAPHR:O_100_0000000000050008:P+00000771:PRO "
src-dn="00000771" timestamp="20140121">
<association
xmlns:query="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsQueryProcessor">00 000771</association>
* <modify-attr attr-name="costCenter">
<add-value/>
</modify-attr>* <modify-attr attr-name="accessCardNumber">
<remove-all-values/>
<add-value>
<value seqnr="000" timestamp="20140122-99991231">01</value>
</add-value>
</modify-attr>
<modify-attr attr-name="Description">
<remove-all-values/>
<add-value>
<value seqnr="000"
timestamp="20140122-99991231">20140122</value>
</add-value>
</modify-attr>
</modify>
</input>
When the expected result should be to completely remove the attribute
costCenter:

<input>
<modify class-name="User" dest-dn="data\users\amartinez"
dest-entry-id="44269"
event-id="DrvSAPHR:O_100_0000000000050008:P+00000771:PRO "
src-dn="00000771" timestamp="20140121">
<association
xmlns:query="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsQueryProcessor">00 000771</association>
<modify-attr attr-name="accessCardNumber">
<remove-all-values/>
<add-value>
<value seqnr="000" timestamp="20140122-99991231">01</value>
</add-value>
</modify-attr>
<modify-attr attr-name="Description">
<remove-all-values/>
<add-value>
<value seqnr="000"
timestamp="20140122-99991231">20140122</value>
</add-value>
</modify-attr>
</modify>
</input>

Any idea what I'm missing?

Regards
Jose Luis


--
jlrodriguez
------------------------------------------------------------------------
jlrodriguez's Profile: https://forums.netiq.com/member.php?userid=359
View this thread: https://forums.netiq.com/showthread.php?t=49744