The rules created using RuleMaker are all designed to manipulate XML documents. Therefore, it is much easier to create and understand them if you can visualise the XML structure. Fortunately, RuleMaker makes this very easy to do by the use of Treeview tree representations of XML documents.
Both an 'input' and 'output' document can be visible at the same time, as shown in the following screenshot.
Each document can be easily displayed by clicking the appropriate Toggle button at the top left or right of the screen. Clicking this button again will hide the displayed document. The amount of screen space allocated to each document can be adjusted by dragging the blue dividers as required.
The Change buttons are used to select the required document to display in either of the treeview locations. They will open a Repository Viewer application window listing the available documents. Simply select the required category from the left hand list, and the click on the appropriate document in the main window. The selected document will then be displayed in the appropriate treeview.
Each rule created with RuleMaker makes use of XPaths to query and manipulate the XML data. To make it easy to create these XPaths, RuleMaker provides a number of advanced features:
The easiest way to enter a new XPath value is by taking it from an example document. Once a document is displayed in one of the treeviews you can click on an element in the document and drag it into the required text area. This will automatically populate the XPath needed to link to the selected element.
If you are comfortable with XPaths, or wish to use more advanced features, the required XPath can be entered directly into the text area. RuleMaker provides XPath validation as you type, so you can immediately see if there are any syntax problems with your entered details.
Regardless of how an XPath has been entered, RuleMaker tries to link the value to the current 'input' and 'output' documents. Next to each XPath, a count will be displayed indicating the number of elements the XPath matches in both of the documents. Clicking on either count will open that document, and highlight the elements that have been matched. This allows you to easily see if your XPath is selecting the elements of the document that you require.