You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alan Hodgkinson <al...@softxs.ch> on 2002/09/06 18:26:05 UTC

XMLForm data stored/retrieved via Session Transformer?

Dear All,

Is it possible to get the data into/out of an XMLForm in XML 
format, via the session transformer?

My goal is to implement business objects stored in XML in the 
session rather than in JavaBeans. It seems to me that form data 
is just begging to be stored in XML format, because it gives 
you Cocoon's tremendous flexibility to manipulate it using XSLT 
stylesheets.

Unfortunately, after searching the docs and mail archive, I can't
find anything that will allow me to use the XMLForm directly
with the session transformer. The XMLForm sees to require a JavaBean 
as a data container. Hopefully I'm wrong with this assumption and 
some kind soul can correct me, with a link to the doc I missed or
with some helpful advice.

Is there some Cocoon documentation or feature that I missed, which 
will allow me to do this? 

..or perhaps someone can suggest where I can implement hooks (or 
hacks :) in the XMLForm to get it to use the session tranformer 
rather than Java beans.

Many thanks in advance and

Best wishes,

Alan Hodgkinson

---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: sed or awk generator

Posted by Steven Noels <st...@outerthought.org>.
Braun wrote:

> I am using ACDSEE ON WINDOWS with descriptions of the pictures in 
> sequential files. I want to aggreggate the pictures and their 
> description in th xml-stream. The image-directory generator is a good 
> solution but for the images but for the description-file I need some 
> sort of file generator with sed or awk capability.
> Has anybody a solution ?

Chaperon might be what you need: http://chaperon.sourceforge.net/ and 
http://xml.apache.org/cocoon/howto/chaperon/howto-chaperon-intro.html

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
stevenn@outerthought.org                      stevenn@apache.org


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


sed or awk generator

Posted by Braun <ja...@kbr-immobilien.de>.
I am using ACDSEE ON WINDOWS with descriptions of the pictures in 
sequential files. I want to aggreggate the pictures and their 
description in th xml-stream. The image-directory generator is a good 
solution but for the images but for the description-file I need some 
sort of file generator with sed or awk capability.
Has anybody a solution ?


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: XMLForm data stored/retrieved via Session Transformer?

Posted by Ivelin Ivanov <iv...@apache.org>.
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" <si...@bristol.ac.uk>
To: <co...@xml.apache.org>
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" <si...@bristol.ac.uk>
> > To: <co...@xml.apache.org>
> > 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
> Simon.Price@bristol.ac.uk
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: XMLForm data stored/retrieved via Session Transformer?

Posted by Simon Price <si...@bristol.ac.uk>.
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" <si...@bristol.ac.uk>
> To: <co...@xml.apache.org>
> 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
Simon.Price@bristol.ac.uk
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: XMLForm data stored/retrieved via Session Transformer?

Posted by Ivelin Ivanov <iv...@apache.org>.
XMLForm currently supports JavaBeans, DOM and mixed models.
You can look at the Feedback Wizard demo for example.

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.


Ivelin


----- Original Message -----
From: "Simon Price" <si...@bristol.ac.uk>
To: <co...@xml.apache.org>
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
>
> PS. I'm still pretty new to Cocoon and so, despite having looked at the
> source for XML Forms, I would not be surprised to find that its already
> possible. If it is, I'd love to know how!
>
> PPS. Thanks to Ivelin for the new itemset tag.
>
> -------------------------------------------------------------------
> 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
> Simon.Price@bristol.ac.uk
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


client-programming with cocoon

Posted by Braun <ja...@kbr-immobilien.de>.
since some time I use some perl programming using a lot of the 
cpan-modules bringing up information into real estate portals.
Soon you end up in a lot of change in your programming because of the 
change of the HTML-Pages from the portals.
It needs also a lot of time to find out what really changed.
Starting with a script from Michael Schilli I transfered the client 
program to XML and the HTML-Pages to XMl and some XSLT-Filtering to 
check for changes.
When I started to study cocoon I found a lot in common with the 
techniques I used in perl. An I thought that the command-line property 
could be used for this.
Maybe somebody already examined the usage of cocoon or its fundaments 
for client programming.


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: XMLForm data stored/retrieved via Session Transformer?

Posted by Simon Price <si...@bristol.ac.uk>.
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

PS. I'm still pretty new to Cocoon and so, despite having looked at the 
source for XML Forms, I would not be surprised to find that its already 
possible. If it is, I'd love to know how!

PPS. Thanks to Ivelin for the new itemset tag.

-------------------------------------------------------------------
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
Simon.Price@bristol.ac.uk
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>