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

Describe negated shortcut content types #1120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ndw
Copy link
Contributor

@ndw ndw commented Dec 14, 2024

Fix #1115

Note how I've proposed to handle negation of exclusions.

@ndw ndw requested a review from a team as a code owner December 14, 2024 15:37
Copy link
Contributor

@gimsieke gimsieke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

Copy link
Member

@xml-project xml-project left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, I got your example right.
The spec says:

The document is considered acceptable if and only if it matches at least one acceptable content type and the last content type that matched was not forbidden.

Now consider a port defined with "-xml". A document marked with "text/plain" should be accepted, but: It does not match any acceptable content type.
What do I miss?

Additionally I think we need to say something about "-any": Is it any error or is it simply ignored? Or is it a new feature to make sure, NO document is supplied on a sequence port?

@gimsieke
Copy link
Contributor

Maybe we need to say that if the list only expands to exclusions, */* will be prepended?

@ndw
Copy link
Contributor Author

ndw commented Dec 14, 2024

It's an interesting question. I think that just "doesn't match at least one acceptable type". Just saying -application/xml wouldn't match text/plain either. If you don't have any positive matches, I think that's just not going to work. When we actually use it in the Invisible XML step, we write:

any -xml -html

@ndw
Copy link
Contributor Author

ndw commented Dec 14, 2024

There are already ways to make a port that doesn't accept any documents, I don't think we have to call attention to -any, but we could.

@xml-project
Copy link
Member

@ndw Ah, ok! I obviously missed the main point. Now your proposal makes totally sense to me. Lets see how often forget about this point when writing pipelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify that negated content type shortcuts are allowed
3 participants