Screen Shot of the Assist Pane
Flash Demonstration
Summary - What it's for
The 'Assist Pane' in SketchPath is provided to help you quickly and reliably build an XPath expression that meets your needs. With this pane active you simply select select an axes, function, node-name, value or variable to insert it into XPath expressions.
What it is
The Assist Pane comprises 5 lists of expression elements that are valid within an XPath expressions. The first list, 'Intelli-List' is populated according to the sub-context within an incomplete XPath expression (see Auto Completion) as it is being built. The remaining 4 lists are pre-populated with the permitted elements of an XPath 1.0 expression.
Selecting an item
The keyboard or mouse can be used to select items within the list or navigate to another list.
Using the keyboard to select an Item
Pressing the <space> key repeatedly steps down through each item in an Assist Pane column in turn, use the cursor keys to move left/right across columns.
To use a selected item from the list, press the <enter> key or the '/' , '[' or [comma] keys. Alternatively, pressing <backspace> or <esc> will remove the selected name from the XPath.
To quickly access elements or attributes that have a prefix, type the prefix - followed by the usual colon. The Intelli-List will then be filtered by that prefix so a named node can be selected more easily from a long list
Mouse support
Clicking an item on a list has the effect of selecting that item, and inserting the item into the XPath editing pane. The Assist Pane considers the existing XPath expression in determining whether to append the clicked item to the expression or replace the last location-step with the clicked item. This should quickly feel intuitive.
For example
/Basket/following::child::
is not valid, so clicking on child:: replaces following:: to produce
/Basket/child::
whereas clicking on node() for the first example is valid, so the step is appended as:
/Basket/following::node()
To permit a location path to be built more easily using the mouse, a number of buttons are available on a vertical toolbar. These provide for functions such as inserting predicates, deleting/undeleting location path steps etc.
Using Intelli-List (Auto-Completion)
The Intelli-List is populated dynamically according to the nodes or values available in the context of the expression as it is being completed. This is done in accordance with preceding predicates and axes, so you should always be presented only with those items that will result in a 'hit' on the xml source at that point in the expression.
Once the location-step is populated the Intelli-List is coloured red, this indicates that selecting an item at this point will not result in the item being appended as would otherwise be the case, but instead results in the current location-step being replaced, this behaviour should quickly feel quite natural.
Trace Mode
The Assist Pane works equally in Trace Mode. The Intelli-List is filled with valid nodes in the context of where the Trace Cursor is placed. Clicking an item replaces the location-step highighted by the Trace Cursor. To enter Trace Mode, either double-click within an expression, press <F10> or click the Trace button on the expression toolbar.
Adjusting the orientaion and size of the Assist Pane
The mouse can be used with the surrounding splitter bars to resize the Assist Pane. Also, clicking on the blue arrow button to the right of the XPath context bar switches the Assist Pane to either be below or to the right of the Expressions editor as shown below.
Collapsing the Assist Pane
When not required, the Assist Pane can be collapsed by either clicking the 'Assist On/Off' selector on the toolbar or by simply clicking the header bar at the top of the Assist Pane. When collapsed the Intelli-List and button column is still visible (as shown below).


