xforms:submission and eXist collection path

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

xforms:submission and eXist collection path

Florent Georges-3
  Hi

  With a freshly installed Orbeon Forms, I tsted the
following XHTML page:

    <head>
       <title>submission test</title>
       <xf:model>
          <xf:instance xmlns="">
             <root/>
          </xf:instance>
          <xf:submission id="save" ref="/root" method="put"
                         action="/exist/rest/db/test/bug.xml"/>
       </xf:model>
    </head>
    <body>
       <p>
          <xf:input ref="/root">
             <xf:label>value:</xf:label>
          </xf:input>
          <xf:submit submission="save">
             <xf:label>save</xf:label>
          </xf:submit>
       </p>
    </body>

  When I press the "save" button, the element "root" is
saved in the embedded eXist database under:

    exist:/db/exist/rest/db/test/bug.xml

but I would have expected instead:

    exist:/db/test/bug.xml

  Is it normal?  Did I do something wrong with my
xf:submission element?

  Regards,

--drkm



















      _____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr



--
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: xforms:submission and eXist collection path

Erik Bruchez
Administrator
I would expect the same as you ;-)

What's the URL of the page you are requesting? The @action URL is  
resolved against that.

-Erik

On Feb 27, 2008, at 4:45 AM, Florent Georges wrote:

>  Hi
>
>  With a freshly installed Orbeon Forms, I tsted the
> following XHTML page:
>
>    <head>
>       <title>submission test</title>
>       <xf:model>
>          <xf:instance xmlns="">
>             <root/>
>          </xf:instance>
>          <xf:submission id="save" ref="/root" method="put"
>                         action="/exist/rest/db/test/bug.xml"/>
>       </xf:model>
>    </head>
>    <body>
>       <p>
>          <xf:input ref="/root">
>             <xf:label>value:</xf:label>
>          </xf:input>
>          <xf:submit submission="save">
>             <xf:label>save</xf:label>
>          </xf:submit>
>       </p>
>    </body>
>
>  When I press the "save" button, the element "root" is
> saved in the embedded eXist database under:
>
>    exist:/db/exist/rest/db/test/bug.xml
>
> but I would have expected instead:
>
>    exist:/db/test/bug.xml
>
>  Is it normal?  Did I do something wrong with my
> xf:submission element?
>
>  Regards,
>
> --drkm
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>      
> _____________________________________________________________________________
> Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers  
> Yahoo! Mail http://mail.yahoo.fr
>
>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: xforms:submission and eXist collection path

Florent Georges-3
Erik Bruchez wrote:

  Hi Erik,

> I would expect the same as you ;-)

  Ok thanks, I feel better ;-)

> What's the URL of the page you are requesting? The @action
> URL is resolved against that.

  This is a local instance on a development machine:

    http://localhost:48080/orbeon/vcard/bug

  If I import the sample documents in the Form application
sample from Orbeon (via the button in the form), the
documents are put in the right collection.  Because the
@action is absolute (it begins with '/') I guess they should
resolve the same way.

  Maybe this is related to my epilogue file.  The file
page-flow.xpl is:

    <config xmlns="http://www.orbeon.com/oxf/controller">
       <files path-info="*.css"/>
       <page path-info="/vcard/bug" view="bug.xhtml"/>
       <page path-info="*"          view="view.xhtml"/>
       <epilogue url="fgeorges-epilogue.xpl"/>
    </config>

  fgeorges-epilogue.xpl is a simplified version of the
Orbeon's epilogue file (I paste it at the end of the email,
I don't know if attachments are accepted on the list).

  Thanks for your help.  Regards,

--drkm


fgeorges-epilogue.xpl:

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          xmlns:fo="http://www.w3.org/1999/XSL/Format"
          xmlns:xhtml="http://www.w3.org/1999/xhtml"
          xmlns:oxf="http://www.orbeon.com/oxf/processors"
          xmlns:xforms="http://www.w3.org/2002/xforms"
          xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">

   <!-- The document produced by the page view -->
   <p:param type="input" name="data"/>
   <!-- The document produced by the page model -->
   <p:param type="input" name="model-data"/>
   <!-- The XML submission if any -->
   <p:param type="input" name="instance"/>
   <!-- The legacy XForms model as produced by the PFC's page/@xforms
        attribute if any -->
   <p:param type="input" name="xforms-model"/>

   <!-- Run the XForms epilogue -->
   <p:processor name="oxf:pipeline">
      <p:input name="config" href="/ops/pfc/xforms-epilogue.xpl"/>
      <p:input name="data" href="#data"/>
      <p:input name="model-data" href="#model-data"/>
      <p:input name="instance" href="#instance"/>
      <p:input name="xforms-model" href="#xforms-model"/>
      <p:output name="xformed-data" id="xformed-data"/>
   </p:processor>

   <!-- Applying theme -->
   <p:processor name="oxf:unsafe-xslt">
      <p:input name="data" href="#xformed-data"/>
      <!--p:input name="request" href="#request"/-->
      <p:input name="config" href="theme.xsl"/>
      <p:output name="data" id="themed-data"/>
   </p:processor>

   <!-- Rewrite all URLs in XHTML documents -->
   <p:processor name="oxf:xhtml-rewrite">
      <p:input name="rewrite-in" href="#themed-data"/>
      <p:output name="rewrite-out" id="rewritten-data"/>
   </p:processor>

   <p:processor name="oxf:xml-converter">
      <p:input name="config">
         <config>
            <method>xhtml</method>
            <public-doctype>-//W3C//DTD XHTML 1.0
