Look at how the UserBean creates a DOM document. Although it is created via the DOM API, you can imagine how you could create the DOM from a file or another source.
----- Original Message ----- From: "Simon Price" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 09, 2002 4:56 PM Subject: Re: XMLForm data stored/retrieved via Session Transformer? > Ivelin Ivanov wrote: > > > XMLForm currently supports JavaBeans, DOM and mixed models. > > You can look at the Feedback Wizard demo for example. > > > I will look again, but it was not obvious to me how to pass a DOM model. > > > How do you mean that people will be using forms without writing Java code. > > We can write another Action to take as parameter a file name with the XML > > model, however how you you handle the input data once submitted. How would > > you implement the logic for handling the input data? This has been requested > > before, but noone has suggested a better replacement for Java when it comes > > to writing general purpose logic. > > > Schematron could still be used to do validation. XSLT could operate on > the model instance (built from the request) to so simple logic. I agree > Java is better for complex logic, but XSLT would be a nice halfway > between the modular database actions approach and the full XML Forms + > JB approach. > > I'll try and work my ideas up into a full example to show what I'm > thinking of. > > Another idea might be to use the flow engine to do some of the > validation/processing. Although I don't think this would scale well, it > would be a practical entry point for people moving from clientside to > serverside - they could make use of their javascript skills and then > later move on to java. > > Simon > > > > Ivelin > > > > > > ----- Original Message ----- > > From: "Simon Price" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Sunday, September 08, 2002 2:45 PM > > Subject: Re: XMLForm data stored/retrieved via Session Transformer? > > > >>Support for Alan's suggestion of a model in XML format.... > >> > >>I'm pretty certain that JXPath can be used with a DOM object so it > >>should be possible for XMLForms to support both JBs and XML as the model. > >> > >>Personally, I really like the idea of being able to create and > >>manipulate the model without having to drop into Java. For many simple > >>forms, its seems like complete overkill having to write beans. > >> > >>Irrespective of what I think, there's a strong argument for having an > >>XML model: new Cocoon users and non-Java programmers will be able to > >>take advantage of XML Forms. > >> > >>Cheers > >> > >>Simon > > ------------------------------------------------------------------- > Simon Price > Institute for Learning and Research Technology > University of Bristol > 8-10 Berkeley Square > Bristol BS8 1HH > United Kingdom > > Direct: +44 (0)7071 226 720 > Office: +44 (0)117 928 7193 > Fax: +44 (0)117 928 7112 > [EMAIL PROTECTED] > http://www.ilrt.bristol.ac.uk > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>