Re: connection with p:choose.

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