com.icl.saxon.style

Class XSLVariable

Implemented Interfaces:
Binding, DOMLocator, Element, Locator, NamedNodeMap, Node, NodeInfo, Source, SourceLocator

public class XSLVariable
extends XSLGeneralVariable
implements Binding

Handler for xsl:variable elements in stylesheet.
The xsl:variable element has mandatory attribute name and optional attribute select

Nested Class Summary

Field Summary

Fields inherited from class com.icl.saxon.style.XSLGeneralVariable

assignable, global, procedure, redundant, select, simpleText, variableFingerprint

Fields inherited from class com.icl.saxon.style.StyleElement

REPORT_ALWAYS, REPORT_IF_INSTANTIATED, REPORT_UNLESS_FORWARDS_COMPATIBLE, attributeSets, extensionNamespaces, reportingCircumstances, staticContext, validationError, version

Fields inherited from class com.icl.saxon.tree.ElementWithAttributes

attributeList, namespaceList

Fields inherited from class com.icl.saxon.tree.ElementImpl

nameCode, root

Fields inherited from class com.icl.saxon.tree.ParentNodeImpl

sequence

Fields inherited from class com.icl.saxon.tree.NodeImpl

emptyArray, index, parent

Fields inherited from class com.icl.saxon.om.AbstractNode

NODE_LETTER

Fields inherited from interface com.icl.saxon.om.NodeInfo

ATTRIBUTE, COMMENT, ELEMENT, NAMESPACE, NODE, NONE, NUMBER_OF_TYPES, PI, ROOT, TEXT

Method Summary

Value
constantValue()
Get the value, if known statically.
int
getDataType()
Get the data type, if known statically.
int
getSlotNumber()
Determine a slot number for the variable.
boolean
isInstruction()
Determine whether this node is an instruction.
void
process(Context context)
Process the variable declaration
void
validate()
Check that the variable is not already declared, and allocate a slot number

Methods inherited from class com.icl.saxon.style.XSLGeneralVariable

checkDuplicateDeclaration, getOwningProcedure, getProcedure, getSelectValue, getVariableFingerprint, getVariableName, isAssignable, isGlobal, mayContainTemplateBody, prepareAttributes, preprocess, validate

Methods inherited from class com.icl.saxon.style.StyleElement

bindVariable, checkEmpty, checkNotTopLevel, checkTopLevel, checkUnknownAttribute, checkWithinTemplate, compileError, compileError, definesExcludedNamespace, definesExtensionElement, doesPostProcessing, fallbackProcessing, findAttributeSets, forwardsCompatibleModeIsEnabled, getContainingStyleSheet, getPrecedence, getPreparedStyleSheet, getPrincipalStyleSheet, getStandardNames, getStyleSheetFunction, getVariableBinding, getVariableNames, getVersion, handleSortKeys, isExcludedNamespace, isExtensionNamespace, isInstruction, isTopLevel, makeAttributeValueTemplate, makeExpression, makePattern, mayContainTemplateBody, prepareAttributes, preprocess, process, processAllAttributes, processAttributeSets, processAttributes, processChildren, processExcludedNamespaces, processExtensionElementAttribute, processVersionAttribute, reportAbsence, setValidationError, styleError, styleError, substituteFor, validate, validateChildren, validateSubtree

Methods inherited from class com.icl.saxon.tree.ElementWithAttributes

addNamespaceNodes, copy, getAttribute, getAttributeList, getAttributeNS, getAttributeNode, getAttributeNodeNS, getAttributeValue, getAttributeValue, getAttributeValue, getAttributes, getLength, getNamedItem, getNamedItemNS, getNamespaceCodes, getPrefixForURI, getURICodeForPrefix, hasAttribute, hasAttributeNS, hasAttributes, initialise, item, outputNamespaceNodes, removeAttribute, removeAttributeNS, removeAttributeNode, removeNamedItem, removeNamedItemNS, setAttribute, setAttributeNS, setAttributeNode, setAttributeNodeNS, setNamedItem, setNamedItemNS, setNamespaceDeclarations

Methods inherited from class com.icl.saxon.tree.ElementImpl

addNamespaceNodes, copy, copy, generateId, getAttributeList, getAttributeValue, getBaseURI, getDocumentRoot, getLineNumber, getNameCode, getNodeType, getPrefixForURI, getSystemId, getURICodeForPrefix, initialise, makeNameCode, outputNamespaceNodes, setAttribute, setLineNumber, setNameCode, setSystemId

Methods inherited from class com.icl.saxon.tree.ParentNodeImpl

addChild, compact, copyStringValue, dropChildren, enumerateChildren, getChildNodes, getFirstChild, getLastChild, getNodeValue, getNthChild, getSequenceNumber, getStringValue, hasChildNodes, removeChild, renumberChildren, useChildrenArray

Methods inherited from class com.icl.saxon.tree.NodeImpl

compareOrder, generateId, getAttributeValue, getAttributeValue, getAttributes, getBaseURI, getChildNodes, getDisplayName, getDocumentElement, getDocumentRoot, getEnumeration, getFingerprint, getFirstChild, getLastChild, getLineNumber, getLocalName, getNameCode, getNamePool, getNextInDocument, getNextSibling, getOriginatingNode, getParent, getPrefix, getPreviousInDocument, getPreviousSibling, getSequenceNumber, getSystemId, getURI, hasAttributes, hasChildNodes, isSameNode, outputNamespaceNodes, removeNode, setSystemId

Methods inherited from class com.icl.saxon.om.AbstractNode

appendChild, appendData, cloneNode, compareOrder, copyStringValue, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, disallowUpdate, generateId, getAttribute, getAttributeNS, getAttributeNode, getAttributeNodeNS, getAttributeValue, getAttributeValue, getAttributes, getBaseURI, getChildNodes, getColumnNumber, getData, getDisplayName, getDoctype, getDocumentElement, getDocumentRoot, getElementById, getElementsByTagName, getElementsByTagNameNS, getEnumeration, getFingerprint, getFirstChild, getImplementation, getLastChild, getLength, getLineNumber, getLocalName, getName, getNameCode, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOriginatingNode, getOwnerDocument, getOwnerElement, getParent, getParentNode, getPrefix, getPreviousSibling, getPublicId, getSpecified, getSystemId, getTagName, getURI, getValue, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, importNode, insertBefore, insertData, isSameNode, isSupported, normalize, outputNamespaceNodes, removeAttribute, removeAttributeNS, removeAttributeNode, removeChild, replaceChild, replaceData, setAttributeNS, setAttributeNode, setAttributeNodeNS, setData, setNodeValue, setPrefix, setValue, splitText, substringData, supports

Method Details

constantValue

public Value constantValue()
Get the value, if known statically.
Specified by:
constantValue in interface Binding

Returns:
the value if known in advance, or null if not.


getDataType

public int getDataType()
Get the data type, if known statically.
Specified by:
getDataType in interface Binding

Returns:
the data type if known


getSlotNumber

public int getSlotNumber()
Determine a slot number for the variable.
Specified by:
getSlotNumber in interface Binding


isInstruction

public boolean isInstruction()
Determine whether this node is an instruction.
Overrides:
isInstruction in interface StyleElement

Returns:
true - it is an instruction (well, it can be, anyway)


process

public void process(Context context)
            throws TransformerException
Process the variable declaration
Overrides:
process in interface StyleElement


validate

public void validate()
            throws TransformerConfigurationException
Check that the variable is not already declared, and allocate a slot number
Overrides:
validate in interface XSLGeneralVariable