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

Re: multiple inputs in test expressions?

From: Nikolay Fiykov <nikolay.fiykov@nsn.com>
Date: Fri, 05 Feb 2010 13:34:26 +0200
Message-ID: <4B6C0242.2090709@nsn.com>
To: public-xml-processing-model-comments@w3.org
>        let $doc1 := collection()[1]
>        let $doc2 := collection()[2]

why would not collection() be available also in test-expressions?

i tend to think it as needed even in case of xpath1 processors, as a 
sequence of documents might have to be tested in same way as individual one.

btw, where in the spec the relationship between p:input and collection() 
is explained?

ext Toman_Vojtech@emc.com wrote:
> 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>
>   
Received on Friday, 5 February 2010 11:38:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 5 February 2010 11:38:13 GMT