Permalink
Browse files

Merge pull request #151 from jwcranford/fix147

Fix #147 in Pipeline, Input, Option, and Parameter classes. Use the entity media type not the variant.
  • Loading branch information...
ndw committed May 6, 2014
2 parents eb361d9 + bdc18b7 commit 58c03eacc58c38c01dd7e61a198f64ab1bbc1309
@@ -51,7 +51,7 @@ protected Representation post(Representation entity, Variant variant) {
doc = runtime.parse(new InputSource(entity.getStream()));
} else {
ReadablePipe pipe = null;
pipe = new ReadableData(runtime, XProcConstants.c_data, entity.getStream(), variant.getMediaType().toString());
pipe = new ReadableData(runtime, XProcConstants.c_data, entity.getStream(), entity.getMediaType().toString());
doc = pipe.read();
}
xpipeline.writeTo(port, doc);
@@ -48,7 +48,7 @@ protected Representation post(Representation entity, Variant variant) {
XdmNode doc = runtime.parse(new InputSource(entity.getStream()));
pipe = new ReadableDocument(runtime, doc, null, null, null);
} else {
pipe = new ReadableData(runtime, XProcConstants.c_data, entity.getStream(), variant.getMediaType().toString());
pipe = new ReadableData(runtime, XProcConstants.c_data, entity.getStream(), entity.getMediaType().toString());
}
while (pipe.moreDocuments()) {
@@ -49,7 +49,7 @@ protected Representation post(Representation entity, Variant variant) {
XdmNode doc = runtime.parse(new InputSource(entity.getStream()));
pipe = new ReadableDocument(runtime, doc, null, null, null);
} else {
pipe = new ReadableData(runtime, XProcConstants.c_data, entity.getStream(), variant.getMediaType().toString());
pipe = new ReadableData(runtime, XProcConstants.c_data, entity.getStream(), entity.getMediaType().toString());
}
while (pipe.moreDocuments()) {
@@ -201,7 +201,7 @@ protected Representation post(Representation entity, Variant variant) {
doc = runtime.parse(new InputSource(entity.getStream()));
} else {
ReadablePipe pipe = null;
pipe = new ReadableData(runtime, XProcConstants.c_data, entity.getStream(), variant.getMediaType().toString());
pipe = new ReadableData(runtime, XProcConstants.c_data, entity.getStream(), entity.getMediaType().toString());
doc = pipe.read();
}

0 comments on commit 58c03ea

Please sign in to comment.