Skip to content

Commit

Permalink
Merge pull request #151 from jwcranford/fix147
Browse files Browse the repository at this point in the history
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 58c03ea
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/com/xmlcalabash/piperack/Input.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected Representation post(Representation entity, Variant variant) {
doc = runtime.parse(new InputSource(entity.getStream())); doc = runtime.parse(new InputSource(entity.getStream()));
} else { } else {
ReadablePipe pipe = null; 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(); doc = pipe.read();
} }
xpipeline.writeTo(port, doc); xpipeline.writeTo(port, doc);
Expand Down
2 changes: 1 addition & 1 deletion src/com/xmlcalabash/piperack/Option.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected Representation post(Representation entity, Variant variant) {
XdmNode doc = runtime.parse(new InputSource(entity.getStream())); XdmNode doc = runtime.parse(new InputSource(entity.getStream()));
pipe = new ReadableDocument(runtime, doc, null, null, null); pipe = new ReadableDocument(runtime, doc, null, null, null);
} else { } 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()) { while (pipe.moreDocuments()) {
Expand Down
2 changes: 1 addition & 1 deletion src/com/xmlcalabash/piperack/Parameter.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected Representation post(Representation entity, Variant variant) {
XdmNode doc = runtime.parse(new InputSource(entity.getStream())); XdmNode doc = runtime.parse(new InputSource(entity.getStream()));
pipe = new ReadableDocument(runtime, doc, null, null, null); pipe = new ReadableDocument(runtime, doc, null, null, null);
} else { } 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()) { while (pipe.moreDocuments()) {
Expand Down
2 changes: 1 addition & 1 deletion src/com/xmlcalabash/piperack/Pipeline.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ protected Representation post(Representation entity, Variant variant) {
doc = runtime.parse(new InputSource(entity.getStream())); doc = runtime.parse(new InputSource(entity.getStream()));
} else { } else {
ReadablePipe pipe = null; 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(); doc = pipe.read();
} }


Expand Down

0 comments on commit 58c03ea

Please sign in to comment.