Methods Summary |
---|
public org.apache.tools.ant.taskdefs.XSLTLiaison | createLiaison()
TraXLiaison l = new TraXLiaison();
l.setLogger(this);
return l;
|
public void | log(java.lang.String message)
throw new AssertionFailedError("Liaison sent message: "+message);
|
public void | tearDown()
File f = new File("xalan2-redirect-out.tmp");
if (f.exists()) {
f.delete();
}
|
public void | testMultipleTransform()
File xsl = getFile("/taskdefs/optional/xsltliaison-in.xsl");
liaison.setStylesheet(xsl);
liaison.addParam("param", "value");
File in = getFile("/taskdefs/optional/xsltliaison-in.xml");
// test for 10 consecutives transform
for (int i = 0; i < 50; i++){
File out = new File("xsltliaison" + i + ".tmp");
try {
liaison.transform(in, out);
} catch (Exception e){
throw new BuildException("failed in transform " + i, e);
} finally {
out.delete();
}
}
|
public void | testSystemId()
File file = null;
if ( File.separatorChar == '\\" ){
file = new File("d:\\jdk");
} else {
file = new File("/user/local/bin");
}
String systemid = JAXPUtils.getSystemId(file);
assertTrue("SystemIDs should start by file:/", systemid.startsWith("file:/"));
assertTrue("SystemIDs should not start with file:////", !systemid.startsWith("file:////"));
|
public void | testXalan2Redirect()
File xsl = getFile("/taskdefs/optional/xalan-redirect-in.xsl");
liaison.setStylesheet(xsl);
File out = new File("xalan2-redirect-out-dummy.tmp");
File in = getFile("/taskdefs/optional/xsltliaison-in.xsl");
try {
liaison.addParam("xalan-version", "2");
liaison.transform(in, out);
} finally {
out.delete();
}
|