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 |
---|---|
int |
computeHashCode()
Compute a hashcode
|
Expression |
copy(RebindingMap rebindings)
Copy an expression.
|
boolean |
equals(java.lang.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.
|
java.lang.String |
getExpressionName()
Get a name identifying the kind of expression, in terms meaningful to a user.
|
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
|
java.lang.String |
getStreamerName()
Get the (partial) name of a class that supports streaming of this kind of 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.
|
boolean |
isDeclaredStreamable() |
boolean |
isInstruction()
Ask whether this expression is an instruction.
|
static Expression |
makeCompositeExpression(java.util.List<UseAttributeSet> targets)
Given a list of UseAttributeSet expressions, combine them into a single expression
|
static java.util.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
|
java.lang.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.
|
alwaysCreatesNewNodes, assembleParams, assembleTunnelParams, computeCardinality, computeSpecialProperties, dynamicError, evaluateAsString, evaluateItem, getConstructType, getImplementationMethod, getInstructionName, getInstructionNameCode, getNetCost, getSourceLocator, isXSLT, iterate, mayCreateNewNodes, process, someOperandCreatesNewNodes
addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getExtraProperty, getIntegerBounds, getInterpretedExpression, getLocalRetainedStaticContext, getLocation, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, hasCompatibleStaticContext, hashCode, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isLiftable, isMultiThreaded, isSameExpression, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toString, typeCheckChildren, typeError, unordered, verifyParentPointers, verifyParentPointers
public UseAttributeSet(StructuredQName name, boolean streamable)
name
- the name of the target attribute setpublic boolean isInstruction()
Expression
isInstruction
in class Instruction
public 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 java.util.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(java.util.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 java.lang.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(RebindingMap rebindings)
copy
in class Expression
rebindings
- 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 java.lang.String getExpressionName()
getExpressionName
in class Instruction
public void export(ExpressionPresenter out) throws XPathException
export
in interface ExportAgent
export
in class Expression
out
- the expression presenter used to display the structureXPathException
- if the export fails, for example if an expression is found that won't work
in the target environment.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the other expressionpublic int computeHashCode()
computeHashCode
in class Expression
public java.lang.String getStreamerName()
getStreamerName
in class Expression
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.