net.sf.saxon.instruct
public class Copy extends ElementCreator
Constructor Summary | |
---|---|
Copy(boolean copyNamespaces, boolean inheritNamespaces, SchemaType schemaType, int validation)
Create a shallow copy instruction |
Method Summary | |
---|---|
Expression | copy()
Copy an expression. |
Item | evaluateItem(XPathContext context)
Evaluate as an expression. |
void | explain(ExpressionPresenter out)
Diagnostic print of expression structure. |
int[] | getActiveNamespaces()
Callback to get a list of the intrinsic namespaces that need to be generated for the element.
|
int | getInstructionNameCode()
Get the name of this instruction for diagnostic and tracing purposes |
int | getIntrinsicDependencies()
Determine which aspects of the context the expression depends on. |
ItemType | getItemType(TypeHierarchy th)
Get the item type of the result of this instruction. |
int | getNameCode(XPathContext context)
Callback from ElementCreator when constructing an element |
String | getNewBaseURI(XPathContext context)
Get the base URI of a copied element node (the base URI is retained in the new copy) |
Expression | optimize(ExpressionVisitor visitor, ItemType contextItemType) |
protected void | outputNamespaceNodes(XPathContext context, Receiver receiver, int nameCode)
Callback to output namespace nodes for the new element. |
TailCall | processLeavingTail(XPathContext context) |
void | processLeft(Stack<XPathContext> contextStack, Stack state)
Process the first half of the instruction in streaming mode |
void | processRight(Stack<XPathContext> contextStack, Stack state)
Process the second half of the instruction in streaming mode |
Expression | simplify(ExpressionVisitor visitor)
Simplify an expression. |
Expression | typeCheck(ExpressionVisitor visitor, ItemType contextItemType) |
Parameters: copyNamespaces true if namespace nodes are to be copied when copying an element inheritNamespaces true if child elements are to inherit the namespace nodes of their parent schemaType the Schema type against which the content is to be validated validation the schema validation mode
Returns: the copy of the original expression
Returns: a set of bit-significant flags identifying the dependencies of the expression
Parameters: th the type hierarchy cache
Returns: The context item type.
Parameters: context XPath dynamic evaluation context
Returns: the namecode of the element to be constructed
Throws: XPathException
Parameters: context XPath dynamic evaluation context
Returns: the base URI
Parameters: context The execution context receiver the Receiver where the namespace nodes are to be written nameCode
Throws: XPathException
Parameters: visitor an expression visitor
Returns: the simplified expression
Throws: net.sf.saxon.trans.XPathException if an error is discovered during expression rewriting