| Modifier and Type | Field and Description |
|---|---|
| private Expression | _name
The name of the key. |
| private QName | _resolvedQName
Expanded qname when name is literal. |
| private Expression | _value
The value to look up in the key/index. |
| private Type | _valueType
The value's data type. |
| Access | Constructor and Description |
|---|---|
| public | KeyCall(QName
The function name (should be 'key' or 'id') fname, List<Expression> A vector containing the arguments the the function arguments)Get the parameters passed to function: key(String name, String value) key(String name, NodeSet value) The 'arguments' vector should contain two parameters for key() calls, one holding the key name and one holding the value(s) to look up. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addParentDependency()
If this call to key() is in a top-level element like another variable or param, add a dependency between that top-level element and the referenced key. |
| public void | translate(ClassGenerator
The Java class generator classGen, MethodGenerator The method generator methodGen)Overrides com. This method is called when the constructor is compiled in Stylesheet.compileConstructor() and not as the syntax tree is traversed. |
| public Type | typeCheck(SymbolTable
The parser's symbol table stable)Overrides com. Type check the parameters for the id() or key() function. |
| _name | back to summary |
|---|---|
| private Expression _name The name of the key. | |
| _resolvedQName | back to summary |
|---|---|
| private QName _resolvedQName Expanded qname when name is literal. | |
| _value | back to summary |
|---|---|
| private Expression _value The value to look up in the key/index. | |
| _valueType | back to summary |
|---|---|
| private Type _valueType The value's data type. | |
| KeyCall | back to summary |
|---|---|
| public KeyCall(QName fname, List<Expression> arguments) Get the parameters passed to function: key(String name, String value) key(String name, NodeSet value) The 'arguments' vector should contain two parameters for key() calls, one holding the key name and one holding the value(s) to look up. The vector has only one parameter for id() calls (the key name is always "##id" for id() calls).
| |
| addParentDependency | back to summary |
|---|---|
| public void addParentDependency() If this call to key() is in a top-level element like another variable or param, add a dependency between that top-level element and the referenced key. For example, <xsl:key name="x" .../> <xsl:variable name="y" select="key('x', 1)"/> and assuming this class represents "key('x', 1)", add a reference between variable y and key x. Note that if 'x' is unknown statically in key('x', 1), there's nothing we can do at this point. | |
| translate | back to summary |
|---|---|
| public void translate(ClassGenerator classGen, MethodGenerator methodGen) Overrides com. This method is called when the constructor is compiled in Stylesheet.compileConstructor() and not as the syntax tree is traversed. This method will generate byte code that produces an iterator for the nodes in the node set for the key or id function call.
| |
| typeCheck | back to summary |
|---|---|
| public Type typeCheck(SymbolTable stable) throws TypeCheckError Overrides com. Type check the parameters for the id() or key() function. The index name (for key() call only) must be a string or convertable to a string, and the lookup-value must be a string or a node-set.
| |