Re: How to use p:compare

Jeni Tennison <jeni@jenitennison.com> writes:

> is that there's no guarantee that the <p:identity> step will be done

Right.

> before the <p:compare> step. It works in Calabash (for some definition
> of 'works'; the error that's given when the documents aren't the same
> isn't particularly helpful). 

:-P

> So you probably need to do:
>
> <p:choose>
>   <p:when test=". = 'true'">
>     <p:xpath-context>
>       <p:pipe step="comparison" port="result" />
>     </p:xpath-context>
>     <p:identity>
>       <p:input port="source">
>         <p:pipe step="pipe" port="source" />
>       </p:input>
>     </p:identity>
>   </p:when>
>   <p:otherwise>
>     <p:identity>
>       <p:input port="source">
>         <p:pipe step="comparison" port="result" />
>       </p:input>
>     </p:identity>
>   </p:otherwise>
> </p:choose>

That's the best I could do to. Bleh, I'm not thrilled, but I guess it
works.

> (By the way, Calabash errored when I had the <p:xpath-context> in the
> <p:choose> instead of the <p:when>, which it shouldn't have done.)

Another day, another bug :-)

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Beware the lollipop of mediocrity: lick
http://nwalsh.com/            | it once and you suck forever.

Received on Thursday, 18 September 2008 20:58:02 UTC