W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > September 2008

Re: How to use p:compare

From: Norman Walsh <ndw@nwalsh.com>
Date: Thu, 18 Sep 2008 16:57:21 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <m23ajx41fy.fsf@nwalsh.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 18 September 2008 20:58:02 GMT