net.sf.saxon.expr
public class RoleLocator extends Object implements Serializable
| Field Summary | |
|---|---|
| static int | BINARY_EXPR |
| static int | FUNCTION |
| static int | FUNCTION_RESULT |
| static int | GROUPING_KEY |
| static int | INSTRUCTION |
| static int | ORDER_BY |
| static int | PARAM |
| static int | TEMPLATE_RESULT |
| static int | TYPE_OP |
| static int | UNARY_EXPR |
| static int | UPDATING_EXPR |
| static int | VARIABLE |
| Constructor Summary | |
|---|---|
| RoleLocator(int kind, Serializable operation, int operand)
Create information about the role of a subexpression within its parent expression | |
| Method Summary | |
|---|---|
| String | composeErrorMessage(ItemType requiredItemType, ItemType suppliedItemType, NamePool pool)
Construct a full error message |
| String | composeRequiredMessage(ItemType requiredItemType, NamePool pool)
Construct the part of the message giving the required item type |
| String | getErrorCode()
Get the error code to be produced if a type error is detected |
| String | getMessage()
Construct and return the error message indicating a type error |
| void | setErrorCode(String code)
Set the error code to be produced if a type error is detected |
Parameters: kind the kind of parent expression, e.g. a function call or a variable reference operation the name of the object in the parent expression, e.g. a function name or instruction name. May be expressed either as a String or as a StructuredQName. For a string, the special format element/attribute is recognized, for example xsl:for-each/select, to identify the role of an XPath expression in a stylesheet. operand Ordinal position of this subexpression, e.g. the position of an argument in a function call
Parameters: requiredItemType the item type required by the context of a particular expression suppliedItemType the item type inferred by static analysis of an expression pool the name pool
Returns: a message of the form "Required item type of A is R; supplied value has item type S"
Parameters: requiredItemType the item type required by the context of a particular expression pool the name pool
Returns: a message of the form "Required item type of X is Y"
Returns: code The error code
Returns: the constructed error message
Parameters: code The error code