Document xsltDoc = new Builder().build(new File("/local/scratch/ptc24/base_corpus/rsc/rsc_art2paper_rng.xsl"));
//Document xsltDoc = new Builder().build(new File("/local/scratch/ptc24/base_corpus/nature/npg_art2paper_rng.xsl"));
//Document xsltDoc = new Builder().build(new File("/local/scratch/ptc24/tmp_corpus/iuc/iucr_art2paper_rng.xsl"));
//Document xsltDoc = new Builder().build(new File("/local/scratch/ptc24/base_corpus/iuc/iucr_art2paper_rng.xsl"));
//Document xsltDoc = new Builder().build(new File("/home/ptc24/iucr_art2paper_rng.xsl"));
XSLTransform xslt = new XSLTransform(xsltDoc);
//List<File> files = FileTools.getFilesFromDirectoryBySuffix(new File("/usr/groups/sciborg/texts/iuc"), ".xml");
List<File> files = FileTools.getFilesFromDirectoryBySuffix(new File("/usr/groups/sciborg/texts/rsc/paperset1"), ".xml");
//List<File> files = FileTools.getFilesFromDirectoryBySuffix(new File("/usr/groups/sciborg/texts/nature/nature_2"), ".xml");
//List<File> files = FileTools.getFilesFromDirectoryBySuffix(new File("/local/scratch/ptc24/rscorig"), ".xml");
//files=files.subList(13,14);
System.out.println(files);
int i=0;
for(File paper : files) {
System.out.println(paper.getName());
System.out.println(i++);
try {
Document xml1;
Document xml2;
XMLAlignment xa;
if(true) {
xml1 = new Builder().build(paper);
PubXMLToSciXML.addNodeIds(xml1.getRootElement(), xml1.getRootElement());
Nodes n = xslt.transform(xml1);
xml2 = XSLTransform.toDocument(n);
xa = new XMLAlignment(xml2, xml1, true);
xa.testXML1ForOscar();
//new Serializer(System.out).write(xml1);
//new Serializer(System.out).write(xml2);