(no subject)

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

(no subject)

franco.pace

Hi again,
Could someone please clear up my ignorance on this issue:

As part of my continuing evaluation, I have been trying to extract url parameters within the PFC and setting the instance xml. To do this I have
just copied the xforms-controls example and have changed the PFC to:

<page path-info="/xforms" view="view.xml" default-submission="sub.xml">
    <setvalue ref="/instance/age" parameter="age"/>
</page>

I have created a default submission:
<instance>
                    <age/>
                    <secret/>
                    <textarea/>
                    <label/>
                    <date/>
                    <flavor/>
                    <carrier/>
                    <new-item>
                        <label/>
                        <value/>
                    </new-item>
                    <range>
                        <value/>
                        <letter/>
                    </range>
                    <country/>
</instance>

I then access this using a url: http://localhost:9080/orbeon/xforms?age=6

The parameter does not seem to be propogated to the form. Am I missreading the doco?

Regards,
Franco
[hidden email] <mailto:[hidden email]>.
Franco Pace
Senior Software Engineer
Lawpoint
Thomson Legal & Regulatory Limited (ABN 64 058 914 668)
PH: 61 2 92394963 FAX: none
EMAIL: [hidden email]
WEB: www.lawpoint.com.au www.thomson.com.au





--
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: [ops-users]

Erik Bruchez
Administrator
Franco,

The document is not automatically propagated to the form. You have to
include it as an XForms instance in your view, for example, with an
XSLT view:

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

The submitted XML instance is always available from actions, page
models and page views as the "instance" input. For XPL pipelines, you
access it with:

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

With XSLT, you access with:

   doc('input:instance')

-Erik

[hidden email] wrote:
 > Hi again,

 > Could someone please clear up my ignorance on this issue:
 >
 > As part of my continuing evaluation, I have been trying to extract
 > url parameters within the PFC and setting the instance xml. To do
 > this I have just copied the xforms-controls example and have changed
 > the PFC to:
 >
 > <page path-info="/xforms" view="view.xml" default-submission="sub.xml">
 >     <setvalue ref="/instance/age" parameter="age"/>
 > </page>
 >
 > I have created a default submission:
 > <instance>
 >                     <age/>
 >                     <secret/>
 >                     <textarea/>
 >                     <label/>
 >                     <date/>
 >                     <flavor/>
 >                     <carrier/>
 >                     <new-item>
 >                         <label/>
 >                         <value/>
 >                     </new-item>
 >                     <range>
 >                         <value/>
 >                         <letter/>
 >                     </range>
 >                     <country/>
 > </instance>
 >
 > I then access this using a url: http://localhost:9080/orbeon/xforms?age=6
 >
 > The parameter does not seem to be propogated to the form. Am I
 > missreading the doco?
 >
 > Regards,
 > Franco
 > [hidden email] <mailto:[hidden email]>.
 > Franco Pace
 > Senior Software Engineer
 > Lawpoint
 > Thomson Legal & Regulatory Limited (ABN 64 058 914 668)
 > PH: 61 2 92394963 FAX: none
 > EMAIL: [hidden email]
 > WEB: www.lawpoint.com.au www.thomson.com.au




--
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: [ops-users]

franco.pace
Erik,
what you say makes sense, but when I try it i get an error:

  Single-node binding expression 'age' returned an empty nodeset

Could it be that the default-submission is not working?

Franco

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]]
Sent: Wednesday, 31 August 2005 10:55
To: [hidden email]
Subject: Re: [ops-users]


Franco,

The document is not automatically propagated to the form. You have to
include it as an XForms instance in your view, for example, with an
XSLT view:

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

The submitted XML instance is always available from actions, page
models and page views as the "instance" input. For XPL pipelines, you
access it with:

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

With XSLT, you access with:

   doc('input:instance')

-Erik

