Hi, I’m evaluating OPS for a project and have a few
fundamental questions. I was going through the documentation but didn’t
find answers to these. Could some one please guide me here or point me to the
right docs? 1) If my model includes
a source xml schema (XSD), will it be used for validations (In my little
experiment I found that it was ignoring the xsd, but I may have missed
something) 2) Do I need to
use the OPS page flow? Can I use just the XForms capability? (For example, I
may want to use my current application for the flow, but want to use xforms for
just a couple of pages) 3) Is there a
standard way / best practice that people use to specify access control of the
fields (ie., don’t display a field for some specific users, make the
field display only – instead of read-write – for another user etc.)
– hopefully there’s a better way than having to write different
x-forms for different roles. 4) How are the
OPS XForms engine and presentation server typically deployed in production? Do
they co-exist on the same machine? Thanks, Vidya -- 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 |
Administrator
|
Hi Vidya,
On 3/13/06, Vidya Narayanan <[hidden email]> wrote: > 1) If my model includes a source xml schema (XSD), will it be used for > validations (In my little experiment I found that it was ignoring the xsd, > but I may have missed something) Yes, the instance will be automatically validated with the schema, when one is specified. We would need to look at your specific case to see why this is not happening. > 2) Do I need to use the OPS page flow? Can I use just the XForms > capability? (For example, I may want to use my current application for the > flow, but want to use xforms for just a couple of pages) By default, HTTP requests go to the OPS servlet. This is for instance how it works in the OPS examples. In that case the OPS Page Flow controller is used. You can also setup your web.xml so that your own servlet runs instead of the OPS servlet, and then setup OPS a filter. This means that your servlet will generate HTML+XForms (with JSP or whatever technology you decide to use) and the OPS filter will handle the "XForms to HTML" transformation. > 3) Is there a standard way / best practice that people use to specify > access control of the fields (ie., don't display a field for some specific > users, make the field display only – instead of read-write – for another > user etc.) – hopefully there's a better way than having to write different > x-forms for different roles. One best practice is to store have the user/role information in a different instance. Then you will use <xforms:bind> with the attributes relevant="..." readonly="..." to define what piece of data is readable and modifyable depending on the user/role of the current user. The specific bind expressions you will write will really depend on your requirements. > 4) How are the OPS XForms engine and presentation server typically > deployed in production? Do they co-exist on the same machine? The server-side part of the XForms engine has two parts: one that transforms the XHTML+XForms into HTML and another one that responds to request from the client-side code. In general both run from the same web application, which can be deployed in a cluster if necessary. But the two parts can be easily decoupled if needed, as the XForms request are handled by a separate servlet, named "ops-xforms-server-servlet" and mapped to /xforms-server in the default web.xml. Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
In reply to this post by Vidya Narayanan-2
Thank you for your replies, Alex.
As for the schema validation not happening, here's what I had specified for the schema (I copied my schema under the tomcat servlets examples, ensured that I'm able to browse to the url and then specified it in the model as below) <xforms:model id="configIni" schema="http://localhost:8080/servlets-examples/ConfigINI_IPC3_5.xsd"> ... It doesn't seem to do any validation against it. However, when I tried 'binding' one of the fields to xs:integer it seems to atleast attempt to cast it to a double and fails, that too only as long as I specify a constraint. i.e., when I try this: <xforms:bind nodeset="/SamplePath/RetryCount" type="xs:integer" constraint=". >= 0 and 12 >= ." ></xforms:bind> It does try to convert my data to double and errors out. But when I omit the constraint, for some reason it doesn't seem to do anything (see the following): <xforms:bind nodeset="/SamplePath/RetryCount" type="xs:integer"></xforms:bind> I'm wondering whether the validation happens when I try to submit? (I haven't specified the action yet). Thank you, Vidya -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro Vernet Sent: Monday, March 13, 2006 7:27 PM To: [hidden email] Subject: Re: [ops-users] Some fundamental questions about the OPS Hi Vidya, On 3/13/06, Vidya Narayanan <[hidden email]> wrote: > 1) If my model includes a source xml schema (XSD), will it be used for > validations (In my little experiment I found that it was ignoring the xsd, > but I may have missed something) Yes, the instance will be automatically validated with the schema, when one is specified. We would need to look at your specific case to see why this is not happening. > 2) Do I need to use the OPS page flow? Can I use just the XForms > capability? (For example, I may want to use my current application for the > flow, but want to use xforms for just a couple of pages) By default, HTTP requests go to the OPS servlet. This is for instance how it works in the OPS examples. In that case the OPS Page Flow controller is used. You can also setup your web.xml so that your own servlet runs instead of the OPS servlet, and then setup OPS a filter. This means that your servlet will generate HTML+XForms (with JSP or whatever technology you decide to use) and the OPS filter will handle the "XForms to HTML" transformation. > 3) Is there a standard way / best practice that people use to specify > access control of the fields (ie., don't display a field for some specific > users, make the field display only - instead of read-write - for another > user etc.) - hopefully there's a better way than having to write different > x-forms for different roles. One best practice is to store have the user/role information in a different instance. Then you will use <xforms:bind> with the attributes relevant="..." readonly="..." to define what piece of data is readable and modifyable depending on the user/role of the current user. The specific bind expressions you will write will really depend on your requirements. > 4) How are the OPS XForms engine and presentation server typically > deployed in production? Do they co-exist on the same machine? The server-side part of the XForms engine has two parts: one that transforms the XHTML+XForms into HTML and another one that responds to request from the client-side code. In general both run from the same web application, which can be deployed in a cluster if necessary. But the two parts can be easily decoupled if needed, as the XForms request are handled by a separate servlet, named "ops-xforms-server-servlet" and mapped to /xforms-server in the default web.xml. Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- 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 |
Administrator
|
Hi Vidya,
Would you have a use case (XHTML + XForms) that we can run in the sandbox to reproduce this issue, plus an XSD file that would be used by this example? Alex On 3/14/06, Vidya Narayanan <[hidden email]> wrote: > Thank you for your replies, Alex. > As for the schema validation not happening, here's what I had specified > for the schema (I copied my schema under the tomcat servlets examples, > ensured that I'm able to browse to the url and then specified it in the > model as below) > > <xforms:model id="configIni" > schema="http://localhost:8080/servlets-examples/ConfigINI_IPC3_5.xsd"> > ... > > It doesn't seem to do any validation against it. However, when I tried > 'binding' one of the fields to xs:integer it seems to atleast attempt to > cast it to a double and fails, that too only as long as I specify a > constraint. > > i.e., when I try this: > <xforms:bind nodeset="/SamplePath/RetryCount" type="xs:integer" > constraint=". >= 0 and 12 >= ." ></xforms:bind> > > It does try to convert my data to double and errors out. But when I omit > the constraint, for some reason it doesn't seem to do anything (see the > following): > > <xforms:bind nodeset="/SamplePath/RetryCount" > type="xs:integer"></xforms:bind> > > > I'm wondering whether the validation happens when I try to submit? (I > haven't specified the action yet). > > Thank you, > Vidya > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On Behalf Of > Alessandro Vernet > Sent: Monday, March 13, 2006 7:27 PM > To: [hidden email] > Subject: Re: [ops-users] Some fundamental questions about the OPS > > Hi Vidya, > > On 3/13/06, Vidya Narayanan <[hidden email]> wrote: > > 1) If my model includes a source xml schema (XSD), will it be > used for > > validations (In my little experiment I found that it was ignoring the > xsd, > > but I may have missed something) > > Yes, the instance will be automatically validated with the schema, > when one is specified. We would need to look at your specific case to > see why this is not happening. > > > 2) Do I need to use the OPS page flow? Can I use just the XForms > > capability? (For example, I may want to use my current application for > the > > flow, but want to use xforms for just a couple of pages) > > By default, HTTP requests go to the OPS servlet. This is for instance > how it works in the OPS examples. In that case the OPS Page Flow > controller is used. You can also setup your web.xml so that your own > servlet runs instead of the OPS servlet, and then setup OPS a filter. > This means that your servlet will generate HTML+XForms (with JSP or > whatever technology you decide to use) and the OPS filter will handle > the "XForms to HTML" transformation. > > > 3) Is there a standard way / best practice that people use to > specify > > access control of the fields (ie., don't display a field for some > specific > > users, make the field display only - instead of read-write - for > another > > user etc.) - hopefully there's a better way than having to write > different > > x-forms for different roles. > > One best practice is to store have the user/role information in a > different instance. Then you will use <xforms:bind> with the > attributes relevant="..." readonly="..." to define what piece of data > is readable and modifyable depending on the user/role of the current > user. The specific bind expressions you will write will really depend > on your requirements. > > > 4) How are the OPS XForms engine and presentation server > typically > > deployed in production? Do they co-exist on the same machine? > > The server-side part of the XForms engine has two parts: one that > transforms the XHTML+XForms into HTML and another one that responds to > request from the client-side code. In general both run from the same > web application, which can be deployed in a cluster if necessary. But > the two parts can be easily decoupled if needed, as the XForms request > are handled by a separate servlet, named "ops-xforms-server-servlet" > and mapped to /xforms-server in the default web.xml. > > Alex > -- > Blog (XML, Web apps, Open Source): > http://www.orbeon.com/blog/ > > > > > > > -- > 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 > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |