Package net.sf.saxon.trace
Class ContextStackFrame
- java.lang.Object
-
- net.sf.saxon.trace.ContextStackFrame
-
- Direct Known Subclasses:
ContextStackFrame.ApplyTemplates,ContextStackFrame.BuiltInTemplateRule,ContextStackFrame.CallingApplication,ContextStackFrame.CallTemplate,ContextStackFrame.FunctionCall,ContextStackFrame.VariableEvaluation
public abstract class ContextStackFrame extends java.lang.ObjectAn 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
Nested Classes Modifier and Type Class Description static classContextStackFrame.ApplyTemplatesSubclass of ContextStackFrame representing an xsl:apply-templates call in XSLTstatic classContextStackFrame.BuiltInTemplateRuleSubclass of ContextStackFrame representing a built-in template rule in XSLTstatic classContextStackFrame.CallingApplicationSubclass of ContextStackFrame representing the outermost stack frame, for the calling applicationstatic classContextStackFrame.CallTemplateSubclass of ContextStackFrame representing an xsl:call-template instruction in XSLTstatic classContextStackFrame.FunctionCallSubclass of ContextStackFrame representing a call to a user-defined function either in XSLT or XQuerystatic classContextStackFrame.VariableEvaluationSubclass of ContextStackFrame representing the evaluation of a variable (typically a global variable)
-
Constructor Summary
Constructors Constructor Description ContextStackFrame()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetContainer()Get the container of the instruction that caused this new context to be created.XPathContextgetContext()Get the value of the context at this level of the context stackItemgetContextItem()Get the value of the context item at this level of the context stackintgetLineNumber()Get the line number of the location of the instruction that caused this new context to be createdjava.lang.StringgetSystemId()Get the system ID representing the location of the instruction that caused this new context to be createdabstract voidprint(Logger out)Display a representation of the stack frame on the specified output streamvoidsetComponent(java.lang.Object container)Set the container of the instruction that caused this new context to be created.voidsetContext(XPathContext context)Set the value of the context at this level of the context stackvoidsetContextItem(Item contextItem)Set the value of the context item at this level of the context stackvoidsetLocation(Location loc)Set the location of the instruction that caused this new context to be createdprotected java.lang.StringshowLocation()Show the location of a call (for use by subclasses)
-
-
-
Method Detail
-
setLocation
public void setLocation(Location loc)
Set the location of the instruction that caused this new context to be created- Parameters:
loc- the location of the instruction
-
getSystemId
public java.lang.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
-
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
-
setComponent
public void setComponent(java.lang.Object 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
-
getContainer
public java.lang.Object 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
-
setContext
public void setContext(XPathContext context)
Set the value of the context at this level of the context stack- Parameters:
context- the context as it was when this new context was created
-
getContext
public XPathContext getContext()
Get the value of the context at this level of the context stack- Returns:
- the context as it was when this new context was created
-
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
-
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
-
print
public abstract void print(Logger out)
Display a representation of the stack frame on the specified output stream- Parameters:
out- the output stream
-
showLocation
protected java.lang.String showLocation()
Show the location of a call (for use by subclasses)- Returns:
- typically "(" + systemId() + "#" + lineNumber() + ")"
-
-