((XSLTLiaison3) liaison).setStylesheet(stylesheet);
} else {
// If we are here we cannot set the stylesheet as
// a resource, but we can set it as a file. So,
// we make an attempt to get it as a file
FileProvider fp =
(FileProvider) stylesheet.as(FileProvider.class);
if (fp != null) {
liaison.setStylesheet(fp.getFile());
} else {
handleError(liaison.getClass().toString()
+ " accepts the stylesheet only as a file");
return;
}