I have a problem about api-call -> exist

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

I have a problem about api-call -> exist

growth
My English not well, I'm sorry if you understand..

I call


<xforms:instance id="control-instance">
   <control xmlns="">
          <operation>query</operation>
          <resource>/db</resource>
          <query/>
          <insert/>
          <error/>
          <formatted-result />
   </control>
</xforms:instance>

<xforms:instance id="response-instance">
   <exist:result/>
</xforms:instance>

<xforms:bind nodeset="formatted-result"
    calculate="if (instance('response-instance')/*)
    then xxforms:serialize(xxforms:call-xpl('oxf:/ops/utils/formatting/format.xpl', 'data', instance('response-instance')/*[1], 'data')/*, 'xml')
    else ''"/> 


    if Data return is
       <item>
         <product>
                <name>AAA</name>
                <price>200</price>
         </product>
         <product>
                <name>BBB</name>
                <price>300</price>
         </product>
       </item>


My question is
I use script
<xforms:output ref="instance('control-instance')/formatted-result/items/product/name" />

but It's wrong!!

How do I access data of return.

Thk.
Growth