RE: "Fixing parameters"

> > If that is the case,
> > do we need the distinction between options and parameters at all?
> > Suppose we drop the notion of parameters altogether and keep only
> > options, then we could do this:
> [...]
> > This would things much simpler (maybe too simple?), almost a
> > documentation issue. On the other hand, it would probably mean that
> we
> > would have to drop the inheritance of parameters from the owner
> > pipeline and other things...
> 
> And that's exactly why I didn't go that way. I still think that it must
> be possible to pass parameters to the XSLT step in this pipeline:
> 
>   <p:pipeline>
>     <p:xslt>
>       <p:input port="stylesheet">
>         <p:document href="style.xsl"/>
>       </p:input>
>     </p:xslt>
>   </p:pipeline>
> 
> And I don't see how to do that without the automagic inheritance.

Well, one way might be:

<p:declare-step type="p:xslt">
  <p:input port="source" sequence="true" primary="true"/>
  <p:input port="stylesheet"/>
  <p:output port="result" primary="true"/>
  <p:output port="secondary" sequence="true"/>

  <p:option name="parameters" inherit="true"/>   <!-- map -->

  <p:option name="initial-mode"/>                <!-- QName -->
  <p:option name="template-name"/>               <!-- QName -->
  <p:option name="output-base-uri"/>             <!-- anyURI -->
  <p:option name="version"/>                     <!-- string -->
</p:declare-step>

Basically, declaring an option as inherit="true" would indicate that if a value for this option is not specified, it would be inherited from the owner pipeline, if it has an option with the same name (and type?). It wouldn't be the same as our current parameter inheritance, but it might provide what we need.

Regards,
Vojtech

--
Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
vojtech.toman@emc.com
http://developer.emc.com/xmltech

Received on Monday, 17 September 2012 07:33:59 UTC