no roots in my pipeline

Well, I like to think that after working with Calabash for several days I've
become a bit of an expert in the interesting but unmarketable skill of
Calabash error message decoding.  But this one has me stumped:

No roots in myPipeline

Where "myPipeline" is the name of, well, my pipeline.

Here's what I think my pipeline is doing:

Open BookStore.xml.  Loop over each Book.  If the number of Authors is > 1,
store the Book in multipleAuthors.xml.  If = 1, store in singleAuthor.xml.
Otherwise, store in noAuthors.xml.  Nothing comes out the output.
Essentially, I'm dividing one XML file into three files.  This pipeline may
or may not be the idea way to do this; the point is to understand for-each
and choose/when better.

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="myPipeline">
    <p:input port="source">
        <p:document href="BookStore.xml"/>
    </p:input>
    <p:output port="result">
        <p:empty/>
    </p:output>
    <p:for-each>
        <p:iteration-source select="//Book"/>
        <p:output port="result">
            <p:empty/>
        </p:output>
        <p:choose name="chooseFile">
            <p:when test="count(//Author)>1">
                <p:store href="multipleAuthors.xml"/>
            </p:when>
            <p:when test="count(//Author)=1">
                <p:store href="singleAuthor.xml"/>
            </p:when>
            <p:otherwise>
                <p:store href="noAuthors.xml"/>
            </p:otherwise>
        </p:choose>
    </p:for-each>
</p:declare-step>

Any ideas on what it means to have no roots?

TIA,

James Garriss
http://garriss.blogspot.com

Received on Monday, 22 September 2008 19:46:34 UTC