}
String uri = elparts2[0];
String local = elparts2[1];
String prefix = NameChecker.getPrefix(elparts2[2]);
NamePool namePool = config.getNamePool();
int nameCode = namePool.allocate(prefix, uri, local);
receiver.startElement(nameCode, StandardNames.XS_UNTYPED, 0, 0);
for (Iterator<String> iter = nsDeclarations.keySet().iterator(); iter.hasNext();) {
String nsprefix = iter.next();
String nsuri = nsDeclarations.get(nsprefix);
receiver.namespace(namePool.allocateNamespaceCode(nsprefix, nsuri), 0);
}
if (atts != null) {
final int len = atts.getLength();
for (int a2=0; a2<len; a2++) {
Attr att = (Attr)atts.item(a2);
String attname = att.getName();
if (attname.startsWith("xmlns") && (attname.equals("xmlns") || attname.startsWith("xmlns:"))) {
// do nothing
} else {
//System.err.println("Processing attribute " + attname);
String[] parts2 = nsSupport.processName(attname, parts, true);
if (parts2==null) {
throw new XPathException("Undeclared namespace in " + attname);
}
String atturi = parts2[0];
String attlocal = parts2[1];
String attprefix = NameChecker.getPrefix(parts2[2]);
// Note, DOM gives no guarantee that the prefix and URI are actually consistent. For example,
// it's possible programmatically to construct attribute nodes that have a namespace URI but
// no prefix. We don't attempt to deal with such situations: garbage in, garbage out.
int attCode = namePool.allocate(attprefix, atturi, attlocal);
receiver.attribute(attCode, StandardNames.XS_UNTYPED_ATOMIC, att.getValue(), 0, 0);
}
}
}