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

Allow special content-types values also in content-type attributes/options #54

Open
xatapult opened this issue Sep 27, 2024 · 1 comment

Comments

@xatapult
Copy link
Contributor

The content-types attribute in the core-spec allows some special values with a well-defined meaning: xml, json, etc.

The content-type attribute/option however does not, which. While programming XProc I found myself often writing content-type="xml" because I simply wanted to load an XML document and did not really care what exact media type is assigned. Of course, this raised an error. But... why not?

Why don't we accept the special values for content-types also in content-type, for all those (often occurring) cases where you don't really care about the exact media type. Just assign the most generic one applicable. Of course we need to give them a specific meaning:

  • xml => text/xml
  • json => application/json
  • etc. list to be completed

If we do this, we also need to change the definition of some error messages, at least XD0079.

@ndw
Copy link

ndw commented Sep 27, 2024

Makes sense to me. I'd argue for application/xml though as text/* media types have an impliced character set, as I recall.

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

No branches or pull requests

2 participants