Project

General

Profile

1
package eu.dnetlib.msro.openaireplus.workflows.repohi.xslt;
2

    
3
import eu.dnetlib.miscutils.functional.xml.ApplyXslt;
4
import org.apache.commons.io.IOUtils;
5
import org.junit.Test;
6

    
7
/**
8
 * Created by miriam on 05/05/2017.
9
 */
10
public class FWFTest {
11

    
12
	@Test
13
	public void testApplyXslt() throws Exception {
14
		ApplyXslt xslt = new ApplyXslt(IOUtils.toString(getClass().getResourceAsStream("/eu/dnetlib/msro/openaireplus/workflows/repo-hi/xslt/fwf_2_db.xsl")));
15

    
16
		String xml = IOUtils.toString(getClass().getResourceAsStream("/eu/dnetlib/msro/openaireplus/workflows/repo-hi/xslt/test-record.xml"));
17
		System.out.println(xslt.evaluate(xml));
18

    
19
	}
20
}
    (1-1/1)