Forms stored and filled with xml data files

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

Forms stored and filled with xml data files

Aseph
Hi.

First of all, I have to said that orbeon is something new to me, so I am going to ask you obvious things.

What i want to is to be able to:
a) fill a form and save the information in a local file (download a file with the forms data)
b) access to the form and upload the file to fill the form and keep working whit it.

I heve copied the files so tell me all my errors too.


After reading Orbeon docs and examples I have done this, using "copy and paste" from axmaples:


***> page-flow.xml

<page id="pg_1" path-info="/frm_xml/frm" view="frm.xhtml" />

----- x -----

***> my xml-form (file called mod_form.xml)

<?xml version="1.0" encoding="UTF-8"?>
<ship>
    <person>
        <name/>
        <age/>
    </person>
    <ticket>
        <price/>
    </ticket>
</ship>

----- x -----

***>  view: frm.xhtml

<html ....
<head>
<xf:model id="mod_FRM">

    <xf:instance id="ins_FRM">
        <xi:include href="mod_form.xml" xi:omit-xml-base="true"/>
    </xf:instance>

    <xf:instance id="ins_FIL">
        <files xmlns="">
            <file filename="" mediatype="" size="" selected="false" />
        </files>
    </xf:instance>

    <xf:bind nodeset="instance('ins_FIL')">
        <xf:bind nodeset="file" type="xs:anyURI"/>
    </xf:bind>

    <xf:submission id="uploadFIL" method="post"
            ref="instance('ins_FIL')" action="/frm_xml/proc_up.xpl"
            replace="instance" instance="ins_FRM"/>

    <xf:submission id="downloadFRM" method="post"
            ref="instance('ins_FRM')" action="/frm_xml/proc_dw.xpl" />

</xf:model>
</head>
<body>
<xf:group ref="instance('ins_FRM')/preson">
    <xf:input ref="name"/>
    <xf:input ref="age"/>
</xf:group>
<xf:group ref="instance('ins_FRM')/ticket">
    <xf:input ref="price"/>
</xf:group>
...
...
<xf:upload ref="instance('ins_FIL')/file" xxforms:size="60">
    <xf:filename ref="@filename"/>
    <xf:mediatype ref="@mediatype"/>
    <xxforms:size ref="@size"/>
</xf:upload>

<xf:submit submission="uploadFIL">
    <xf:label>Upload and read</xf:label>
</xf:submit>

<xf:submit submission="downloadFRM">
    <xf:label>Download and save</xf:label>
</xf:submit>
...
</body></html>

----- x -----

***> actions: proc_up.xpl

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:oxf="http://www.orbeon..com/oxf/processors">

<p:param name="instance" type="input" debug="............ IN ............"/>
<p:param name="data" type="output" debug="............ OUT ............"/>

<p:processor name="oxf:xslt">
    <p:input name="config">
        <config xsl:version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <url><xsl:value-of select="/*"/></url>
            <content-type>text/xml</content-type>
            <force-content-type>true</force-content-type>
            <cache-control>
                <use-local-cache>false</use-local-cache>
            </cache-control>
        </config>
    </p:input>
    <p:input  name="data" href="#instance"/>
    <p:output name="data" id="url-config"/>
</p:processor>


<p:processor name="oxf:url-generator">
    <p:input name="config" href="#url-config"/>
    <p:output name="data" ref="data"/>
</p:processor>

</p:config>

----- x -----

***> action : proc_dw.xpl

I do not know how to do it.

----- x -----



I am lost and I do not know how to resolve this situation, so any example will be welcome.

Thanks for your help,
A.



Unlimited freedom, unlimited storage. Get it now

--
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: Forms stored and filled with xml data files

manish_suriya

Hi ,

first go for simple Hello world example which is well explained in orbeon site.

http://www.orbeon.com/ops/xforms-hello/

and its explaination at.

http://www.orbeon.com/ops/doc/intro-tutorial.

then go for http://www.orbeon.com/ops/forms/  in which they are saving the xforms in eXist database.

You can also visit.

http://www.ibm.com/developerworks/xml/library/x-xformstiplocal/index.html

and


//www.xml.com/pub/a/2003/12/30/xforms.html




Manish Suriya
Mailto: [hidden email]
Website:
http://www.tcs.com
____________________________________________
Experience certainty.        IT Services
                       Business Solutions
                       Outsourcing
____________________________________________



asephian naihpesa <[hidden email]>

09/30/2008 01:33 PM

Please respond to
[hidden email]

To
[hidden email]
cc
Subject
[ops-users] Forms stored and filled with xml data files





Hi.

First of all, I have to said that orbeon is something new to me, so I am going to ask you obvious things.

What i want to is to be able to:
a) fill a form and save the information in a local file (download a file with the forms data)
b) access to the form and upload the file to fill the form and keep working whit it.

I heve copied the files so tell me all my errors too.


After reading Orbeon docs and examples I have done this, using "copy and paste" from axmaples:


***> page-flow.xml

<page id="pg_1" path-info="/frm_xml/frm" view="frm.xhtml" />

----- x -----

***> my xml-form (file called mod_form.xml)

<?xml version="1.0" encoding="UTF-8"?>
<ship>
   <person>
       <name/>
       <age/>
   </person>
   <ticket>
       <price/>
   </ticket>
</ship>

----- x -----

***>  view: frm.xhtml

<html ....
<head>
<xf:model id="mod_FRM">

   <xf:instance id="ins_FRM">
       <xi:include href="mod_form.xml" xi:omit-xml-base="true"/>
   </xf:instance>

   <xf:instance id="ins_FIL">
       <files xmlns="">
           <file filename="" mediatype="" size="" selected="false" />
       </files>
   </xf:instance>

   <xf:bind nodeset="instance('ins_FIL')">
       <xf:bind nodeset="file" type="xs:anyURI"/>
   </xf:bind>

   <xf:submission id="uploadFIL" method="post"
           ref="instance('ins_FIL')" action="/frm_xml/proc_up.xpl"
           replace="instance" instance="ins_FRM"/>

   <xf:submission id="downloadFRM" method="post"
           ref="instance('ins_FRM')" action="/frm_xml/proc_dw.xpl" />

</xf:model>
</head>
<body>
<xf:group ref="instance('ins_FRM')/preson">
   <xf:input ref="name"/>
   <xf:input ref="age"/>
</xf:group>
<xf:group ref="instance('ins_FRM')/ticket">
   <xf:input ref="price"/>
</xf:group>
...
...
<xf:upload ref="instance('ins_FIL')/file" xxforms:size="60">
   <xf:filename ref="@filename"/>
   <xf:mediatype ref="@mediatype"/>
   <xxforms:size ref="@size"/>
</xf:upload>

<xf:submit submission="uploadFIL">
   <xf:label>Upload and read</xf:label>
</xf:submit>

<xf:submit submission="downloadFRM">
   <xf:label>Download and save</xf:label>
</xf:submit>
...
</body></html>

----- x -----

***> actions: proc_up.xpl

<p:config xmlns:p="
http://www.orbeon.com/oxf/pipeline"
       xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
       xmlns:xs="
http://www.w3.org/2001/XMLSchema"
       xmlns:oxf="
http://www.orbeon..com/oxf/processors">

<p:param name="instance" type="input" debug="............ IN ............"/>
<p:param name="data" type="output" debug="............ OUT ............"/>

<p:processor name="oxf:xslt">
   <p:input name="config">
       <config xsl:version="2.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
           <url><xsl:value-of select="/*"/></url>
           <content-type>text/xml</content-type>
           <force-content-type>true</force-content-type>
           <cache-control>
               <use-local-cache>false</use-local-cache>
           </cache-control>
       </config>
   </p:input>
   <p:input  name="data" href="#instance"/>
   <p:output name="data" id="url-config"/>
</p:processor>


<p:processor name="oxf:url-generator">
   <p:input name="config" href="#url-config"/>
   <p:output name="data" ref="data"/>
</p:processor>

</p:config>

----- x -----

***> action : proc_dw.xpl

I do not know how to do it.

----- x -----



I am lost and I do not know how to resolve this situation, so any example will be welcome.

Thanks for your help,
A.



Unlimited freedom, unlimited storage. Get it now
--
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:NT00007086    
=====-----=====-----=====
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
|

xxforms:choose or xxforms:if

Frank Feng
Hi all,
 
I've experienced a problem with xxforms:choose / xxforms:if, the orbeon engine simply said "Invalid element in XForms document: xxforms:choose". But it seems being supported by Orbeon. Any suggestions?
 
