W3C home > Mailing lists > Public > xproc-dev@w3.org > October 2010

Re: Binding output port of p:choose

From: Olivier Jeulin <olivier.jeulin@gmail.com>
Date: Sun, 03 Oct 2010 23:06:50 +0200
Message-ID: <4CA8F06A.5070309@gmail.com>
To: XProc Dev <xproc-dev@w3.org>
Le 03/10/2010 21:41, Florent Georges a écrit :
>    Hi,
>
>    I am trying to bind the result port of a p:choose/p:when to the
> output port of my pipeline, which has another name:
>
>      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
>                      name="pipeline"
>                      version="1.0">
>
>         <p:output port="my-result">
>            <p:pipe port="result" step="s"/>
>         </p:output>
>
>         <p:choose name="s">
>            <p:when test="true()">
>               <p:identity>
>                  <p:input port="source">
>                     <p:inline>
>                        <true/>
>                     </p:inline>
>                  </p:input>
>               </p:identity>
>            </p:when>
>         </p:choose>
>
>      </p:declare-step>
>
>    But when I execute it with Calabash, I get the error "XE0001:
> Unreadable port: result on s".  I guess I missed (again) something
> obvious, but what?

Hi Florent,

from the spec: "If the selected subpipeline has a primary output port, 
the port with the same name on the p:choose is also a primary output port."
Here, p:identity has no *primary* output port, therefore p:choose isn't 
connected to the result port.

You have to do do the connection explicitly (tested with Calabash 0.9.19):

<p:when test="true()">
	<p:output port="result">
		<p:pipe port="result" step="id"/>
	</p:output>
	<p:identity name="id">
		<p:input port="source">
			<p:inline>
				<true/>
			</p:inline>
		</p:input>
	</p:identity>
</p:when>

Olivier
Received on Sunday, 3 October 2010 21:07:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 3 October 2010 21:07:54 GMT