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

saving result / sequence problem

From: Stefanie Haupt <st.haupt@gmail.com>
Date: Fri, 26 Feb 2010 18:22:09 +0100
To: xproc-dev@w3.org
Message-Id: <1267204929.3682.12.camel@stefanie-laptop>
Dear experts,

I have a working pipeline attached below. I'm trying to extend it to
save the output which appears as result of the very last step on the
console. Which works fine if I don't use for-each within the pipe.
I have commented it out to see if my approach works at all. It does.

If I leave the for-each step in, an error is thrown, it says that there
are xx documents on the input port which aren't expected. 

Would you please have a look and tell me where I'm going wrong?

Many thanks in advance!
Stefanie Haupt

This is my pipeline (actually it's much longer but I managed to shorten
it down):

<?xml version="1.0"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
 <p:input port="parameters" kind="parameter" primary="true"/> 
 <p:input port="source" sequence="true"/>
 <p:output port="result" sequence="true">
  <p:pipe port="result" step="last"/>
  <p:variable name="input"
 <!-- list directories  (level 1) -->
 <p:directory-list name="directories">
  <p:with-option name="path" select="$input">
 <!--  loop 2nd level-->
<!-- <p:for-each name="directoryloop">
  <p:output port="result" sequence="true"/>
  <p:iteration-source select="/c:directory/c:directory"/>

  <!-\- provide files and directories -\->
  <p:variable name="dirpath"
   select="p:resolve-uri(concat($input,'/', c:directory/@name))"/>
   <p:with-option name="path" select="$dirpath"/>
 </p:for-each> -->
 <!-- would want to ideally wrap the last output as it is a list of
files to be able to store it as xml but
 no name is accepted for wrap, tested: c:result, result, ex:result, I'm
out of ideas here 
  <p:with-option name="wrapper" select="ex:result"/>
 <p:store name="log">
  <p:with-option name="href"
 <p:identity name="last">
  <p:input port="source" sequence="true">   
   <p:pipe port="result" step="log"/>

Stefanie Haupt
Received on Friday, 26 February 2010 17:22:50 UTC

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