/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
* THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
*/
/**
* The Fast Infoset SAX serializer that maps prefixes to user specified prefixes
* that are specified in a namespace URI to prefix map.
* <p>
* This serializer will not preserve the original prefixes and this serializer
* should not be used when prefixes need to be preserved, such as the case
* when there are qualified names in content.
* <p>
* A namespace URI to prefix map is utilized such that the prefixes
* in the map are utilized rather than the prefixes specified in
* the qualified name for elements and attributes.
* <p>
* Any namespace declarations with a namespace URI that is not present in
* the map are added.
* <p>
*/
// Use the local name to look up elements/attributes
super(true);
_prefixToPrefixMapping = new HashMap();
// Empty prefix
// 'xml' prefix
_namespaceToPrefixMapping.put(EncodingConstants.XML_NAMESPACE_NAME, EncodingConstants.XML_NAMESPACE_PREFIX);
}
try {
if (_elementHasNamespaces == false) {
// Mark the current buffer position to flag attributes if necessary
mark();
_elementHasNamespaces = true;
// Write out Element byte with namespaces
} else {
if (p != null) {
}
return;
}
}
if (p != null) {
} else {
}
} catch (IOException e) {
throw new SAXException("startElement", e);
}
}
protected final void encodeElement(String namespaceURI, String qName, String localName) throws IOException {
// Check the entry is a member of the read only map
}
}
}
}
protected boolean encodeElementMapEntry(LocalNameQualifiedNamesMap.Entry entry, String namespaceURI) throws IOException {
return true;
}
}
return false;
}
boolean addToTable;
boolean mustToBeAddedToTable;
if (atts instanceof EncodingAlgorithmAttributes) {
// If data is null then there is no algorithm data
if (uri == "http://www.w3.org/2001/XMLSchema-instance" ||
}
} else {
}
} else {
}
}
}
} else {
if (uri == "http://www.w3.org/2001/XMLSchema-instance" ||
}
}
}
}
_terminate = true;
}
if (i != -1) {
}
if (p != null) {
if (p.length() == 0)
return localName;
else
return p + ":" + localName;
} else {
return qName;
}
}
protected final boolean encodeAttribute(String namespaceURI, String qName, String localName) throws IOException {
// Check the entry is a member of the read only map
}
}
}
}
protected boolean encodeAttributeMapEntry(LocalNameQualifiedNamesMap.Entry entry, String namespaceURI) throws IOException {
return true;
}
}
return false;
}
}
}
}