Re: Where is my c:result?

Excellent.  My mistake was assuming that p:compare had a primary output.
What should have tipped me off as I read the spec?  Is it that primary
equals false?  From the spec:

<p:declare-step type="p:compare">
     <p:input port="source" primary="true"/>
     <p:input port="alternate"/>
     <p:output port="result" primary="false"/>
     <p:option name="fail-if-not-equal" select="'false'"/>         <!--
boolean -->
</p:declare-step>

As to a working solution, you had the right idea, but as calabash informs
us:  Attribute "step" not allowed on p:output.  Instead, we can put a result
port in p:compare, like such:

    <p:compare fail-if-not-equal="true" name="compareBookstores">
        <p:input port="source">
            <p:pipe step="main" port="source"/>
        </p:input>
        <p:input port="alternate">
            <p:pipe step="main" port="alternate"/>
        </p:input>
        <p:output port="result"/>
    </p:compare>

And then it works.  Thank you for your help, Xmlizer!

James Garriss
http://garriss.blogspot.com

On 9/13/08 10:47 AM, "mozer" <xmlizer@gmail.com> wrote:

> Indeed (so the last answer by email was wrong)
> 
> This is due to the fact that p:compare has NO primary output
> 
> So you need to explicitly bind it
> 
> So this one should work (at least I hope)
> 
> <p:declare-step xmlns:p="http://www.w3.org/ns/xproc
> <http://www.w3.org/ns/xproc> " name="main">
>    <p:input port="source" primary="true">
>        <p:document href="Bookstore.xml"/>
>    </p:input>
>    <p:input port="alternate">
>        <p:document href="BookStoreDupe.xml"/>
>    </p:input>
>    <p:output port="result">
>      <p:pipe step="compare" port="result" />
>    </p:output>
>    <p:compare fail-if-not-equal="true" name="compare">
>        <p:input port="source">
>            <p:pipe step="main" port="source"/>
>        </p:input>
>        <p:input port="alternate">
>            <p:pipe step="main" port="alternate"/>
>        </p:input>
>    </p:compare>
> </p:declare-step>
> 
> Xmlizer
> 
> On Sat, Sep 13, 2008 at 4:16 PM, James Garriss <james@garriss.org> wrote:
>> using:  calabash 0.6.0
>> 
>> Several steps, including p:compare, wrap their results in a c:result
>> document.  How do I access that?  It doesn't seem to automatically pop out on
>> the default result port.   And I can't find any mention of how to access it
>> in the spec.  
>> 
>> Appreciate any pointers!
>> 
>> James Garriss
>> http://garriss.blogspot.com
>> 
>> PS:  here's my pipeline:
>> 
>> <p:declare-step xmlns:p="http://www.w3.org/ns/xproc
>> <http://www.w3.org/ns/xproc> " name="main">
>>     <p:input port="source" primary="true">
>>         <p:document href="Bookstore.xml"/>
>>     </p:input>
>>     <p:input port="alternate">
>>         <p:document href="BookStoreDupe.xml"/>
>>     </p:input>
>>     <p:input port="|result"/>
>>     <p:output port="result"/>
>>     <p:compare fail-if-not-equal="true">
>>         <p:input port="source">
>>             <p:pipe step="main" port="source"/>
>>         </p:input>
>>         <p:input port="alternate">
>>             <p:pipe step="main" port="alternate"/>
>>         </p:input>
>>     </p:compare>
>> </p:declare-step>
> 
> 

Received on Saturday, 13 September 2008 15:02:44 UTC