Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make it possible to override data input content type from command-line or Ant task without breaking tests and violating the specifications #287

Open
wants to merge 1 commit into
base: saxon97
from

Conversation

Projects
None yet
2 participants
@Vampire
Copy link

Vampire commented Mar 6, 2019

Followup to #112.
The first four commits that were just a bit cleanup you did yourself already in the meantime.
The last and main commit, I rebased onto the saxon97 branch.
I didn't tried it right now, but the rebase went through without significant conflicts and it still compiles.

make it possible to override data input content type from command-lin…
…e or Ant task without breaking tests and violating the specifications
@ndw

This comment has been minimized.

Copy link
Owner

ndw commented Mar 6, 2019

Can you provide a couple of examples of where you use forced-content-type? I'm wondering if override-content-type wouldn't be a better name (and more consistent with the developing XProc 3.0 specs).

@Vampire

This comment has been minimized.

Copy link
Author

Vampire commented Mar 6, 2019

Use-cases are as mentioned in the superseded PR. It allows the user to override the data input content type from the command-line or the Ant task explicitly. One usecase is to force the content being treated as text or force the content to being encoded with base64, if you simply manually know better than the detection or if the webserver sends a wrong content type which could pretty well happen out there.

The forced-content-type is just an internal name, I can change that to whatever you want.
User-facing it is called contentType in the Ant task or without actual name via command line as -d <contentType>@<port>=<uri>.

This is also how it is documented already since 6 years but actually not working. This is because in my PR #99 I already added this functionality including docu changes, but my implementation broke some test as the changes violated the spec. When accepting that PR, you left out these changes but kept the documentation changes. The original commit with the wrong implementation was f5bc23d. I then created #112 with an alternative implementation that worked the same but did not break any test or violated the spec. So currently the code actually does not work like documented and these changes would bring those in line again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.