Re: Binding outputs

On 4/22/07, Norman Walsh <ndw@nwalsh.com> wrote:
> / Innovimax SARL <innovimax@gmail.com> was heard to say:
> | On 4/22/07, Norman Walsh <ndw@nwalsh.com> wrote:
> |>
> |> Is the following intended to be legal:
>
> I should have said that I don't mean p:inline bindings explicitly, but
> p:inline/p:document/p:pipe bindings in general.
>
> |>
> |>   <p:group>
> |>     <p:output port="output">
> |>       <p:inline>
> |>         <doc/>
> |>       </p:inline>
> |>     </p:output>
> |>   </p:group>
> |
> | Should we add the constraint that if p:outputs are declared that p:group
> | must have a name ?
>
> We could, but if it only has one output then that will be the default
> for the following step, so it's not always strictly necessary.
>
> | What about this?
> |>
> |>   <p:group>
> |>     <p:output port="output">
> |>       <p:pipe step="foo" port="result"/>
> |>       <p:inline>
> |>         <doc/>
> |>       </p:inline>
> |>     </p:output>
> |>
> |>     <p:load name="foo">
> |>       <p:option name="href" select="'http://example.com/xml/doc.xml"/>
> |>     </p:load>
> |>   </p:group>
> |>
> |> What about this?
> |
> | It is not only perfectly valid but a real use case
> |
> |>  <p:identity>
> |>     <p:input port="source">
> |>       <p:inline>
> |>         <doc/>
> |>       </p:inline>
> |>     </p:input>
> |>     <p:output port="result">
> |>       <p:inline>
> |>         <doc/>
> |>       </p:inline>
> |>     </p:output>
> |>   </p:identity>
> |
> | This one, that I would call "fixed output" is perfectly valid. Anyway,
> | whatever the inline input is, it is valid
>
> So a pipeline author can call a component but provide entirely
> different, unrelated documents as output.
>
> Assuming the following pipe is loaded from a library:
>
>   <p:pipeline name="ex:myPipe">
>     <p:input port="source">
>       <p:inline>
>         <foo/>
>       </p:inline>
>     </p:input>
>     <p:output port="result"/>
>     <p:identity/>
>   </p:pipeline>
>
> What is the output from this pipeline?
>
>   <ex:myPipe>
>     <p:input port="source">
>       <p:inline>
>         <bar/>
>       </p:inline>
>     </p:input>
>   </ex:myPipe>

The output is <bar/>, because this use case, is the "default input" one.
This is a very useful use case, for auxiliary inputs which could be
"overloaded" by the user

Mohamed
-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 8 72 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 €

Received on Sunday, 22 April 2007 16:14:35 UTC