net.sf.saxon.instruct
Class Copy

java.lang.Object
  extended bynet.sf.saxon.instruct.Instruction
      extended bynet.sf.saxon.instruct.ExprInstruction
          extended bynet.sf.saxon.instruct.ElementCreator
              extended bynet.sf.saxon.instruct.Copy
All Implemented Interfaces:
Expression, Serializable, SourceLocator

public class Copy
extends ElementCreator

Handler for xsl:copy elements in stylesheet.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.instruct.ElementCreator
schemaType, useAttributeSets, validation, validationContext
 
Fields inherited from class net.sf.saxon.instruct.Instruction
children
 
Constructor Summary
Copy(AttributeSet[] useAttributeSets, boolean copyNamespaces, SchemaType schemaType, int validation)
           
 
Method Summary
 void display(int level, NamePool pool)
          Diagnostic print of expression structure.
protected  int getNameCode(XPathContext context)
          Callback from ElementCreator when constructing an element
protected  void getXPathExpressions(List list)
           
protected  void outputNamespaceNodes(XPathContext context, Receiver receiver)
          Callback to output namespace nodes for the new element.
 TailCall processLeavingTail(XPathContext context)
          Evaluate the instruction to produce a new element node
 void setInstructionDetails(Controller controller, NamePool namePool, InstructionDetails details)
          Get the name of this instruction for diagnostic and tracing purposes
 
Methods inherited from class net.sf.saxon.instruct.ElementCreator
analyze, evaluateItem, getResultType, getValidationContext, getValidationMode, promoteInst, setValidationContext, setValidationMode
 
Methods inherited from class net.sf.saxon.instruct.ExprInstruction
effectiveBooleanValue, evaluateAsString, getCardinality, getDependencies, getItemType, getSpecialProperties, getSubExpressions, iterate, promote, simplify
 
Methods inherited from class net.sf.saxon.instruct.Instruction
assembleParams, assembleTunnelParams, getChildren, getColumnNumber, getInstructionDetails, getInstructionName, getLineNumber, getPublicId, getSystemId, getSystemId, process, processChildren, processChildrenLeavingTail, recoverableError, setChildren, setSourceLocation, styleError, styleError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Copy

public Copy(AttributeSet[] useAttributeSets,
            boolean copyNamespaces,
            SchemaType schemaType,
            int validation)
Method Detail

setInstructionDetails

public void setInstructionDetails(Controller controller,
                                  NamePool namePool,
                                  InstructionDetails details)
Get the name of this instruction for diagnostic and tracing purposes

Specified by:
setInstructionDetails in class Instruction

getNameCode

protected int getNameCode(XPathContext context)
                   throws TransformerException
Callback from ElementCreator when constructing an element

Specified by:
getNameCode in class ElementCreator
Parameters:
context -
Returns:
the namecode of the element to be constructed
Throws:
TransformerException

outputNamespaceNodes

protected void outputNamespaceNodes(XPathContext context,
                                    Receiver receiver)
                             throws TransformerException
Callback to output namespace nodes for the new element.

Specified by:
outputNamespaceNodes in class ElementCreator
Parameters:
context - The execution context
receiver - the Receiver where the namespace nodes are to be written
Throws:
TransformerException

processLeavingTail

public TailCall processLeavingTail(XPathContext context)
                            throws TransformerException
Description copied from class: ElementCreator
Evaluate the instruction to produce a new element node

Overrides:
processLeavingTail in class ElementCreator
Parameters:
context -
Returns:
null (this instruction never returns a tail call)
Throws:
TransformerException

getXPathExpressions

protected void getXPathExpressions(List list)
Specified by:
getXPathExpressions in class ExprInstruction

display

public void display(int level,
                    NamePool pool)
Diagnostic print of expression structure. The expression is written to the System.err output stream

Parameters:
level - indentation level for this expression