net.sf.saxon.instruct
Class FixedElement
java.lang.Object
|
+--net.sf.saxon.expr.ComputedExpression
|
+--net.sf.saxon.instruct.Instruction
|
+--net.sf.saxon.instruct.InstructionWithChildren
|
+--net.sf.saxon.instruct.ElementCreator
|
+--net.sf.saxon.instruct.FixedElement
- All Implemented Interfaces:
- Container, Expression, InstructionInfoProvider, java.io.Serializable, javax.xml.transform.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,
boolean inheritNamespaces,
SchemaType schemaType,
int validation)
Create an instruction that creates a new element node |
Methods inherited from class net.sf.saxon.instruct.Instruction |
appendItem, assembleParams, assembleTunnelParams, computeCardinality, computeSpecialProperties, dynamicError, dynamicError, effectiveBooleanValue, evaluateAsString, getImplementationMethod, getInstructionNameCode, getSourceLocator, iterate, process, promote |
Methods inherited from class net.sf.saxon.expr.ComputedExpression |
adoptChildExpression, computeDependencies, computeStaticProperties, dynamicError, dynamicError, getColumnNumber, getConstructType, getDependencies, getExecutable, getIntrinsicDependencies, getLineNumber, getLocationId, getParentExpression, getPublicId, getSpecialProperties, getSystemId, markTailFunctionCalls, resetStaticProperties, setLocationId, setParentExpression, typeError |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.xml.transform.SourceLocator |
getColumnNumber, getLineNumber, getPublicId, getSystemId |
namespaceCodes
protected int[] namespaceCodes
FixedElement
public FixedElement(int nameCode,
int[] namespaceCodes,
AttributeSet[] useAttributeSets,
boolean inheritNamespaces,
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
getInstructionInfo
public InstructionInfo getInstructionInfo()
- Description copied from class:
ComputedExpression
- Get InstructionInfo for this expression
- Specified by:
getInstructionInfo
in interface InstructionInfoProvider
- Overrides:
getInstructionInfo
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 XPathException
- 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:
XPathException
display
public void display(int level,
NamePool pool,
java.io.PrintStream out)
- Display this instruction as an expression, for diagnostics
- Parameters:
level
- indentation level for this expressionpool
- NamePool used to expand any names appearing in the expressionout
- Output destination