SQL Processor not returning query results

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

SQL Processor not returning query results

assafn
Hi,

I am trying to perform a simple query to mysql and
populate a drop down list of countries from my
countries db. Alas, the drop down list does not get
populated. Any suggestions as to what am I doing
wrong?

Below is is my code.

Thanks,

Assaf

page-flow.xml

<config xmlns="http://www.orbeon.com/oxf/controller"
        xmlns:xu="http://www.xmldb.org/xupdate"
        instance-passing="forward">

    <!-- Main page showing moving form -->
    <page path-info="/countries"
model="list-countries.xpl" view="view.xsl"/>

    <epilogue url="oxf:/config/epilogue.xpl"/>

</config>

view.xsl:
<xhtml:html
xmlns:xforms="http://www.w3.org/2002/xforms"
            xmlns:xhtml="http://www.w3.org/1999/xhtml"
                        xmlns:sql="http://orbeon.org/oxf/xml/sql"
           
xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xhtml:head>
                <xhtml:title>Request Form</xhtml:title>
               
                <xforms:model
xmlns:xforms="http://www.w3.org/2002/xforms">
                        <xforms:instance>
                                <root>
                                        <country_code/>
                                </root>
                        </xforms:instance>
                </xforms:model>
               
        </xhtml:head>
    <xhtml:body>
                        <xhtml:table border="0" cellpadding="2"
cellspacing="0">
                                <xhtml:tr>
                                        <xhtml:td align="right">Country</xhtml:td>
                                        <xhtml:td>
                                                <xforms:select1 ref="/root/country_code"
appearance="minimal">
                                                                <xforms:itemset
nodeset="instance('countries')/country">
                                                                        <xforms:label ref="name"/>
                                                                        <xforms:value ref="code"/>
                                                                </xforms:itemset>
                                                </xforms:select1>
                                        </xhtml:td>
                                </xhtml:tr>
                        </xhtml:table>
    </xhtml:body>
</xhtml:html>

list-countries.xpl:
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
        xmlns:sql="http://orbeon.org/oxf/xml/sql"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:oxf="http://www.orbeon.com/oxf/processors">
       
        <p:param name="data" type="input"/>
        <p:param name="data" type="output"/>
       
        <p:processor name="oxf:sql">
                <p:output name="data" id="countries"/>
                <p:input name="config">
                        <sql:config>
                                <sql:connection>
                                        <sql:datasource>logistics</sql:datasource>
                                        <countries>
                                                <sql:execute>
                                                        <sql:query> select * from countries order by
name asc</sql:query>
                                                        <sql:result-set>
                                                                <sql:row-iterator>
                                                                        <country>
                                                                                <name>
                                                                                        <sql:get-column-value type="xs:string"
column="name"/>
                                                                                </name>
                                                                                <code>
                                                                                        <sql:get-column-value type="xs:string"
column="code"/>
                                                                                </code>
                                                                        </country>
                                                                </sql:row-iterator>
                                                        </sql:result-set>
                                                </sql:execute>
                                        </countries>
                                </sql:connection>
                        </sql:config>
                </p:input>
        </p:processor>
</p:config>

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: SQL Processor not returning query results

Ryan Puddephatt
Assaf,
        You need to copy the model data into your instance something like:

<xforms:instance id="instance">
        <instance>
                <xsl:copy-of select="/"/>
        </instance>
</xforms:instance>

Hope this helps

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: Assaf [mailto:[hidden email]]
>Sent: 16 June 2006 17:02
>To: [hidden email]
>Subject: [ops-users] SQL Processor not returning query results
>
>Hi,
>
>I am trying to perform a simple query to mysql and
>populate a drop down list of countries from my
>countries db. Alas, the drop down list does not get
>populated. Any suggestions as to what am I doing
>wrong?
>
>Below is is my code.
>
>Thanks,
>
>Assaf
>
>page-flow.xml
>
><config xmlns="http://www.orbeon.com/oxf/controller"
>        xmlns:xu="http://www.xmldb.org/xupdate"
>        instance-passing="forward">
>
>    <!-- Main page showing moving form -->
>    <page path-info="/countries"
>model="list-countries.xpl" view="view.xsl"/>
>
>    <epilogue url="oxf:/config/epilogue.xpl"/>
>
></config>
>
>view.xsl:
><xhtml:html
>xmlns:xforms="http://www.w3.org/2002/xforms"
>            xmlns:xhtml="http://www.w3.org/1999/xhtml"
> xmlns:sql="http://orbeon.org/oxf/xml/sql"
>
>xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xhtml:head>
> <xhtml:title>Request Form</xhtml:title>
>
> <xforms:model
>xmlns:xforms="http://www.w3.org/2002/xforms">
> <xforms:instance>
> <root>
> <country_code/>
> </root>
> </xforms:instance>
> </xforms:model>
>
> </xhtml:head>
>    <xhtml:body>
> <xhtml:table border="0" cellpadding="2"
>cellspacing="0">
> <xhtml:tr>
> <xhtml:td
align="right">Country</xhtml:td>
> <xhtml:td>
> <xforms:select1
>ref="/root/country_code"
>appearance="minimal">
>
<xforms:itemset
>nodeset="instance('countries')/country">
>
<xforms:label
>ref="name"/>
>
<xforms:value
>ref="code"/>
>
</xforms:itemset>

> </xforms:select1>
> </xhtml:td>
> </xhtml:tr>
> </xhtml:table>
>    </xhtml:body>
></xhtml:html>
>
>list-countries.xpl:
><p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
> xmlns:sql="http://orbeon.org/oxf/xml/sql"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:oxf="http://www.orbeon.com/oxf/processors">
>
> <p:param name="data" type="input"/>
> <p:param name="data" type="output"/>
>
> <p:processor name="oxf:sql">
> <p:output name="data" id="countries"/>
> <p:input name="config">
> <sql:config>
> <sql:connection>
>
<sql:datasource>logistics</sql:datasource>
> <countries>
> <sql:execute>
> <sql:query> select *
from
>countries order by
>name asc</sql:query>
> <sql:result-set>
>
<sql:row-iterator>
>
<country>
>
<name>
>
<sql:get-
>column-value type="xs:string"
>column="name"/>
>
</name>
>
<code>
>
<sql:get-
>column-value type="xs:string"
>column="code"/>
>
</code>
>
</country>
>
</sql:row-iterator>

> </sql:result-set>
> </sql:execute>
> </countries>
> </sql:connection>
> </sql:config>
> </p:input>
> </p:processor>
></p:config>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: SQL Processor not returning query results

Erik Bruchez
Administrator
In reply to this post by assafn
In fact, you don't need XSLT for this (although it is fine to use XSLT
if you will actually need it for other tasks in the view). You can do
this with XInclude instead:

   <xforms:instance id="instance">
     <xi:include href="input:data"/>
   </xforms:instance>

As a BTW: ideally, you should be able to do this:

   <xforms:instance id="instance" src="input:data"/>

However this does not work (yet) due to the way the XForms engine is
currently hooked up. But since today you can use:

   <xforms:instance id="instance" src="input:instance"/>

to access the current XML submission.

-Erik

Assaf wrote:

> Hi,
>
> I am trying to perform a simple query to mysql and
> populate a drop down list of countries from my
> countries db. Alas, the drop down list does not get
> populated. Any suggestions as to what am I doing
> wrong?
>
> Below is is my code.
>
> Thanks,
>
> Assaf
>
> page-flow.xml
>
> <config xmlns="http://www.orbeon.com/oxf/controller"
>         xmlns:xu="http://www.xmldb.org/xupdate"
>         instance-passing="forward">
>
>     <!-- Main page showing moving form -->
>     <page path-info="/countries"
> model="list-countries.xpl" view="view.xsl"/>
>
>     <epilogue url="oxf:/config/epilogue.xpl"/>
>
> </config>
>
> view.xsl:
> <xhtml:html
> xmlns:xforms="http://www.w3.org/2002/xforms"
>             xmlns:xhtml="http://www.w3.org/1999/xhtml"
> xmlns:sql="http://orbeon.org/oxf/xml/sql"
>            
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xhtml:head>
> <xhtml:title>Request Form</xhtml:title>
>
> <xforms:model
> xmlns:xforms="http://www.w3.org/2002/xforms">
> <xforms:instance>
> <root>
> <country_code/>
> </root>
> </xforms:instance>
> </xforms:model>
>
> </xhtml:head>
>     <xhtml:body>
> <xhtml:table border="0" cellpadding="2"
> cellspacing="0">
> <xhtml:tr>
> <xhtml:td align="right">Country</xhtml:td>
> <xhtml:td>
> <xforms:select1 ref="/root/country_code"
> appearance="minimal">
> <xforms:itemset
> nodeset="instance('countries')/country">
> <xforms:label ref="name"/>
> <xforms:value ref="code"/>
> </xforms:itemset>
> </xforms:select1>
> </xhtml:td>
> </xhtml:tr>
> </xhtml:table>
>     </xhtml:body>
> </xhtml:html>
>
> list-countries.xpl:
> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
> xmlns:sql="http://orbeon.org/oxf/xml/sql"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:oxf="http://www.orbeon.com/oxf/processors">
>
> <p:param name="data" type="input"/>
> <p:param name="data" type="output"/>
>
> <p:processor name="oxf:sql">
> <p:output name="data" id="countries"/>
> <p:input name="config">
> <sql:config>
> <sql:connection>
> <sql:datasource>logistics</sql:datasource>
> <countries>
> <sql:execute>
> <sql:query> select * from countries order by
> name asc</sql:query>
> <sql:result-set>
> <sql:row-iterator>
> <country>
> <name>
> <sql:get-column-value type="xs:string"
> column="name"/>
> </name>
> <code>
> <sql:get-column-value type="xs:string"
> column="code"/>
> </code>
> </country>
> </sql:row-iterator>
> </sql:result-set>
> </sql:execute>
> </countries>
> </sql:connection>
> </sql:config>
> </p:input>
> </p:processor>
> </p:config>
--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: SQL Processor not returning query results

assafn
In reply to this post by assafn
Hi Erik,

I tried your suggestion but I still get the empty
select. I put the list-countries.xpl in the xpl
sandbox and there I get the countries in a nice xml.

i am really stuck here. any suggestions?

In fact, you don't need XSLT for this (although it is
fine to use XSLT if you will actually need it for
other tasks in the view). You can do this with
XInclude instead:


  <xforms:instance id="instance">
    <xi:include href="input:data"/>
  </xforms:instance>


As a BTW: ideally, you should be able to do this:


  <xforms:instance id="instance" src="input:data"/>

However this does not work (yet) due to the way the
XForms engine is currently hooked up. But since today
you can use:


  <xforms:instance id="instance"
src="input:instance"/>


to access the current XML submission.


-Erik

Assaf wrote:
Hi,


I am trying to perform a simple query to mysql and
populate a drop down list of countries from my
countries db. Alas, the drop down list does not get
populated. Any suggestions as to what am I doing
wrong?


Below is is my code.


Thanks,


Assaf


page-flow.xml


<config xmlns="http://www.orbeon.com/oxf/controller";
        xmlns:xu="http://www.xmldb.org/xupdate";
        instance-passing="forward">


    <!-- Main page showing moving form -->
    <page path-info="/countries"
model="list-countries.xpl" view="view.xsl"/>


    <epilogue url="oxf:/config/epilogue.xpl"/>


</config>

view.xsl:
<xhtml:html
xmlns:xforms="http://www.w3.org/2002/xforms";
xmlns:xhtml="http://www.w3.org/1999/xhtml";
xmlns:sql="http://orbeon.org/oxf/xml/sql";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<xhtml:head>
<xhtml:title>Request Form</xhtml:title>

<xforms:model
xmlns:xforms="http://www.w3.org/2002/xforms";>
<xforms:instance>
<root>
<country_code/>
</root>
</xforms:instance>
</xforms:model>

</xhtml:head>
<xhtml:body>
<xhtml:table border="0" cellpadding="2"
cellspacing="0">
<xhtml:tr>
<xhtml:td align="right">Country</xhtml:td>
<xhtml:td>
<xforms:select1 ref="/root/country_code"
appearance="minimal">
<xforms:itemset
nodeset="instance('countries')/country">
<xforms:label ref="name"/>
<xforms:value ref="code"/>
</xforms:itemset>
</xforms:select1>
</xhtml:td>
</xhtml:tr>
</xhtml:table>
</xhtml:body>
</xhtml:html>


list-countries.xpl:
<p:config
xmlns:p="http://www.orbeon.com/oxf/pipeline";
        xmlns:sql="http://orbeon.org/oxf/xml/sql";
        xmlns:xs="http://www.w3.org/2001/XMLSchema";
       
xmlns:oxf="http://www.orbeon.com/oxf/processors";>
       
        <p:param name="data" type="input"/>
        <p:param name="data" type="output"/>
       
        <p:processor name="oxf:sql">
                <p:output name="data" id="countries"/>
                <p:input name="config">
                        <sql:config>
                                <sql:connection>
                                       
<sql:datasource>logistics</sql:datasource>
                                        <countries>
                                               
<sql:execute>
                                                     
 <sql:query> select *
from countries order by
name asc</sql:query>
                                                     
 <sql:result-set>
                                                     
         
<sql:row-iterator>
                                                     
                 
<country>
                                                     
                         
<name>
                                                     
                                 
<sql:get-column-value type="xs:string"
column="name"/>
                                                     
                         
</name>
                                                     
                         
<code>
                                                     
                                 
<sql:get-column-value type="xs:string"
column="code"/>
                                                     
                         
</code>
                                                     
                 
</country>
                                                     
         
</sql:row-iterator>
                                                     
 </sql:result-set>
                                               
</sql:execute>
                                        </countries>
                                </sql:connection>
                        </sql:config>
                </p:input>
        </p:processor>
</p:config>




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: SQL Processor not returning query results

assafn
I tried adding the following to the list-countries.xpl
but it does not show anything.

<p:param name="data" type="output"
debug="model-output"/>

The list-countries.xpl file works fine in the xpl
sandbox. So I assume the problem is with the view. But
I just can't get it to work. Can someone please help
before the end of the weekend. I was hoping to present
OPS for a proof of concept on Monday and trying to get
this silly simple thing to work. Thanks!!!

--- Assaf <[hidden email]> wrote:

> Hi Erik,
>
> I tried your suggestion but I still get the empty
> select. I put the list-countries.xpl in the xpl
> sandbox and there I get the countries in a nice xml.
>
>
> i am really stuck here. any suggestions?
>
> In fact, you don't need XSLT for this (although it
> is
> fine to use XSLT if you will actually need it for
> other tasks in the view). You can do this with
> XInclude instead:
>
>
>   <xforms:instance id="instance">
>     <xi:include href="input:data"/>
>   </xforms:instance>
>
>
> As a BTW: ideally, you should be able to do this:
>
>
>   <xforms:instance id="instance" src="input:data"/>
>
> However this does not work (yet) due to the way the
> XForms engine is currently hooked up. But since
> today
> you can use:
>
>
>   <xforms:instance id="instance"
> src="input:instance"/>
>
>
> to access the current XML submission.
>
>
> -Erik
>
> Assaf wrote:
> Hi,
>
>
> I am trying to perform a simple query to mysql and
> populate a drop down list of countries from my
> countries db. Alas, the drop down list does not get
> populated. Any suggestions as to what am I doing
> wrong?
>
>
> Below is is my code.
>
>
> Thanks,
>
>
> Assaf
>
>
> page-flow.xml
>
>
> <config
> xmlns="http://www.orbeon.com/oxf/controller";
>         xmlns:xu="http://www.xmldb.org/xupdate";
>         instance-passing="forward">
>
>
>     <!-- Main page showing moving form -->
>     <page path-info="/countries"
> model="list-countries.xpl" view="view.xsl"/>
>
>
>     <epilogue url="oxf:/config/epilogue.xpl"/>
>
>
> </config>
>
> view.xsl:
> <xhtml:html
> xmlns:xforms="http://www.w3.org/2002/xforms";
> xmlns:xhtml="http://www.w3.org/1999/xhtml";
> xmlns:sql="http://orbeon.org/oxf/xml/sql";
> xmlns:xs="http://www.w3.org/2001/XMLSchema";>
> <xhtml:head>
> <xhtml:title>Request Form</xhtml:title>
>
> <xforms:model
> xmlns:xforms="http://www.w3.org/2002/xforms";>
> <xforms:instance>
> <root>
> <country_code/>
> </root>
> </xforms:instance>
> </xforms:model>
>
> </xhtml:head>
> <xhtml:body>
> <xhtml:table border="0" cellpadding="2"
> cellspacing="0">
> <xhtml:tr>
> <xhtml:td align="right">Country</xhtml:td>
> <xhtml:td>
> <xforms:select1 ref="/root/country_code"
> appearance="minimal">
> <xforms:itemset
> nodeset="instance('countries')/country">
> <xforms:label ref="name"/>
> <xforms:value ref="code"/>
> </xforms:itemset>
> </xforms:select1>
> </xhtml:td>
> </xhtml:tr>
> </xhtml:table>
> </xhtml:body>
> </xhtml:html>
>
>
> list-countries.xpl:
> <p:config
> xmlns:p="http://www.orbeon.com/oxf/pipeline";
>         xmlns:sql="http://orbeon.org/oxf/xml/sql";
>         xmlns:xs="http://www.w3.org/2001/XMLSchema";
>        
> xmlns:oxf="http://www.orbeon.com/oxf/processors";>
>        
>         <p:param name="data" type="input"/>
>         <p:param name="data" type="output"/>
>        
>         <p:processor name="oxf:sql">
>                 <p:output name="data"
> id="countries"/>
>                 <p:input name="config">
>                         <sql:config>
>                                 <sql:connection>
>                                        
> <sql:datasource>logistics</sql:datasource>
>                                         <countries>
>                                                
> <sql:execute>
>                                                    
>  
>  <sql:query> select *
> from countries order by
> name asc</sql:query>
>                                                    
>  
>  <sql:result-set>
>                                                    
>  
>          
> <sql:row-iterator>
>                                                    
>  
>                  
> <country>
>                                                    
>  
>                          
> <name>
>                                                    
>  
>                                  
> <sql:get-column-value type="xs:string"
> column="name"/>
>                                                    
>  
>                          
> </name>
>                                                    
>  
>                          
> <code>
>                                                    
>  
>                                  
> <sql:get-column-value type="xs:string"
> column="code"/>
>                                                    
>  
>                          
> </code>
>                                                    
>  
>                  
> </country>
>                                                    
>  
>          
> </sql:row-iterator>
>                                                    
>  
>  </sql:result-set>
>                                                
> </sql:execute>
>                                         </countries>
>                                 </sql:connection>
>                         </sql:config>
>                 </p:input>
>         </p:processor>
> </p:config>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com 
>
> >
> --
> You receive this message as a subscriber of the
> [hidden email] mailing list.
> To unsubscribe:
> mailto:[hidden email]
> For general help:
> mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
>

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: SQL Processor not returning query results

Erik Bruchez
Administrator
Assaf,

One error I see in your model:

<p:output name="data" id="countries"/>

should be:

<p:output name="data" ref="data"/>

There are more errors in your view as well. I attach a zip file with a
working example. I use the following entry in my page flow:

<page path-info="/assaf" model="/assaf/model.xpl" view="/assaf/view.xhtml"/>

Ajust the paths accordingly.

Of course you will have to switch back to using the SQL processor in the
model. I just put inline data for my test.

I hope this helps,

-Erik

Assaf wrote:

> I tried adding the following to the list-countries.xpl
> but it does not show anything.
>
> <p:param name="data" type="output"
> debug="model-output"/>
>
> The list-countries.xpl file works fine in the xpl
> sandbox. So I assume the problem is with the view. But
> I just can't get it to work. Can someone please help
> before the end of the weekend. I was hoping to present
> OPS for a proof of concept on Monday and trying to get
> this silly simple thing to work. Thanks!!!
>
> --- Assaf <[hidden email]> wrote:
>
>> Hi Erik,
>>
>> I tried your suggestion but I still get the empty
>> select. I put the list-countries.xpl in the xpl
>> sandbox and there I get the countries in a nice xml.
>>
>>
>> i am really stuck here. any suggestions?
>>
>> In fact, you don't need XSLT for this (although it
>> is
>> fine to use XSLT if you will actually need it for
>> other tasks in the view). You can do this with
>> XInclude instead:
>>
>>
>>   <xforms:instance id="instance">
>>     <xi:include href="input:data"/>
>>   </xforms:instance>
>>
>>
>> As a BTW: ideally, you should be able to do this:
>>
>>
>>   <xforms:instance id="instance" src="input:data"/>
>>
>> However this does not work (yet) due to the way the
>> XForms engine is currently hooked up. But since
>> today
>> you can use:
>>
>>
>>   <xforms:instance id="instance"
>> src="input:instance"/>
>>
>>
>> to access the current XML submission.
>>
>>
>> -Erik
>>
>> Assaf wrote:
>> Hi,
>>
>>
>> I am trying to perform a simple query to mysql and
>> populate a drop down list of countries from my
>> countries db. Alas, the drop down list does not get
>> populated. Any suggestions as to what am I doing
>> wrong?
>>
>>
>> Below is is my code.
>>
>>
>> Thanks,
>>
>>
>> Assaf
>>
>>
>> page-flow.xml
>>
>>
>> <config
>> xmlns="http://www.orbeon.com/oxf/controller";
>>         xmlns:xu="http://www.xmldb.org/xupdate";
>>         instance-passing="forward">
>>
>>
>>     <!-- Main page showing moving form -->
>>     <page path-info="/countries"
>> model="list-countries.xpl" view="view.xsl"/>
>>
>>
>>     <epilogue url="oxf:/config/epilogue.xpl"/>
>>
>>
>> </config>
>>
>> view.xsl:
>> <xhtml:html
>> xmlns:xforms="http://www.w3.org/2002/xforms";
>> xmlns:xhtml="http://www.w3.org/1999/xhtml";
>> xmlns:sql="http://orbeon.org/oxf/xml/sql";
>> xmlns:xs="http://www.w3.org/2001/XMLSchema";>
>> <xhtml:head>
>> <xhtml:title>Request Form</xhtml:title>
>>
>> <xforms:model
>> xmlns:xforms="http://www.w3.org/2002/xforms";>
>> <xforms:instance>
>> <root>
>> <country_code/>
>> </root>
>> </xforms:instance>
>> </xforms:model>
>>
>> </xhtml:head>
>> <xhtml:body>
>> <xhtml:table border="0" cellpadding="2"
>> cellspacing="0">
>> <xhtml:tr>
>> <xhtml:td align="right">Country</xhtml:td>
>> <xhtml:td>
>> <xforms:select1 ref="/root/country_code"
>> appearance="minimal">
>> <xforms:itemset
>> nodeset="instance('countries')/country">
>> <xforms:label ref="name"/>
>> <xforms:value ref="code"/>
>> </xforms:itemset>
>> </xforms:select1>
>> </xhtml:td>
>> </xhtml:tr>
>> </xhtml:table>
>> </xhtml:body>
>> </xhtml:html>
>>
>>
>> list-countries.xpl:
>> <p:config
>> xmlns:p="http://www.orbeon.com/oxf/pipeline";
>>         xmlns:sql="http://orbeon.org/oxf/xml/sql";
>>         xmlns:xs="http://www.w3.org/2001/XMLSchema";
>>        
>> xmlns:oxf="http://www.orbeon.com/oxf/processors";>
>>        
>>         <p:param name="data" type="input"/>
>>         <p:param name="data" type="output"/>
>>        
>>         <p:processor name="oxf:sql">
>>                 <p:output name="data"
>> id="countries"/>
>>                 <p:input name="config">
>>                         <sql:config>
>>                                 <sql:connection>
>>                                        
>> <sql:datasource>logistics</sql:datasource>
>>                                         <countries>
>>                                                
>> <sql:execute>
>>                                                    
>>  
>>  <sql:query> select *
>> from countries order by
>> name asc</sql:query>
>>                                                    
>>  
>>  <sql:result-set>
>>                                                    
>>  
>>          
>> <sql:row-iterator>
>>                                                    
>>  
>>                  
>> <country>
>>                                                    
>>  
>>                          
>> <name>
>>                                                    
>>  
>>                                  
>> <sql:get-column-value type="xs:string"
>> column="name"/>
>>                                                    
>>  
>>                          
>> </name>
>>                                                    
>>  
>>                          
>> <code>
>>                                                    
>>  
>>                                  
>> <sql:get-column-value type="xs:string"
>> column="code"/>
>>                                                    
>>  
>>                          
>> </code>
>>                                                    
>>  
>>                  
>> </country>
>>                                                    
>>  
>>          
>> </sql:row-iterator>
>>                                                    
>>  
>>  </sql:result-set>
>>                                                
>> </sql:execute>
>>                                         </countries>
>>                                 </sql:connection>
>>                         </sql:config>
>>                 </p:input>
>>         </p:processor>
>> </p:config>
>>
>>
>>
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam
>> protection around
>> http://mail.yahoo.com 
>>
>> --
>> You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> To unsubscribe:
>> mailto:[hidden email]
>> For general help:
>> mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page:
>> http://www.objectweb.org/wws
>>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com 
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

assaf.zip (1K) Download Attachment