Problem with oxf:xmlFragment type in oxf:sql processor

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

Problem with oxf:xmlFragment type in oxf:sql processor

lukasz.oleksak
Hello,

For few days I'm testing the OPS 3.0 in context of integration with Oracle 10g database. I've tried the following pipline in XPL Sandbox example application and recived such error:

XForms error: Illegal XML type for SQL type: {http://www.orbeon.com/oxf/processors}xmlFragment, CLOB

When xmlFragment is replaced with xs:String then an output stated below is generated.

<rows>
  <row>
<CustomerContact><FirstName>first</FirstName><LastName>last</LastName><EmailAddress>[hidden email]</EmailAddress></CustomerContact>
  </row>
</rows>

I'm interested in reciving formated xml from database CLOB/XmlType column insead of a plain text.
Does someone have any idea how to resolve this issue?

Best regards
£ukasz

Here is the pipeline definition:

<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:input name="config">
        <sql:config>                
            <sql:connection>
                <sql:datasource>myorbeon</sql:datasource>    <sql:execute xmlns:sql="http://orbeon.org/oxf/xml/sql">
                        <sql:query>
                           select * from orbeon_test
                        </sql:query>

                        <sql:result-set>
                           <rows>
                              <sql:row-iterator>
                                  <row>
                                     <sql:get-column-value type="oxf:xmlFragment" column="clob_col"/>
                                    </row>
                                </sql:row-iterator>
                            </rows>
                            </sql:result-set>
                        </sql:execute>                        
                    </sql:connection>
            </sql:config>
        </p:input>
        <p:output name="data" ref="data"/>
    </p:processor>

</p:config>



--
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: Problem with oxf:xmlFragment type in oxf:sql processor

Erik Bruchez
Administrator
Lukasz,

I see thta CLOB doesn't work below, but what about XMLType? This
definitely worked at some point.

-Erik

[hidden email] wrote:

> Hello,
>
> For few days I'm testing the OPS 3.0 in context of integration with Oracle 10g database. I've tried the following pipline in XPL Sandbox example application and recived such error:
>
> XForms error: Illegal XML type for SQL type: {http://www.orbeon.com/oxf/processors}xmlFragment, CLOB
>
> When xmlFragment is replaced with xs:String then an output stated below is generated.
>
> <rows>
>   <row>
> <CustomerContact><FirstName>first</FirstName><LastName>last</LastName><EmailAddress>[hidden email]</EmailAddress></CustomerContact>
>   </row>
> </rows>
>
> I'm interested in reciving formated xml from database CLOB/XmlType column insead of a plain text.
> Does someone have any idea how to resolve this issue?
>
> Best regards
> £ukasz
>
> Here is the pipeline definition:
>
> <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:input name="config">
>         <sql:config>                
>             <sql:connection>
>                 <sql:datasource>myorbeon</sql:datasource>    <sql:execute xmlns:sql="http://orbeon.org/oxf/xml/sql">
>                         <sql:query>
>                            select * from orbeon_test
>                         </sql:query>
>
>                         <sql:result-set>
>                            <rows>
>                               <sql:row-iterator>
>                                   <row>
>                                      <sql:get-column-value type="oxf:xmlFragment" column="clob_col"/>
>                                     </row>
>                                 </sql:row-iterator>
>                             </rows>
>                             </sql:result-set>
>                         </sql:execute>                        
>                     </sql:connection>
>             </sql:config>
>         </p:input>
>         <p:output name="data" ref="data"/>
>     </p:processor>
>
> </p:config>
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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