throws SAXException {
// process buffered character data
processCharacters();
try {
QName nodeName = new QName(namespaceURI, localName);
// decode node name
nodeName = ISO9075.decode(nodeName);
// properties
NodeId id = null;
QName nodeTypeName = null;
QName[] mixinTypes = null;
ArrayList props = new ArrayList(atts.getLength());
for (int i = 0; i < atts.getLength(); i++) {
if (atts.getURI(i).equals(QName.NS_XMLNS_URI)) {
// skip namespace declarations reported as attributes
// see http://issues.apache.org/jira/browse/JCR-620#action_12448164
continue;
}
QName propName = new QName(atts.getURI(i), atts.getLocalName(i));
// decode property name
propName = ISO9075.decode(propName);
// value(s)
String attrValue = atts.getValue(i);
TextValue[] propValues;
// always assume single-valued property for the time being
// until a way of properly serializing/detecting multi-valued
// properties on re-import is found (see JCR-325);
// see also DocViewSAXEventGenerator#leavingProperties(Node, int)
// todo proper multi-value serialization support
propValues = new TextValue[1];
propValues[0] = new StringValue(attrValue, nsContext);
if (propName.equals(QName.JCR_PRIMARYTYPE)) {
// jcr:primaryType
if (attrValue.length() > 0) {
try {
nodeTypeName = NameFormat.parse(attrValue, nsContext);
} catch (NameException ne) {
throw new SAXException("illegal jcr:primaryType value: "
+ attrValue, ne);
}
}
} else if (propName.equals(QName.JCR_MIXINTYPES)) {
// jcr:mixinTypes
mixinTypes = parseNames(attrValue);
} else if (propName.equals(QName.JCR_UUID)) {
// jcr:uuid
if (attrValue.length() > 0) {
id = NodeId.valueOf(attrValue);
}
} else {