== null) {
if (attributes == null) {
attributes = new XMLAttributesImpl();
}
QName ns = (QName)NEW_NS_ATTR_QNAME.clone();
ns.prefix = null;
ns.localpart = XMLSymbols.PREFIX_XMLNS;
ns.rawname = XMLSymbols.PREFIX_XMLNS;
int index =
attributes.addAttribute(
ns,
XMLSymbols.fCDATASymbol,
uri != null ? uri : XMLSymbols.EMPTY_STRING);
attributes.setSpecified(index, true);
// Need to re-declare this prefix in the current context
// in order for the SAX parser to report the appropriate
// start and end prefix mapping events. -- mrglavas
fNamespaceContext.declarePrefix(prefix, uri);
}
}
else if (
attributes.getValue(NamespaceContext.XMLNS_URI, prefix)
== null) {
if (attributes == null) {
attributes = new XMLAttributesImpl();
}
QName ns = (QName)NEW_NS_ATTR_QNAME.clone();
ns.localpart = prefix;
ns.rawname += prefix;
ns.rawname = (fSymbolTable != null) ?
fSymbolTable.addSymbol(ns.rawname) :
ns.rawname.intern();