Methods Summary |
---|
public com.sun.org.apache.xalan.internal.xsltc.compiler.AttributeSet | addAttributeSet(com.sun.org.apache.xalan.internal.xsltc.compiler.AttributeSet atts)
if (_attributeSets == null) _attributeSets = new Hashtable();
return (AttributeSet)_attributeSets.put(atts.getName(), atts);
|
public void | addDecimalFormatting(com.sun.org.apache.xalan.internal.xsltc.compiler.QName name, com.sun.org.apache.xalan.internal.xsltc.compiler.DecimalFormatting symbols)
if (_decimalFormats == null) _decimalFormats = new Hashtable();
_decimalFormats.put(name, symbols);
|
public com.sun.org.apache.xalan.internal.xsltc.compiler.Param | addParam(com.sun.org.apache.xalan.internal.xsltc.compiler.Param parameter)
if (_variables == null) _variables = new Hashtable();
final String name = parameter.getName().getStringRep();
return (Param)_variables.put(name, parameter);
|
public void | addPrefixAlias(java.lang.String prefix, java.lang.String alias)Adds an alias for a namespace prefix
if (_aliases == null) _aliases = new Hashtable();
_aliases.put(prefix,alias);
|
public void | addPrimop(java.lang.String name, com.sun.org.apache.xalan.internal.xsltc.compiler.util.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.
Vector methods = (Vector)_primops.get(name);
if (methods == null) {
_primops.put(name, methods = new Vector());
}
methods.addElement(mtype);
|
public com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet | addStylesheet(com.sun.org.apache.xalan.internal.xsltc.compiler.QName name, com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet node)
return (Stylesheet)_stylesheets.put(name, node);
|
public com.sun.org.apache.xalan.internal.xsltc.compiler.Template | addTemplate(com.sun.org.apache.xalan.internal.xsltc.compiler.Template template)
final QName name = template.getName();
if (_templates == null) _templates = new Hashtable();
return (Template)_templates.put(name, template);
|
public com.sun.org.apache.xalan.internal.xsltc.compiler.Variable | addVariable(com.sun.org.apache.xalan.internal.xsltc.compiler.Variable variable)
if (_variables == null) _variables = new Hashtable();
final String name = variable.getName().getStringRep();
return (Variable)_variables.put(name, variable);
|
public void | excludeNamespaces(java.lang.String prefixes)Exclude a series of namespaces given by a list of whitespace
separated namespace prefixes.
if (prefixes != null) {
StringTokenizer tokens = new StringTokenizer(prefixes);
while (tokens.hasMoreTokens()) {
final String prefix = tokens.nextToken();
final String uri;
if (prefix.equals("#default"))
uri = lookupNamespace(Constants.EMPTYSTRING);
else
uri = lookupNamespace(prefix);
if (uri != null) excludeURI(uri);
}
}
|
public void | excludeURI(java.lang.String uri)Register a namespace URI so that it will not be declared in the output
unless it is actually referenced in the output.
// The null-namespace cannot be excluded
if (uri == null) return;
// Create new hashtable of exlcuded URIs if none exists
if (_excludedURI == null) _excludedURI = new Hashtable();
// Register the namespace URI
Integer refcnt = (Integer)_excludedURI.get(uri);
if (refcnt == null)
refcnt = new Integer(1);
else
refcnt = new Integer(refcnt.intValue() + 1);
_excludedURI.put(uri,refcnt);
|
public java.lang.String | generateNamespacePrefix()
return(new String("ns"+(_nsCounter++)));
|
public com.sun.org.apache.xalan.internal.xsltc.compiler.DecimalFormatting | getDecimalFormatting(com.sun.org.apache.xalan.internal.xsltc.compiler.QName name)
if (_decimalFormats == null) return null;
return((DecimalFormatting)_decimalFormats.get(name));
|
public boolean | isExcludedNamespace(java.lang.String uri)Check if a namespace should not be declared in the output (unless used)
if (uri != null && _excludedURI != null) {
final Integer refcnt = (Integer)_excludedURI.get(uri);
return (refcnt != null && refcnt.intValue() > 0);
}
return false;
|
public com.sun.org.apache.xalan.internal.xsltc.compiler.AttributeSet | lookupAttributeSet(com.sun.org.apache.xalan.internal.xsltc.compiler.QName name)
if (_attributeSets == null) return null;
return (AttributeSet)_attributeSets.get(name);
|
public com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode | lookupName(com.sun.org.apache.xalan.internal.xsltc.compiler.QName qname)
if (_variables == null) return null;
final String name = qname.getStringRep();
return (SyntaxTreeNode)_variables.get(name);
|
public java.lang.String | lookupNamespace(java.lang.String prefix)
if (_current == null) return(Constants.EMPTYSTRING);
return(_current.lookupNamespace(prefix));
|
public com.sun.org.apache.xalan.internal.xsltc.compiler.Param | lookupParam(com.sun.org.apache.xalan.internal.xsltc.compiler.QName qname)
if (_variables == null) return null;
final String name = qname.getStringRep();
final Object obj = _variables.get(name);
return obj instanceof Param ? (Param)obj : null;
|
public java.lang.String | lookupPrefixAlias(java.lang.String prefix)Retrieves any alias for a given namespace prefix
if (_aliases == null) return null;
return (String)_aliases.get(prefix);
|
public java.util.Vector | lookupPrimop(java.lang.String name)Lookup a primitive operator or function in the symbol table by
prepending the prefix PrimopPrefix.
return (Vector)_primops.get(name);
|
public com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet | lookupStylesheet(com.sun.org.apache.xalan.internal.xsltc.compiler.QName name)
return (Stylesheet)_stylesheets.get(name);
|
public com.sun.org.apache.xalan.internal.xsltc.compiler.Template | lookupTemplate(com.sun.org.apache.xalan.internal.xsltc.compiler.QName name)
if (_templates == null) return null;
return (Template)_templates.get(name);
|
public com.sun.org.apache.xalan.internal.xsltc.compiler.Variable | lookupVariable(com.sun.org.apache.xalan.internal.xsltc.compiler.QName qname)
if (_variables == null) return null;
final String name = qname.getStringRep();
final Object obj = _variables.get(name);
return obj instanceof Variable ? (Variable)obj : null;
|
public void | setCurrentNode(com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode node)
_current = node;
|
public void | unExcludeNamespaces(java.lang.String prefixes)Turn of namespace declaration exclusion
if (_excludedURI == null) return;
if (prefixes != null) {
StringTokenizer tokens = new StringTokenizer(prefixes);
while (tokens.hasMoreTokens()) {
final String prefix = tokens.nextToken();
final String uri;
if (prefix.equals("#default"))
uri = lookupNamespace(Constants.EMPTYSTRING);
else
uri = lookupNamespace(prefix);
Integer refcnt = (Integer)_excludedURI.get(uri);
if (refcnt != null)
_excludedURI.put(uri, new Integer(refcnt.intValue() - 1));
}
}
|