Thanks. Frank
 
 
The model:
----------------------
...

<vra:location type="">
    <vra:name type="geographic"/>
    <vra:name type=""/>
    <vra:refid type="accession"/>
</vra:location>

...

The xform:
------------------------
...

<xforms:repeat nodeset="vra:name" id="work_location_name-repeat">
    <xxforms:choose>
         <xxforms:when test="position()=1">
 
            <p class="vra-content">
            <xforms:input ref=".">
                <xforms:label class="vra-label">Location (geo...)</xforms:label>
                <xforms:help>
Geographic location, e.g. Paris,London</xforms:help>
            </xforms:input>
            </p>
        </xxforms:when>
        <xxforms:otherwise>
            <p class="vra-content">
            <xforms:input ref=".">
                <xforms:label class="vra-label">Location (repo...)</xforms:label>
                <xforms:help>
Repository or owner (e.g. Musee du Louvre)</xforms:help>
            </xforms:input>
            </p>
            <p class="vra-content">
                <xforms:select1 ref="@type[position()=last()]" appearance="full">
                    <xforms:label class="vra-label">Type</xforms:label>
                    <xforms:help>Location Type</xforms:help>
                    <xforms:itemset nodeset="instance('data-dict')/work/location/name/types/type">
                        <xforms:label ref="@label"/>
                        <xforms:value ref="@value"/>
                    </xforms:itemset>
                </xforms:select1>
            </p>
        </xxforms:otherwise>
    </xxforms:choose>
</xforms:repeat>

...

 

 
 


--
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: Forms stored and filled with xml data files

Aseph
In reply to this post by manish_suriya
Hi,

Thanks for the examples.but I think I have not explain very well my problem.


First: I have my form by I do not know how to serialize it througth a xpl process and for save the data into a XML file at user/client computer.

Second: I do not know how to read the information send by an upload component to read the xml file uploaded, take the data and fill the empty form.

Reading the examples that you have told me, I see exmaple to work with local files:

--- EXAMPLES ---
<xf:submission id="readFRM" method="get"
action="file:///c:/data.xml" replace="instance" instance="ins_FRM" />

<xf:submission id="saveFRM" method="put"
action="file:///c:/data.xml" replace="instance" instance="ins_FRM" />
--- EXAMPLES ---


What I try is to load the file which I select in the upload component. (Selecting one and trying to do something like next the lines does not work.

<xf:submission id="readFRM" method="get"
action="instance('ins_FIL_COMP')/file/@filename" replace="instance" instance="ins_FRM"/>


I hope my explanation make easier to understand the problem.





--- On Tue, 30/9/08, Manish Suriya <[hidden email]> wrote:
From: Manish Suriya <[hidden email]>
Subject: [ops-users] Re: Forms stored and filled with xml data files
To: ops-users@ow2..org
Date: Tuesday, 30 September, 2008, 2:16 PM


Hi ,

first go for simple Hello world example which is well explained in orbeon site.

http://www.orbeon.com/ops/xforms-hello/

and its explaination at.

http://www.orbeon..com/ops/doc/intro-tutorial..

then go for http://www.orbeon.com/ops/forms/  in which they are saving the xforms in eXist database.

You can also visit.

http://www.ibm.com/developerworks/xml/library/x-xformstiplocal/index.html

and


//www.xml.com/pub/a/2003/12/30/xforms.html




Manish Suriya
Mailto: [hidden email]
Website:
http://www.tcs.com
____________________________________________
Experience certainty.        IT Services
                       Business Solutions
                       Outsourcing
____________________________________________



asephian naihpesa <[hidden email]>

09/30/2008 01:33 PM

Please respond to
[hidden email]

To
[hidden email]
cc

Subject
[ops-users] Forms stored and filled with xml data files







Hi.

First of all, I have to said that orbeon is something new to me, so I am going to ask you obvious things.

What i want to is to be able to:
a) fill a form and save the information in a local file (download a file with the forms data)
b) access to the form and upload the file to fill the form and keep working whit it.

I heve copied the files so tell me all my errors too.


After reading Orbeon docs and examples I have done this, using "copy and paste" from axmaples:


***> page-flow.xml

<page id="pg_1" path-info="/frm_xml/frm" view="frm.xhtml" />

