xproc / 3.0-steps

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

Clarify expand-text and other "global" attributes with respect to p:run #630

Open ndw opened 3 weeks ago

ndw commented 3 weeks ago

Consider:

<p:run> 
  <p:with-input expand-text="false"> 
    <p:declare-step version="3.1"> 
      <p:input port="rsource"/> 
      <p:output port="result" /> 
      <p:option name="opt" select="7"/> 
      <p:add-attribute attribute-name="name" attribute-value="{$opt}"/> 
    </p:declare-step> 
  </p:with-input> 
  ...

It's clear that expand-text="false" protects the {$opt} expression from being prematurely expanded. However, it's not clear what the default setting of expand-text is in the pipeline. One could argue that the settings all "reset" at the pipeline boundary. Or one could argue that inheritance means the expand-text setting applies to the pipeline.

I think, and informal correspondence suggests that the consensus position is, that all of the values reset at the boundary. This is consistent with the current prose that says:

Independent of how the pipeline is provided, it must have a version attribute on its root element.

But the spec should clarify that.