Edit online

Tooltip Helper for the XPath Functions Arguments

When editing the arguments of an XPath/XSLT function, Oxygen XML Developer Eclipse plugin tracks the current entered argument by displaying a tooltip containing the function signature. The currently edited argument is highlighted with a bolder font.

When moving the cursor through the expression, the tooltip is updated to reflect the argument found at the cursor position.

Examples:

If you want to concatenate the absolute values of two variables, named v1 and v2:
<xsl:template match="/">
    <xsl:value-of select="concat(abs($v1), abs($v2))"></xsl:value-of>
</xsl:template>
When moving the cursor before the first abs function, Oxygen XML Developer Eclipse plugin identifies it as the first argument of the concat function. The tooltip shows in bold font the following information about the first argument:
  • Its name is $arg1.
  • Its type is xdt:anyAtomicType.
  • It is optional (note the ? sign after the argument type).

The function also takes other arguments that have the same type and returns a xs:string.

Figure 1. XPath Tooltip Helper - Identify the concat Function's First Argument

Moving the cursor on the first variable $v1, the editor identifies the abs as context function and shows its signature:

Figure 2. XPath Tooltip Helper - Identify the abs Function's Argument

Further, clicking the second abs function name, the editor detects that it represents the second argument of the concat function. The tooltip is repainted to display the second argument in bold font.

Figure 3. XPath Tooltip Helper - Identify the concat Function's Second Argument
Note: The tooltip helper is also available in the XPath Builder view.