W3C home > Mailing lists > Public > xproc-dev@w3.org > July 2015

Re: connection with p:choose.

From: Norman Walsh <ndw@nwalsh.com>
Date: Fri, 24 Jul 2015 05:41:56 -0400
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <87wpxpsxi3.fsf@nwalsh.com>
Strasser Pablo <strasserpablo@bluewin.ch> writes:
> Not making the explicit connection work and solved my original problem
> but I was wandering if this error is intended or is a bug.

If you want to refer to the output port(s) of a p:choose explicitly,
you have to provide name(s) for them in each branch:

<p:declare-step
	xmlns:p="http://www.w3.org/ns/xproc"
	version="1.0" 
	xmlns:c="http://www.w3.org/ns/xproc-step"
	xmlns:cx="http://xmlcalabash.com/ns/extensions"
	name="pipeline" >
	<p:option name="value" select="1" />
	<p:output port="result" />
	<p:choose name="choose">
		<p:when test="$value=1" >
                  <p:output port="result"/>
			<p:identity>
				<p:input port="source">
					<p:inline>
						<case>1</case>
					</p:inline>
				</p:input>
			</p:identity>	
		</p:when>
		<p:otherwise>
                  <p:output port="result"/>
			<p:identity>
				<p:input port="source">
					<p:inline>
						<case>2</case>
					</p:inline>
				</p:input>
			</p:identity>	
		</p:otherwise>
	</p:choose>
		<p:identity>
			<p:input port="source">
				<p:pipe step="choose" port="result" />
			</p:input>
		</p:identity>
</p:declare-step>

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 512 761 6676
www.marklogic.com

Received on Friday, 24 July 2015 09:42:23 UTC

This archive was generated by hypermail 2.3.1 : Friday, 24 July 2015 09:42:24 UTC