| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.instruct.Instruction net.sf.saxon.instruct.SimpleNodeConstructor
All known Subclasses: net.sf.saxon.instruct.Attribute, net.sf.saxon.instruct.Namespace, net.sf.saxon.instruct.ValueOf, net.sf.saxon.instruct.ProcessingInstruction, net.sf.saxon.instruct.FixedAttribute, net.sf.saxon.instruct.Comment,
SimpleNodeConstructor | abstract public class SimpleNodeConstructor extends Instruction (Code) | | Common superclass for XSLT instructions whose content template produces a text
value: xsl:attribute, xsl:comment, xsl:processing-instruction, xsl:namespace,
and xsl:text
|
Method Summary | |
protected String | checkContent(String data, XPathContext context) Check the content of the node, and adjust it if necessary. | public int | computeSpecialProperties() Get the static properties of this expression (other than its type). | final public boolean | createsNewNodes() Determine whether this instruction creates new nodes. | public void | display(int level, NamePool pool, PrintStream out) | public Item | evaluateItem(XPathContext context) Evaluate as an expression. | protected int | evaluateNameCode(XPathContext context) | public CharSequence | expandChildren(XPathContext context) Expand the stylesheet elements subordinate to this one, returning the result
as a string. | public Expression | getSelect() | public SequenceIterator | iterate(XPathContext context) | public Iterator | iterateSubExpressions() | abstract public void | localTypeCheck(StaticContext env, ItemType contextItemType) | public Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) | protected void | promoteInst(PromotionOffer offer) Offer promotion for subexpressions. | public void | setSelect(Expression select) | public Expression | simplify(StaticContext env) | public Expression | typeCheck(StaticContext env, ItemType contextItemType) The analyze() method is called in XQuery, where node constructors
are implemented as Expressions. |
SimpleNodeConstructor | public SimpleNodeConstructor()(Code) | | |
checkContent | protected String checkContent(String data, XPathContext context) throws DynamicError(Code) | | Check the content of the node, and adjust it if necessary. The checks depend on the node kind.
Parameters: data - the supplied content Parameters: context - the dynamic context the original content, unless adjustments are needed throws: DynamicError - if the content is invalid |
computeSpecialProperties | public int computeSpecialProperties()(Code) | | Get the static properties of this expression (other than its type). The result is
bit-signficant. These properties are used for optimizations. In general, if
property bit is set, it is true, but if it is unset, the value is unknown.
a set of flags indicating static properties of this expression |
createsNewNodes | final public boolean createsNewNodes()(Code) | | Determine whether this instruction creates new nodes.
This implementation returns true.
|
display | public void display(int level, NamePool pool, PrintStream out)(Code) | | Display this instruction as an expression, for diagnostics
|
evaluateItem | public Item evaluateItem(XPathContext context) throws XPathException(Code) | | Evaluate as an expression. We rely on the fact that when these instructions
are generated by XQuery, there will always be a valueExpression to evaluate
the content
|
expandChildren | public CharSequence expandChildren(XPathContext context) throws XPathException(Code) | | Expand the stylesheet elements subordinate to this one, returning the result
as a string. The expansion must not generate any element or attribute nodes.
Parameters: context - The dynamic context for the transformation |
promoteInst | protected void promoteInst(PromotionOffer offer) throws XPathException(Code) | | Offer promotion for subexpressions. 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 exception: XPathException - if any error is detected |
typeCheck | public Expression typeCheck(StaticContext env, ItemType contextItemType) throws XPathException(Code) | | The analyze() method is called in XQuery, where node constructors
are implemented as Expressions. In this case the required type for the
select expression is a single string.
Parameters: env - The static context for the query the rewritten expression throws: XPathException - if any static errors are found in this expressionor any of its children |
|
|