You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by John Lianoglou <jo...@arachnedesign.net> on 2004/06/07 07:37:31 UTC

Re: XML in HTTP Post Parameters [RESOLVED]

Well, took a break to watch Pirates of the Caribbean, and when I came 
back I sorted it out! The answer is to use the StreamGenerator!

The docs are a bit incomplete, though:
http://cocoon.apache.org/2.1/userdocs/generators/stream-generator.html

On the Cocoon documentation for 2.1, the following sitemap example code 
fragment is provided:

     <map:generate type="stream" />

If you want to extract a single parameter, you'll have to use:

     <map:generate type="stream">
         <map:parameter name="form-name" value="my_text_area" />
     </map:generate>

And definitely make sure that the XML has a root element ... which 
means (vis-a-vis usability) you may have to check for -- and insert it 
-- using JavaScript on the client side, to ensure it's there by the 
time Cocoon sees it.

I wound up integrating it into other pipelines by using a CInclude.

Does anyone else have any simpler solutions? I feel like I'm reaching 
over my shoulder to scratch my ass on this one...



jL


On Jun 6, 2004, at 8:26 PM, John Lianoglou wrote:

> I'm slowly going mad trying to get XML data entered into a HTML 
> textarea element, on the Cocoon side. The parameter value naturally 
> uses XML character entity replacements for characters such as <, >, 
> and & ... is there any (built-in) way to extract proper XML from the 
> post variable?


John Lianoglou | Vice President | ARACHNEdesign
http://www.arachnedesign.net


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


Re: XML in HTTP Post Parameters [RESOLVED]

Posted by Joerg Heinicke <jo...@gmx.de>.
On 07.06.2004 07:37, John Lianoglou wrote:

> The docs are a bit incomplete, though:
> http://cocoon.apache.org/2.1/userdocs/generators/stream-generator.html

You can provide a patch if you want ;-)

> Does anyone else have any simpler solutions? I feel like I'm reaching 
> over my shoulder to scratch my ass on this one...

I don't think that there is a simpler solution than your aggregation + 
stream generator. There are other solutions - e.g. the request generator 
should also work, but you have to extract the correct value, or 
processPipelineToDOM() in the flowscript - but no solution seems to be 
that straight forward as the stream generator.

Joerg

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