net.sf.saxon.instruct
public class CopyOf extends Instruction implements MappingFunction
Constructor Summary | |
---|---|
CopyOf(Expression select, boolean copyNamespaces, int validation, SchemaType schemaType, boolean rejectDuplicatAttributes) |
Method Summary | |
---|---|
protected static void | copyAttribute(NodeInfo source, SchemaType schemaType, int validation, Instruction instruction, XPathContext context, boolean rejectDuplicates) |
boolean | createsNewNodes()
Determine whether this instruction creates new nodes.
|
void | display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure. |
Item | evaluateItem(XPathContext context)
Return the first item if there is one, or null if not |
int | getCardinality() |
int | getDependencies() |
int | getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
int | getInstructionNameCode()
Get the name of this instruction, for diagnostics and tracing |
ItemType | getItemType(TypeHierarchy th) |
SequenceIterator | iterate(XPathContext context) |
Iterator | iterateSubExpressions() |
Object | map(Item item, XPathContext context)
Map one item to a sequence.
|
Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) |
TailCall | processLeavingTail(XPathContext context)
Process this xsl:copy-of instruction |
protected void | promoteInst(PromotionOffer offer) |
void | setReadOnce(boolean b) |
void | setRequireDocumentOrElement(boolean requireDocumentOrElement)
For XQuery, the operand (select) must be a single element or document node. |
Expression | simplify(StaticContext env) |
Expression | typeCheck(StaticContext env, ItemType contextItemType) |
Parameters: level indentation level for this expression out
Parameters: context
Returns: the result of evaluating the instruction
Throws: XPathException
Parameters: item The item to be mapped. If context is supplied, this must be the same as context.currentItem(). context The processing context. This is supplied only for mapping constructs that set the context node, position, and size. Otherwise it is null.
Returns: either (a) a SequenceIterator over the sequence of items that the supplied input item maps to, or (b) an Item if it maps to a single item, or (c) null if it maps to an empty sequence.
Parameters: context the dynamic context for the transformation
Returns: null - this implementation of the method never returns a TailCall
Parameters: requireDocumentOrElement