/**
 *    Copyright 2016 FIX Protocol Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package io.fixprotocol.orchestra.transformers;

import org.junit.Assert;
import org.junit.Test;

import io.fixprotocol.orchestra.transformers.RepositoryXslTransformer;

import javax.xml.transform.TransformerException;
import java.io.File;
import java.io.IOException;

public class XslTransformerTest {
    @Test
    public void testTransformer() throws IOException, TransformerException {
        String[] arr = new String[4];
        arr[0] = Thread.currentThread().getContextClassLoader().getResource("xsl/Repository2010to2016.xsl")
                .getFile();
        arr[1] = Thread.currentThread().getContextClassLoader().getResource("FixRepository.xml")
                .getFile();
        String sourceDir = new File(arr[1]).getParent();
        arr[2] = String.format("%s%soutput.xml", System.getProperty("java.io.tmpdir"), System.getProperty("file.separator"));
        arr[3] = String.format("phrases-file=%s%sFIX.5.0SP2_EP216_en_phrases.xml", sourceDir, System.getProperty("file.separator"));
        RepositoryXslTransformer.main(arr);
        File outFile = new File(arr[2]);
        Assert.assertTrue(outFile.exists());
    }
}

@@ -1379,16 +1379,17 @@
 rmat(%22%25s
+/
 %25soutput
@@ -1435,48 +1435,104 @@
 ir%22)
-, System.getProperty(%22file.separator%22));
+);%0A        // document function in XSLT expects a URI, not a file name (Saxon does not convert) 
 %0A   
@@ -1577,12 +1577,19 @@
 ile=
-%25s%25s
+file:///%25s/
 FIX.
@@ -1631,45 +1631,26 @@
 eDir
-, System.getProperty(%22file.separator%22
+.replace('%5C%5C', '/'
 ));%0A

Correct URI format, make it work on Windows