java.io.Serializable, javax.xml.transform.SourceLocator, LocationProvider, SaxonLocator, EvaluableItem, SequenceIterable, TailCallReturner, InstructionInfo, org.xml.sax.LocatorAttributeCreator, Comment, Namespace, ProcessingInstruction, ValueOfpublic abstract class SimpleNodeConstructor extends Instruction
| Modifier and Type | Field | Description |
|---|---|---|
protected Expression |
select |
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticProperties| Constructor | Description |
|---|---|
SimpleNodeConstructor() |
Default constructor used by subclasses
|
| Modifier and Type | Method | Description |
|---|---|---|
protected java.lang.String |
checkContent(java.lang.String data,
XPathContext context) |
Check the content of the node, and adjust it if necessary.
|
int |
computeCardinality() |
Get the cardinality of the sequence returned by evaluating this instruction
|
int |
computeSpecialProperties() |
Get the static properties of this expression (other than its type).
|
boolean |
createsNewNodes() |
Determine whether this instruction creates new nodes.
|
Item |
evaluateItem(XPathContext context) |
Evaluate as an expression.
|
int |
evaluateNameCode(XPathContext context) |
Run-time method to compute the name of the node being constructed.
|
java.lang.CharSequence |
expandChildren(XPathContext context) |
Expand the stylesheet elements subordinate to this one, returning the result
as a string.
|
Expression |
getSelect() |
Get the expression that determines the string value of the constructed node
|
SequenceIterator |
iterate(XPathContext context) |
Return an Iterator to iterate over the values of a sequence.
|
java.util.Iterator |
iterateSubExpressions() |
Get the immediate sub-expressions of this expression.
|
abstract void |
localTypeCheck(ExpressionVisitor visitor,
ItemType contextItemType) |
Method to perform type-checking specific to the kind of instruction
|
Expression |
optimize(ExpressionVisitor visitor,
ItemType contextItemType) |
Perform optimisation of an expression and its subexpressions.
|
protected void |
promoteInst(PromotionOffer offer) |
Offer promotion for subexpressions.
|
boolean |
replaceSubExpression(Expression original,
Expression replacement) |
Replace one subexpression by a replacement subexpression
|
void |
setSelect(Expression select,
Configuration config) |
Set the select expression: the value of this expression determines the string-value of the node
|
Expression |
simplify(ExpressionVisitor visitor) |
Simplify an expression.
|
Expression |
typeCheck(ExpressionVisitor visitor,
ItemType contextItemType) |
The typeCheck() method is called in XQuery, where node constructors
are implemented as Expressions.
|
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, copy, display, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, explain, findParentOf, getCardinality, getColumnNumber, getColumnNumber, getContainer, getDependencies, getExecutable, getHostLanguage, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isUpdatingExpression, iterateEvents, markTailFunctionCalls, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, toString, typeErrorassembleParams, assembleTunnelParams, dynamicError, evaluateAsString, getConstructType, getImplementationMethod, getInstructionNameCode, getItemType, getSourceLocator, isXSLT, process, processLeavingTail, promoteprotected Expression select
public SimpleNodeConstructor()
public void setSelect(Expression select, Configuration config) throws XPathException
select - the expression that computes the string value of the nodeconfig - the Saxon configuration (used for example to do early validation of the content
of an attribute against the schema-defined type)XPathExceptionpublic Expression getSelect()
public final boolean createsNewNodes()
createsNewNodes in class Instructionpublic int computeCardinality()
computeCardinality in class Instructionpublic Expression simplify(ExpressionVisitor visitor) throws XPathException
Instructionsimplify in class Instructionvisitor - an expression visitorXPathException - if an error is discovered during expression
rewritingpublic int computeSpecialProperties()
computeSpecialProperties in class Instructionpublic abstract void localTypeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException
visitor - an expression visitorcontextItemType - the static type of the context itemXPathExceptionpublic Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException
typeCheck in class Expressionvisitor - an expression visitorcontextItemType - the static type of "." at the point where this expression is invoked.
The parameter is set to null if it is known statically that the context item will be undefined.
If the type of the context item is not known statically, the argument is set to
Type.ITEM_TYPEXPathException - if any static errors are found in this expression
or any of its childrenpublic Expression optimize(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException
ExpressionThis method is called after all references to functions and variables have been resolved to the declaration of the function or variable, and after all type checking has been done.
optimize in class Expressionvisitor - an expression visitorcontextItemType - the static type of "." at the point where this expression is invoked.
The parameter is set to null if it is known statically that the context item will be undefined.
If the type of the context item is not known statically, the argument is set to
Type.ITEM_TYPEXPathException - if an error is discovered during this phase
(typically a type error)public java.util.Iterator iterateSubExpressions()
ExpressioniterateSubExpressions in class Expressionpublic boolean replaceSubExpression(Expression original, Expression replacement)
replaceSubExpression in class Expressionoriginal - the original subexpressionreplacement - the replacement subexpressionpublic java.lang.CharSequence expandChildren(XPathContext context) throws XPathException
context - The dynamic context for the transformationXPathException - if any error occurspublic Item evaluateItem(XPathContext context) throws XPathException
evaluateItem in interface EvaluableItemevaluateItem in class Instructioncontext - The context in which the expression is to be evaluatedXPathException - if any dynamic error occurs evaluating the
expressionprotected java.lang.String checkContent(java.lang.String data,
XPathContext context)
throws XPathException
data - the supplied contentcontext - the dynamic contextXPathException - if the content is invalidpublic int evaluateNameCode(XPathContext context) throws XPathException
context - the XPath dynamic evaluation contextXPathException - if any failure occurspublic SequenceIterator iterate(XPathContext context) throws XPathException
Instructioniterate in interface SequenceIterableiterate in class Instructioncontext - supplies the context for evaluationXPathException - if any dynamic error occurs evaluating the
expressionprotected void promoteInst(PromotionOffer offer) throws XPathException
promoteInst in class Instructionoffer - details of the offer, for example the offer to move
expressions that don't depend on the context to an outer level in
the containing expressionXPathException - if any error is detected