W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > September 2012

RE: "Fixing parameters"

From: Toman, Vojtech <vojtech.toman@emc.com>
Date: Mon, 17 Sep 2012 03:33:05 -0400
To: "public-xml-processing-model-wg@w3.org" <public-xml-processing-model-wg@w3.org>
Message-ID: <F3C7EBECE80AC346BE4D1C5A9BB4A41F2EE7113383@MX11A.corp.emc.com>
> > 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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 17 September 2012 07:33:59 GMT