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, Instr, Locatable, 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,
SchemaType schemaType,
int validation)
Create an instruction that creates a new element node |
Method Summary |
void |
display(int level,
NamePool pool)
Display this instruction as an expression, for diagnostics |
java.lang.String |
getInstructionName()
Get the instruction name |
protected int |
getNameCode(XPathContext context)
Callback from the superclass ElementCreator to get the nameCode
for the element name |
void |
getXPathExpressions(java.util.List list)
Get all the XPath expressions associated with this instruction
(in XSLT terms, the expression present on attributes of the instruction,
as distinct from the child instructions in a sequence construction) |
protected void |
outputNamespaceNodes(XPathContext context,
Receiver out)
Callback to output namespace nodes for the new element. |
Methods inherited from class net.sf.saxon.instruct.Instruction |
assembleParams, assembleTunnelParams, displayChildren, dynamicError, dynamicError, getChildren, getColumnNumber, getExecutable, getInstructionNamespace, getLineNumber, getPublicId, getSourceLocator, getSystemId, process, processChildren, processChildrenLeavingTail, recoverableError, setChildren, setExecutable, setSourceLocation |
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(java.util.List list)
- Description copied from class:
ExprInstruction
- Get all the XPath expressions associated with this instruction
(in XSLT terms, the expression present on attributes of the instruction,
as distinct from the child instructions in a sequence construction)
- Specified by:
getXPathExpressions
in class ExprInstruction
- Parameters:
list
- A list to be populated with the list of XPath expressions
getInstructionName
public java.lang.String getInstructionName()
- Get the instruction name
- Specified by:
getInstructionName
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 javax.xml.transform.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:
javax.xml.transform.TransformerException
display
public void display(int level,
NamePool pool)
- Display this instruction as an expression, for diagnostics
- Parameters:
level
- indentation level for this expression