for(int i=0;i<paperNodes.size();i++) {
Element e = (Element)paperNodes.get(i);
Nodes idNodes = e.query("art:front/art:article-meta/art:article-id[@pub-id-type='publisher-id']", xpc);
String name = idNodes.get(0).getValue();
File outFile = new File(testDir, name + ".xml");
e.detach();
Document outDoc = new Document(e);
new Serializer(new FileOutputStream(outFile)).write(outDoc);
//XOMTools.clearNamespaces(outDoc.getRootElement());
//Document sciXML = XSLTransform.toDocument(xslt.transform(outDoc));
//File sciXMLFile = new File(testDir, name + ".sci.xml");