int length = attributes.getLength();
if (length != 0) {
try {
attSet = AttributeSet.createAttributeSet2(attributes);
} catch (DOMException ex) {
throw new SAXParseException(getMessage("XDB-002",
new Object[] { ex.getMessage() }), locator, ex);
}
}
//
// Then create the element, associate its attributes, and
// stack it for later addition.
//
ElementNode2 e = null;
try {
// Translate a SAX empty string to mean no namespaceURI
if ("".equals(namespaceURI)) {
namespaceURI = null;
}
e = (ElementNode2)document.createElementNS(namespaceURI, qName);
} catch (DOMException ex) {
throw new SAXParseException(getMessage("XDB-004",
new Object[] { ex.getMessage() }), locator, ex);
}
if (attributes instanceof AttributesEx) {
e.setIdAttributeName(
((AttributesEx)attributes).getIdAttributeName());