cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasha Joachimsthal" <j.joachimst...@hippo.nl>
Subject RE: xhtml serialization and form textarea
Date Mon, 17 Sep 2007 07:22:05 GMT
Hi,

In the latest 2.1 branch code you can set

<map:serializer logger="sitemap.serializer.xml" mime-type="text/html;
charset=UTF-8" name="xhtml"
src="org.apache.cocoon.components.serializers.XHTMLSerializer">
        <omit-xml-declaration>yes</omit-xml-declaration>
        <doctype-default>strict</doctype-default>
        <encoding>UTF-8</encoding>
        <indent>no</indent>
      </map:serializer>

The doctype will be strict then.

Jasha Joachimsthal

Hippo
Oosteinde 11
1017 WT Amsterdam
The Netherlands
+31 (0)20 5224466 

www.hippo.nl 

> -----Original Message-----
> From: Peter Sparkes [mailto:peter@didm.co.uk] 
> Sent: zondag 16 september 2007 16:09
> To: users@cocoon.apache.org
> Subject: Re: xhtml serialization and form textarea
> 
> Hi,
> 
> On further testing the 2.1.10
> org.apache.cocoon.components.serializers.XHTMLSerializer 
> serializes the output as
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> 
> although it has the following settings
> 
> <doctype-public>-//W3C//DTD XHTML 1.0 
> Strict//EN</doctype-public> 
> <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.
> dtd</doctype-system>
> 
> I have tried using the latest 2.1 branch code of this block, 
> I assume that it is cocoon-serializers-block.jar, and get the 
> the same results.
> 
> Am I using the correct jar?
> 
> 
> Peter
> 
> > Thanks Jasha,
> >
> > As you suggested I tried the 2.1.10
> > org.apache.cocoon.components.serializers.XHTMLSerializer  
> and it works 
> > fine for  the browsers I have tried so far.
> >
> > I very much appreciate you help
> >
> > Thanks again
> >
> > Peter
> >> Hi Peter,
> >>
> >> The XMLSerializer closes all elements which leads to an unwanted 
> >> result in case of textarea, script and some other elements that 
> >> browsers can't handle when closed. You can make your own XSL that 
> >> imports the cforms XSLs and override the template of the 
> textarea. An 
> >> other option is to use 
> >> org.apache.cocoon.components.serializers.XHTMLSerializer. You may 
> >> have to use the latest 2.1 branch code of this block, some issues 
> >> have been fixed in the code the last few months.
> >>
> >> Jasha Joachimsthal
> >>
> >> ---------
> >>
> >> Hippo
> >> Oosteinde 11
> >> 1017 WT Amsterdam
> >> The Netherlands
> >> +31 (0)20 5224466
> >> jasha@hippo.nl
> >> www.hippo.nl
> >>
> >>
> >>  
> >>> -----Original Message-----
> >>> From: Peter Sparkes [mailto:peter@didm.co.uk]
> >>> Sent: maandag 3 september 2007 19:46
> >>> To: users@cocoon.apache.org
> >>> Subject: Re: xhtml serialization and form textarea
> >>>
> >>>
> >>> Hi Jasha,
> >>>
> >>> The Class is org.apache.cocoon.serialization.XMLSerializer. The 
> >>> version is whatever comes with cocoon 2.1.10
> >>>
> >>> Doing something like:
> >>>
> >>> <textarea ......>-</textarea>
> >>>
> >>> does not work as the <textarea .. is generated from
> >>>
> >>> <ft:widget id="lodge">
> >>>       <fi:styling  type="textarea" rows="10" cols="40"/>  
> >>> </ft:widget>
> >>>
> >>> by the forms styling and I can't work out how to change the 
> >>> stylesheets
> >>>
> >>> Peter
> >>>    
> >>>> peter@didm.co.uk>
> >>>>
> >>>> Hi Peter,
> >>>>
> >>>> which serializer are you using (both class and version)?
> >>>> As workaround you can put a   in the textarea if your       
> >>> version of the XHTMLSerializer closes the textarea 
> element (not very 
> >>> nice).
> >>>    
> >>>> Jasha
> >>>>
> >>>>
> >>>> -----Original Message-----
> >>>> From:    Peter Sparkes [mailto:peter@didm.co.uk]
> >>>> Sent:    Mon 9/3/2007 6:17 PM
> >>>> To:    users@cocoon.apache.org
> >>>> Cc:   
> >>>> Subject:    xhtml serialization and form textarea
> >>>>
> >>>> Hi,
> >>>>
> >>>> 1.    Using CForms I generate a form with a textarea. If I       
> >>> serialize it    
> >>>> as xml the output is :
> >>>>
> >>>>  <textarea title="" name="enjoy" id="enjoy:input"       
> >>> class="forms field    
> >>>> active" rows="10" cols="40"/>
> >>>>
> >>>> 2.    If I serialize it as html the output is :
> >>>>
> >>>>  <textarea title="" name="enjoy" id="enjoy:input"       
> >>> class="forms field    
> >>>> active" rows="10" cols="40"></textarea>
> >>>>
> >>>> which is correct and the form displays correctly
> >>>>
> >>>> 3.    However when I serialize as XHTML 1.0 Strict the       
> >>> xhtml output is:
> >>>    
> >>>>  <textarea title="" name="enjoy" id="enjoy:input"       
> >>> class="forms field    
> >>>> active" rows="10" cols="40"/>
> >>>>
> >>>> which is not correct and the form does not display correctly
> >>>>
> >>>> Please, how do I get correct xhtml
> >>>>
> >>>> Thanks
> >>>>
> >>>> Peter Sparkes
> >>>>
> >
> >
> 
> ---------------------------------------------------------------------
> 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