----- x -----

***> my xml-form (file called mod_form.xml)

<?xml version="1.0" encoding="UTF-8"?>
<ship>
   <person>
       <name/>
       <age/>
   </person>
   <ticket>
       <price/>
   </ticket>
</ship>

----- x -----

***>  view: frm.xhtml

<html ....
<head>
<xf:model id="mod_FRM">

   <xf:instance id="ins_FRM">
       <xi:include href="mod_form.xml" xi:omit-xml-base="true"/>
   </xf:instance>

   <xf:instance id="ins_FIL">
       <files xmlns="">
           <file filename="" mediatype="" size="" selected="false" />
       </files>
   </xf:instance>

   <xf:bind nodeset="instance('ins_FIL')">
       <xf:bind nodeset="file" type="xs:anyURI"/>
   </xf:bind>

   <xf:submission id="uploadFIL" method="post"
           ref="instance('ins_FIL')" action="/frm_xml/proc_up.xpl"
           replace="instance" instance="ins_FRM"/>

   <xf:submission id="downloadFRM" method="post"
           ref="instance('ins_FRM')" action="/frm_xml/proc_dw.xpl" />

</xf:model>
</head>
<body>
<xf:group ref="instance('ins_FRM')/preson">
   <xf:input ref="name"/>
   <xf:input ref="age"/>
</xf:group>
<xf:group ref="instance('ins_FRM')/ticket">
   <xf:input ref="price"/>
</xf:group>
....
....
<xf:upload ref="instance('ins_FIL')/file" xxforms:size="60">
   <xf:filename ref="@filename"/>
   <xf:mediatype ref="@mediatype"/>
   <xxforms:size ref="@size"/>
</xf:upload>

<xf:submit submission="uploadFIL">
   <xf:label>Upload and read</xf:label>
</xf:submit>

<xf:submit submission="downloadFRM">
   <xf:label>Download and save</xf:label>
</xf:submit>
....
</body></html>

----- x -----

***> actions: proc_up.xpl

<p:config xmlns:p="
http://www.orbeon.com/oxf/pipeline"
       xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
       xmlns:xs="
http://www.w3.org/2001/XMLSchema"
       xmlns:oxf="
http://www.orbeon..com/oxf/processors">

<p:param name="instance" type="input" debug="............ IN ............"/>
<p:param name="data" type="output" debug="............ OUT ............"/>

<p:processor name="oxf:xslt">
   <p:input name="config">
       <config xsl:version="2.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
           <url><xsl:value-of select="/*"/></url>
           <content-type>text/xml</content-type>
           <force-content-type>true</force-content-type>
           <cache-control>
               <use-local-cache>false</use-local-cache>
           </cache-control>
       </config>
   </p:input>
   <p:input  name="data" href="#instance"/>
   <p:output name="data" id="url-config"/>
</p:processor>


<p:processor name="oxf:url-generator">
   <p:input name="config" href="#url-config"/>
   <p:output name="data" ref="data"/>
</p:processor>

</p:config>

----- x -----

***> action : proc_dw.xpl

I do not know how to do it.

----- x -----



I am lost and I do not know how to resolve this situation, so any example will be welcome.

Thanks for your help,
A.



Unlimited freedom, unlimited storage. Get it now
--
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:NT00007086    
=====-----=====-----=====
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


Add more friends to your messenger and enjoy! Invite them now.

--
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: Re: Forms stored and filled with xml data files

Alessandro Vernet
Administrator
On Tue, Sep 30, 2008 at 8:42 AM, asephian <[hidden email]> wrote:
> Thanks for the examples.but I think I have not explain very well my problem.
>
>
> First: I have my form by I do not know how to serialize it througth a xpl
> process and for save the data into a XML file at user/client computer.
>
> Second: I do not know how to read the information send by an upload
> component to read the xml file uploaded, take the data and fill the empty
> form.

Form Runner does all this for you. Have you considered using Form
Runner? You can enable the save-locally button by changing the
oxf.fr.detail.buttons property. See
http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties#TOC-Buttons-on-Detail-Page.

Form Runner does something that is more user friendly that just sending
the XML data to the user: it creates an HTML file with a form that
contains the form data in a hidden input field. When users open the HTML
they have saved locally and submit the form, they are taken back to the
page on which they were editing the data.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
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