xproc / 3.0-steps

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

Problem with primary input port #532

Closed xml-project closed 2 years ago

xml-project commented 2 years ago

Consider:

<p:run>
   <p:with-input>
      <p:declare-step version="3.0">
         <p:input port="source" content-types="xml" />
         <p:output port="result"/>
         <p:identity />
   </p:declare-step>
   <p:run-input><doc /></p:run-input>
   <p:output port="result"/>
</p:run>

Important here: p:run-input has no port attribute (it is optional). For p:with-input it would be connected to the primary input port. But for p:run-input this would be an error (err:XC0201) because the declared input port and the p:run-input have different names. Did it miss something? If not, I think the easiest way to get out is to make attribute port on p:run-with required.

xml-project commented 2 years ago

Fixed with https://github.com/xproc/3.0-grammar/pull/35