xproc / 3.0-steps

Repository for change requests to the standard step library and for official extension steps
10 stars 7 forks source link

Multiple issues in p:os-exec #403

Closed xml-project closed 4 years ago

xml-project commented 4 years ago

Although the signature of p:os-exec is 3.0 the prose is to my understanding a verbatim copy of the 1.0 specs. This results to my reading in quite a lot issues. So instead of listing them one by one I would like to specify the step's behavior. If we agree on the laster, I will try to do the required editions:

  1. p:os-exec has a sequence input port 'source' accepting any mediatype. If exactly one document appears on the port, this documents is used as input for standard-in. Unless it is a binary document it is serialized according to option @serialization. Based on this procedure, we do not need @source-is-xml any more.

  2. For output ports "results" and "errors" I propose to make them sequence, where either one or no document can appear. The content of standard-out or standard-error will appear on this port, if the respective stream is not empty. With the new attributes "result-content-type" and "error-content-type" we define the content-type property of the respective document. The option also controls whether and how the character stream on standard-out, standard-error is parsed. As a consequence we do not need options "result-is-xml", "wrap-result-lines", "errors-is-xml" and "wrap-error-lines" any more.

Does this make sense to anybody?

Added

  1. Port "exit-status" should have content-types="application/json" holding the exit code as xs:double.
xml-project commented 4 years ago

First draft in pr #407

ndw commented 4 years ago

It looks like an improvement to me. One minor detail: If result-content-type is singular, I think error-content-type should be singular as well.

xml-project commented 4 years ago

@ndw Took the plural "errors-content-type" because the related port is called "errors". Do you suggest to rename it to "error" or is it just for the option?

xml-project commented 4 years ago

fixed with pr #407