Re: Naming ports vs. naming documents

> In a stylesheet, we would like to be able to write: <xsl:import
> href="someURI"/>, where someURI is a reference to output of a step in
> the pipeline. Instead of assigning the URI to the output, as in
> <p:output name="..." produces="someURI"/>, I think it is better to
> make the connection explicit between the step that produces the
> document and the one that consumes the document (see [1] for a
> discussion on this topic), as in:
> 
>     <p:step name="...">
>         <p:output label="step-1-output"/>
>     </p:step>
> 
>     <p:step name="xslt">
>         <p:define-uri uri="someURI" ref="step-1-output"/>
>     </p:step>

First, I think it would be a mistake to use

  <xsl:import href="http://some.server/some/path"/>

and have the http: URI refer to completely unrelated things depending
on which pipeline it's run in (and they have to be unrelated, so that
multiple instances of the pipeline can run).  

What we have here is just a conventional temporary file, and I don't
see why we can't use conventional temporary file mechanisms for
handling it.  The conventional way to do it is to have an
automatically generated filename which is shared by storing it in a
variable.  This removes the issue of what URI scheme to use, and can
for example be implemented as a file: URI.

This leaves us with two problems: how to share the name, and how to
synchronise the components (since the access to the temporary file need
not be mediated by the pipeline engine, the second component probably
can't start reading it until the first has finished writing it).

The name can be passed in to the second component by whatever
mechanism we use for passing parameters, providing we have some
sort of variables in the pipeline.

And the synchronisation could be automated if the pipeline compiler
recognised that on of the second component's parameters used the
variable that stored the temporary file name.

-- Richard

Received on Thursday, 4 May 2006 13:17:23 UTC