net.sf.saxon.instruct
public class SimpleContentConstructor extends ComputedExpression
Field Summary | |
---|---|
boolean | isAtomic |
boolean | isSingleton |
Expression | select |
Expression | separator |
Constructor Summary | |
---|---|
SimpleContentConstructor(Expression select, Expression separator) |
Method Summary | |
---|---|
protected int | computeCardinality()
Compute the cardinality of the result of the expression. |
void | display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure. |
Item | evaluateItem(XPathContext context)
Evaluate an expression as a single item. |
int | getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
ItemType | getItemType(TypeHierarchy th)
Determine the data type of the expression, if possible. |
Iterator | iterateSubExpressions()
Get the immediate sub-expressions of this expression. |
Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) |
Expression | promote(PromotionOffer offer)
Offer promotion for this subexpression. |
Expression | simplify(StaticContext env)
Simplify an expression. |
Expression | typeCheck(StaticContext env, ItemType contextItemType) |
Returns: the cardinality, @link {StaticProperty.EXACTLY_ONE}
Parameters: level indentation level for this expression pool NamePool used to expand any names appearing in the expression out Output destination
Parameters: context The context in which the expression is to be evaluated
Returns: the node or atomic value that results from evaluating the expression; or null to indicate that the result is an empty sequence
Throws: net.sf.saxon.trans.XPathException if any dynamic error occurs evaluating the expression
This method should always return a result, though it may be the best approximation that is available at the time.
Parameters: th
Returns: a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER, Type.NODE, or Type.ITEM (meaning not known at compile time)
Returns: an iterator containing the sub-expressions of this expression
Parameters: offer 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 expression
Returns: if the offer is not accepted, return this expression unchanged. Otherwise return the result of rewriting the expression to promote this subexpression
Throws: net.sf.saxon.trans.XPathException if any error is detected
Returns: the simplified expression
Throws: net.sf.saxon.trans.XPathException if an error is discovered during expression rewriting