Re: multiple inputs in test expressions?

>        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 UTC