xproc / 3.0-steps

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

Static options declared in a pipeline for p:run #450

Closed xml-project closed 2 years ago

xml-project commented 4 years ago

How can a pipeline author tell that one or more of the options she supplied to p:run should be supplied to the static analysis of the supplied pipeline? Options (I can think of):

  1. Pipelines to be executed in p:run can not have static options to be bound from the outside.

  2. We add another option (say p:static-options as array(XS_QName)?) to p:run to distinguish the static from the dynamic options).

ndw commented 4 years ago

Rather than having a different kind of parameter, I suggest we add a static-parameters parameter to p:run. It's a map just like parameters but all of the values are provided as static values to the pipeline being run. It's an error to provide the same QName key in both maps.

This is roughly parallel to what XPath does for the fn:transform function.

gimsieke commented 4 years ago

Change this sentence, too: "the option value will be computed during static analysis and supplied" → supplied to static analysis

(Also: Silently ignore static options that the pipeline doesn’t declare)

gimsieke commented 3 years ago

I think static-parameters has been overtaken by events: c44d67b / PR #461
It’s <p:run-option static="true"/> now for each static option that needs to be set.

Will change the prose according to the previous comment.

xatapult commented 2 years ago

@gimsieke Can this one be closed? It seems to be addressed.

ndw commented 2 years ago

Yup.