Suggested update for `replace="text"`

In "11.2.3 Processing the Response from a Submission":

> text: If the type of the body, as overridden by the response-mediatype
attribute if present, is neither an XML mediatype (i.e. with a content type
not matching any of the specifiers in [RFC 3023]) nor a text type (i.e.
with a content type not matching text/*), nothing in the document is
replaced and submission fails with result-text-mediatype, and an
error-message of the unacceptable mediatype. Otherwise the content
replacement is performed according to Replacing Data with the Submission
Response. If this operation succeeds, submission succeeds.

We might want to add `application/json` as supported for text replacement
as well for consistency with supporting XML mediatypes (including
`application/xml`). This would allow storing JSON as text in a node in the
same way that we support storing XML as text in a node. This would change
the text to:

> text: If the type of the body, as overridden by the response-mediatype
attribute if present, is neither an XML mediatype (i.e. with a content type
not matching any of the specifiers in [RFC 3023]), nor the
`application/json` mediatype, nor a text type (i.e. with a content type not
matching text/*), nothing in the document is replaced and submission fails
with result-text-mediatype, and an error-message of the unacceptable
mediatype. Otherwise the content replacement is performed according to
Replacing Data with the Submission Response. If this operation succeeds,
submission succeeds.

WDYT?

-Erik

Received on Thursday, 7 February 2019 17:32:01 UTC