Class XSLLocalVariable
- All Implemented Interfaces:
Source, SourceLocator, ActiveSource, GroundedValue, Item, MutableNodeInfo, NamespaceResolver, NodeInfo, Sequence, Location, SteppingNode, SiblingCountingNode, Locator
Handler for xsl:variable elements acting as local variable declarations in a stylesheet.
The xsl:variable element has mandatory attribute name and optional attribute select
The xsl:variable element has mandatory attribute name and optional attribute select
-
Nested Class Summary
Nested classes/interfaces inherited from class StyleElement
StyleElement.OnFailure -
Field Summary
Fields inherited from class XSLGeneralVariable
sourceBindingFields inherited from class StyleElement
ACTION_COMPILE, ACTION_FIXUP, ACTION_OPTIMIZE, ACTION_PROCESS_ATTRIBUTES, ACTION_TYPECHECK, ACTION_VALIDATE, actionsCompleted, defaultCollationName, defaultMode, defaultXPathNamespace, expandText, extensionNamespaces, reportingCircumstances, staticContext, validationError, version, YES_NOFields inherited from class NodeImpl
NODE_LETTER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompileLocalVariable(Compilation exec, ComponentDeclaration decl) Process this local variable declaration by expanding any sequence constructor and setting the select expression to the resultvoidFix up references from XPath expressions.Ask whether this element contains a binding for a variable with a given name; and if it does, return the source binding informationGet the static type of the variable.booleanDetermine whether this node is an instruction.protected voidSet the attribute list for the element.Methods inherited from class XSLGeneralVariable
getObjectName, getSourceBinding, getVariableQName, isGlobal, mayContainSequenceConstructor, postValidate, validateMethods inherited from class StyleElement
allocateLocalSlots, allocateLocation, arrayToSequence, bindLocalVariable, bindVariable, changesRetainedStaticContext, checkAttributeValue, checkEmpty, checkSortComesFirst, checkTopLevel, checkUnknownAttribute, compile, compileContentValueTemplate, compileDeclaration, compileError, compileError, compileError, compileError, compileError, compileError, compileErrorInAttribute, compileSequenceConstructor, compileSequenceConstructor, compileWarning, compileWarning, compileWarning, fallbackProcessing, findAncestorElement, findCollation, forwardsCompatibleModeIsEnabled, generateId, getAttributeValue, getBaseURI, getCompilation, getConfiguration, getContainingPackage, getContainingSlotManager, getDeclaredVisibility, getDefaultCollationName, getDefaultMode, getDefaultValidation, getDefaultXPathNamespace, getEffectiveVersion, getLastChildInstruction, getNamespaceResolver, getOverriddenComponent, getPackageData, getPrincipalStylesheetModule, getProperties, getSchemaType, getStaticContext, getStaticContext, getTypeAnnotation, getUsedAttributeSets, getUsedPackage, getVisibility, getWithParamInstructions, getXslOriginal, hasImplicitBinding, index, interpretVisibilityValue, invalidAttribute, isActionCompleted, isConstructingComplexContent, isDeclaration, isExcludedNamespace, isExpandingText, isExtensionAttributeAllowed, isExtensionNamespace, isNo, isPermittedChild, isSchemaAware, issueWarning, issueWarning, isTopLevel, isWithinDeclaredStreamableConstruct, isYes, makeAttributeValueTemplate, makeExpression, makeExpressionVisitor, makeExtendedSequenceType, makePattern, makeQName, makeRetainedStaticContext, makeSequenceType, makeSortKeys, mapToSequence, markTailCalls, mayContainFallback, mayContainParam, processAllAttributes, processAttributes, processBooleanAttribute, processDefaultCollationAttribute, processDefaultMode, processDefaultValidationAttribute, processDefaultXPathNamespaceAttribute, processExcludedNamespaces, processExpandTextAttribute, processExtensionElementAttribute, processStandardAttributes, processStreamableAtt, processVersionAttribute, reportAbsence, requireXslt40, seesAvuncularVariables, setActionCompleted, setCompilation, setIgnoreInstruction, setInstructionLocation, setObjectName, setValidationError, substituteFor, typeCheck, typeCheck, undeclaredNamespaceError, validateChildren, validateSubtree, validateValidationAttribute, xPath10ModeIsEnabledMethods inherited from class ElementImpl
addAttribute, addNamespace, addNamespace, attributes, checkNotNamespaceSensitiveElement, copy, delete, fixupInsertedNamespaces, generateId, getAllNamespaces, getAttributeValue, getColumnNumber, getDeclaredNamespaces, getLineNumber, getNodeKind, getNodeName, getRoot, getSchemaType, getSystemId, getURIForPrefix, initialise, isId, isIdref, isIdRefNode, isInScopeNamespace, isNilled, iteratePrefixes, removeAttribute, removeNamespace, removeTypeAnnotation, rename, replaceStringValue, setAttributeInfo, setAttributes, setLocation, setNamespaceMap, setNilled, setNodeName, setSystemId, setTypeAnnotationMethods inherited from class ParentNodeImpl
addChild, compact, getFirstChild, getLastChild, getNthChild, getNumberOfChildren, getRawSequenceNumber, getSequenceNumber, getUnicodeStringValue, hasChildNodes, insertChildren, insertChildrenAt, iterateChildren, removeChild, replaceChildrenAt, setChildren, setRawSequenceNumberMethods inherited from class NodeImpl
atomize, compareOrder, effectiveBooleanValue, equals, getDisplayName, getFingerprint, getLocalPart, getNamePool, getNextInDocument, getNextSibling, getParent, getPhysicalRoot, getPrefix, getPreviousInDocument, getPreviousSibling, getRawParent, getSiblingPosition, getSuccessorElement, getTreeInfo, getURI, hasFingerprint, hashCode, head, insertSiblings, isDeleted, iterateAxis, iterateAxis, newBuilder, replace, saveLocation, setRawParent, setSiblingPositionMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GroundedValue
asIterable, concatenate, containsNode, materializeMethods inherited from interface Item
getLength, getStringValue, itemAt, iterate, reduce, subsequenceMethods inherited from interface NodeInfo
asActiveSource, children, children, deliver, getGenre, getPublicId, isSameNodeInfo, isStreamed, toShortStringMethods inherited from interface Sequence
makeRepeatable
-
Constructor Details
-
XSLLocalVariable
public XSLLocalVariable()
-
-
Method Details
-
getBindingInformation
Ask whether this element contains a binding for a variable with a given name; and if it does, return the source binding information- Overrides:
getBindingInformationin classStyleElement- Parameters:
name- the variable name- Returns:
- the binding information if this element binds a variable of this name; otherwise null
-
isInstruction
public boolean isInstruction()Determine whether this node is an instruction.- Overrides:
isInstructionin classStyleElement- Returns:
- true - it is an instruction (well, it can be, anyway)
-
prepareAttributes
protected void prepareAttributes()Description copied from class:StyleElementSet the attribute list for the element. This is called to process the attributes (note the distinction from processAttributes in the superclass). Must be supplied in a subclass- Specified by:
prepareAttributesin classStyleElement
-
getRequiredType
Get the static type of the variable. This is the declared type, unless the value is statically known and constant, in which case it is the actual type of the value.- Returns:
- the declared or inferred type
-
fixupReferences
Description copied from class:StyleElementFix up references from XPath expressions. Overridden for function declarations and variable declarations- Overrides:
fixupReferencesin classStyleElement- Throws:
XPathException- if any references cannot be fixed up.
-
compileLocalVariable
Process this local variable declaration by expanding any sequence constructor and setting the select expression to the result- Parameters:
exec- the executabledecl- the declaration being compiled- Throws:
XPathException- if an error occurs
-