The XPath Builder is a powerful tool that allows you to build and test an XPath expression against any XML document. You can test different expressions against an XDS document and modify the XDS document while testing the expression. For more information about XPath expression, see Understanding Policies for Identity Manager 3.5.1 .
Figure 5-1 XPath Builder
To use the XPath Builder:
In the Policy Builder, select any of the following conditions or action, then click theicon .
Selectto browse to and select the XDS document to test.
Designer comes with sample event files you can use to test the XPath expression against. The files are located in the plug-in com.novell.designer.idm.policy_ version\simulation , where version is the current version of Designer. The events are Add, Association, Delete, Instance, Modify, Move, Query, Rename, and Status.
Double-click the folder to display the available events. Each event has different files you can select. For example, if you select Add you have three options: Organization.xml, OrganizationalUnit.xml, and User.xml. The file indicates the event. If you select User.xml, it is an Add event for a User object.
Select a file, then click.
The input document is now displayed in theview. The tab allows you to use an XML source editor to edit the imported document, or an XML document from another editor can be copied and pasted into the source view. If you change the document, click to save the changed document.
If you want to see the XDS document without scrolling, click theicon . To see the and windows, click icon .
Select the current position in the document from which you would like start building your XPath expression.
The XPath context that you have selected is displayed in theas shown.
searches the entire XML document to match the specified XPath expression. It returns results for each instance of the XPath expression. In this example, the XPath expression is “/nds/input/add”. It searches the entire XML document for each instance of add.
searches the XML document until it finds a match and stops. The unique XPath expression is “/nds/input/add”. It searches for the first instance of add and stops. You can specify which instance you want to use by selecting the next instance of the XPath element in the .
Specify an XPath expression in thefield.
NOTE:Using the keystroke combination Ctrl Space 3, /, [, or ( triggers code completion. The expression is evaluated up until the cursor location, and insertable elements are shown in a drop-down box.
The results of your XPath expression appear in thetext area below.
If the XPath editor does not evaluate the expression, click theicon to force the XPath Builder to evaluate the expression.
When you are finished building and testing an XPath expression, clickto close the XPath Builder. The text displayed in the is placed into the policy that you are editing.