net.sf.saxon.instruct

Class ValueOf

public final class ValueOf extends SimpleNodeConstructor

An xsl:value-of element in the stylesheet.
The xsl:value-of element takes attributes:
Constructor Summary
ValueOf(Expression select, boolean disable, boolean noNodeIfEmpty)
Method Summary
voidcheckPermittedContents(SchemaType parentType, StaticContext env, boolean whole)
Check statically that the results of the expression are capable of constructing the content of a given schema type.
intcomputeCardinality()
voiddisplay(int level, NamePool pool, PrintStream out)
Display this instruction as an expression, for diagnostics
ItemevaluateItem(XPathContext context)
intgetInstructionNameCode()
Get the name of this instruction for diagnostic and tracing purposes
ItemTypegetItemType(TypeHierarchy th)
voidlocalTypeCheck(StaticContext env, ItemType contextItemType)
TailCallprocessLeavingTail(XPathContext context)
protected voidpromoteInst(PromotionOffer offer)
Offer promotion for subexpressions.
voidsetIsNumberingInstruction()
Indicate that this is really an xsl:nunber instruction

Constructor Detail

ValueOf

public ValueOf(Expression select, boolean disable, boolean noNodeIfEmpty)

Method Detail

checkPermittedContents

public void checkPermittedContents(SchemaType parentType, StaticContext env, boolean whole)
Check statically that the results of the expression are capable of constructing the content of a given schema type.

Parameters: parentType The schema type env the static context whole

Throws: net.sf.saxon.trans.XPathException if the expression doesn't match the required content type

computeCardinality

public int computeCardinality()

display

public void display(int level, NamePool pool, PrintStream out)
Display this instruction as an expression, for diagnostics

evaluateItem

public Item evaluateItem(XPathContext context)

getInstructionNameCode

public int getInstructionNameCode()
Get the name of this instruction for diagnostic and tracing purposes

getItemType

public ItemType getItemType(TypeHierarchy th)

localTypeCheck

public void localTypeCheck(StaticContext env, ItemType contextItemType)

processLeavingTail

public TailCall processLeavingTail(XPathContext context)

promoteInst

protected void promoteInst(PromotionOffer offer)
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 move expressions that don't depend on the context to an outer level in the containing expression

Throws: XPathException if any error is detected

setIsNumberingInstruction

public void setIsNumberingInstruction()
Indicate that this is really an xsl:nunber instruction