} else {
throw new XProcException("Unexpected element in email message: " + field.getNodeName());
}
}
while (source.moreDocuments()) {
XdmNode xmlpart = S9apiUtils.getDocumentElement(source.read());
String contentType = xmlpart.getAttributeValue(_content_type);
String filename = xmlpart.getBaseURI().getPath();
int pos = filename.lastIndexOf("/");
if (pos >= 0) {