W3C home > Mailing lists > Public > xproc-dev@w3.org > June 2009

Re: Implicit output ports and p:declare-step

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Thu, 25 Jun 2009 16:39:12 +0100
To: Norman Walsh <ndw@nwalsh.com>
Cc: XProc Dev <xproc-dev@w3.org>
Message-ID: <f5bmy7w4927.fsf@hildegard.inf.ed.ac.uk>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Norman Walsh writes:

> Consider:
>
>   <p:library ...>
>     <p:declare-step type="px:fred">
>       <p:input port="source"/>
>       <p:identity/>
>     </p:declare-step>
>   </p:library>
>
> By the current rules, px:fred has one input port named "source" and
> one output port...with no name.
>
> Now suppose you want to store the result of px:fred in a file and
> then continue processing it. You try to write it like this:
>
>   <px:fred name="myproc"/>
>   <p:store href="fred-output.xml"/>
>
>   <p:identity>
>     <p:input port="source">
>       <p:pipe step="myproc" port="???"/>
>     </p:input>
>   </p:identity>
>
> But you can't because there's nothing to put in "port".

OK, I see -- you're not objecting to the default binding, you're
objecting to the anonymity.

> I can see several options:
>
> 1. We say that the implicitly created port is named "result".

Works for me.  

> Do my concerns above make sense?

Yes, more so, thanks.   Anonymity of gensyms is always a bet of the
form "no-one will ever want/need to ...", and you will almost always
lose that bet.  So, what do we call 'result' at the moment, let me
see. . .

 p:pipeline gets a 'result' output port
 p:viewport gets a 'result' output port
 p:viewport gets a 'current' port visible to its subpipeline
 p:for-each gets a 'current' port visible to its subpipeline
 p:catch gets a 'error' port visible to its subpipeline

So, saying that the defaulted output port of p:declare-step (when it
has content) is 'result' is possible, but perhaps it would be better
if we made that universal, i.e. that _all_ default-supplied output
ports are called 'result'.

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFKQ5ogkjnJixAXWBoRAqtlAJ9wlC94elfIUiysuvhYkbfxs8STMQCcCQui
Y7Qau7IddPNnV0i+/Hkcf9M=
=6iDW
-----END PGP SIGNATURE-----
Received on Thursday, 25 June 2009 15:45:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 25 June 2009 15:45:25 GMT