[hidden email] wrote:
 > Hi again,

 > Could someone please clear up my ignorance on this issue:
 >
 > As part of my continuing evaluation, I have been trying to extract
 > url parameters within the PFC and setting the instance xml. To do
 > this I have just copied the xforms-controls example and have changed
 > the PFC to:
 >
 > <page path-info="/xforms" view="view.xml" default-submission="sub.xml">
 >     <setvalue ref="/instance/age" parameter="age"/>
 > </page>
 >
 > I have created a default submission:
 > <instance>
 >                     <age/>
 >                     <secret/>
 >                     <textarea/>
 >                     <label/>
 >                     <date/>
 >                     <flavor/>
 >                     <carrier/>
 >                     <new-item>
 >                         <label/>
 >                         <value/>
 >                     </new-item>
 >                     <range>
 >                         <value/>
 >                         <letter/>
 >                     </range>
 >                     <country/>
 > </instance>
 >
 > I then access this using a url: http://localhost:9080/orbeon/xforms?age=6
 >
 > The parameter does not seem to be propogated to the form. Am I
 > missreading the doco?
 >
 > Regards,
 > Franco
 > [hidden email] <mailto:[hidden email]>.
 > Franco Pace
 > Senior Software Engineer
 > Lawpoint
 > Thomson Legal & Regulatory Limited (ABN 64 058 914 668)
 > PH: 61 2 92394963 FAX: none
 > EMAIL: [hidden email]
 > WEB: www.lawpoint.com.au www.thomson.com.au





--
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: [ops-users]

Erik Bruchez
Administrator
It's working here. Try this:

In the Page Flow:

<page path-info="/franco" view="franco/view.xml"
       default-submission="franco/sub.xml">
     <setvalue ref="/instance/age" parameter="age"/>
</page>

sub.xml:

<instance>
     <age/>
     <secret/>
     <textarea/>
     <label/>
     <date/>
     <flavor/>
     <carrier/>
     <new-item>
         <label/>
         <value/>
     </new-item>
     <range>
         <value/>
         <letter/>
     </range>
     <country/>
</instance>

view.xml:

  <html xmlns:f="http://orbeon.org/oxf/xml/formatting"
        xmlns:xhtml="http://www.w3.org/1999/xhtml"
        xmlns:xforms="http://www.w3.org/2002/xforms"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns="http://www.w3.org/1999/xhtml"
        xsl:version="2.0">
      <head>
          <xforms:model>
              <xforms:instance>
                  <xsl:copy-of select="doc('input:instance')"/>
              </xforms:instance>
          </xforms:model>
      </head>
      <body>
          <h2>Some XForms Controls</h2>
          <xforms:output ref="age"/>
          <h2>Entire XML Instance</h2>
          <f:xml-source>
              <xsl:copy-of select="doc('input:instance')"/>
          </f:xml-source>
      </body>
  </html>

-Erik

[hidden email] wrote:

> Erik,
> what you say makes sense, but when I try it i get an error:
>
>   Single-node binding expression 'age' returned an empty nodeset
>
> Could it be that the default-submission is not working?
>
> Franco
>
> -----Original Message-----
> From: Erik Bruchez [mailto:[hidden email]]
> Sent: Wednesday, 31 August 2005 10:55
> To: [hidden email]
> Subject: Re: [ops-users]
>
>
> Franco,
>
> The document is not automatically propagated to the form. You have to
> include it as an XForms instance in your view, for example, with an
> XSLT view:
>
>    <xforms:model id="main-model">
>        <xforms:instance id="main-instance">
>            <xsl:copy-of select="doc('input:instance')"/>
>        </xforms:instance>
>    </xforms:model>
>
> The submitted XML instance is always available from actions, page
> models and page views as the "instance" input. For XPL pipelines, you
> access it with:
>
>    <p:param name="instance" type="input"/>
>
> With XSLT, you access with:
>
>    doc('input:instance')
>
> -Erik
>
> [hidden email] wrote:
>  > Hi again,
>
>  > Could someone please clear up my ignorance on this issue:
>  >
>  > As part of my continuing evaluation, I have been trying to extract
>  > url parameters within the PFC and setting the instance xml. To do
>  > this I have just copied the xforms-controls example and have changed
>  > the PFC to:
>  >
>  > <page path-info="/xforms" view="view.xml" default-submission="sub.xml">
>  >     <setvalue ref="/instance/age" parameter="age"/>
>  > </page>
>  >
>  > I have created a default submission:
>  > <instance>
>  >                     <age/>
>  >                     <secret/>
>  >                     <textarea/>
>  >                     <label/>
>  >                     <date/>
>  >                     <flavor/>
>  >                     <carrier/>
>  >                     <new-item>
>  >                         <label/>
>  >                         <value/>
>  >                     </new-item>
>  >                     <range>
>  >                         <value/>
>  >                         <letter/>
>  >                     </range>
>  >                     <country/>
>  > </instance>
>  >
>  > I then access this using a url: http://localhost:9080/orbeon/xforms?age=6
>  >
>  > The parameter does not seem to be propogated to the form. Am I
>  > missreading the doco?
>  >
>  > Regards,
>  > Franco
>  > [hidden email] <mailto:[hidden email]>.
>  > Franco Pace
>  > Senior Software Engineer
>  > Lawpoint
>  > Thomson Legal & Regulatory Limited (ABN 64 058 914 668)
>  > PH: 61 2 92394963 FAX: none
>  > EMAIL: [hidden email]
>  > WEB: www.lawpoint.com.au www.thomson.com.au
>
>
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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



