public class SourceBinding extends Object
Modifier and Type | Field and Description |
---|---|
static int |
AS |
static int |
ASSIGNABLE |
protected GeneralVariable |
compiledVariable |
protected String |
constantText |
static int |
DISALLOWS_CONTENT |
static int |
GLOBAL |
static int |
GROUP |
static int |
IMPLICITLY_REQUIRED |
static int |
PARAM |
static int |
PRIVATE |
static int |
REQUIRED |
static int |
SELECT |
protected SlotManager |
slotManager |
static int |
STATIC |
static int |
TUNNEL |
Constructor and Description |
---|
SourceBinding(StyleElement sourceElement) |
Modifier and Type | Method and Description |
---|---|
void |
checkAgainstRequiredType(SequenceType required)
Check the supplied select expression against the required type.
|
protected void |
fixupBinding(Binding binding)
Notify all variable references of the Binding instruction
|
void |
fixupReferences()
Notify all references to this variable of the data type
|
GeneralVariable |
getCompiledVariable()
Get the compiled variable
|
SequenceType |
getDeclaredType()
Get the type actually declared for the attribute
|
SequenceType |
getInferredType(boolean useContentRules)
Get the best available static type of the variable.
|
List<BindingReference> |
getReferences()
Get all the known references to this variable
|
Expression |
getSelectExpression()
Get the select expression actually appearing in the variable declaration
|
SlotManager |
getSlotManager()
Get the SlotManager associated with this stylesheet construct.
|
StyleElement |
getSourceElement()
Get the declaration in the stylesheet
|
StructuredQName |
getVariableQName()
Get the name of the variable
|
void |
handleSequenceConstructor(Executable exec,
Declaration decl)
If the element contains a sequence constructor, convert this to an expression and assign it to the
select attribute
|
boolean |
hasProperty(int prop)
Get a boolean property of the variable
|
boolean |
isStatic() |
void |
postValidate()
Hook to allow additional validation of a parent element immediately after its
children have been validated.
|
void |
prepareAttributes(int permittedAttributes) |
void |
registerReference(BindingReference ref)
Method called by VariableReference to register the variable reference for
subsequent fixup
|
void |
setProperty(int prop,
boolean flag)
Set a boolean property of the variable
|
protected void |
setReferenceCount(GeneralVariable var)
Set the number of references to this variable.
|
void |
setVariableQName(StructuredQName name)
Set the name of the variable
|
void |
validate()
Validate the declartaion
|
protected String constantText
protected SlotManager slotManager
protected GeneralVariable compiledVariable
public static final int PRIVATE
public static final int GLOBAL
public static final int PARAM
public static final int TUNNEL
public static final int REQUIRED
public static final int IMPLICITLY_REQUIRED
public static final int ASSIGNABLE
public static final int SELECT
public static final int AS
public static final int DISALLOWS_CONTENT
public static final int GROUP
public static final int STATIC
public SourceBinding(StyleElement sourceElement)
public void prepareAttributes(int permittedAttributes) throws XPathException
XPathException
public StyleElement getSourceElement()
public void setVariableQName(StructuredQName name)
name
- the name of the variable as a QNamepublic void validate() throws XPathException
XPathException
public void postValidate() throws XPathException
XPathException
public boolean isStatic()
public void checkAgainstRequiredType(SequenceType required) throws XPathException
required
- The type required by the variable declaration, or in the case
of xsl:with-param, the signature of the called templateXPathException
- if an error is detectedpublic StructuredQName getVariableQName()
public void setProperty(int prop, boolean flag)
prop
- the property to be set (e.g. TUNNEL
)flag
- true to set the property on, false to set it offpublic boolean hasProperty(int prop)
prop
- the property whose value is requiredpublic List<BindingReference> getReferences()
public SlotManager getSlotManager()
public void handleSequenceConstructor(Executable exec, Declaration decl) throws XPathException
exec
- the executabledecl
- the declaration being compiledXPathException
- if a static error is found, for example a type errorpublic SequenceType getDeclaredType()
public Expression getSelectExpression()
public SequenceType getInferredType(boolean useContentRules)
useContentRules
- set to true if the standard rules for xsl:variable and similar elements apply,
whereby the element's contained sequence constructor substitutes for the select attributepublic void registerReference(BindingReference ref)
ref
- the variable reference being registeredpublic void fixupReferences() throws XPathException
XPathException
protected void fixupBinding(Binding binding)
binding
- the Binding that represents this variable declaration in the executable code treeprotected void setReferenceCount(GeneralVariable var)
var
- the variablepublic GeneralVariable getCompiledVariable()
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.