cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <ajuf...@sun3.oulu.fi>
Subject Re: capturing XML in forms
Date Thu, 22 Dec 2005 11:53:55 GMT
Ard Schrijvers wrote:
> See http://xinha.python-hosting.com/ for the reason why HTMLArea and Xinha are look-alikes

Yes, I have seen this site already. Do you happen to know whether this 
editor always produces valid XML. There is no mentioning about this on 
the Xinha site. The simple tests I have peformed seem to indicate that 
it does.

> 
> 
>>
>>Jean-Baptiste Quenot wrote:
>>
>>>* Andre Juffer:
>>>
>>>
>>>
>>>>Capturing XHTML content via forms is something I have never done
>>>>before (and is of course  not specific to Cocoon).  Basically, I
>>>>guess, one would have to parse the text and store the result for
>>>>instance in a  DOM document which is subsequently  stored in the
>>>>XML  database,  right? Or is  there  is  more simple  or  better
>>>>solution, maybe cocoon can handle this already?
>>>
>>>
>>>Integrated in Cocoon  there is the htmlarea  styling that displays
>>>the  HTMLArea  editor, and  the  htmlarea  convertor in  forms  to
>>>convert the text typed by the user to XHTML.  This is very similar
>>>to what you intend to do, especially the convertor stuff.
>>>
>>>See the HTMLArea forms samples at
>>>
>>
>>http://cocoon.zones.apache.org/demos/release/samples/blocks/fo
>>rms/htmlarea
>>
>>This looks very similar to the one that I currently use, Xinha:
>>
>>http://xinha.gogo.co.nz/xinha-nightly/examples/full_example-body.html
>>
>>As far as I could see this editor produces valid XHTML. That 
>>is, after 
>>capturing the textarea content, I actually replace all &lt; 
>>and &gt; by 
>>a '<' and '>' and put that in a java.lang.String containing also the 
>>"<?xml version="1.0" ?>" and use a SAX parser to parse this String 
>>(place it into a StringReader first). It appears entirely valid. It 
>>should then be straightword to create a DOM document with cocoon's 
>>org.apache.cocoon.xml.dom.DOMBuilder and place this Document into the 
>>Session and ultimately it can be inserted into the pipeline with the 
>>Read DOM Session Transformer (I have not tried this part yet).
>>
>>I'll have a look at HTMLArea forms samples. Thanks.
>>
>>Andre
>>
>>---------------------------------------------------------------------
>>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
> 
> 


-- 
Andre H. Juffer              | Phone: +358-8-553 1161
The Biocenter and            | Fax: +358-8-553-1141
     the Dep. of Biochemistry | Email: Andre.Juffer@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/

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


Mime
View raw message