RE: multiple inputs in test expressions?

I am afraid you would indeed have to merge the documents in your
example. The XPath context for the test expression is at most one
document, so you can't query across two documents here.

Using XSLT for merging the documents is one option, but XProc provides
(probably much more efficient) alternatives: for instance, the
p:wrap-sequence step.

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.

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 fikin
> Sent: Thursday, February 04, 2010 8:59 PM
> To: public-xml-processing-model-comments@w3.org
> Subject: multiple inputs in test expressions?
> 
> i have a case of value lookup withing a secondary input document.
> 
> <p:input name="source" primary="true" />
> <p:input name="src2" />
> <p:choose>
>    <p:when test="/tags/tag[ @name= $src2/tags/tag/@name ]"
>...</p:when>
> </p:choose>
> 
> is there a way to make it working without merging the two documents
> with xslt first?
> 
> 

Received on Friday, 5 February 2010 10:16:09 UTC