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:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 7:14 AM To: [EMAIL PROTECTED] Subject: Re: request attribute / xml Thanks a lot!! That's it what a really need!! Rui On Mon, 2004-08-02 at 11:57, [EMAIL PROTECTED] 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Rui Alberto L. GonÃalves <[EMAIL PROTECTED]> PT InovaÃÃo --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
