public class UseAttributeSet extends Instruction implements ComponentInvocation, ContextOriginator
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
Constructor and Description |
---|
UseAttributeSet(StructuredQName name,
boolean streamable)
Create a use-attribute-set expression
|
Modifier and Type | Method and Description |
---|---|
Expression |
copy()
Copy an expression.
|
boolean |
equals(Object obj)
Test whether this UseAttributeSets expression is equal to another
|
void |
export(ExpressionPresenter out)
Export of expression structure.
|
int |
getBindingSlot()
Get the binding slot to be used.
|
ExpressionCompiler |
getExpressionCompiler()
Return the compiler of the UseAttributeSets expression
|
Component |
getFixedTarget()
Get the target component if this is known in advance, that is, if the target component
is private or final, or in some other cases such as xsl:original.
|
int |
getIntrinsicDependencies()
Determine the intrinsic dependencies of an expression, that is, those which are not derived
from the dependencies of its subexpressions.
|
ItemType |
getItemType()
Get the item type of the items returned by evaluating this instruction
|
protected StreamingAdjunct |
getStreamingAdjunct()
Get a class that supports streamed evaluation of this expression
|
SymbolicName |
getSymbolicName()
Get the symbolic name of the component that this invocation references
|
AttributeSet |
getTargetAttributeSet()
Get the target attribute set to which this instruction is provisionally bound
|
StructuredQName |
getTargetAttributeSetName()
Get the target attribute sets of this instruction.
|
int |
hashCode()
Compute a hashcode
|
boolean |
isDeclaredStreamable() |
static Expression |
makeCompositeExpression(List<UseAttributeSet> targets)
Given a list of UseAttributeSet expressions, combine them into a single expression
|
static List<UseAttributeSet> |
makeUseAttributeSetInstructions(StructuredQName[] targets,
StyleElement instruction)
Make an list of expressions whose combined effect is to expand the attribute sets named in an
[xsl]use-attribute-sets attribute, for example on a literal result element
|
static Expression |
makeUseAttributeSets(StructuredQName[] targets,
StyleElement instruction)
Make an expression whose effect is to expand the attribute sets named in an [xsl]use-attribute-sets
attribute, for example on a literal result element
|
Iterable<Operand> |
operands()
Get the immediate sub-expressions of this expression, with information about the relationship
of each expression to its parent expression.
|
Expression |
optimize(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Perform optimisation of an expression and its subexpressions.
|
TailCall |
processLeavingTail(XPathContext context)
ProcessLeavingTail: called to do the real work of this instruction.
|
void |
setBindingSlot(int slot)
Set the binding slot to be used.
|
void |
setTarget(AttributeSet target)
Set the attribute set to be used.
|
Expression |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Perform type checking of an expression and its subexpressions.
|
assembleParams, assembleTunnelParams, computeCardinality, computeSpecialProperties, createsNewNodes, dynamicError, evaluateAsString, evaluateItem, getConstructType, getExpressionName, getImplementationMethod, getInstructionName, getInstructionNameCode, getNetCost, getSourceLocator, isXSLT, iterate, main, process, promoteChildren, toStreamingPattern
addToPathMap, adoptChildExpression, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, clearStreamabilityData, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getHostLanguage, getIntegerBounds, getLocation, getObjectName, getPackageData, getParentExpression, getPosture, getPostureAndSweepIfKnown, getProperties, getProperty, getRetainedStaticContext, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStreamability, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, makeStreamingAdjunct, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, optimizeForType, promote, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setFiltered, setFlattened, setLocation, setParentExpression, setPostureAndSweep, setRetainedStaticContext, setRetainedStaticContextLocally, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toString, typeCheckChildren, typeError, unordered
public UseAttributeSet(StructuredQName name, boolean streamable)
name
- the name of the target attribute setpublic static Expression makeUseAttributeSets(StructuredQName[] targets, StyleElement instruction) throws XPathException
targets
- the QNames contained in the use-attribute-sets attributeinstruction
- the instruction on which the use-attribute-sets attribute appearsXPathException
- if an error occurs, for example no attribute set found with the required namepublic static List<UseAttributeSet> makeUseAttributeSetInstructions(StructuredQName[] targets, StyleElement instruction) throws XPathException
targets
- the QNames contained in the use-attribute-sets attributeinstruction
- the instruction on which the use-attribute-sets attribute appearsXPathException
- if an error occurs, for example no attribute set found with the required namepublic static Expression makeCompositeExpression(List<UseAttributeSet> targets)
targets
- the list of expressionspublic boolean isDeclaredStreamable()
public void setTarget(AttributeSet target)
target
- the attribute set to be usedpublic void setBindingSlot(int slot)
setBindingSlot
in interface ComponentInvocation
slot
- the offset in the binding vector of the containing package where the target component
can be found.public int getBindingSlot()
getBindingSlot
in interface ComponentInvocation
public SymbolicName getSymbolicName()
getSymbolicName
in interface ComponentInvocation
public AttributeSet getTargetAttributeSet()
public Component getFixedTarget()
ComponentInvocation
getFixedTarget
in interface ComponentInvocation
public Iterable<Operand> operands()
Expression
If the expression is a Callable, then it is required that the order of the operands returned by this function is the same as the order of arguments supplied to the corresponding call() method.
operands
in class Instruction
public Expression optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
This method is called after all references to functions and variables have been resolved to the declaration of the function or variable, and after all type checking has been done.
optimize
in class Expression
visitor
- an expression visitorcontextItemType
- the static type of "." at the point where this expression is invoked.
The parameter is set to null if it is known statically that the context item will be undefined.
If the type of the context item is not known statically, the argument is set to
Type.ITEM_TYPE
XPathException
- if an error is discovered during this phase
(typically a type error)public Expression copy()
copy
in class Expression
public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
This checks statically that the operands of the expression have the correct type; if necessary it generates code to do run-time type checking or type conversion. A static type error is reported only if execution cannot possibly succeed, that is, if a run-time type error is inevitable. The call may return a modified form of the expression.
This method is called after all references to functions and variables have been resolved to the declaration of the function or variable. However, the types of such functions and variables may not be accurately known if they have not been explicitly declared.
typeCheck
in class Expression
visitor
- an expression visitorcontextInfo
- XPathException
- if an error is discovered during this phase
(typically a type error)public ItemType getItemType()
getItemType
in class Instruction
public int getIntrinsicDependencies()
getIntrinsicDependencies
in class Expression
public StructuredQName getTargetAttributeSetName()
public TailCall processLeavingTail(XPathContext context) throws XPathException
processLeavingTail
in interface TailCallReturner
processLeavingTail
in class Instruction
context
- The dynamic context of the transformation, giving access to the current node,
the current variables, etc.XPathException
- if a dynamic error occurs during the evaluation
of the instructionpublic void export(ExpressionPresenter out)
export
in class Expression
out
- the expression presenter used to display the structurepublic boolean equals(Object obj)
public ExpressionCompiler getExpressionCompiler()
getExpressionCompiler
in class Expression
protected StreamingAdjunct getStreamingAdjunct()
getStreamingAdjunct
in class Expression
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.