public abstract class XSLVariableDeclaration extends XSLGeneralVariable implements VariableDeclaration, StylesheetProcedure
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
references |
assignable, compiledVariable, constantText, global, implicitlyRequiredParam, redundant, requiredParam, requiredType, select, slotManager, tunnel
ACTION_COMPILE, ACTION_FIXUP, ACTION_OPTIMIZE, ACTION_PROCESS_ATTRIBUTES, ACTION_TYPECHECK, ACTION_VALIDATE, actionsCompleted, defaultCollationName, defaultXPathNamespace, extensionNamespaces, REPORT_ALWAYS, REPORT_IF_INSTANTIATED, REPORT_UNLESS_FALLBACK_AVAILABLE, REPORT_UNLESS_FORWARDS_COMPATIBLE, reportingCircumstances, staticContext, validationError, version, YES_NO
NODE_LETTER
ALL_NAMESPACES, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES
Constructor and Description |
---|
XSLVariableDeclaration() |
Modifier and Type | Method and Description |
---|---|
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
|
abstract SequenceType |
getRequiredType()
Get the static type of the variable.
|
SlotManager |
getSlotManager()
Get the SlotManager associated with this stylesheet construct.
|
int |
getSlotNumber()
Get the slot number allocated to this variable (its position in the stackframe)
|
protected void |
index(Declaration decl,
PrincipalStylesheetModule top)
Method supplied by declaration elements to add themselves to a stylesheet-level index
|
boolean |
isDeclaration()
Ask whether this node is a declaration, that is, a permitted child of xsl:stylesheet
(including xsl:include and xsl:import).
|
boolean |
isInstruction()
Determine whether this node is an instruction.
|
void |
optimize(Declaration declaration)
Optimize the stylesheet construct
|
void |
registerReference(BindingReference ref)
Method called by VariableReference to register the variable reference for
subsequent fixup
|
protected void |
setReferenceCount(GeneralVariable var)
Set the number of references to this variable.
|
void |
setSlotNumber(int slot)
Allocate a slot number to this variable
|
void |
validate(Declaration decl)
Check that the variable is not already declared, and allocate a slot number
|
allowsAsAttribute, allowsRequired, allowsTunnelAttribute, allowsValue, checkAgainstRequiredType, getConstructType, getReturnedItemType, getVariableDisplayName, getVariableQName, initializeBinding, isAssignable, isGlobal, isRequiredParam, isTunnelParam, mayContainSequenceConstructor, postValidate, prepareAttributes, setRedundant
allocateLocationId, allocatePatternSlots, allocateSlots, bindLocalVariable, bindVariable, checkAttributeValue, checkEmpty, checkSortComesFirst, checkTopLevel, checkUnknownAttribute, compile, compileDeclaration, compileError, compileError, compileError, compileError, compileSequenceConstructor, compileWarning, compileWarning, definesExcludedNamespace, definesExtensionElement, fallbackProcessing, forwardsCompatibleModeIsEnabled, getAttributeSets, getAttributeValue, getColumnNumber, getCommonChildItemType, getContainerGranularity, getContainingSlotManager, getContainingStylesheet, getDefaultCollationName, getDefaultXPathNamespace, getEffectiveVersion, getExecutable, getHostLanguage, getLastChildInstruction, getLineNumber, getLocationProvider, getNamespaceResolver, getObjectName, getPreparedStylesheet, getPrincipalStylesheetModule, getProcessorVersion, getProperties, getProperty, getSchemaType, getStaticContext, getSystemId, getTypeAnnotation, getWithParamInstructions, isActionCompleted, isExcludedNamespace, isExplaining, isExtensionNamespace, isPermittedChild, issueWarning, issueWarning, isTopLevel, isXslt30Processor, makeAttributeValueTemplate, makeExpression, makeExpressionVisitor, makeNamespaceContext, makePattern, makeQName, makeSequenceType, makeSortKeys, makeTraceInstruction, markTailCalls, mayContainFallback, mayContainParam, processAllAttributes, processAttributes, processDefaultCollationAttribute, processDefaultXPathNamespaceAttribute, processExcludedNamespaces, processExtensionElementAttribute, processStandardAttributes, processVersionAttribute, reportAbsence, seesAvuncularVariables, setActionCompleted, setObjectName, setValidationError, substituteFor, typeCheck, typeCheck, undeclaredNamespaceError, validateChildren, validateSubtree, xPath10ModeIsEnabled
addAttribute, addNamespace, copy, delete, fixupInsertedNamespaces, generateId, getAttributeList, getAttributeValue, getAttributeValue, getBaseURI, getColumnNumber, getDeclaredNamespaces, getDocumentRoot, getLineNumber, getNameCode, getNamespaceList, getNodeKind, getPrefixForURI, getRoot, getSchemaType, getSystemId, getTypeAnnotation, getURIForPrefix, gsetAttributeCollection, initialise, isId, isNilled, iteratePrefixes, removeAttribute, removeTypeAnnotation, rename, replaceStringValue, setAttributeList, setLocation, setNameCode, setNamespaceDeclarations, setNamespaceList, setSystemId, setTypeAnnotation
addChild, compact, enumerateChildren, getFirstChild, getLastChild, getNthChild, getNumberOfChildren, getRawSequenceNumber, getSequenceNumber, getStringValue, getStringValueCS, hasChildNodes, insertChildren, insertChildrenAt, removeChild, replaceChildrenAt, setChildren, setRawSequenceNumber
atomize, compareOrder, equals, getConfiguration, getDisplayName, getDocumentNumber, getFingerprint, getLocalPart, getNamePool, getNextInDocument, getNextSibling, getParent, getPhysicalRoot, getPrefix, getPreviousInDocument, getPreviousSibling, getPublicId, getRawParent, getSiblingPosition, getTypedValue, getURI, insertSiblings, isDeleted, isIdref, isSameNodeInfo, iterateAxis, iterateAxis, newBuilder, replace, setRawParent, setSiblingPosition
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getVariableQName
getLineNumber, getSystemId
public boolean isDeclaration()
isDeclaration
in class StyleElement
public SlotManager getSlotManager()
getSlotManager
in interface StylesheetProcedure
public int getSlotNumber()
public void setSlotNumber(int slot)
slot
- the position of the variable on the local stack framepublic abstract SequenceType getRequiredType()
public void registerReference(BindingReference ref)
registerReference
in interface VariableDeclaration
ref
- the variable referencepublic boolean isInstruction()
isInstruction
in class StyleElement
public void fixupReferences() throws XPathException
fixupReferences
in class StyleElement
XPathException
- if any references cannot be fixed up.public void validate(Declaration decl) throws XPathException
validate
in class XSLGeneralVariable
decl
- XPathException
- if any error is found during validationprotected void fixupBinding(Binding binding)
binding
- the Binding that represents this variable declaration in the executable code treeprotected void setReferenceCount(GeneralVariable var)
setReferenceCount
in class XSLGeneralVariable
var
- the variableprotected void index(Declaration decl, PrincipalStylesheetModule top) throws XPathException
StyleElement
index
in class StyleElement
decl
- the Declaration being indexed. (This corresponds to the StyleElement object
except in cases where one module is imported several times with different precedence.)top
- the outermost XSLStylesheet elementXPathException
- if any error is encounteredpublic void optimize(Declaration declaration) throws XPathException
optimize
in interface StylesheetProcedure
declaration
- XPathException
public GeneralVariable getCompiledVariable()