net.sf.saxon.instruct
Class Copy

java.lang.Object
  |
  +--net.sf.saxon.instruct.Instruction
        |
        +--net.sf.saxon.instruct.ExprInstruction
              |
              +--net.sf.saxon.instruct.ElementCreator
                    |
                    +--net.sf.saxon.instruct.Copy
All Implemented Interfaces:
Expression, Instr, Locatable, java.io.Serializable, javax.xml.transform.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.
 java.lang.String getInstructionName()
          Get the name of this instruction for diagnostic and tracing purposes
protected  int getNameCode(XPathContext context)
          Callback from ElementCreator when constructing an element
protected  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 receiver)
          Callback to output namespace nodes for the new element.
 TailCall processLeavingTail(XPathContext context)
          Evaluate the instruction to produce a new element node
 
Methods inherited from class net.sf.saxon.instruct.ElementCreator
analyze, evaluateItem, getCardinality, getItemType, getValidationContext, getValidationMode, promoteInst, setValidationContext, setValidationMode
 
Methods inherited from class net.sf.saxon.instruct.ExprInstruction
effectiveBooleanValue, evaluateAsString, getDependencies, getSpecialProperties, getSubExpressions, iterate, promote, simplify
 
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
 

Constructor Detail

Copy

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

getInstructionName

public java.lang.String getInstructionName()
Get the name of this instruction for diagnostic and tracing purposes

Specified by:
getInstructionName in class Instruction

getNameCode

protected int getNameCode(XPathContext context)
                   throws javax.xml.transform.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:
javax.xml.transform.TransformerException

outputNamespaceNodes

protected void outputNamespaceNodes(XPathContext context,
                                    Receiver receiver)
                             throws javax.xml.transform.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:
javax.xml.transform.TransformerException

processLeavingTail

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

Specified by:
processLeavingTail in interface Instr
Overrides:
processLeavingTail in class ElementCreator
Parameters:
context -
Returns:
null (this instruction never returns a tail call)
Throws:
javax.xml.transform.TransformerException

getXPathExpressions

protected 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

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