W3C home > Mailing lists > Public > xproc-dev@w3.org > March 2012

Re: why the output requirements on viewport?

From: Romain Deltour <rdeltour@gmail.com>
Date: Tue, 13 Mar 2012 11:08:45 +0100
Cc: XProc Dev <xproc-dev@w3.org>
Message-Id: <DEBE14B6-4496-4C6D-BF35-35FEE63B5243@gmail.com>
To: Conal Tuohy <conal.tuohy@versi.edu.au>
You can do that by connecting the output port to the empty sequence with p:empty:

> If no documents appear on the output port, the matched element will effectively be deleted. 

Romain.


On 13 mars 2012, at 05:13, Conal Tuohy wrote:

> Why does the XProc spec require viewports to have a primary output? http://www.w3.org/TR/xproc/#err.S0006
>> The p:viewport must contain a single, primary output port declared explicitly or supplied by default. If that port has no connection, then it is connected to the primary output port of the last step in the subpipeline. It is a static error (err:XS0006) if the primary output port is unconnected and the last step in the subpipeline does not have a primary output port.
>> 
> http://www.w3.org/TR/xproc/#p.viewport
> 
> I can see that it is generally useful to provide an output (when using the viewport as a way of transforming a document by transforming chunks of it) but equally it's sometimes unnecessary     (when using the viewport merely to break the document into chunks for independent processing in their own right). It seems to me that in those cases where a viewport's sub-pipeline merely consumes the sequence of documents without producing any output, the viewport could simply remove the matched elements (i.e. it would behave like p:delete, seen from the outside).
> -- 
> Conal Tuohy
> eResearch Business Analyst
> Victorian eResearch Strategic Initiative
> +61-466324297
Received on Tuesday, 13 March 2012 10:09:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 13 March 2012 10:09:26 GMT