|
Hi!
I was assailed by XQuery for a long time, because it always has no response to me. I have already tried to search the solution, but don't get the point. Could you please help to solve this problem? thanks a lot!
Below is my code(refer to Orbeon) in one file:
<xforms:model id="topic">
<xforms:action ev:event="xforms-ready"> <xforms:insert nodeset="instance('list-documents-query')"
origin="instance('god')"/> <xforms:send submission="list-documents-submission"/> </xforms:action>
<xforms:instance id="god"> <exist:query> <exist:text> xquery version "1.0";
let $collection-name := '/orbeon/exist/rest/db/orbeon/xforms-bookcast/www.xml'
return
<document> {string($collection-name//topic[1]/baseName/baseNameString)}
</document> </exist:text> </exist:query> </xforms:instance>
<xforms:instance id="list-documents-query"> <exist:query/> </xforms:instance>
<xforms:instance id="documents-instance"> <document/> </xforms:instance>
<xforms:submission id="list-documents-submission" ref="instance('god')"
method="post" action="/orbeon/exist/rest/db/orbeon/xforms-bookcast/?search"
replace="instance" xxforms:instance="documents-instance" f:url-type="resource" xxforms:readonly="true"/>
</xforms:model>
<xforms:output value="instance('documents-instance')/documents/document"/>
|