XPath Assistant

Call up

  • INUBIT Workbench, Burger menu Tools > XPath assistant (shortcut Alt+Shift+P)

  • Tool key icon in the XSLT mapping table (shortcut ALT+P)

workbench user guide 471 1

The XPath wizard helps you create, test and edit XPath expressions.

You can use the XPath functions and elements from an example message to the XPath field using drag & drop. The XPath expression is evaluated immediately, and the result is displayed in the Result area.

  1. XPath field

    You can use drag & drop to drag XPath functions from messages in the editor window or the XPath functions docking window as well as variables from the table of workflow variables to the field.

    Context field (only if called via the tool key icon in the XSLT Converter)

    The context path is filled automatically. It shows the position relative to one to which the XPath has to be specified. It is relevant, for example, for an XPath below an xsl:for-each element where the context path refers to the node to be passed through and where this node is the starting point of the XPath. If auto complete is enabled (refer to Changing INUBIT Workbench Settings):

    • The XPath field suggests variable names from the existing XPath function list if you begin typing with $.

      Variables must be added to the Variables section before.

    • The XPath field suggests function names if you begin typing with alphabets, e.g.: fn or xslt

      The default namespace fn: can be omitted.

    • The XPath field suggests xml tag names when you begin typing with / followed by the first letter of an element.

      To view the corresponding sub tag elements, enter / followed by the first letter of an element after that sub tag element’s parent name, e.g.: /root/element1/sub-element2/

  2. Toolbar for editor and variables table

    Offers functions for editing messages in the editor window and workflow variables in the variables table.

  3. Toolbar for the editor

    Offers only functions for editing messages in the editor window.

  4. Editor

    The editor offers a graphical interface for creating and editing text, XML and XML Schema files. You can load existing files from the file system, the Repository, or from the clipboard. Each file format is automatically displayed in a suitable editor.

    Refer to Using the Editor.

    When clicking the X icon in the top right corner, a dialog is displayed saying that all changes get lost when closing the dialog. The former XPath expression is not overwritten. When clicking No, the XPath assistant window stays open.

    When clicking OK, the editor closes without saving. The former XPath expression is overwritten.

  5. Workflow variables

    Shows a list of all available workflow variables that can be used for the XPath expression.

  6. XPath structure

    Displays the syntax tree of the XPath expression. It can be used to view and analyze partial results (in particular of predicates) of the XPath expression, e.g., for debugging.

  7. Namespaces

    Lists all namespace prefix and namespace URI pairs used for the XPath execution. In case of drag & drop into the XPath field, the namespace is defined automatically.

  8. XPath functions

    Shows a list of all available XPath functions that can be dragged into the XPath expression using drag & drop.

  9. Result

    Shows the result of the evaluation of the XPath expression that was entered in the XPath field.

  10. Documentation

    Each selected XPath function is described in the Documentation window.

Enable/Disable millisecond precision for dateTime functions

This function is available from INUBIT 8.0.34.

For external functions → Formatter class functions which use dateTime values as arguments, millisecond precision validation check can be enabled with the flag enableFormatterMicrosecondsValidation which by default is disabled (false).

  • In Windows

    To enable this add the system property enableFormatterMicrosecondsValidation in the files start_workbench.bat and setenv.bat:

    set JVM_PARAMS=%JVM_PARAMS% -DenableFormatterMicrosecondsValidation=true
  • In Linux

    To enable this add the system property enableFormatterMicrosecondsValidation in the files start_workbench.sh and setenv.sh:

    JVM_PARAMS="$JVM_PARAMS -DenableFormatterMicrosecondsValidation=true"

XPath Wizard Toolbars

The XPath wizard has two toolbars for loading, displaying and editing example files:

  • Toolbar for editor and variables table

  • Toolbar for editor

The upper toolbar is used to control the functions for the editor window and the variables table:

Toolbar for editor and variables table

  • workbench user guide 472 0: Load watch point file

    You can load messages and variables together from the file system as a watch point file (*.wpf file).

  • workbench user guide 472 1: Load watch point file from Repository

    You can load messages and variables together from the Repository as a watch point file (*.wpf file).

  • workbench user guide 472 2: Save watch point file

    You can save messages and variables together as a watch point file (*.wpf file) into the file system.

  • workbench user guide 472 3: Save watch point file to Repository

    You can save messages and variables together as a watch point file (*.wpf file) into the Repository.

    Refer to Test data

  • workbench user guide 472 4: Copy to clipboard

    Saves the message -including all variables - to the clipboard.

  • workbench user guide 472 5: Insert from clipboard

    Inserts messages and variables from the clipboard.

Toolbar for editor

The lower toolbar only offers functions for the editor:

  • workbench user guide 473 0 Menu: Opens a submenu with the following commands:

    • workbench user guide 473 1 New: For creating a new file. You can choose between the file types simple text, XML, and XML Schema.

    • workbench user guide 473 2 Open: For loading a file from the file system or the Repository or for loading the clipboard content.

    • workbench user guide 473 3 Save: For saving the current file to the file system or the Repository or copying the current content to the clipboard.

    • workbench user guide 473 4 Print: For printing the current file.

    • Display appropriate editors for the content: Reduces the available editors to those that are suitable for the currently displayed file format.

    • Generate XML Schema template: Generates a template for an XML Schema from an XML file.

    • Compare: Compares XML documents

    • Editable: If this option is selected, you can edit the displayed file.

  • workbench user guide 473 5: Tree view

  • workbench user guide 473 6: Schema view

    Refer to Schema Editor.

  • workbench user guide 473 7: Text view

    Refer to Text Editor.

  • workbench user guide 472 4: Search

    Clicking the button opens the input field. You finish the input of the character string you want to search for by pressing the Return button. All instances are highlighted as bold. You can use arrow buttons to navigate through the instances.