cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Billy Turchin" <bturc...@revenuetech.com>
Subject RE: request attribute / xml
Date Mon, 02 Aug 2004 14:15:06 GMT

 I recently had a similar problem where I wanted to pass XML string data in a request attribute
to Cocoon.  I could not find an easy and clean way to do this. The existing request generator
grabbed lots of data I did not need and it would keep my data as a String rather than parsing
as an XML document.  I did not have (or want to) put a DOM Node in the request attribute.
 
 
 As a solution I wrote a new RequestAttributeGenerator.  This works like a combination of
the existing session attribute generator and the request generator.  You can specify a particular
request attribute, rather than having to get everything like the existing request generator.
 Then you can also specify to treat the content as XML.  Right now data is treated as either
a String, Node or XMLizable.  This new settings allows a String to be parsed as an XML document.

 I will post a separate message to the dev list to discuss adding this new generator to the
project.

 - Billy

-----Original Message-----
From: Rui Alberto L. Gonçalves [mailto:rui-l-goncalves@ptinovacao.pt]
Sent: Monday, August 02, 2004 7:14 AM
To: users@cocoon.apache.org
Subject: Re: request attribute / xml


Thanks a lot!! That's it what a really need!!

Rui

On Mon, 2004-08-02 at 11:57, gounis@osmosis.gr wrote:
> take a look at this sample
> 
> 
> http://localhost:8888/samples/stream/uploadstring
> 
> -- stavros 
> 
> On Mon, 2 Aug 2004, Rui Alberto L. [ISO-8859-1] Gonηalves wrote:
> 
> > Hi all,
> > 
> > I have an html page with a list of items. The user is
> > allowed to switch items position and optionally create
> > "folders" and place some items inside this folder. (Done
> > with javascript) Once the user is happy with the selections, submits 
> > the request and there's a request attribute  witch its value is a
> > String (with xml syntax) representing what the user submitted.
> > Ex:
> > <doc>
> >  <item>A</item>
> >  <folder name="I created this folder and placed items B and C inside">
> >    <item>B</item>
> >    <item>C</item>
> >  </folder>
> >  <item>D</item>
> > </doc>
> > 
> > I need to transform this string to XML for further processing
> > with cocoon. 
> > 
> > Does cocoon offers some way to help solving this problem? Anyone
> > wold like to suggest a better approach to this problem? (changing
> > the way the request is done, etc... ? )
> > 
> > I can use RequestGenerator and then pass a stylesheet and
> > parse this string with xslt, but this does't look clean.
> > 
> > Thanks for any help, opinion, suggestion, etc...
> > 
> > Rui
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
-- 
Rui Alberto L. Gonçalves <rui-l-goncalves@ptinovacao.pt>
PT Inovação


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message