I need help with the xpath expression to strip off an empty title. I
have tried the designer xpath builder with different paths, such as
"/nds/input/modify/modify-attr... and modify/modify-attr... etc.

I'm trying to get the correct XPATH expression in the XPATH builder. It
won't find the empty string on the title. When using it in policy it
also won't find it.

I believe the content in the expression:
modify/modify-attr/add-value/value[not(*)][not(text()) or text()=''] is
correct, but that my path is messed up.

I have been using Lothar's example of the below rule to strip out
content.

<rule>
<description>Strip Empty Nodes</description>
<conditions/>
<actions>
<do-strip-xpath
expression="self::instance/attr/value[not(*)][not(text()) or
text()='']"/>
<do-strip-xpath expression="self::instance/attr[not(*)]"/>
<do-strip-xpath expression="self::add/add-attr/value[not(*)][not(text())
or text()='']"/>
<do-strip-xpath expression="self::add/add-attr[not(*)]"/>
<do-strip-xpath
expression="self::modify/modify-attr/remove-value/value[not(*)][not(text())
or text()='']"/>
<do-strip-xpath
expression="self::modify/modify-attr/remove-value[not(*)]"/>
<do-strip-xpath
expression="self::modify/modify-attr/add-value/value[not(*)][not(text())
or text()='']"/>
<do-strip-xpath
expression="self::modify/modify-attr/add-value[not(*)]"/>
<do-strip-xpath expression="self::modify/modify-attr[not(*)]"/>
</actions>
</rule>



With a third party online xpath tester I have the below xpath expression
and xml document below. It works in the third party tool just fine, it
finds the empty string for Title. This is of course generating a 613
error with the driver. I'm not using the self:: from the policy above in
the designer xpath builder, but trying to duplicate the below test in
the designer xpath builder doesn't give me the same result.

Expression:
/nds/input/modify/modify-attr/add-value/value[not(*)][not(text()) or
text()='']

<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.4.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<modify class-name="User" dest-dn="\LL-IDM-POC\data\Users\112130790"
dest-entry-id="850209" event-id="PK_EMPLID=411013,tabl
e=PS_LL_IAM_VW,schema=SYSADM:78302b88-c919-4399-a63b-3ecedb564068">

<association>PK_EMPLID=411013,table=PS_LL_IAM_VW,s chema=SYSADM</association>
<modify-attr attr-name="LLpager">
<remove-all-values/>
<add-value>
<value type="string">3 - 4/7/17 5:49 AM</value>
</add-value>
</modify-attr>
<modify-attr attr-name="LLUID">
<remove-all-values/>
<add-value>
<value type="string">411013-0-2009-07-19</value>
</add-value>
</modify-attr>
<modify-attr attr-name="LLEmplStatus">
<remove-all-values/>
<add-value>
<value type="string">P</value>
</add-value>
</modify-attr>
<modify-attr attr-name="LLEmplStatusDescr">
<remove-all-values/>
<add-value>
<value type="string">Leave W/Py</value>
</add-value>
</modify-attr>
<modify-attr attr-name="Title">
<remove-all-values/>
<add-value>
<value type="string"/>
</add-value>
</modify-attr>
<modify-attr attr-name="LLPayGroup">
<remove-all-values/>
<add-value>
<value type="string">912</value>
</add-value>
</modify-attr>
<modify-attr attr-name="LLUSSocCD">
<remove-all-values/>
<add-value>
<value type="string">8306</value>
</add-value>
</modify-attr>
<modify-attr attr-name="employeeType">
<remove-all-values/>
<add-value>
<value type="string">S</value>
</add-value>
</modify-attr>
</modify>
</input>
</nds>

thanks,
Fred


--
fp_IDMWORKS
------------------------------------------------------------------------
fp_IDMWORKS's Profile: https://forums.netiq.com/member.php?userid=9869
View this thread: https://forums.netiq.com/showthread.php?t=57772