net.sf.saxon.instruct
Class FixedElement
java.lang.Object
net.sf.saxon.instruct.Instruction
net.sf.saxon.instruct.ExprInstruction
net.sf.saxon.instruct.ElementCreator
net.sf.saxon.instruct.FixedElement
- All Implemented Interfaces:
- Expression, Serializable, SourceLocator
- public class FixedElement
- extends ElementCreator
An instruction that creates an element node whose name is known statically.
Used for literal results elements in XSLT, for direct element constructors
in XQuery, and for xsl:element in cases where the name and namespace are
known statically.
- See Also:
- Serialized Form
Constructor Summary |
FixedElement(int nameCode,
int[] namespaceCodes,
AttributeSet[] useAttributeSets,
SchemaType schemaType,
int validation)
Create an instruction that creates a new element node |
Methods inherited from class net.sf.saxon.instruct.Instruction |
assembleParams, assembleTunnelParams, getChildren, getColumnNumber, getInstructionDetails, getInstructionName, getLineNumber, getPublicId, getSystemId, getSystemId, process, processChildren, processChildrenLeavingTail, recoverableError, setChildren, setSourceLocation, styleError, styleError |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
namespaceCodes
protected int[] namespaceCodes
FixedElement
public FixedElement(int nameCode,
int[] namespaceCodes,
AttributeSet[] useAttributeSets,
SchemaType schemaType,
int validation)
- Create an instruction that creates a new element node
- Parameters:
nameCode
- Represents the name of the element nodenamespaceCodes
- List of namespaces to be added to the element node.
May be null if none are required.useAttributeSets
- Array of attribute sets to be expanded. May be null
if none are required.schemaType
- Type annotation for the new element node
getXPathExpressions
public void getXPathExpressions(List list)
- Specified by:
getXPathExpressions
in class ExprInstruction
setInstructionDetails
public void setInstructionDetails(Controller controller,
NamePool namePool,
InstructionDetails details)
- Get the name of this instruction for diagnostic and tracing purposes
- Specified by:
setInstructionDetails
in class Instruction
getNameCode
protected int getNameCode(XPathContext context)
- Callback from the superclass ElementCreator to get the nameCode
for the element name
- Specified by:
getNameCode
in class ElementCreator
- Parameters:
context
- The evaluation context (not used)
- Returns:
- the name code for the element name
outputNamespaceNodes
protected void outputNamespaceNodes(XPathContext context,
Receiver out)
throws TransformerException
- Description copied from class:
ElementCreator
- Callback to output namespace nodes for the new element.
- Specified by:
outputNamespaceNodes
in class ElementCreator
- Parameters:
context
- The execution contextout
- the Receiver where the namespace nodes are to be written
- Throws:
TransformerException
display
public void display(int level,
NamePool pool)
- Display this instruction as an expression, for diagnostics
- Parameters:
level
- indentation level for this expression