/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: SymbolTable.java,v 1.5 2005/09/28 13:48:16 pvedula Exp $
*/
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @author Morten Jorgensen
*/
final class SymbolTable {
// These hashtables are used for all stylesheets
// These hashtables are used for some stylesheets
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
/**
* Add a primitive operator or function to the symbol table. To avoid
* name clashes with user-defined names, the prefix <tt>PrimopPrefix</tt>
* is prepended.
*/
}
}
/**
* Lookup a primitive operator or function in the symbol table by
* prepending the prefix <tt>PrimopPrefix</tt>.
*/
}
/**
* This is used for xsl:attribute elements that have a "namespace"
* attribute that is currently not defined using xmlns:
*/
return("ns"+(_nsCounter++));
}
/**
* Use a namespace prefix to lookup a namespace URI
*/
}
}
/**
* Adds an alias for a namespace prefix
*/
}
/**
* Retrieves any alias for a given namespace prefix
*/
}
/**
* 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
// Create new hashtable of exlcuded URIs if none exists
// Register the namespace URI
else
}
/**
* Exclude a series of namespaces given by a list of whitespace
* separated namespace prefixes.
*/
while (tokens.hasMoreTokens()) {
else
}
}
}
/**
* Check if a namespace should not be declared in the output (unless used)
*/
}
return false;
}
/**
* Turn of namespace declaration exclusion
*/
if (_excludedURI == null) return;
while (tokens.hasMoreTokens()) {
else
}
}
}
/**
* 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 {@link #popExcludedNamespacesContext()}.
*/
public void pushExcludedNamespacesContext() {
if (_excludedURIStack == null) {
_excludedURIStack = new Stack();
}
_excludedURI = null;
}
/**
* 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.
*/
public void popExcludedNamespacesContext() {
if (_excludedURIStack.isEmpty()) {
}
}
}