com.icl.saxon.style

Class XSLGeneralVariable

Implemented Interfaces:
DOMLocator, Element, Locator, NamedNodeMap, Node, NodeInfo, Source, SourceLocator
Known Direct Subclasses:
SAXONAssign, SAXONReturn, SQLColumn, XSLParam, XSLVariable, XSLWithParam

public abstract class XSLGeneralVariable
extends StyleElement

This class defines common behaviour across xsl:variable, xsl:param, and xsl:with-param

Field Summary

protected boolean
assignable
protected boolean
global
protected Procedure
procedure
protected boolean
redundant
protected Expression
select
protected String
simpleText
protected int
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

void
checkDuplicateDeclaration()
Check whether this declaration duplicates another one
Procedure
getOwningProcedure()
Get the owning Procedure definition, if this is a local variable
Procedure
getProcedure()
Get associated Procedure (for details of stack frame, if this is a global variable containing local variable declarations)
protected Value
getSelectValue(Context context)
Get the value of the select expression if present or the content of the element otherwise
int
getVariableFingerprint()
Get the fingerprint of the variable name
String
getVariableName()
Get the display name of the variable.
boolean
isAssignable()
Test whether it is permitted to assign to the variable using the saxon:assign extension element.
boolean
isGlobal()
boolean
mayContainTemplateBody()
Determine whether this type of element is allowed to contain a template-body
void
prepareAttributes()
void
preprocess()
Preprocess: this ensures space is available for local variables declared within this global variable
void
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, isSameNodeInfo, outputNamespaceNodes, removeNode, setSystemId

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

appendChild, appendData, cloneNode, compareDocumentPosition, 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, getFeature, getFingerprint, getFirstChild, getImplementation, getLastChild, getLength, getLineNumber, getLocalName, getName, getNameCode, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOriginatingNode, getOwnerDocument, getOwnerElement, getParent, getParentNode, getPrefix, getPreviousSibling, getPublicId, getSchemaTypeInfo, getSpecified, getSystemId, getTagName, getTextContent, getURI, getUserData, getValue, getWholeText, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, importNode, insertBefore, insertData, isDefaultNamespace, isElementContentWhitespace, isEqualNode, isId, isSameNode, isSameNodeInfo, isSupported, lookupNamespaceURI, lookupPrefix, normalize, outputNamespaceNodes, removeAttribute, removeAttributeNS, removeAttributeNode, removeChild, replaceChild, replaceData, replaceWholeText, setAttributeNS, setAttributeNode, setAttributeNodeNS, setData, setIdAttribute, setIdAttributeNS, setIdAttributeNode, setNodeValue, setPrefix, setTextContent, setUserData, setValue, splitText, substringData, supports

Field Details

assignable

protected boolean assignable

global

protected boolean global

procedure

protected Procedure procedure

redundant

protected boolean redundant

select

protected Expression select

simpleText

protected String simpleText

variableFingerprint

protected int variableFingerprint

Method Details

checkDuplicateDeclaration

public void checkDuplicateDeclaration()
            throws TransformerConfigurationException
Check whether this declaration duplicates another one

getOwningProcedure

public Procedure getOwningProcedure()
            throws TransformerConfigurationException
Get the owning Procedure definition, if this is a local variable

getProcedure

public Procedure getProcedure()
Get associated Procedure (for details of stack frame, if this is a global variable containing local variable declarations)

getSelectValue

protected Value getSelectValue(Context context)
            throws TransformerException
Get the value of the select expression if present or the content of the element otherwise

getVariableFingerprint

public int getVariableFingerprint()
Get the fingerprint of the variable name

getVariableName

public String getVariableName()
Get the display name of the variable.

isAssignable

public boolean isAssignable()
Test whether it is permitted to assign to the variable using the saxon:assign extension element. This will only be true if the extra attribute saxon:assignable="yes" is present.

isGlobal

public boolean isGlobal()

mayContainTemplateBody

public boolean mayContainTemplateBody()
Determine whether this type of element is allowed to contain a template-body
Overrides:
mayContainTemplateBody in interface StyleElement
Returns:
true: yes, it may contain a template-body

prepareAttributes

public void prepareAttributes()
            throws TransformerConfigurationException
Overrides:
prepareAttributes in interface StyleElement

preprocess

public void preprocess()
            throws TransformerConfigurationException
Preprocess: this ensures space is available for local variables declared within this global variable
Overrides:
preprocess in interface StyleElement

validate

public void validate()
            throws TransformerConfigurationException
Overrides:
validate in interface StyleElement