- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Fri, 05 May 2006 11:01:06 +0100
- To: public-xml-processing-model-wg@w3.org
Hi Richard, I don't quite follow what you mean here: Richard Tobin wrote: >> 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. The scenario, as I understand it is that we have an XSLT step that uses stylesheet A, which imports stylesheet B, where stylesheet B is an output from a previous step in the pipeline. I think that you're suggesting that the URI for stylesheet B is stored in a pipeline variable, and passed into the XSLT step as a pipeline parameter. Then, presumably, stylesheet A needs to have some notation for referencing that (pipeline) parameter, so the <xsl:import> would look something like: <xsl:import href="!STYLESHEET_B_FILENAME!" /> The problem with this is that stylesheet A then cannot be used outside a pipeline. Or perhaps you're suggesting that stylesheet A be generated by another step that takes the URI for stylesheet B as an input or an XSLT parameter. The pipeline would look something like: (some step) | v stylesheet B | (store) | v stylesheet B URI | doc (xslt) <- generate_stylesheet_A.xsl | | v v (xslt) <- stylesheet A | v result which seems quite laborious. I feel I must have misunderstood your suggestion. Could you clarify? Thanks, Jeni -- Jeni Tennison http://www.jenitennison.com
Received on Friday, 5 May 2006 10:01:20 UTC