net.sf.saxon.trace

Class ContextStackFrame

public abstract class ContextStackFrame extends Object

An entry on the context stack. A new entry is created every time the context changes. This is a representation of the stack created on request; it does not hold live data.
Nested Class Summary
static classContextStackFrame.ApplyTemplates
Subclass of ContextStackFrame representing an xsl:apply-templates call in XSLT
static classContextStackFrame.BuiltInTemplateRule
Subclass of ContextStackFrame representing a built-in template rule in XSLT
static classContextStackFrame.CallingApplication
Subclass of ContextStackFrame representing the outermost stack frame, for the calling application
static classContextStackFrame.CallTemplate
Subclass of ContextStackFrame representing an xsl:call-template instruction in XSLT
static classContextStackFrame.ForEach
Subclass of ContextStackFrame representing an xsl:for-each instruction in XSLT
static classContextStackFrame.FunctionCall
Subclass of ContextStackFrame representing a call to a user-defined function either in XSLT or XQuery
static classContextStackFrame.VariableEvaluation
Subclass of ContextStackFrame representing the evaluation of a variable (typically a global variable)
Method Summary
ContainergetContainer()
Get the container of the instruction that caused this new context to be created.
ItemgetContextItem()
Get the value of the context item at this level of the context stack
intgetLineNumber()
Get the line number of the location of the instruction that caused this new context to be created
StringgetSystemId()
Get the system ID representing the location of the instruction that caused this new context to be created
abstract voidprint(PrintStream out)
Display a representation of the stack frame on the specified output stream
voidsetContainer(Container container)
Set the container of the instruction that caused this new context to be created.
voidsetContextItem(Item contextItem)
Set the value of the context item at this level of the context stack
voidsetLineNumber(int lineNumber)
Set the line number of the location of the instruction that caused this new context to be created
voidsetSystemId(String uri)
Set the system ID representing the location of the instruction that caused this new context to be created
protected StringshowLocation()
Show the location of a call (for use by subclasses)

Method Detail

getContainer

public Container getContainer()
Get the container of the instruction that caused this new context to be created. This will generally be an object such as an XSLT Template or a user-defined function

Returns: the container of the instruction in the expression tree

getContextItem

public Item getContextItem()
Get the value of the context item at this level of the context stack

Returns: the context item as it was when this new context was created

getLineNumber

public int getLineNumber()
Get the line number of the location of the instruction that caused this new context to be created

Returns: the line number of the instruction within its containing module

getSystemId

public String getSystemId()
Get the system ID representing the location of the instruction that caused this new context to be created

Returns: the system ID (base URI/module URI) of the module containing the instruction

print

public abstract void print(PrintStream out)
Display a representation of the stack frame on the specified output stream

Parameters: out the output stream

setContainer

public void setContainer(Container container)
Set the container of the instruction that caused this new context to be created. This will generally be an object such as an XSLT Template or a user-defined function

Parameters: container the container of the instruction

setContextItem

public void setContextItem(Item contextItem)
Set the value of the context item at this level of the context stack

Parameters: contextItem the context item as it was when this new context was created

setLineNumber

public void setLineNumber(int lineNumber)
Set the line number of the location of the instruction that caused this new context to be created

Parameters: lineNumber the line number of the instruction within its containing module

setSystemId

public void setSystemId(String uri)
Set the system ID representing the location of the instruction that caused this new context to be created

Parameters: uri the system ID (base URI/module URI) of the module containing the instruction

showLocation

protected String showLocation()
Show the location of a call (for use by subclasses)

Returns: typically "(" + systemId() + "#" + lineNumber() + ")"