cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsui, Alban" <Alban.T...@COGNOS.com>
Subject RE: dynamic "encoding" for html serialiser?
Date Wed, 16 Jul 2003 16:24:25 GMT
So you are saying I could do something like:


			<map:match pattern="*/test">
				<map:act type="characterencoding">
					<map:parameter name="form-encoding"
value="utf-8"/>
				</map:act>
				<map:act type="sethtmlencparam"/> <!-- set
up pipeline param html_enc for serializer -->
				<map:generate type="serverpages"
src="test.xsp"/>
				<map:serialize type="{html_enc}"/>
			</map:match>


and have several html serializer for different encodings. 

Correct?

I think I will need shiftjis for japanse, some chinese encodings and korean
encoding plus standard iso encoding... would cocoon support that? 

it just seems to me it is a bit strange we can pass that encoding as a
parameter into the <map:serialize> tag.

Cheers

-----Original Message-----
From: Geoff Howard [mailto:cocoon@leverageweb.com]
Sent: 16 July 2003 16:25
To: users@cocoon.apache.org
Subject: Re: dynamic "encoding" for html serialiser?


You declare the encoding as part of the serializer config in the 
sitemap.  if you need the same serializer to use different encodings in 
different pipelines, you need to declare the serializer once for each of 
  the encodings with a different name each time.

Geoff


Tsui, Alban wrote:
> Hi
> 
> I am trying to write a xsp page directly generating html and my page 
> will take in a parameter which would tell me what final encoding the 
> page should use. SO I tried to "manually" generate that
> 
> <meta Content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
> 
> tag ...
> but my serializer seems to append
> 
> <meta Content="text/html; charset=UTF-8" http-equiv="Content-Type">
> 
> in my final html output.
> 
> i have not specified any encoding in my html serializer defintion in my 
> sitemap at all... and I have an entry as follows:
> 
>         <map:serializers default="html">
>                 <map:serializer logger="sitemap.serializer.xml" 
> mime-type="text/xml" name="xml" 
> src="org.apache.cocoon.serialization.XMLSerializer"/>
> 
>                 <map:serializer logger="sitemap.serializer.html" 
> mime-type="text/html" name="html" 
> src="org.apache.cocoon.serialization.HTMLSerializer">
> 
>                         <buffer-size>1024</buffer-size>
>                 </map:serializer>
>                 <map:serializer logger="sitemap.serializer.svgxml" 
> mime-type="image/svg-xml" name="svgxml" 
> src="org.apache.cocoon.serialization.XMLSerializer">
> 
>                         <doctype-public>-//W3C//DTD SVG 20000303 
> Stylable//EN</doctype-public>
>                         
>
<doctype-system>http://www.w3.org/TR/2000/03/WD-SVG-20000303/</doctype-syste
m> 
> 
>                 </map:serializer>
>                 <map:serializer mime-type="image/jpeg" name="svg2jpeg" 
> src="org.apache.cocoon.serialization.SVGSerializer">
> 
>                         <parameter name="quality" type="float" 
> value="0.9"/>
>                 </map:serializer>
>                 <map:serializer mime-type="image/png" name="svg2png" 
> src="org.apache.cocoon.serialization.SVGSerializer"/>
> 
>         </map:serializers>
> 
> Is there anyway I could effect the final encoding in that meta string 
> generated from the serialiser from within the xsp generator?
> 
> I am using version 2.0.3 cocoon.
> 
> AT
> 
> Join us at Cognos' biggest event of the year/ Enterprise 2003, The 
> Cognos Business Forum/.  Taking place in over 25 cities around the 
> world, it's an opportunity for Business and IT leaders to learn about 
> strategies for driving performance. Visit_ 
> http://www.cognos.com/enterprise03_ for more details.
> 
> This message may contain privileged and/or confidential information.  If 
> you have received this e-mail in error or are not the intended 
> recipient, you may not use, copy, disseminate or distribute it; do not 
> open any attachments, delete it immediately from your system and notify 
> the sender promptly by e-mail that you have done so.  Thank you.
> 



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

Join us at Cognos' biggest event of the year Enterprise 2003, The Cognos
Business Forum.  Taking place in over 25 cities around the world, it's an
opportunity for Business and IT leaders to learn about strategies for
driving performance. Visit http://www.cognos.com/enterprise03 for more
details. 

This message may contain privileged and/or confidential information.  If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.

Mime
View raw message