If you put the script contents between <xsl:comment> the quotes aeree unescaped.
> -----Original Message----- > From: Peter Sparkes [mailto:[EMAIL PROTECTED] > Sent: vrijdag 21 september 2007 8:33 > To: [email protected] > Subject: Re: xhtml serialization and form textarea > > Thanks Jasha , > > Your suggestion works although I had some other problems that > I had to fix. > > However the XHTMLSerializer turns > > <script type="text/javascript">document.write('<img alt="lodge" > id="imgslide" src=" '+theimage[0][0]+' " />')</script> > > into > > <script type="text/javascript">document.write('<img alt="lodge" > id="imgslide" src="'+theimage[0][0]+' " />')</script> > > Do you know > > * how I can fix this? > * If its a known fault with the serializer? > > > Thanks again > > Peter > > > > 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:[EMAIL PROTECTED] > >> Sent: zondag 16 september 2007 16:09 > >> To: [email protected] > >> 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 > >>>> [EMAIL PROTECTED] > >>>> www.hippo.nl > >>>> > >>>> > >>>> > >>>> > >>>>> -----Original Message----- > >>>>> From: Peter Sparkes [mailto:[EMAIL PROTECTED] > >>>>> Sent: maandag 3 september 2007 19:46 > >>>>> To: [email protected] > >>>>> 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 > >>>>> > >>>>> > >>>>>> [EMAIL PROTECTED]> > >>>>>> > >>>>>> 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:[EMAIL PROTECTED] > >>>>>> Sent: Mon 9/3/2007 6:17 PM > >>>>>> To: [email protected] > >>>>>> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
