APIdia Launch Partner
Top Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.compiler

pack-priv final Class SymbolTable

extends Object
Class Inheritance
Imports
com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodType, java.util.ArrayList, .HashMap, .List, .Map, .Stack, .StringTokenizer

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen

Field Summary

Modifier and TypeField and Description
private Map<String, String>
private Map<String, AttributeSet>
private SyntaxTreeNode
_current

Use a namespace prefix to lookup a namespace URI

private Map<String, DecimalFormatting>
private Map<String, Integer>
private Stack<Map<String, Integer>>
private Map<String, Key>
private int
_nsCounter

This is used for xsl:attribute elements that have a "namespace" attribute that is currently not defined using xmlns:

private final Map<String, List<MethodType>>
private final Map<String, Stylesheet>
private Map<String, Template>
private Map<String, VariableBase>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public AttributeSet
public void
public void
addKey(QName name, Key key)

public Param
addParam(Param parameter)

public void
addPrefixAlias(String prefix, String alias)

Adds an alias for a namespace prefix

public void
addPrimop(String name, MethodType mtype)

Add a primitive operator or function to the symbol table.

public Stylesheet
public Template
public Variable
public void
excludeNamespaces(String prefixes)

Exclude a series of namespaces given by a list of whitespace separated namespace prefixes.

public void
excludeURI(String uri)

Register a namespace URI so that it will not be declared in the output unless it is actually referenced in the output.

public String
public DecimalFormatting
public Key
getKey(QName name)

public boolean
isExcludedNamespace(String uri)

Check if a namespace should not be declared in the output (unless used)

public AttributeSet
public SyntaxTreeNode
public String
public Param
public String
lookupPrefixAlias(String prefix)

Retrieves any alias for a given namespace prefix

public List<MethodType>
lookupPrimop(String name)

Lookup a primitive operator or function in the symbol table by prepending the prefix PrimopPrefix.

public Stylesheet
public Template
public Variable
public void
popExcludedNamespacesContext()

Exclusion of namespaces by a stylesheet does not extend to any stylesheet imported or included by the stylesheet.

public void
pushExcludedNamespacesContext()

Exclusion of namespaces by a stylesheet does not extend to any stylesheet imported or included by the stylesheet.

public void
public void
unExcludeNamespaces(String prefixes)

Turn of namespace declaration exclusion

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_aliasesback to summary
private Map<String, String> _aliases
_attributeSetsback to summary
private Map<String, AttributeSet> _attributeSets
_currentback to summary
private SyntaxTreeNode _current

Use a namespace prefix to lookup a namespace URI

_decimalFormatsback to summary
private Map<String, DecimalFormatting> _decimalFormats
_excludedURIback to summary
private Map<String, Integer> _excludedURI
_excludedURIStackback to summary
private Stack<Map<String, Integer>> _excludedURIStack
_keysback to summary
private Map<String, Key> _keys
_nsCounterback to summary
private int _nsCounter

This is used for xsl:attribute elements that have a "namespace" attribute that is currently not defined using xmlns:

_primopsback to summary
private final Map<String, List<MethodType>> _primops
_stylesheetsback to summary
private final Map<String, Stylesheet> _stylesheets
_templatesback to summary
private Map<String, Template> _templates
_variablesback to summary
private Map<String, VariableBase> _variables

Constructor Detail

SymbolTableback to summary
pack-priv SymbolTable()

Method Detail

addAttributeSetback to summary
public AttributeSet addAttributeSet(AttributeSet atts)
addDecimalFormattingback to summary
public void addDecimalFormatting(QName name, DecimalFormatting symbols)
addKeyback to summary
public void addKey(QName name, Key key)
addParamback to summary
public Param addParam(Param parameter)
addPrefixAliasback to summary
public void addPrefixAlias(String prefix, String alias)

Adds an alias for a namespace prefix

addPrimopback to summary
public void addPrimop(String name, MethodType mtype)

Add a primitive operator or function to the symbol table. To avoid name clashes with user-defined names, the prefix PrimopPrefix is prepended.

addStylesheetback to summary
public Stylesheet addStylesheet(QName name, Stylesheet node)
addTemplateback to summary
public Template addTemplate(Template template)
addVariableback to summary
public Variable addVariable(Variable variable)
excludeNamespacesback to summary
public void excludeNamespaces(String prefixes)

Exclude a series of namespaces given by a list of whitespace separated namespace prefixes.

excludeURIback to summary
public void excludeURI(String uri)

Register a namespace URI so that it will not be declared in the output unless it is actually referenced in the output.

generateNamespacePrefixback to summary
public String generateNamespacePrefix()
getDecimalFormattingback to summary
public DecimalFormatting getDecimalFormatting(QName name)
getKeyback to summary
public Key getKey(QName name)
isExcludedNamespaceback to summary
public boolean isExcludedNamespace(String uri)

Check if a namespace should not be declared in the output (unless used)

lookupAttributeSetback to summary
public AttributeSet lookupAttributeSet(QName name)
lookupNameback to summary
public SyntaxTreeNode lookupName(QName qname)
lookupNamespaceback to summary
public String lookupNamespace(String prefix)
lookupParamback to summary
public Param lookupParam(QName qname)
lookupPrefixAliasback to summary
public String lookupPrefixAlias(String prefix)

Retrieves any alias for a given namespace prefix

lookupPrimopback to summary
public List<MethodType> lookupPrimop(String name)

Lookup a primitive operator or function in the symbol table by prepending the prefix PrimopPrefix.

lookupStylesheetback to summary
public Stylesheet lookupStylesheet(QName name)
lookupTemplateback to summary
public Template lookupTemplate(QName name)
lookupVariableback to summary
public Variable lookupVariable(QName qname)
popExcludedNamespacesContextback to summary
public void popExcludedNamespacesContext()

Exclusion of namespaces by a stylesheet does not extend to any stylesheet imported or included by the stylesheet. Upon exiting the context of a stylesheet, a call to this method is needed to restore the set of excluded namespaces that was in effect prior to entering the context of the current stylesheet.

pushExcludedNamespacesContextback to summary
public void pushExcludedNamespacesContext()

Exclusion of namespaces by a stylesheet does not extend to any stylesheet imported or included by the stylesheet. Upon entering the context of a new stylesheet, a call to this method is needed to clear the current set of excluded namespaces temporarily. Every call to this method requires a corresponding call to popExcludedNamespacesContext().

setCurrentNodeback to summary
public void setCurrentNode(SyntaxTreeNode node)
unExcludeNamespacesback to summary
public void unExcludeNamespaces(String prefixes)

Turn of namespace declaration exclusion