APIdia Launch Partner
Top Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.compiler

pack-priv final Class Key

extends TopLevelElement
Class Inheritance
Imports
com.sun.org.apache.bcel.internal.generic.BranchHandle, .ConstantPoolGen, .GOTO, .IFEQ, .IFGE, .IFGT, .ILOAD, .INVOKEINTERFACE, .INVOKEVIRTUAL, .ISTORE, .InstructionHandle, .InstructionList, .LocalVariableGen, .PUSH, com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator, .ErrorMsg, .MethodGenerator, .NodeSetType, .StringType, .Type, .TypeCheckError, .Util, com.sun.org.apache.xml.internal.dtm.Axis, com.sun.org.apache.xml.internal.utils.XML11Char

Authors
Morten Jorgensen, Santiago Pericas-Geertsen

Field Summary

Modifier and TypeField and Description
private Pattern
_match

The pattern to match starting at the root node.

private QName
_name

The name of this key as defined in xsl:key.

private Expression
_use

The expression that generates the values for this key.

private Type
_useType

The type of the _use expression.

Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement:
_dependencies

Constructor Summary

AccessConstructor and Description
pack-priv
Key()

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The key's name (from the <xsl:key> elements 'name' attribute).
getName
()

Returns a String-representation of this key's name

public void
parseContents(Parser
A reference to the stylesheet parser
parser
)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.parseContents.

Parse the <xsl:key> element and attributes

public void
translate(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.translate.

Gather all nodes that match the expression in the attribute "match" and add one (or more) entries in this key's index.

public void
traverseNodeSet(ClassGenerator classGen, MethodGenerator methodGen, int buildKeyIndex)

This method is called if the "use" attribute of the key contains a node set.

public Type
typeCheck(SymbolTable stable)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.typeCheck.

Type check all the children of this node.

Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement:
addDependencycompiledisplaygetDependencies

Field Detail

_matchback to summary
private Pattern _match

The pattern to match starting at the root node.

_nameback to summary
private QName _name

The name of this key as defined in xsl:key.

_useback to summary
private Expression _use

The expression that generates the values for this key.

_useTypeback to summary
private Type _useType

The type of the _use expression.

Constructor Detail

Keyback to summary
pack-priv Key()

Method Detail

getNameback to summary
public String getName()

Returns a String-representation of this key's name

Returns:String

The key's name (from the <xsl:key> elements 'name' attribute).

parseContentsback to summary
public void parseContents(Parser parser)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.parseContents.

Parse the <xsl:key> element and attributes

Parameters
parser:Parser

A reference to the stylesheet parser

translateback to summary
public void translate(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.translate.

Gather all nodes that match the expression in the attribute "match" and add one (or more) entries in this key's index.

traverseNodeSetback to summary
public void traverseNodeSet(ClassGenerator classGen, MethodGenerator methodGen, int buildKeyIndex)

This method is called if the "use" attribute of the key contains a node set. In this case we must traverse all nodes in the set and create one entry in this key's index for each node in the set.

typeCheckback to summary
public Type typeCheck(SymbolTable stable) throws TypeCheckError

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.typeCheck.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.typeCheck.

Type check all the children of this node.