W3C home > Mailing lists > Public > public-xml-processing-model-comments@w3.org > February 2010

RE: multiple inputs in test expressions?

From: <Toman_Vojtech@emc.com>
Date: Fri, 5 Feb 2010 05:55:31 -0500
Message-ID: <997C307BEB90984EBE935699389EC41CA7D74B@CORPUSMX70C.corp.emc.com>
To: <public-xml-processing-model-comments@w3.org>
It could look something like this (I haven't tested it, so it probably
does not work - but you should get the idea):

<p:xquery>
  <p:input port="source">
    <p:pipe step="..." port="..."/> <!-- first document -->
    <p:pipe step="..." port="..."/> <!-- second document -->
  </p:input>
  <p:input port="query">
    <p:inline>
      <c:query xmlns:c="..."><![CDATA[
        let $doc1 := collection()[1]
        let $doc2 := collection()[2]
        return <result>
               {
                 boolean($doc1/tags/tag[@name=$doc2/tags/tag/@name])
               }
               </result>]]>
      </c:query>
    </p:inline>
  </p:input>
</p:xquery>

<p:choose>
   <p:when test="/result='true'">...</p:when>
</p:choose>


Regards,
Vojtech

> -----Original Message-----
> From: public-xml-processing-model-comments-request@w3.org
[mailto:public-xml-
> processing-model-comments-request@w3.org] On Behalf Of Nikolay Fiykov
> Sent: Friday, February 05, 2010 11:35 AM
> To: public-xml-processing-model-comments@w3.org
> Subject: Re: multiple inputs in test expressions?
> 
> How would the xquery step look like?
> 
> ext Toman_Vojtech@emc.com wrote:
> > Another approach could be to use p:xquery to query across the
documents,
> > and then use the result of the p:xquery step in your
p:choose/p:when.
> > That would eliminate the need for merging the documents.
> >
> 
Received on Friday, 5 February 2010 10:57:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 5 February 2010 10:57:26 GMT