xproc / 3.0-steps

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

Unspecified p:error behavior #623

Closed xatapult closed 1 month ago

xatapult commented 1 month ago

The p:error step has a source port with sequence="true". The spec leaves it unspecified what must happen when there are multiple documents on the source port. There are, I think, two options:

  1. Use a separate c:error element for each incoming document
  2. Add all incoming documents as children of a single c:error element.

To me the first makes more sense. It would allow you to raises multiple errors in one go. But it is not a very strong preference.

I would like to hear opinions and I think we should specify this.

ndw commented 1 month ago

I think it's a sequence so that it's optional, but one could pass multiple documents so we should specify what that means. I agree that separate c:error elements makes the most sense.

ndw commented 1 month ago

Actually, on closer inspection, you can only provide one error code and that's on the c:error element, so maybe it makes more sense to say that multiple documents should be children of the c:error element.

On any other step, I'd be inclined to say that we should make it an error to provide more than one input, but on the p:error step, that just invites confusion I think: "error: your error was in error, it had more than one input"