net.sf.saxon.instruct
public abstract class ElementCreator extends ParentNodeConstructor
| Field Summary | |
|---|---|
| protected boolean | inheritNamespaces
The inheritNamespaces flag indicates that the namespace nodes on the element created by this instruction
are to be inherited (copied) on the children of this element. |
| protected boolean | preservingTypes
Flag set to true if validation=preserve and no schema type supplied for validation |
| Constructor Summary | |
|---|---|
| ElementCreator()
Construct an ElementCreator. | |
| Method Summary | |
|---|---|
| protected void | checkContentSequence(StaticContext env)
Check statically whether the content of the element creates attributes or namespaces
after creating any child nodes |
| int | computeSpecialProperties()
Get the static properties of this expression (other than its type). |
| Item | evaluateItem(XPathContext context)
Evaluate the constructor, returning the constructed element node. |
| int[] | getActiveNamespaces()
Callback to get a list of the intrinsic namespaces that need to be generated for the element. |
| int | getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
| ItemType | getItemType(TypeHierarchy th)
Get the item type of the value returned by this instruction |
| abstract int | getNameCode(XPathContext context)
Determine (at run-time) the name code of the element being constructed |
| abstract String | getNewBaseURI(XPathContext context)
Get the base URI for the element being constructed |
| boolean | isInheritNamespaces()
Determine whether the inherit namespaces flag is set |
| boolean | isPreservingTypes()
Determine whether this elementCreator performs validation or strips type annotations |
| EventIterator | iterateEvents(XPathContext context) |
| protected abstract void | outputNamespaceNodes(XPathContext context, Receiver receiver, int nameCode)
Callback to output namespace nodes for the new element. |
| TailCall | processLeavingTail(XPathContext context)
Evaluate the instruction to produce a new element node. |
| void | processLeft(Stack<XPathContext> contextStack, Stack state)
In streaming mode, process the first half of the instruction (to start a new document or element) |
| void | processRight(Stack<XPathContext> contextStack, Stack state)
In streaming mode, proecss the right half of the instruction (to end a new document or element) |
| void | setValidationMode(int mode)
Set the validation mode for the new element |
| void | suppressValidation(int validationMode)
Suppress validation on contained element constructors, on the grounds that the parent element
is already performing validation. |
Parameters: env the static context
Throws: XPathException
Returns: a set of flags indicating static properties of this expression
Returns: an array of namespace codes, the codes either occupy the whole array or are terminated by a -1 entry. A result of null is equivalent to a zero-length array.
Parameters: th the type hierarchy cache
Returns: the item type
Parameters: context the XPath dynamic evaluation context
Returns: the integer name code representing the element name
Throws: XPathException if a failure occurs
Parameters: context the XPath dynamic evaluation context
Returns: the base URI of the constructed element
Returns: true if namespaces constructed on a parent element are to be inherited by its children
Returns: false if the instruction performs validation of the constructed output or if it strips type annotations, otherwise true
Parameters: context The execution context receiver the Receiver where the namespace nodes are to be written nameCode the name code of the element being created
Throws: net.sf.saxon.trans.XPathException
Parameters: context XPath dynamic evaluation context
Returns: null (this instruction never returns a tail call)
Throws: XPathException
Parameters: contextStack state a stack on which the instruction can save state information for use during the corresponding
Parameters: contextStack state a stack on which the instruction can save state information for use during the corresponding