xproc / 3.0-steps

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

Attribute `version` on dynamic pipeline in p:run #526

Closed xml-project closed 2 years ago

xml-project commented 2 years ago

I think there is a problem with @version on the dynamic pipeline executed on p:run. If the attribute is present, all is fine. But if the attribute is absense, I think in the current writing the following rule from the main specs applies:

If the p:declare-step has no ancestors in the XProc namespace, then it must have a version attribute. It is a static error err:XS0062 if a required version attribute is not present.

However once the p:declare-step arrives on the input port of p:run, it is almost impossible for the compiler to know whether it comes from an p:inline (no @version required) or is loaded from an external document via p:document or p:load (in some previous step).

Options:

  1. The dynamic pipeline always get a missing version value from the pipeline which contains the p:run.
  2. Attribute version is required for dynamically executed pipelines.

I could life with both of them and may be (1) is more convinient to authors. Did I miss something?

ndw commented 2 years ago

The p:run step is odd in that its "static analysis" phase has to begin after it's been given a pipeline. The input pipeline must therefore have a version attribute on its root element. That's option 2, I think.