| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.instruct.SimpleContentConstructor
All known Subclasses: net.sf.saxon.instruct.QuerySimpleContentConstructor,
SimpleContentConstructor | public class SimpleContentConstructor extends ComputedExpression (Code) | | This class implements the rules for an XSLT simple content constructor, which are used in constructing
the string value of an attribute node, text node, comment node, etc, from the value of the select
expression or the contained sequence constructor.
|
isAtomic | boolean isAtomic(Code) | | |
isSingleton | boolean isSingleton(Code) | | |
computeCardinality | protected int computeCardinality()(Code) | | Compute the cardinality of the result of the expression.
the cardinality, @link {StaticProperty.EXACTLY_ONE} |
display | public void display(int level, NamePool pool, PrintStream out)(Code) | | Diagnostic print of expression structure. The expression is written to the System.err
output stream
Parameters: level - indentation level for this expression Parameters: pool - NamePool used to expand any names appearing in the expression Parameters: out - Output destination |
evaluateItem | public Item evaluateItem(XPathContext context) throws XPathException(Code) | | Evaluate an expression as a single item. This always returns either a single Item or
null (denoting the empty sequence). No conversion is done. This method should not be
used unless the static type of the expression is a subtype of "item" or "item?": that is,
it should not be called if the expression may return a sequence. There is no guarantee that
this condition will be detected.
Parameters: context - The context in which the expression is to be evaluated the node or atomic value that results from evaluating theexpression; or null to indicate that the result is an emptysequence throws: net.sf.saxon.trans.XPathException - if any dynamic error occurs evaluating theexpression |
getImplementationMethod | public int getImplementationMethod()(Code) | | An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
This method indicates which of these methods is prefered.
|
getItemType | public ItemType getItemType(TypeHierarchy th)(Code) | | Determine the data type of the expression, if possible. All expression return
sequences, in general; this method determines the type of the items within the
sequence, assuming that (a) this is known in advance, and (b) it is the same for
all items in the sequence.
This method should always return a result, though it may be the best approximation
that is available at the time.
a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER,Type.NODE, or Type.ITEM (meaning not known at compile time) Parameters: th - |
iterateSubExpressions | public Iterator iterateSubExpressions()(Code) | | Get the immediate sub-expressions of this expression. Default implementation
returns a zero-length array, appropriate for an expression that has no
sub-expressions.
an iterator containing the sub-expressions of this expression |
promote | public Expression promote(PromotionOffer offer) throws XPathException(Code) | | Offer promotion for this subexpression. The offer will be accepted if the subexpression
is not dependent on the factors (e.g. the context item) identified in the PromotionOffer.
By default the offer is not accepted - this is appropriate in the case of simple expressions
such as constant values and variable references where promotion would give no performance
advantage. This method is always called at compile time.
Parameters: offer - details of the offer, for example the offer to moveexpressions that don't depend on the context to an outer level inthe containing expression if the offer is not accepted, return this expression unchanged.Otherwise return the result of rewriting the expression to promotethis subexpression throws: net.sf.saxon.trans.XPathException - if any error is detected |
|
|