Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

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

Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Eric van der Vlist
I have added a <xforms:trigger> to the application I am developing and I
get the following error:

Processing terminated by xsl:message at line 144 in
oxf:/config/xforms-to-xhtml.xsl

Looking at that line, I see:

  <xsl:template match="xforms:trigger">
        <!-- TODO -->
        <xsl:message terminate="yes">Trigger control is not supported</xsl:message>
    </xsl:template>

OTH, the examples seem to use xforms:trigger!

Is it supported in OPS 3.0 beta 3 or not? If not, is it supported in the
nightly build?

Thanks,

Eric
--
Le premier annuaire des apiculteurs 100% XML!
                                                http://apiculteurs.info/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Erik Bruchez
Administrator
Eric,

I notice in your other email that you are using an "xforms" attribute on
your <page> element in your page flow. This triggers the use of the
legacy XForms engine, which is compatible with the Orbeon
PresentationServer 2.8 XForms engine. If you want to use the new XForms
engine, do not use that attribute: simply put your XForms models under
your <xhtml:head> element in your page view.

This by the way will go through an execution path which does not use the
legacy xforms-to-xhtml.xsl stylesheet.

<xforms:trigger> has been supported since the first OPS 3.0 beta, but
you may still want to use a more recent nightly build to get more bug
fixes and features.

-Erik

Eric van der Vlist wrote:

> I have added a <xforms:trigger> to the application I am developing and I
> get the following error:
>
> Processing terminated by xsl:message at line 144 in
> oxf:/config/xforms-to-xhtml.xsl
>
> Looking at that line, I see:
>
>   <xsl:template match="xforms:trigger">
>         <!-- TODO -->
>         <xsl:message terminate="yes">Trigger control is not supported</xsl:message>
>     </xsl:template>
>
> OTH, the examples seem to use xforms:trigger!
>
> Is it supported in OPS 3.0 beta 3 or not? If not, is it supported in the
> nightly build?
>
> Thanks,
>
> Eric


--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Eric van der Vlist
Erik,

Le lundi 07 novembre 2005 à 17:01 +0100, Erik Bruchez a écrit :
> Eric,
>
> I notice in your other email that you are using an "xforms" attribute on
> your <page> element in your page flow. This triggers the use of the
> legacy XForms engine, which is compatible with the Orbeon
> PresentationServer 2.8 XForms engine. If you want to use the new XForms
> engine, do not use that attribute: simply put your XForms models under
> your <xhtml:head> element in your page view.

Arg! I had read that but failed to put it into practice :-( ...

I am probably still missing something but...

I have now a page without xforms attribute:

<page id="home" path-info="/foo/(.*)" matcher="oxf:perl5-matcher"
model="index.xpl" view="directory.xsl">

index.xpl tests the xforms instance to send to the data output either an
empty document or the output of the directory scanner.

directory.xsl declares a xforms in its xhtml:head:

               <xforms:model>
                    <xforms:instance>
                        <form xmlns="">
                            <path/>
                        </form>
                    </xforms:instance>
                    <xforms:submission id="go" method="post" action="/foo/"/>
                </xforms:model>


And simple xforms controls including:

                           <xforms:input ref="/form/path"/>
                            <xforms:submit submission="go">
                                <xforms:label>Submit</xforms:label>
                            </xforms:submit>

and

            <xforms:trigger xxforms:appearance="link">
                <xforms:label>
                    <xsl:value-of select="@name"/>
                </xforms:label>
                <xforms:action ev:event="DOMActivate">
                    <xforms:setvalue ref="/form/path"><xsl:value-of select="$path"/>/<xsl:value-of
                            select="@name"/></xforms:setvalue>
                    <xforms:send submission="go"/>
                </xforms:action>
            </xforms:trigger>

This is working except that the XForms engine seems to be ignoring the
address I provide in my xforms:submission action attribute and sends me
to a /xforms-server-submit address that doesn't seem to be declared
anywhere but that is still serving my document.

Also, when I try to add a <setvalue ref="/form/path" matcher-group="1"/>
in the description of my page, I am still forwarded to this magic
address, but the instance seems to be always empty.

Last thing, the  <xforms:trigger xxforms:appearance="link"> doesn't seem
to be implemented and the trigger is rendered as a button.

How can I get:
      * the instance served at /foo/ ?
      * <setvalue ref="/form/path" matcher-group="1"/> working?
      * xforms:trigger xxforms:appearance="link" rendered as a link?

Thanks,

Eric

--
Le premier annuaire des apiculteurs 100% XML!
                                                http://apiculteurs.info/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Eric van der Vlist
Le lundi 07 novembre 2005 à 22:23 +0100, Eric van der Vlist a écrit :

>
> How can I get:
>       * the instance served at /foo/ ?
>       * <setvalue ref="/form/path" matcher-group="1"/> working?
>       * xforms:trigger xxforms:appearance="link" rendered as a link?

Looking at the source code (ops/pfc/xforms-to-ajax-xhtml.xsl), I have
solved this third bullet point by replacing my trigger by
<xforms:trigger appearance="xxforms:link">...

I am still trying to find a solution for the first two :-) ...

Thanks,

Eric
--
Freelance consulting and training.
                                            http://dyomedea.com/english/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Erik Bruchez
Administrator
In reply to this post by Eric van der Vlist
Eric van der Vlist wrote:

 > Arg! I had read that but failed to put it into practice :-( ...
 >
 > I am probably still missing something but...
 >
 > I have now a page without xforms attribute:
 >
 > <page id="home" path-info="/foo/(.*)" matcher="oxf:perl5-matcher"
 > model="index.xpl" view="directory.xsl">
 >
 > index.xpl tests the xforms instance to send to the data output either an
 > empty document or the output of the directory scanner.
 >
 > directory.xsl declares a xforms in its xhtml:head:
 >
 >                <xforms:model>
 >                     <xforms:instance>
 >                         <form xmlns="">
 >                             <path/>
 >                         </form>
 >                     </xforms:instance>
 >                     <xforms:submission id="go" method="post"
action="/foo/"/>
 >                 </xforms:model>
 >
 >
 > And simple xforms controls including:
 >
 >                            <xforms:input ref="/form/path"/>
 >                             <xforms:submit submission="go">
 >                                 <xforms:label>Submit</xforms:label>
 >                             </xforms:submit>
 >
 > and
 >
 >             <xforms:trigger xxforms:appearance="link">
 >                 <xforms:label>
 >                     <xsl:value-of select="@name"/>
 >                 </xforms:label>
 >                 <xforms:action ev:event="DOMActivate">
 >                     <xforms:setvalue ref="/form/path"><xsl:value-of
select="$path"/>/<xsl:value-of
 >                             select="@name"/></xforms:setvalue>
 >                     <xforms:send submission="go"/>
 >                 </xforms:action>
 >             </xforms:trigger>
 >
 > This is working except that the XForms engine seems to be ignoring the
 > address I provide in my xforms:submission action attribute and sends me
 > to a /xforms-server-submit address that doesn't seem to be declared
 > anywhere but that is still serving my document.
 >
 > Also, when I try to add a <setvalue ref="/form/path" matcher-group="1"/>
 > in the description of my page, I am still forwarded to this magic
 > address, but the instance seems to be always empty.
 >
 > Last thing, the  <xforms:trigger xxforms:appearance="link"> doesn't seem
 > to be implemented and the trigger is rendered as a button.
 >
 > How can I get:
 >       * the instance served at /foo/ ?

The POST is currently actually performed by the XForm server. So your
URL bar is going to show the URL of the XForms server, which then only
should actually POST to /foo/. In the logs, you should be able to see
whether the POST actually works, and whether a request is done to
/foo/.

 >       * <setvalue ref="/form/path" matcher-group="1"/> working?

So let's just see:

You post something like:

<form>
   <path>blah</path>
</form>

to /foo/.

This mean that the value for the first regular expression group is the
empty string, and it's going to override the current value of
/form/path. So you get:

<form>
   <path/>
</form>

 >       * xforms:trigger xxforms:appearance="link" rendered as a link?

You figured that one out :-) We are using a regular "appearance"
attribute now. It looks like othet XForms engines are using
appearance="minimal" to get there, so we may change that again.

-Erik




--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Eric van der Vlist
Le lundi 07 novembre 2005 à 23:19 +0100, Erik Bruchez a écrit :

> Eric van der Vlist wrote:
>
>  > How can I get:
>  >       * the instance served at /foo/ ?
>
> The POST is currently actually performed by the XForm server. So your
> URL bar is going to show the URL of the XForms server, which then only
> should actually POST to /foo/. In the logs, you should be able to see
> whether the POST actually works, and whether a request is done to
> /foo/.
>
>  >       * <setvalue ref="/form/path" matcher-group="1"/> working?
>
> So let's just see:
>
> You post something like:
>
> <form>
>    <path>blah</path>
> </form>
>
> to /foo/.
>
> This mean that the value for the first regular expression group is the
> empty string, and it's going to override the current value of
> /form/path. So you get:
>
> <form>
>    <path/>
> </form>
Hmmm... I am still confused :-) !

What I'd like is to get the same behavior that I used a lot with OPS
2.8:

A GET to /foo/blah is treated like the submission of the instance

<form>
   <path>blah</path>
</form>

to /foo/

and vice versa, when a XForms submission is sent to /foo/ with the
instance

<form>
   <path>blah</path>
</form>

the URL that shows up in the browser is /foo/blah.

When you can use that, I think that this is the basis of REST friendly
web applications that give stable URIs with a minimal amount of query
strings...

How can I achieve that with 3.0?

Thanks,

Eric
--
If you have a XML document, you have its schema.
                                                  http://examplotron.org
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Erik Bruchez
Administrator
Eric van der Vlist wrote:

 > Hmmm... I am still confused :-) !

Understandable ;-)

 > What I'd like is to get the same behavior that I used a lot with OPS
 > 2.8:
 >
 > A GET to /foo/blah is treated like the submission of the instance
 >
 > <form>
 >    <path>blah</path>
 > </form>
 >
 > to /foo/

This being done with <setvalue> in the PFC. as you know. But in this
case, you must use the "default-submission" attribute on the page to
provide an empty XML document into which <setvalue> will operate.

 > and vice versa, when a XForms submission is sent to /foo/ with the
 > instance
 >
 > <form>
 >    <path>blah</path>
 > </form>
 >
 > the URL that shows up in the browser is /foo/blah.

To do this, you must get your browser to change its location to
/foo/blah, right?

Unfortunately, an XForms submission doesn't allow you to do that (at
least, not without an extension). By using the "get" method, you will,
as per the spec, get something like /foo/?path=blah, which is
REST-friendly, but not the format you want.

However, you can do this with <xforms:load ref="..."/>.

This will actually cause the browser to change its location to a path
which comes from a value stored into an XForms instance, which means
you can generate it dynamically. Check out the "Relative Paths / Load
Action" section here for the details:

   http://www.orbeon.com/ops/doc/reference-xforms-ng

(Sorry, I realize there is no good anchor there.)

A side note: we do not optimize xforms:load much right now,
i.e. transform it into an actual HTML <a> element whenever
possible. For now, the browser location is changed with
Javascript. But we have an RFE for this:

http://forge.objectweb.org/tracker/?func=detail&atid=350210&aid=304205&group_id=168

 > When you can use that, I think that this is the basis of REST friendly
 > web applications that give stable URIs with a minimal amount of query
 > strings...
 >
 > How can I achieve that with 3.0?

I think the above does the trick! The Blog example uses these
techniques for the exact same reason, i.e. to provide a nice
REST-based interface.

-Erik




--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Eric van der Vlist
Le lundi 07 novembre 2005 à 23:55 +0100, Erik Bruchez a écrit :

.../...

> Unfortunately, an XForms submission doesn't allow you to do that (at
> least, not without an extension). By using the "get" method, you will,
> as per the spec, get something like /foo/?path=blah, which is
> REST-friendly, but not the format you want.
>
> However, you can do this with <xforms:load ref="..."/>.
>
> This will actually cause the browser to change its location to a path
> which comes from a value stored into an XForms instance, which means
> you can generate it dynamically. Check out the "Relative Paths / Load
> Action" section here for the details:
>
>    http://www.orbeon.com/ops/doc/reference-xforms-ng
I had missed this must read document that isn't indexed from the front
page !

> (Sorry, I realize there is no good anchor there.)
>
> A side note: we do not optimize xforms:load much right now,
> i.e. transform it into an actual HTML <a> element whenever
> possible. For now, the browser location is changed with
> Javascript. But we have an RFE for this:
>
> http://forge.objectweb.org/tracker/?func=detail&atid=350210&aid=304205&group_id=168

Yes, that seems to be most needed, otherwise search engines wouldn't
index a site that uses this technique...

>  > When you can use that, I think that this is the basis of REST friendly
>  > web applications that give stable URIs with a minimal amount of query
>  > strings...
>  >
>  > How can I achieve that with 3.0?
>
> I think the above does the trick! The Blog example uses these
> techniques for the exact same reason, i.e. to provide a nice
> REST-based interface.

Hmmm... I have tried:

<xforms:input ref="/form/path"/>
<xforms:trigger>
   <xforms:label>Go!</xforms:label>
   <xforms:load ref="/form/path" ev:event="DOMActivate"/>
</xforms:trigger>

Expecting to be redirected to the URL entered in the input box when I
press the "Go!' button but nothing happens when I press the button.

What am I still missing?

Thanks,

Eric

--
Le premier annuaire des apiculteurs 100% XML!
                                                http://apiculteurs.info/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Erik Bruchez
Administrator
Eric van der Vlist wrote:

> Le lundi 07 novembre 2005 ? 23:55 +0100, Erik Bruchez a ?crit :
>
> .../...
>
>
>>Unfortunately, an XForms submission doesn't allow you to do that (at
>>least, not without an extension). By using the "get" method, you will,
>>as per the spec, get something like /foo/?path=blah, which is
>>REST-friendly, but not the format you want.
>>
>>However, you can do this with <xforms:load ref="..."/>.
>>
>>This will actually cause the browser to change its location to a path
>>which comes from a value stored into an XForms instance, which means
>>you can generate it dynamically. Check out the "Relative Paths / Load
>>Action" section here for the details:
>>
>>   http://www.orbeon.com/ops/doc/reference-xforms-ng
>
>
> I had missed this must read document that isn't indexed from the front
> page !
>
>
>>(Sorry, I realize there is no good anchor there.)
>>
>>A side note: we do not optimize xforms:load much right now,
>>i.e. transform it into an actual HTML <a> element whenever
>>possible. For now, the browser location is changed with
>>Javascript. But we have an RFE for this:
>>
>>http://forge.objectweb.org/tracker/?func=detail&atid=350210&aid=304205&group_id=168
>
>
> Yes, that seems to be most needed, otherwise search engines wouldn't
> index a site that uses this technique...
>
>
>> > When you can use that, I think that this is the basis of REST friendly
>> > web applications that give stable URIs with a minimal amount of query
>> > strings...
>> >
>> > How can I achieve that with 3.0?
>>
>>I think the above does the trick! The Blog example uses these
>>techniques for the exact same reason, i.e. to provide a nice
>>REST-based interface.
>
>
> Hmmm... I have tried:
>
> <xforms:input ref="/form/path"/>
> <xforms:trigger>
>    <xforms:label>Go!</xforms:label>
>    <xforms:load ref="/form/path" ev:event="DOMActivate"/>
> </xforms:trigger>
>
> Expecting to be redirected to the URL entered in the input box when I
> press the "Go!' button but nothing happens when I press the button.
>
> What am I still missing?
I tried your example above, and it works for me. You are using a recent
nightly build, right? Support for xforms:load was added after beta 3.

-Erik



--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Erik Bruchez
Administrator
In reply to this post by Eric van der Vlist
Eric van der Vlist wrote:

>>   http://www.orbeon.com/ops/doc/reference-xforms-ng
>
>
> I had missed this must read document that isn't indexed from the front
> page !

This was kind of a temporary location while we were working on this
document. I just linked it from the index now.

> Yes, that seems to be most needed, otherwise search engines wouldn't
> index a site that uses this technique...

That's one of the good reasons to do it :-)

-Erik



--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Eric van der Vlist
In reply to this post by Erik Bruchez
Le mardi 08 novembre 2005 à 12:49 +0100, Erik Bruchez a écrit :

> >
> > What am I still missing?
>
> I tried your example above, and it works for me. You are using a recent
> nightly build, right? Support for xforms:load was added after beta 3.

Yes, I am using ops-cvs-2005-11-07...

I can send you a stripped down repro case...

Also, I am worried that this might not give me the flexibility I had
with OPS 2.8.

In 2.8, one could have some elements of the instance in the URL and the
rest of the instance as HTTP POST or GET parameters.

For instance, in my web site apiculteur.info, to edit the content of a
page (such as for instance http://apiculteurs.info/apiculteur/anne
+gaelle+kerneur/), I use a page which address is
http://apiculteurs.info/apiculteur/anne+gaelle+kerneur/edition.

While using that page, the id of the beekeeper is extracted from the URL
(here anne+gaelle+kerneur) and all the other data related to the
beekeeper is passed in the HTTP POST.

Using such addresses has a lot of benefits. For instance, I can see in
the server's log which pages are updated (I couldn't see that if the ID
was passed in the POST with the other elements).

Could I do the same with OPS 3.0? How?

Thanks,

Eric
--
Don't you think all these XML schema languages should work together?
                                                         http://dsdl.org
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Erik Bruchez
Administrator
Eric van der Vlist wrote:

 > I can send you a stripped down repro case...

Sure.

 > Also, I am worried that this might not give me the flexibility I had
 > with OPS 2.8.
 >
 > In 2.8, one could have some elements of the instance in the URL and
 > the rest of the instance as HTTP POST or GET parameters.
 >
 > For instance, in my web site apiculteur.info, to edit the content of
 > a page (such as for instance http://apiculteurs.info/apiculteur/anne
 > +gaelle+kerneur/), I use a page which address is
 > http://apiculteurs.info/apiculteur/anne+gaelle+kerneur/edition.
 >
 > While using that page, the id of the beekeeper is extracted from the
 > URL (here anne+gaelle+kerneur) and all the other data related to the
 > beekeeper is passed in the HTTP POST.
 >
 > Using such addresses has a lot of benefits. For instance, I can see
 > in the server's log which pages are updated (I couldn't see that if
 > the ID was passed in the POST with the other elements).
 >
 > Could I do the same with OPS 3.0? How?

Absolutely. If you create an XForms submission that posts an XForms
instance to the current path, i.e.:

   /apiculteur/anne+gaelle+kerneur/edition

the PFC:

1. Receives the posted XML document.

2. Is still able to extract further data from the path and stick it
    into the posted XML document.

The only negative aspect I see is that currently I am not sure there
is a clean way to specify an action posting to the current path
without explicitly specifying the path, e.g.:

<xforms:submission ...
   action="/apiculteur/anne+gaelle+kerneur/edition"/>

What would be the clean way of doing this from a URI perspective?

   <xforms:submission ... action="."/> ?

-Erik



--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Eric van der Vlist
Le mardi 08 novembre 2005 à 13:53 +0100, Erik Bruchez a écrit :
> Eric van der Vlist wrote:
>
>  > I can send you a stripped down repro case...
>
> Sure.

You were right and when I have striped the repro case down I have found
my mistake...

There is still something I can't get working as I am expecting that it
would work (I attach the documents)...

I have a very simple page-flow:

    <page id="home" path-info="/test/(.*)" matcher="oxf:perl5-matcher" view="index.xsl"
        default-submission="default-submission.xml">
        <setvalue ref="/form/path" matcher-group="1"/>
    </page>


The form's model is:

                <xforms:model>
                    <xforms:instance>
                        <form xmlns="">
                            <path/>
                            <uri/>
                        </form>
                    </xforms:instance>
                    <xforms:bind nodeset="/form/uri" calculate="concat('/test/', /form/path)"/>
                    <xforms:submission id="go" method="post" action="/test/"/>
                </xforms:model>

and I am using an xforms:load to navigate:

                   <xforms:trigger appearance="xxforms:button">
                        <xforms:label>Go!</xforms:label>
                        <xforms:load ref="/form/uri" ev:event="DOMActivate"/>
                    </xforms:trigger>

The URL displayed in the browser is following the form/uri as expected,
but the /form/path isn't initialized with the content of the regexp
group as expected.

>  > Also, I am worried that this might not give me the flexibility I had
>  > with OPS 2.8.
>  >
>  > In 2.8, one could have some elements of the instance in the URL and
>  > the rest of the instance as HTTP POST or GET parameters.
>  >
>  > For instance, in my web site apiculteur.info, to edit the content of
>  > a page (such as for instance http://apiculteurs.info/apiculteur/anne
>  > +gaelle+kerneur/), I use a page which address is
>  > http://apiculteurs.info/apiculteur/anne+gaelle+kerneur/edition.
>  >
>  > While using that page, the id of the beekeeper is extracted from the
>  > URL (here anne+gaelle+kerneur) and all the other data related to the
>  > beekeeper is passed in the HTTP POST.
>  >
>  > Using such addresses has a lot of benefits. For instance, I can see
>  > in the server's log which pages are updated (I couldn't see that if
>  > the ID was passed in the POST with the other elements).
>  >
>  > Could I do the same with OPS 3.0? How?
>
> Absolutely. If you create an XForms submission that posts an XForms
> instance to the current path, i.e.:
>
>    /apiculteur/anne+gaelle+kerneur/edition
>
> the PFC:
>
> 1. Receives the posted XML document.
>
> 2. Is still able to extract further data from the path and stick it
>     into the posted XML document.
>
> The only negative aspect I see is that currently I am not sure there
> is a clean way to specify an action posting to the current path
> without explicitly specifying the path, e.g.:
>
> <xforms:submission ...
>    action="/apiculteur/anne+gaelle+kerneur/edition"/>
Great, I need to test all that but I am now more confident :-) ...

> What would be the clean way of doing this from a URI perspective?
>
>    <xforms:submission ... action="."/> ?

Yes, or maybe <xforms:submission ... action="./"/>. It should have the
same effect but I find it slightly more readable!

Thanks

Eric

--
Curious about Relax NG? Read my book online.
                                   http://books.xmlschemata.org/relaxng/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


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

test.zip (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Erik Bruchez
Administrator
Eric van der Vlist wrote:

 > There is still something I can't get working as I am expecting that it
 > would work (I attach the documents)...
 >
 > I have a very simple page-flow:
 >
 >     <page id="home" path-info="/test/(.*)"
matcher="oxf:perl5-matcher" view="index.xsl"
 >         default-submission="default-submission.xml">
 >         <setvalue ref="/form/path" matcher-group="1"/>
 >     </page>
 >
 >
 > The form's model is:
 >
 >                 <xforms:model>
 >                     <xforms:instance>
 >                         <form xmlns="">
 >                             <path/>
 >                             <uri/>
 >                         </form>
 >                     </xforms:instance>
 >                     <xforms:bind nodeset="/form/uri"
calculate="concat('/test/', /form/path)"/>
 >                     <xforms:submission id="go" method="post"
action="/test/"/>
 >                 </xforms:model>
 >
 > and I am using an xforms:load to navigate:
 >
 >                    <xforms:trigger appearance="xxforms:button">
 >                         <xforms:label>Go!</xforms:label>
 >                         <xforms:load ref="/form/uri"
ev:event="DOMActivate"/>
 >                     </xforms:trigger>
 >
 > The URL displayed in the browser is following the form/uri as expected,
 > but the /form/path isn't initialized with the content of the regexp
 > group as expected.

An easy one: you must somehow access the XML submission and include
that in your XForms page. You can do this with XSLT:

<xforms:instance>
     <xsl:copy-of select="doc('input:instance')"/>
</xforms:instance>

or with XInclude:

<xforms:instance xmlns:xi="http://www.w3.org/2001/XInclude">
     <xi:include href="input:instance"/>
</xforms:instance>

I tried both, and get the expected result. This is documented in the
famous secret document ;-)

http://www.orbeon.com/ops/doc/reference-xforms-ng#instance-initialization

 >>What would be the clean way of doing this from a URI perspective?
 >>
 >>   <xforms:submission ... action="."/> ?
 >
 >
 > Yes, or maybe <xforms:submission ... action="./"/>. It should have the
 > same effect but I find it slightly more readable!

But then this will append a "/" to your original URL, right? E.g.:

"./"
   against
"/apiculteur/anne+gaelle+kerneur/edition"
   =
"/apiculteur/anne+gaelle+kerneur/edition/"

-Erik




--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Eric van der Vlist
Le mercredi 09 novembre 2005 à 21:40 +0100, Erik Bruchez a écrit :

> Eric van der Vlist wrote:
>
> An easy one: you must somehow access the XML submission and include
> that in your XForms page. You can do this with XSLT:
>
> <xforms:instance>
>      <xsl:copy-of select="doc('input:instance')"/>
> </xforms:instance>
>
> or with XInclude:
>
> <xforms:instance xmlns:xi="http://www.w3.org/2001/XInclude">
>      <xi:include href="input:instance"/>
> </xforms:instance>
>
> I tried both, and get the expected result. This is documented in the
> famous secret document ;-)
>
> http://www.orbeon.com/ops/doc/reference-xforms-ng#instance-initialization
Hmmm.. I hadn't spotted this difference with XForms classic!

Maybe you could add it to
http://www.orbeon.com/ops/doc/home-changes-30#xforms-migration (even as
a "TODO"...

>
>  >>What would be the clean way of doing this from a URI perspective?
>  >>
>  >>   <xforms:submission ... action="."/> ?
>  >
>  >
>  > Yes, or maybe <xforms:submission ... action="./"/>. It should have the
>  > same effect but I find it slightly more readable!
>
> But then this will append a "/" to your original URL, right? E.g.:
>
> "./"
>    against
> "/apiculteur/anne+gaelle+kerneur/edition"
>    =
> "/apiculteur/anne+gaelle+kerneur/edition/"
Now that you mention it, this needed to be double checked!

According to http://www.ietf.org/rfc/rfc3986.txt, (if I haven't missed
anything) "." and "./" are synonyms and if the current URI
is /apiculteur/anne+gaelle+kerneur/edition the relative URI "." is
"/apiculteur/anne+gaelle+kerneur/".

To refer the current document, one could use an empty reference: ""
noting that "" is meant to identify the same document with the same
query string...

The best option seems to be to repeat the last piece of the address:
"edition" with the downside that the form would become more difficult to
move...

That would be different if the original URI was "/apiculteur/anne+gaelle
+kerneur/edition/" and in that case "." could be used to identified the
current URI.

That's something to take into account in a site URI policy!

Thanks for your help.

Eric

--
Freelance consulting and training.
                                            http://dyomedea.com/english/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Erik Bruchez
Administrator
Eric van der Vlist wrote:

> Maybe you could add it to
> http://www.orbeon.com/ops/doc/home-changes-30#xforms-migration (even as
> a "TODO"...

Done. Well, just the TODO!

> Now that you mention it, this needed to be double checked!
>
> According to http://www.ietf.org/rfc/rfc3986.txt, (if I haven't missed
> anything) "." and "./" are synonyms and if the current URI
> is /apiculteur/anne+gaelle+kerneur/edition the relative URI "." is
> "/apiculteur/anne+gaelle+kerneur/".

Which can make sense I guess if "." means "the current 'directory'".

> To refer the current document, one could use an empty reference: ""
> noting that "" is meant to identify the same document with the same
> query string...
>
> The best option seems to be to repeat the last piece of the address:
> "edition" with the downside that the form would become more difficult to
> move...

Yes, the initial intent was to make it location-independent.

But for now we only support absolute URLs and absolute paths, so clearly
we need to improve this.

> That would be different if the original URI was "/apiculteur/anne+gaelle
> +kerneur/edition/" and in that case "." could be used to identified the
> current URI.
>
> That's something to take into account in a site URI policy!
>
> Thanks for your help.

And thanks for the precisions!

-Erik



--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Joe Dane
In reply to this post by Eric van der Vlist
On Nov 8, 2005, at 2:07 AM, Eric van der Vlist wrote:

> Le mardi 08 novembre 2005 à 12:49 +0100, Erik Bruchez a écrit :
>

> For instance, in my web site apiculteur.info, to edit the content of a
> page (such as for instance http://apiculteurs.info/apiculteur/anne
> +gaelle+kerneur/), I use a page which address is
> http://apiculteurs.info/apiculteur/anne+gaelle+kerneur/edition.
>
I'm very much interested in something just about exactly like that.  
I haven't had much time in the last few weeks, but the last time I  
worked on this I wasn't able to get it going.  So I'm very keen to  
hear how you come alone.

As I recall, the problem I had was in initializing the form on the  
first request. if the xforms model was something like

  <model>
    <id/>
    <text/>
    ...
  </model>

I'd want the initial form for a (GET) request to /1234/edit to show  
up as

  <model>
    <id>1234</id>
    <text>this is the text for item 1234</text>
    ...
  </model>

where the 'id' was taken from the URL, and the rest was loaded from a  
data source of some sort.  I think I was trying to use the "default  
submission" mechanism, but I wasn't sure how to insert stuff from the  
URL (etc.) into that submission.

I'm going to try to scrape together a few hours this weekend to try  
again, but I would love to see any examples you've got working.


> While using that page, the id of the beekeeper is extracted from  
> the URL
> (here anne+gaelle+kerneur) and all the other data related to the
> beekeeper is passed in the HTTP POST.
>
> Using such addresses has a lot of benefits. For instance, I can see in
> the server's log which pages are updated (I couldn't see that if  
> the ID
> was passed in the POST with the other elements).
>
> Could I do the same with OPS 3.0? How?
>
> Thanks,
>
> Eric
> --
> Don't you think all these XML schema languages should work together?
>                                                          http://
> dsdl.org
> ----------------------------------------------------------------------
> --
> Eric van der Vlist       http://xmlfr.org            http://
> dyomedea.com
> (ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
> (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/ 
> xmlschema
> ----------------------------------------------------------------------
> --
>
>
>
> --
> You receive this message as a subscriber of the ops-
> [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
>
--

joe





--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Eric van der Vlist
Hi Joe,

Le jeudi 10 novembre 2005 à 15:15 -1000, Joe Dane a écrit :

> On Nov 8, 2005, at 2:07 AM, Eric van der Vlist wrote:
>
> > Le mardi 08 novembre 2005 à 12:49 +0100, Erik Bruchez a écrit :
> >
>
> > For instance, in my web site apiculteur.info, to edit the content of a
> > page (such as for instance http://apiculteurs.info/apiculteur/anne
> > +gaelle+kerneur/), I use a page which address is
> > http://apiculteurs.info/apiculteur/anne+gaelle+kerneur/edition.
> >
> I'm very much interested in something just about exactly like that.  
> I haven't had much time in the last few weeks, but the last time I  
> worked on this I wasn't able to get it going.  So I'm very keen to  
> hear how you come alone.
With OPS 2.8 that was easy enough but with 3.0 I am not really sure how
(and even if) that can be done (see my post "Still missing something
fundamental with XForms NG  and a couple of comments")!

Eric

--
Curious about Relax NG? Read my book online.
                                   http://books.xmlschemata.org/relaxng/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




--
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: Getting confused: is xforms:trigger supported in OPS 3.0 beta 3?

Erik Bruchez
Administrator
In reply to this post by Joe Dane
Joe Dane wrote:

> On Nov 8, 2005, at 2:07 AM, Eric van der Vlist wrote:
>
>> Le mardi 08 novembre 2005 ? 12:49 +0100, Erik Bruchez a ?crit :
>>
>
>> For instance, in my web site apiculteur.info, to edit the content of a
>> page (such as for instance http://apiculteurs.info/apiculteur/anne
>> +gaelle+kerneur/), I use a page which address is
>> http://apiculteurs.info/apiculteur/anne+gaelle+kerneur/edition.
>>
> I'm very much interested in something just about exactly like that.   I
> haven't had much time in the last few weeks, but the last time I  worked
> on this I wasn't able to get it going.  So I'm very keen to  hear how
> you come alone.
>
> As I recall, the problem I had was in initializing the form on the  
> first request. if the xforms model was something like
>
>  <model>
>    <id/>
>    <text/>
>    ...
>  </model>
>
> I'd want the initial form for a (GET) request to /1234/edit to show  up as
>
>  <model>
>    <id>1234</id>
>    <text>this is the text for item 1234</text>
>    ...
>  </model>
>
> where the 'id' was taken from the URL, and the rest was loaded from a  
> data source of some sort.  I think I was trying to use the "default  
> submission" mechanism, but I wasn't sure how to insert stuff from the  
> URL (etc.) into that submission.
>
> I'm going to try to scrape together a few hours this weekend to try  
> again, but I would love to see any examples you've got working.
It may bear repeating that the Blog example uses exactly this strategy.
Have a look at the page flow for that example, there should be
everything you need in there.

Also look at the documentation:

http://www.orbeon.com/ops/doc/reference-page-flow#d1583593e854

Sorry there is no meaningful anchor in that URL, but next time we update
the site this will be at:

http://www.orbeon.com/ops/doc/reference-page-flow#url-extraction

-Erik



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