|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.instruct.Instruction
net.sf.saxon.instruct.ExprInstruction
net.sf.saxon.instruct.CopyOf
An xsl:copy-of element in the stylesheet.
Field Summary |
Fields inherited from class net.sf.saxon.instruct.Instruction |
children |
Constructor Summary | |
CopyOf(Expression select,
boolean copyNamespaces,
int validation,
SchemaType schemaType)
|
Method Summary | |
Expression |
analyze(StaticContext env)
Perform static analysis of an expression and its subexpressions. |
protected static void |
copyAttribute(NodeInfo source,
SchemaType schemaType,
int validation,
Controller controller)
|
void |
display(int level,
NamePool pool)
Diagnostic print of expression structure. |
boolean |
effectiveBooleanValue(XPathContext context)
Get the effective boolean value of the expression. |
Item |
evaluateItem(XPathContext context)
Return the first item if there is one, or null if not |
int |
getCardinality()
Determine the static cardinality of the expression. |
int |
getDependencies()
Determine which aspects of the context the expression depends on. |
ItemType |
getItemType()
Determine the data type of the expression, if possible. |
SequenceType |
getResultType()
Get the result type returned by this instruction |
int |
getSpecialProperties()
Get the static properties of this expression (other than its type). |
Expression[] |
getSubExpressions()
Get the immediate sub-expressions of this expression. |
protected void |
getXPathExpressions(List list)
|
SequenceIterator |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence. |
TailCall |
processLeavingTail(XPathContext context)
Process this xsl:copy-of instruction |
protected void |
promoteInst(PromotionOffer offer)
|
void |
setInstructionDetails(Controller controller,
NamePool namePool,
InstructionDetails details)
Get the name of this instruction, for diagnostics and tracing |
void |
setRequireDocumentOrElement(boolean requireDocumentOrElement)
For XQuery, the operand (select) must be a single element or document node. |
void |
setValidationContext(ValidationContext validationContext)
Set the validation context |
Expression |
simplify()
Simplify an expression. |
Methods inherited from class net.sf.saxon.instruct.ExprInstruction |
evaluateAsString, promote |
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 |
public CopyOf(Expression select, boolean copyNamespaces, int validation, SchemaType schemaType)
Method Detail |
public void setInstructionDetails(Controller controller, NamePool namePool, InstructionDetails details)
setInstructionDetails
in class Instruction
public void setRequireDocumentOrElement(boolean requireDocumentOrElement)
requireDocumentOrElement
- public void setValidationContext(ValidationContext validationContext)
validationContext
- public TailCall processLeavingTail(XPathContext context) throws TransformerException
processLeavingTail
in class Instruction
context
- the dynamic context for the transformation
TransformerException
protected static void copyAttribute(NodeInfo source, SchemaType schemaType, int validation, Controller controller) throws TransformerException
TransformerException
public Expression simplify() throws XPathException
Expression
simplify
in interface Expression
simplify
in class ExprInstruction
XPathException
public SequenceType getResultType()
getResultType
in class Instruction
public ItemType getItemType()
Expression
This method should always return a result, though it may be the best approximation that is available at the time.
getItemType
in interface Expression
getItemType
in class ExprInstruction
public int getCardinality()
Expression
Determine the static cardinality of the expression. This establishes how many items there will be in the result of the expression, at compile time (i.e., without actually evaluating the result.
This method should always return a result, though it may be the best approximation that is available at the time.
getCardinality
in interface Expression
getCardinality
in class ExprInstruction
public int getDependencies()
Expression
getDependencies
in interface Expression
getDependencies
in class ExprInstruction
public int getSpecialProperties()
Expression
getSpecialProperties
in interface Expression
getSpecialProperties
in class ExprInstruction
protected void promoteInst(PromotionOffer offer) throws XPathException
promoteInst
in class ExprInstruction
XPathException
protected void getXPathExpressions(List list)
getXPathExpressions
in class ExprInstruction
public Expression analyze(StaticContext env) throws XPathException
This checks statically that the operands of the expression have the correct type; if necessary it generates code to do run-time type checking or type conversion. A static type error is reported only if execution cannot possibly succeed, that is, if a run-time type error is inevitable. The call may return a modified form of the expression.
This method is called after all references to functions and variables have been resolved to the declaration of the function or variable. However, the types of such functions and variables will only be accurately known if they have been explicitly declared.
env
- the static context of the expression
XPathException
- if an error is discovered during this phase
(typically a type error)public void display(int level, NamePool pool)
level
- indentation level for this expressionpublic Expression[] getSubExpressions()
Expression
getSubExpressions
in interface Expression
getSubExpressions
in class ExprInstruction
public Item evaluateItem(XPathContext context) throws XPathException
evaluateItem
in interface Expression
evaluateItem
in class ExprInstruction
context
-
XPathException
public boolean effectiveBooleanValue(XPathContext context) throws XPathException
Expression
effectiveBooleanValue
in interface Expression
effectiveBooleanValue
in class ExprInstruction
XPathException
public SequenceIterator iterate(XPathContext context) throws XPathException
Expression
iterate
in interface Expression
iterate
in class ExprInstruction
XPathException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |