Not able to save the forms in xml fromat.

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

Not able to save the forms in xml fromat.

manish_suriya

Hi,

I am a beginner for X forms and orbeons forms. i m try to learn by running some demo applicvations in orbeon forms.

i m usingone l application which captures order data. then i am clciking on save button

i want to save  this form at C:/temp/ex1order.xml. i am using the folloiwng code for it.

i am able to see the application and enetrs the names, age, game etc. when i clicked on SAVE button i am not able to save form in xml format.

i m getting  this error
==========================================================
xforms:submission: submission URL scheme not yet implemented: file
==========================================================

Xhtml file.:
=======================================================

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ev="http://www.w3.org/2001/xml-events"
      xmlns:xf="http://www.w3.org/2002/xforms">
  <head>
   
    <style type="text/css">
      h1 {font-size: 12pt }
      xf|input.itemClass { width:100px }
      xf|input.custNumClass { width:100px }
      xf|input.dateClass { width:80px }
    </style>
    <title>Enter Order</title>

    <xf:model id="model1">

      <xf:instance>
        <order xmlns="" itemNum="">
          <quantity/>
          <custNum/>
          <orderDate/>
        </order>
      </xf:instance>

      <xf:submission id="s01" method="put"
                     action="file:///C:/temp/ex1order.xml" />

     
    </xf:model>
  </head>

  <body>

    <h1>Enter Order</h1>
    <p>Enter data for order below.</p>

    <xf:input model="model1" class="itemClass" ref="@itemNum">
      <xf:label>Item Number</xf:label>
    </xf:input>

    <xf:input model="model1" ref="quantity">
      <xf:label>Quantity</xf:label>
    </xf:input>

    <xf:input model="model1" ref="custNum" class="custNumClass">
      <xf:label>Customer Number</xf:label>
    </xf:input>

    <xf:input model="model1" ref="orderDate" class="dateClass">
      <xf:label>Order Date</xf:label>
    </xf:input>

    <br />

    <xf:submit submission="s01">
      <xf:label>Save</xf:label>
    </xf:submit>

    <p>Click "Save" to store entered order.</p>

  </body>
</html>
=================================================

where i m wrong ??

please help me.

thanks in advance.

Manish Suriya
Mailto: [hidden email]
Website:
http://www.tcs.com
____________________________________________
Experience certainty.        IT Services
                       Business Solutions
                       Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Not able to save the forms in xml fromat.

Hank Ratzesberger
Manish,

I believe in theory what you have should work:

>
>       <xf:submission id="s01" method="put"
>                      action="file:///C:/temp/ex1order.xml" />
>

but I don't think Orbeon supports this and it may not be
part of the XForms spec.

Instead, you probably have to use the file serializer hooked
up to a service (page-flow.xml entry that refers to an xpl file).
You could POST to the url, and the filename could be parameters.
Then you have the information necessary to use the file
serializer to write to a file.

http://www.orbeon.com/ops/doc/processors-serializers#file-serializer

The URL generator is used in the xpl to evaluate parameters.

http://www.orbeon.com/ops/doc/processors-generators-url

--Hank


On Sep 24, 2008, at 8:34 AM, Manish Suriya wrote:

>
> Hi,
>
> I am a beginner for X forms and orbeons forms. i m try to learn by  
> running some demo applicvations in orbeon forms.
>
> i m usingone l application which captures order data. then i am  
> clciking on save button
>
> i want to save  this form at C:/temp/ex1order.xml. i am using the  
> folloiwng code for it.
>
> i am able to see the application and enetrs the names, age, game  
> etc. when i clicked on SAVE button i am not able to save form in  
> xml format.
>
> i m getting  this error
> ==========================================================
> xforms:submission: submission URL scheme not yet implemented: file
> ==========================================================
>
> Xhtml file.:
> =======================================================
>
> <html xmlns="http://www.w3.org/1999/xhtml"
>       xmlns:ev="http://www.w3.org/2001/xml-events"
>       xmlns:xf="http://www.w3.org/2002/xforms">
>   <head>
>
>     <style type="text/css">
>       h1 {font-size: 12pt }
>       xf|input.itemClass { width:100px }
>       xf|input.custNumClass { width:100px }
>       xf|input.dateClass { width:80px }
>     </style>
>     <title>Enter Order</title>
>
>     <xf:model id="model1">
>
>       <xf:instance>
>         <order xmlns="" itemNum="">
>           <quantity/>
>           <custNum/>
>           <orderDate/>
>         </order>
>       </xf:instance>
>
>       <xf:submission id="s01" method="put"
>                      action="file:///C:/temp/ex1order.xml" />
>
>
>     </xf:model>
>   </head>
>
>   <body>
>
>     <h1>Enter Order</h1>
>     <p>Enter data for order below.</p>
>
>     <xf:input model="model1" class="itemClass" ref="@itemNum">
>       <xf:label>Item Number</xf:label>
>     </xf:input>
>
>     <xf:input model="model1" ref="quantity">
>       <xf:label>Quantity</xf:label>
>     </xf:input>
>
>     <xf:input model="model1" ref="custNum" class="custNumClass">
>       <xf:label>Customer Number</xf:label>
>     </xf:input>
>
>     <xf:input model="model1" ref="orderDate" class="dateClass">
>       <xf:label>Order Date</xf:label>
>     </xf:input>
>
>     <br />
>
>     <xf:submit submission="s01">
>       <xf:label>Save</xf:label>
>     </xf:submit>
>
>     <p>Click "Save" to store entered order.</p>
>
>   </body>
> </html>
> =================================================
>
> where i m wrong ??
>
> please help me.
>
> thanks in advance.
>
> Manish Suriya
> Mailto: [hidden email]
> Website: http://www.tcs.com
> ____________________________________________
> Experience certainty.        IT Services
>                        Business Solutions
>                        Outsourcing
> ____________________________________________=====-----=====-----
> ===== Notice: The information contained in this e-mail message and/
> or attachments to it may contain confidential or privileged  
> information. If you are not the intended recipient, any  
> dissemination, use, review, distribution, printing or copying of  
> the information contained in this e-mail message and/or attachments  
> to it are strictly prohibited. If you have received this  
> communication in error, please notify us by reply e-mail or  
> telephone and immediately and permanently delete the message and  
> any attachments. Thank you
>
> --
> 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
> OW2 mailing lists service home page: http://www.ow2.org/wws
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Not able to save the forms in xml fromat.

manish_suriya

Thanks Hank. I will try out this.

Manish Suriya
ASE
Tata Consultancy Services
UNIT NO.801, 901 & 1001, A-WING, HIRANANDANI BUSINESS PARK
HIRANANDANI BUILDERS SPECIAL ECONOMIC ZONE,
Mumbai - 400076,Maharashtra
India
Cell:- 09819863849
Mailto: [hidden email]
Website:
http://www.tcs.com
____________________________________________
Experience certainty.        IT Services
                       Business Solutions
                       Outsourcing
____________________________________________



Hank Ratzesberger <[hidden email]>

09/24/2008 10:09 PM

Please respond to
[hidden email]

To
[hidden email]
cc
Subject
[ops-users] Re: Not able to save the forms in xml fromat.





Manish,

I believe in theory what you have should work:

>
>       <xf:submission id="s01" method="put"
>                      action="
file:///C:/temp/ex1order.xml" />
>

but I don't think Orbeon supports this and it may not be
part of the XForms spec.

Instead, you probably have to use the file serializer hooked
up to a service (page-flow.xml entry that refers to an xpl file).
You could POST to the url, and the filename could be parameters.
Then you have the information necessary to use the file
serializer to write to a file.

http://www.orbeon.com/ops/doc/processors-serializers#file-serializer

The URL generator is used in the xpl to evaluate parameters.

http://www.orbeon.com/ops/doc/processors-generators-url

--Hank


On Sep 24, 2008, at 8:34 AM, Manish Suriya wrote:

>
> Hi,
>
> I am a beginner for X forms and orbeons forms. i m try to learn by  
> running some demo applicvations in orbeon forms.
>
> i m usingone l application which captures order data. then i am  
> clciking on save button
>
> i want to save  this form at C:/temp/ex1order.xml. i am using the  
> folloiwng code for it.
>
> i am able to see the application and enetrs the names, age, game  
> etc. when i clicked on SAVE button i am not able to save form in  
> xml format.
>
> i m getting  this error
> ==========================================================
> xforms:submission: submission URL scheme not yet implemented: file
> ==========================================================
>
> Xhtml file.:
> =======================================================
>
> <html xmlns="
http://www.w3.org/1999/xhtml"
>       xmlns:ev="
http://www.w3.org/2001/xml-events"
>       xmlns:xf="
http://www.w3.org/2002/xforms">
>   <head>
>
>     <style type="text/css">
>       h1 {font-size: 12pt }
>       xf|input.itemClass { width:100px }
>       xf|input.custNumClass { width:100px }
>       xf|input.dateClass { width:80px }
>     </style>
>     <title>Enter Order</title>
>
>     <xf:model id="model1">
>
>       <xf:instance>
>         <order xmlns="" itemNum="">
>           <quantity/>
>           <custNum/>
>           <orderDate/>
>         </order>
>       </xf:instance>
>
>       <xf:submission id="s01" method="put"
>                      action="
file:///C:/temp/ex1order.xml" />
>
>
>     </xf:model>
>   </head>
>
>   <body>
>
>     <h1>Enter Order</h1>
>     <p>Enter data for order below.</p>
>
>     <xf:input model="model1" class="itemClass" ref="@itemNum">
>       <xf:label>Item Number</xf:label>
>     </xf:input>
>
>     <xf:input model="model1" ref="quantity">
>       <xf:label>Quantity</xf:label>
>     </xf:input>
>
>     <xf:input model="model1" ref="custNum" class="custNumClass">
>       <xf:label>Customer Number</xf:label>
>     </xf:input>
>
>     <xf:input model="model1" ref="orderDate" class="dateClass">
>       <xf:label>Order Date</xf:label>
>     </xf:input>
>
>     <br />
>
>     <xf:submit submission="s01">
>       <xf:label>Save</xf:label>
>     </xf:submit>
>
>     <p>Click "Save" to store entered order.</p>
>
>   </body>
> </html>
> =================================================
>
> where i m wrong ??
>
> please help me.
>
> thanks in advance.
>
> Manish Suriya
> Mailto: [hidden email]
> Website:
http://www.tcs.com
> ____________________________________________
> Experience certainty.        IT Services
>                        Business Solutions
>                        Outsourcing
> ____________________________________________=====-----=====-----
> ===== Notice: The information contained in this e-mail message and/
> or attachments to it may contain confidential or privileged  
> information. If you are not the intended recipient, any  
> dissemination, use, review, distribution, printing or copying of  
> the information contained in this e-mail message and/or attachments  
> to it are strictly prohibited. If you have received this  
> communication in error, please notify us by reply e-mail or  
> telephone and immediately and permanently delete the message and  
> any attachments. Thank you
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe:
[hidden email]
> For general help:
[hidden email]
> OW2 mailing lists service home page:
http://www.ow2.org/wws

Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042






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

ForwardSourceID:NT00006606    
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Not able to save the forms in xml fromat.

Hank Ratzesberger
In reply to this post by manish_suriya
An example of a pipeline that you post to, with the parameter ?filename=
It uses the xslt pipeline to create the file serializer config.

And....It has not been tested,  just wrote it, as an example of how it
might be done.  Post the fixed/working version if it is not quite right.

HTH,
Hank

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
         xmlns:oxf="http://www.orbeon.com/oxf/processors">

         <p:param name="instance" type="input"/>

         <!-- Get the request paramters -->
         <p:processor name="oxf:request">
                 <p:input name="config">
                         <config>
                                 <include>/request/parameters</include>
                         </config>
                 </p:input>
                 <p:output name="data" id="params"/>
         </p:processor>

         <!-- Convert file -->
         <p:processor name="oxf:xml-converter">
                 <p:input name="config">
                         <content-type>text/xml</content-type>
                         <encoding>utf-8</encoding>
                         <version>1.0</version>
                 </p:input>
                 <p:input name="data" href="#instance"/>
                 <p:output name"data" id="file"/>
         </p:processor>

         <!-- Create the file serializer config -->
         <p:processor name="oxf:-xslt">
           <p:input name="data" href="#params"/>
           <p:input name="config">
             <xsl:stylesheet version="2.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
               xmlns:xs="http://www.w3.org/2001/XMLSchema">

               <xsl:template select="/">
                 <config>
                   <directory>/my/internal/dir</directory>
                   <file><xsl:value-of select="/request/parameters/
parameter[name='filename']/value"></file>
                   <make-directories>false</make-directories>
                   <append>false</append>
                   <cache-control>false</cache-control>
                 </config>
               </xsl:template>
             </xsl:stylesheet>
           </p:input>
           <p:output name="data" id="result"/>
         </p:processor>

         <!-- Write the file -->
         <p:processor name="oxf:file-serializer">
                 <p:input name="config" href="#config"/>
                 <p:input name="data" href="#file"/>
         </p:processor>

</p:config>





> Hi Hank
>
> I have more or less the same problem.
>
> Could you please send us a simple (very very simple) example doing it?
>
> I/us would be very grateful.
>
>  A.
>
>
> Hank Ratzesberger wrote:
>>
>> [snip]
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
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
OW2 mailing lists service home page: http://www.ow2.org/wws