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

How to invoke a step recursively?

From: Manfred Staudinger <manfred.staudinger@gmail.com>
Date: Fri, 11 Sep 2009 13:09:20 +0200
Message-ID: <a946be3a0909110409p59e3b4b3q13ca8d362a79b87b@mail.gmail.com>
To: xproc-dev <xproc-dev@w3.org>
I would like to invoke step level-1 of my pipeline [1] recursively. So
iteration n should invoke this step with using the output from
iteration n-1 as its input. I need to have also the output from all
the iterations explicit in result. How can I achive this?


[1] xpl:
<p:declare-step name="myPipeline"
	<p:option name="dir"/>
	<p:output port="result" sequence="true">
		<p:pipe step="level-0" port="result"/>
		<p:pipe step="level-1" port="result"/>
	<p:serialization port="result" indent="true" omit-xml-declaration="false"/>
	<p:directory-list name="level-0">
		<p:with-option name="path" select="concat($dir,
	<p:make-absolute-uris match="*/c:directory/@name">
		<p:with-option name="base-uri" select="concat($dir, '/')"/>
	<p:for-each name="level-1">
		<p:iteration-source select="/c:directory/c:directory"/>
		<p:output port="result"/>
		<p:variable name="dirpath" select="concat(c:directory/@name, '/')"/>
			<p:with-option name="path" select="$dirpath"/>
		<p:make-absolute-uris match="*/c:directory/@name">
			<p:with-option name="base-uri" select="$dirpath"/>
Received on Friday, 11 September 2009 11:10:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:05 UTC