--
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: [ops-users]

franco.pace
In reply to this post by Erik Bruchez
Thanks again Erik,
Comparing the working version with the non working seems to
reveal the problem:

  xsl:version="2.0"

My original xhtml:html:

<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:f="http://orbeon.org/oxf/xml/formatting"
    xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
    xmlns:widget="http://orbeon.org/oxf/xml/widget"
    xmlns:ev="http://www.w3.org/2001/xml-events">

(taken from the xforms controls example) didn't include the xsl:version attribute. (defaulting to "1.0" i guess)
I have confirmed the problem by taking it out of the working version and breaking it. There seems to be some cacheing going on so I needed to stop & start tomcat between adding and removing the xsl:version="2.0" parameter.

Thanks for your speedy response - much appreciated.

Regards,
Franco

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]]
Sent: Wednesday, 31 August 2005 12:41
To: [hidden email]
Subject: Re: [ops-users]


It's working here. Try this:

In the Page Flow:

<page path-info="/franco" view="franco/view.xml"
       default-submission="franco/sub.xml">
     <setvalue ref="/instance/age" parameter="age"/>
</page>

sub.xml:

<instance>
     <age/>
     <secret/>
     <textarea/>
     <label/>
     <date/>
     <flavor/>
     <carrier/>
     <new-item>
         <label/>
         <value/>
     </new-item>
     <range>
         <value/>
         <letter/>
     </range>
     <country/>
</instance>

view.xml:

  <html xmlns:f="http://orbeon.org/oxf/xml/formatting"
        xmlns:xhtml="http://www.w3.org/1999/xhtml"
        xmlns:xforms="http://www.w3.org/2002/xforms"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns="http://www.w3.org/1999/xhtml"
        xsl:version="2.0">
      <head>
          <xforms:model>
              <xforms:instance>
                  <xsl:copy-of select="doc('input:instance')"/>
              </xforms:instance>
          </xforms:model>
      </head>
      <body>
          <h2>Some XForms Controls</h2>
          <xforms:output ref="age"/>
          <h2>Entire XML Instance</h2>
          <f:xml-source>
              <xsl:copy-of select="doc('input:instance')"/>
          </f:xml-source>
      </body>
  </html>

-Erik

[hidden email] wrote:

> Erik,
> what you say makes sense, but when I try it i get an error:
>
>   Single-node binding expression 'age' returned an empty nodeset
>
> Could it be that the default-submission is not working?
>
> Franco
>
> -----Original Message-----
> From: Erik Bruchez [mailto:[hidden email]]
> Sent: Wednesday, 31 August 2005 10:55
> To: [hidden email]
> Subject: Re: [ops-users]
>
>
> Franco,
>
> The document is not automatically propagated to the form. You have to
> include it as an XForms instance in your view, for example, with an
> XSLT view:
>
>    <xforms:model id="main-model">
>        <xforms:instance id="main-instance">
>            <xsl:copy-of select="doc('input:instance')"/>
>        </xforms:instance>
>    </xforms:model>
>
> The submitted XML instance is always available from actions, page
> models and page views as the "instance" input. For XPL pipelines, you
> access it with:
>
>    <p:param name="instance" type="input"/>
>
> With XSLT, you access with:
>
>    doc('input:instance')
>
> -Erik
>
> [hidden email] wrote:
>  > Hi again,
>
>  > Could someone please clear up my ignorance on this issue:
>  >
>  > As part of my continuing evaluation, I have been trying to extract
>  > url parameters within the PFC and setting the instance xml. To do
>  > this I have just copied the xforms-controls example and have changed
>  > the PFC to:
>  >
>  > <page path-info="/xforms" view="view.xml" default-submission="sub.xml">
>  >     <setvalue ref="/instance/age" parameter="age"/>
>  > </page>
>  >
>  > I have created a default submission:
>  > <instance>
>  >                     <age/>
>  >                     <secret/>
>  >                     <textarea/>
>  >                     <label/>
>  >                     <date/>
>  >                     <flavor/>
>  >                     <carrier/>
>  >                     <new-item>
>  >                         <label/>
>  >                         <value/>
>  >                     </new-item>
>  >                     <range>
>  >                         <value/>
>  >                         <letter/>
>  >                     </range>
>  >                     <country/>
>  > </instance>
>  >
>  > I then access this using a url: http://localhost:9080/orbeon/xforms?age=6
>  >
>  > The parameter does not seem to be propogated to the form. Am I
>  > missreading the doco?
>  >
>  > Regards,
>  > Franco
>  > [hidden email] <mailto:[hidden email]>.
>  > Franco Pace
>  > Senior Software Engineer
>  > Lawpoint
>  > Thomson Legal & Regulatory Limited (ABN 64 058 914 668)
>  > PH: 61 2 92394963 FAX: none
>  > EMAIL: [hidden email]
>  > WEB: www.lawpoint.com.au www.thomson.com.au
>
>
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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




--
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: [ops-users]

franco.pace
In reply to this post by Erik Bruchez
Erik,
I have just found a little problem with the 'working' example.
Correct me if I am wrong. It works fine if you do actually
include the 'age' in the query string:

http://localhost:9080/orbeon/xforms?age=23

but if you leave it out:

http://localhost:9080/orbeon/xforms

then the age from the default-subbmission instance
does not propogate. My understanding is that the
value in of the element in the default-submission should
propogate to the form if the value is not specified in the
url querystring (acting as a default). removing the <setvalue>
from the page-flow.xml does result in the value finding its way to
the form. Is this a bug?

Franco



-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]]
Sent: Wednesday, 31 August 2005 12:41
To: [hidden email]
Subject: Re: [ops-users]


It's working here. Try this:

In the Page Flow:

<page path-info="/franco" view="franco/view.xml"
       default-submission="franco/sub.xml">
     <setvalue ref="/instance/age" parameter="age"/>
</page>

sub.xml:

<instance>
     <age/>
     <secret/>
     <textarea/>
     <label/>
     <date/>
     <flavor/>
     <carrier/>
     <new-item>
         <label/>
         <value/>
     </new-item>
     <range>
         <value/>
         <letter/>
     </range>
     <country/>
</instance>

view.xml:

  <html xmlns:f="http://orbeon.org/oxf/xml/formatting"
        xmlns:xhtml="http://www.w3.org/1999/xhtml"
        xmlns:xforms="http://www.w3.org/2002/xforms"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns="http://www.w3.org/1999/xhtml"
        xsl:version="2.0">
      <head>
          <xforms:model>
              <xforms:instance>
                  <xsl:copy-of select="doc('input:instance')"/>
              </xforms:instance>
          </xforms:model>
      </head>
      <body>
          <h2>Some XForms Controls</h2>
          <xforms:output ref="age"/>
          <h2>Entire XML Instance</h2>
          <f:xml-source>
              <xsl:copy-of select="doc('input:instance')"/>
          </f:xml-source>
      </body>
  </html>

-Erik

[hidden email] wrote:

> Erik,
> what you say makes sense, but when I try it i get an error:
>
>   Single-node binding expression 'age' returned an empty nodeset
>
> Could it be that the default-submission is not working?
>
> Franco
>
> -----Original Message-----
> From: Erik Bruchez [mailto:[hidden email]]
> Sent: Wednesday, 31 August 2005 10:55
> To: [hidden email]
> Subject: Re: [ops-users]
>
>
> Franco,
>
> The document is not automatically propagated to the form. You have to
> include it as an XForms instance in your view, for example, with an
> XSLT view:
>
>    <xforms:model id="main-model">
>        <xforms:instance id="main-instance">
>            <xsl:copy-of select="doc('input:instance')"/>
>        </xforms:instance>
>    </xforms:model>
>
> The submitted XML instance is always available from actions, page
> models and page views as the "instance" input. For XPL pipelines, you
> access it with:
>
>    <p:param name="instance" type="input"/>
>
> With XSLT, you access with:
>
>    doc('input:instance')
>
> -Erik
>
> [hidden email] wrote:
>  > Hi again,
>
>  > Could someone please clear up my ignorance on this issue:
>  >
>  > As part of my continuing evaluation, I have been trying to extract
>  > url parameters within the PFC and setting the instance xml. To do
>  > this I have just copied the xforms-controls example and have changed
>  > the PFC to:
>  >
>  > <page path-info="/xforms" view="view.xml" default-submission="sub.xml">
>  >     <setvalue ref="/instance/age" parameter="age"/>
>  > </page>
>  >
>  > I have created a default submission:
>  > <instance>
>  >                     <age/>
>  >                     <secret/>
>  >                     <textarea/>
>  >                     <label/>
>  >                     <date/>
>  >                     <flavor/>
>  >                     <carrier/>
>  >                     <new-item>
>  >                         <label/>
>  >                         <value/>
>  >                     </new-item>
>  >                     <range>
>  >                         <value/>
>  >                         <letter/>
>  >                     </range>
>  >                     <country/>
>  > </instance>
>  >
>  > I then access this using a url: http://localhost:9080/orbeon/xforms?age=6
>  >
>  > The parameter does not seem to be propogated to the form. Am I
>  > missreading the doco?
>  >
>  > Regards,
>  > Franco
>  > [hidden email] <mailto:[hidden email]>.
>  > Franco Pace
>  > Senior Software Engineer
>  > Lawpoint
>  > Thomson Legal & Regulatory Limited (ABN 64 058 914 668)
>  > PH: 61 2 92394963 FAX: none
>  > EMAIL: [hidden email]
>  > WEB: www.lawpoint.com.au www.thomson.com.au
>
>
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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




--
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: [ops-users]

Erik Bruchez
Administrator
In reply to this post by franco.pace
 > I have confirmed the problem by taking it out of the working version
 > and breaking it. There seems to be some cacheing going on so I
 > needed to stop & start tomcat between adding and removing the
 > xsl:version="2.0" parameter.

Using xsl:version="2.0" tells the PFC that the given document should
be considered as an XSLT stylesheet (as a "simplified stylesheet
module", following the XSLT 2.0 terminology).

Without this attribute, your document is considered by the PFC as a
simple XML document (such as an XHTML document) to send as is to the
epilogue.

-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: [ops-users]

Erik Bruchez
Administrator
In reply to this post by franco.pace
Franco,

Yes, that was a bug. Now fixed.

-Erik

[hidden email] wrote:

> Erik,
> I have just found a little problem with the 'working' example.
> Correct me if I am wrong. It works fine if you do actually
> include the 'age' in the query string:
>
> http://localhost:9080/orbeon/xforms?age=23
>
> but if you leave it out:
>
> http://localhost:9080/orbeon/xforms
>
> then the age from the default-subbmission instance
> does not propogate. My understanding is that the
> value in of the element in the default-submission should
> propogate to the form if the value is not specified in the
> url querystring (acting as a default). removing the <setvalue>
> from the page-flow.xml does result in the value finding its way to
> the form. Is this a bug?
>
> Franco


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