public class ProcessingInstruction extends SimpleNodeConstructor
select
locationId, staticProperties
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD
Constructor and Description |
---|
ProcessingInstruction(Expression name)
Create an xsl:processing-instruction instruction
|
Modifier and Type | Method and Description |
---|---|
protected String |
checkContent(String data,
XPathContext context)
Check the content of the node, and adjust it if necessary
|
void |
display(int level,
NamePool pool,
PrintStream out)
Display this instruction as an expression, for diagnostics
|
protected int |
evaluateNameCode(XPathContext context) |
int |
getCardinality()
Determine the static cardinality of the expression.
|
int |
getDependencies()
Determine which aspects of the context the expression depends on.
|
int |
getInstructionNameCode()
Get the name of this instruction for diagnostic and tracing purposes
|
ItemType |
getItemType(TypeHierarchy th)
Get the item type of the items returned by evaluating this instruction
|
Iterator |
iterateSubExpressions()
Get the immediate sub-expressions of this expression.
|
void |
localTypeCheck(StaticContext env,
ItemType contextItemType) |
TailCall |
processLeavingTail(XPathContext context)
Process this instruction, that is, produce a processing-instruction node in the
result sequence.
|
protected void |
promoteInst(PromotionOffer offer)
Offer promotion for subexpressions.
|
Expression |
simplify(StaticContext env)
Simplify an expression.
|
computeSpecialProperties, createsNewNodes, evaluateItem, expandChildren, getSelect, iterate, optimize, setSelect, typeCheck
appendItem, assembleParams, assembleTunnelParams, computeCardinality, dynamicError, evaluateAsString, getImplementationMethod, getInstructionInfo, getSourceLocator, isXSLT, process, promote
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, dynamicError, effectiveBooleanValue, getColumnNumber, getConstructType, getExecutable, getHostLanguage, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, markTailFunctionCalls, resetStaticProperties, setLocationId, setParentExpression, suppressValidation, typeError, typeError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getColumnNumber, getLineNumber, getPublicId, getSystemId
public ProcessingInstruction(Expression name)
name
- the expression used to compute the name of the generated
processing-instructionpublic int getInstructionNameCode()
getInstructionNameCode
in class Instruction
public ItemType getItemType(TypeHierarchy th)
Instruction
getItemType
in interface Expression
getItemType
in class Instruction
public int getCardinality()
ComputedExpression
getCardinality
in interface Expression
getCardinality
in class ComputedExpression
public Expression simplify(StaticContext env) throws XPathException
Instruction
simplify
in interface Expression
simplify
in class SimpleNodeConstructor
XPathException
- if an error is discovered during expression
rewritingpublic void localTypeCheck(StaticContext env, ItemType contextItemType) throws XPathException
localTypeCheck
in class SimpleNodeConstructor
XPathException
public int getDependencies()
ComputedExpression
getDependencies
in interface Expression
getDependencies
in class ComputedExpression
public Iterator iterateSubExpressions()
ComputedExpression
iterateSubExpressions
in interface Expression
iterateSubExpressions
in class SimpleNodeConstructor
protected void promoteInst(PromotionOffer offer) throws XPathException
promoteInst
in class SimpleNodeConstructor
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 expressionXPathException
- if any error is detectedpublic TailCall processLeavingTail(XPathContext context) throws XPathException
processLeavingTail
in interface TailCallReturner
processLeavingTail
in class Instruction
context
- the dynamic context of this transformationXPathException
- if any non-recoverable dynamic error occursprotected String checkContent(String data, XPathContext context) throws DynamicError
checkContent
in class SimpleNodeConstructor
data
- the supplied contentcontext
- the dynamic contextDynamicError
- if the content is invalidprotected int evaluateNameCode(XPathContext context) throws XPathException
evaluateNameCode
in class SimpleNodeConstructor
XPathException
public void display(int level, NamePool pool, PrintStream out)
SimpleNodeConstructor
display
in interface Expression
display
in class SimpleNodeConstructor
level
- indentation level for this expressionpool
- NamePool used to expand any names appearing in the expressionout
- Output destination