- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Fri, 26 Oct 2007 20:27:18 +0100
- To: Nikolay Fiykov <nikolay.fiykov@nsn.com>
- CC: public-xml-processing-model-comments@w3.org, w3c-xsl-wg@w3.org
Hi Nikolay, Thanks for your longer explanation, which I'm going to snip. Nikolay Fiykov wrote: > What the spec lacks completely though is how parallel branches are to be > handled. > By "parallel branches" I mean the one defined by "connection between > ports", not the conditional one. So I think you're taking an example like this: <p:pipeline name="split-document"> <p:input port="source" /> <p:output port="result1"> <p:pipe step="transform1" port="result" /> </p:output> <p:output port="result2"> <p:pipe step="transform2" port="result" /> </p:output> <p:xslt name="transform1"> <p:input port="source"> <p:pipe step="split-document" port="source" /> </p:input> <p:input port="stylesheet"> <p:document href="getAs.xsl" /> </p:input> </p:xslt> <p:xslt name="transform2"> <p:input port="source"> <p:pipe step="split-document" port="source" /> </p:input> <p:input port="stylesheet"> <p:document href="getBs.xsl" /> </p:input> </p:xslt> </p:pipeline> Here, a single source is being used by two steps within the pipeline. And what's not clear is how that works. Right? > I'd argue that this is not entirely for implementors to choose as > essentially depending on the strategy, > we may have different end results for one and same pipeline. > In this case we can receive either both stylesheets results (if events > are distributed simultaneously) > or only one of them (if the implementation executes each xslt as a > separate step) (second will be > empty because the first step already consumed the stream). The *intention* is that if an input gets used twice, as in the above example, then the XProc processor should detect that and create an implicit tee: the input document is essentially duplicated, and both steps that take it as an input receive the full document (as a sequence of events, we'd hope, in this case). I agree we need to actually say this, probably in Section 2.6 (Connections). > Further on, there are similar questions as to how to merge results from > parallel executions. > We have few other use cases where stream merging (combining) would be > needed. > The spec has got nothing about such cases either. We don't talk about merging streams of events at the XProc language level because XProc is defined in terms of passing around (sequences of) documents rather than streams of events. The standard steps p:wrap-sequence and p:pack *might* be of some help, but it really depends on the use cases that you're referring to. If you want to point us to the use cases that you're concerned about, we can probably isolate the areas where we need to clarify things. Thanks, Jeni -- Jeni Tennison http://www.jenitennison.com
Received on Friday, 26 October 2007 19:27:30 UTC