Re: computed ports and viewports

On 3/9/07, Alex Milowski <alex@milowski.org> wrote:
> <p:viewport name="v" match="/doc/section">
> <p:viewport-source>
>    <p:pipe step="other" port="result" select="/section/section"/>
> </p:viewport-source>
> ...
> </p:viewport>
>
> It seems like this is OK.

Currently we are saying "the viewport-source is an anonymous input:
its binding provides a single document". And in 2.2 we have:

"Each input and output is declared to accept or produce either a
single document or a sequence of documents. It is not a static error
to connect a port that is declared to produce a sequence of documents
to a port that is declared to accept only a single document. It is,
however, a dynamic error if the former step actually produces more
than a single document at run time."

The way I read the specification, the snippet you quote is valid, but
will create a dynamic error if /section/section returns more than one
element.

Alex
-- 
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/

Received on Friday, 9 March 2007 18:35:18 UTC