Skip to content

Commit

Permalink
FOP 1.1 seems to have removed some useful constants; go figure.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndw committed Mar 15, 2013
1 parent 9852719 commit fd4968e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/com/xmlcalabash/util/FoFOP.java
Expand Up @@ -120,15 +120,15 @@ public void initialize(XProcRuntime runtime, XStep step, Properties options) {
public void format(XdmNode doc, OutputStream out, String contentType) {
String outputFormat = null;
if (contentType == null || "application/pdf".equalsIgnoreCase(contentType)) {
outputFormat = MimeConstants.MIME_PDF; // "PDF";
outputFormat = "application/pdf"; // "PDF";
} else if ("application/PostScript".equalsIgnoreCase(contentType)) {
outputFormat = MimeConstants.MIME_POSTSCRIPT; //"PostScript";
outputFormat = "application/postscript"; //"PostScript";
} else if ("application/afp".equalsIgnoreCase(contentType)) {
outputFormat = MimeConstants.MIME_AFP; //"AFP";
outputFormat = "application/x-afp"; //"AFP";
} else if ("application/rtf".equalsIgnoreCase(contentType)) {
outputFormat = MimeConstants.MIME_RTF;
outputFormat = "application/rtf";
} else if ("text/plain".equalsIgnoreCase(contentType)) {
outputFormat = MimeConstants.MIME_PLAIN_TEXT;
outputFormat = "text/plain";
} else {
throw new XProcException(step.getNode(), "Unsupported content-type on p:xsl-formatter: " + contentType);
}
Expand Down

0 comments on commit fd4968e

Please sign in to comment.