W3C home > Mailing lists > Public > xproc-dev@w3.org > September 2008

Re: primary ports and automatic connections

From: James Garriss <james@garriss.org>
Date: Thu, 18 Sep 2008 07:00:14 -0400
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <C4F7ACFE.82E%james@garriss.org>
There it is.  Thatıs what I was missing.  Thank you again.

James Garriss
http://garriss.blogspot.com


From: mozer <xmlizer@gmail.com>
Date: Thu, 18 Sep 2008 05:29:42 +0200
To: James Garriss <james@garriss.org>
Cc: XProc Dev <xproc-dev@w3.org>
Subject: Re: primary ports and automatic connections
Resent-From: XProc Dev <xproc-dev@w3.org>
Resent-Date: Thu, 18 Sep 2008 03:30:22 +0000

James,

On Thu, Sep 18, 2008 at 1:30 AM, James Garriss <james@garriss.org> wrote:
> from:  2:3 Primary Inputs and Outputs
> 
> "The special significance of primary input and output ports is that they are
> connected automatically by the processor if no explicit binding is given."
> 
> Is it valid to assume then that if an input port is not a primary port, it is
> not automatically connected by the processor?

Sure !
 
> 
> 
> I ask because when I run this pipeline in Calabash 0.6.0:
> 
> <p:declare-step xmlns:p="http://www.w3.org/ns/xproc
> <http://www.w3.org/ns/xproc> ">
>     <p:input port="source">
>         <p:inline><foo>bar</foo></p:inline>
>     </p:input>
>     <p:output port="result"/>
>     <p:identity/>
> </p:declare-step>
> 
> I get this output:
> 
> <foo xmlns:p="http://www.w3.org/ns/xproc">bar</foo
> <http://www.w3.org/ns/xproc%22%3Ebar%3C/foo> >
> 
> This puzzles me, because identity has no primary ports:
> 
> <p:declare-step type="p:identity">
>      <p:input port="source" sequence="true"/>
>      <p:output port="result" sequence="true"/>
> </p:declare-step>

Of course there is a primary input AND a primary output port
If you look at the definition of primary input port

[Definition: If a step has a document input port which is explicitly marked
"primary='true'", or if it has exactly one document input port and that port
is not explicitly marked "primary='false'", then that input port is the
primary input port of the step]

you can see that 

[[
or if it has exactly one document input port and that port is not explicitly
marked "primary='false'",
]]

which is exaclty the case for p:identity and a bunch of other steps

Xmlizer
Received on Thursday, 18 September 2008 11:01:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 18 September 2008 11:01:07 GMT