Transitional//EN</public-doctype>
           
<system-doctype>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</system-doctype>
            <encoding>utf-8</encoding>
            <content-type>application/xhtml+xml</content-type>
            <indent>false</indent>
            <indent-amount>0</indent-amount>
         </config>
      </p:input>
      <p:input name="data" href="#rewritten-data"/>
      <p:output name="data" id="converted"/>
   </p:processor>

   <!-- Serialize to HTTP -->
   <p:processor name="oxf:http-serializer">
      <p:input name="config">
         <config>
            <header>
               <name>Cache-Control</name>
               <value>post-check=0, pre-check=0</value>
            </header>
            <!-- NOTE: converter specifies text/html content-type -->
         </config>
      </p:input>
      <p:input name="data" href="#converted"/>
   </p:processor>

</p:config>




















      _____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr



--
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: xforms:submission and eXist collection path

Alessandro Vernet
Administrator
On Wed, Feb 27, 2008 at 6:20 PM, Florent Georges <[hidden email]> wrote:
>   If I import the sample documents in the Form application
>  sample from Orbeon (via the button in the form), the
>  documents are put in the right collection.  Because the
>  @action is absolute (it begins with '/') I guess they should
>  resolve the same way.
>
>   Maybe this is related to my epilogue file.  The file
>  page-flow.xpl is: [...]

Would it work if you use the default epilogue? If it works with the
default epilogue, then you know this is a problem with the one you are
using. Otherwise, you are one step closer to being able to create a
file that runs in the sandbox and that reproduces this :).

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/


--
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: Re: xforms:submission and eXist collection path

Florent Georges-3
Alessandro Vernet wrote:

> On Wed, Feb 27, 2008 at 6:20 PM, Florent Georges wrote:

> >   Maybe this is related to my epilogue file.  The file
> >  page-flow.xpl is: [...]

> Would it work if you use the default epilogue?

  Yes.

> If it works with the default epilogue, then you know this
> is a problem with the one you are using. Otherwise, you
> are one step closer to being able to create a file that
> runs in the sandbox and that reproduces this :).

  I went to the XForms Sandbox on my local Orbeon instance
and run the following file (in Upload Local File):

    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:xf="http://www.w3.org/2002/xforms">

       <head>
          <title>submission test</title>
          <xf:model>
             <xf:instance xmlns="">
                <root/>
             </xf:instance>
             <xf:submission id="save" ref="/root" method="put"
                            action="/exist/rest/db/test/bug.xml"/>
          </xf:model>
       </head>

       <body>
          <p>
             <xf:input ref="/root">
                <xf:label>value:</xf:label>
             </xf:input>
             <xf:submit submission="save">
                <xf:label>save</xf:label>
             </xf:submit>
          </p>
       </body>

    </html>

  The problem remains the same (that is, the result is saved
in eXist in the collection /db/exist/rest/db/test/ instead
of the expected /db/test/.)

  I don't know if this is possible to try it directly in the
Orbeon's website (to see if this is related to my instance),
especially how to check then where the result is saved (I am
using here the eXist Admin Client.)

  Thank you for the help.  Regards,

--drkm



















      _____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr



--
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: xforms:submission and eXist collection path

Florent Georges-3
Florent Georges wrote:

>   I don't know if this is possible to try it directly in the
> Orbeon's website (to see if this is related to my instance),
> especially how to check then where the result is saved

  Sorry, I spoke to quickly.  I've tested it into the XForms Sandox on
the Orbeon Server instance at http://www.orbeon.com/ops/, and the
problem is the same.

  Regards,

--drkm





















      _____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr



--
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: xforms:submission and eXist collection path

Erik Bruchez
Administrator
Florent,

Try disabling local submission in properties.xml:

<property as="xs:boolean" name="oxf.xforms.optimize-local-submission"  
value="false"/>

If you still have an issue, please enable XForms logging and send the  
results:

http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-logging

-Erik

On Mar 2, 2008, at 3:20 PM, Florent Georges wrote:

> Florent Georges wrote:
>
>>  I don't know if this is possible to try it directly in the
>> Orbeon's website (to see if this is related to my instance),
>> especially how to check then where the result is saved
>
>  Sorry, I spoke to quickly.  I've tested it into the XForms Sandox on
> the Orbeon Server instance at http://www.orbeon.com/ops/, and the
> problem is the same.
>
>  Regards,
>
> --drkm
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: xforms:submission and eXist collection path

Florent Georges-3
Erik Bruchez wrote:

> Try disabling local submission in properties.xml:

> <property as="xs:boolean" name="oxf.xforms.optimize-local-submission"
> value="false"/>

  Yes, that solved the issue.  Thanks a lot!  Do you want me to fill in
a bug report with the test case I've sent?

  Regards,

--drkm




















      _____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr



--
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: Re: xforms:submission and eXist collection path

Erik Bruchez
Administrator
Florent,

I have just entered a bug:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=308760&group_id=168&atid=350207

-Erik

On Mar 3, 2008, at 5:09 PM, Florent Georges wrote:

> Erik Bruchez wrote:
>
>> Try disabling local submission in properties.xml:
>
>> <property as="xs:boolean" name="oxf.xforms.optimize-local-submission"
>> value="false"/>
>
>  Yes, that solved the issue.  Thanks a lot!  Do you want me to fill in
> a bug report with the test case I've sent?
>
>  Regards,
>
> --drkm
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
OW2 mailing lists service home page: http://www.ow2.org/wws