if (getProcessNamespaceURI().equals(namespace)) {
XMLPipelineContext context = getPipelineContext();
Locator locator = context.getCurrentLocator();
String message = "Message parts must be in a different " +
"namespace from the message";
fatalError(new XMLStreamingException(message, locator));
}
nestedElementLevel--;
if (nestedElementLevel == 0) {
// This must be the end of the current part.
if (!currentPart.getName().equals(localName)) {
// This should never happen because the document is supposed
// to be valid before it reaches this process....But just in
// case.
XMLPipelineContext context = getPipelineContext();
Locator locator = context.getCurrentLocator();
String message = "Parts out of sync. Current part is " +
currentPart.getName() + " current endElement is " +
localName;
fatalError(new XMLStreamingException(message, locator));
}
currentPart.setValue(partValueBuffer.toString());
message.addPart(currentPart);
partValueBuffer = null;