This class defines common behaviour across xsl:variable, xsl:param, and xsl:with-param
assignable
protected boolean assignable
constantText
protected String constantText
global
protected boolean global
implicitlyRequiredParam
protected boolean implicitlyRequiredParam
redundant
protected boolean redundant
requiredParam
protected boolean requiredParam
tunnel
protected boolean tunnel
allowsAsAttribute
protected boolean allowsAsAttribute()
allowsRequired
protected boolean allowsRequired()
allowsTunnelAttribute
protected boolean allowsTunnelAttribute()
allowsValue
protected boolean allowsValue()
checkAgainstRequiredType
protected void checkAgainstRequiredType(SequenceType required)
throws XPathException
Check the supplied select expression against the required type.
required
- The type required by the variable declaration, or in the case
of xsl:with-param, the signature of the called template
getReturnedItemType
protected ItemType getReturnedItemType()
Determine the type of item returned by this instruction (only relevant if
it is an instruction).
- getReturnedItemType in interface StyleElement
- the item type returned. This is null for a variable: we are not
interested in the type of the variable, but in what the xsl:variable constributes
to the result of the sequence constructor it is part of.
getVariableDisplayName
public String getVariableDisplayName()
Get the display name of the variable.
getVariableQName
public StructuredQName getVariableQName()
Get the QName of the variable
- the name as a structured QName, or a dummy name if the variable has no name attribute
or has an invalid name attribute
initializeInstruction
protected void initializeInstruction(Executable exec,
GeneralVariable var)
throws XPathException
Initialize - common code called from the compile() method of all subclasses
exec
- the executablevar
- the representation of the variable declaration in the compiled executable
isAssignable
public boolean isAssignable()
Test whether it is permitted to assign to the variable using the saxon:assign
extension element.
- true if the extra attribute saxon:assignable="yes"
is present.
isGlobal
public boolean isGlobal()
Test whether this is a global variable or parameter
isRequiredParam
public boolean isRequiredParam()
Test whether this is a required parameter (required="yes")
- true if this is a required parameter
isTunnelParam
public boolean isTunnelParam()
Test whether this is a tunnel parameter (tunnel="yes")
- true if this is a tunnel parameter
mayContainSequenceConstructor
public boolean mayContainSequenceConstructor()
Determine whether this type of element is allowed to contain a template-body
- mayContainSequenceConstructor in interface StyleElement
- true: yes, it may contain a template-body
setRedundant
public void setRedundant()
Mark this global variable as redundant. This is done before prepareAttributes is called.