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

Added forbidden content types and content type shortcuts #799

Merged
merged 1 commit into from Apr 23, 2019

Conversation

Projects
None yet
2 participants
@ndw
Copy link
Contributor

commented Apr 23, 2019

Fix #790

@ndw ndw requested review from gimsieke, eriksiegel and xml-project Apr 23, 2019

@ndw ndw requested a review from xproc/spec-authors as a code owner Apr 23, 2019

@ndw

This comment has been minimized.

Copy link
Contributor Author

commented Apr 23, 2019

If (when?) this PR is accepted, we should go through the step library and replace the long forms with the short forms.

@xml-project
Copy link
Contributor

left a comment

Does the left to right rule makes it over-complicated. Couldn't we just say, that a content-type is acceptable if it matches at least one of the positive and none of the excluded.
We use this rule for the regex lists too, so it seems natural to me.
What did I miss?

@ndw

This comment has been minimized.

Copy link
Contributor Author

commented Apr 23, 2019

Consider a step like p:add-attribute that should apply to XML or HTML documents. You can't say "xml" because that excludes HTML. You can't say "html" because that excludes XML. The temptation will be to say "xml html". That expands to:

application/xml text/xml application/*+xml -application/xhtml+xml text/html application/xhtml+xml

Without the left-to-right rule, that won't allow application/xhtml+xml documents. That was the simplest thing I could think of to make this work.

Alternatively, we could not exclude HTML from XML. Then you wouldn't need the left-to-right rule. I could be persuaded to do that, I guess, but it seemed like it was useful to have XML mean "XML only"

@xml-project

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

OK, missed that. Thanks for explaining.

@xml-project xml-project self-requested a review Apr 23, 2019

@ndw ndw merged commit 19651f4 into xproc:master Apr 23, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ndw ndw deleted the ndw:iss-790 branch Apr 23, 2019

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.