Hi Kevin,

I ran into something similar where I wanted my pages to by xhtml 1.1
strict, but Kid's FAQ explained the 4.01 Transitional for the HTML
serializer.  I can accept that reasoning, but I was thinking that it
would be nice if there was some way in TG to be able to choose the
serializer. (i.e. HTML or XML) since Kid has both.

'I tried monkey patching turbogears.view.serializer, but that did not
work and is fragile anyway.

Not sure if there are API differences between the two serializers and if
that would cause trouble for TG.  I guess some investigating is in order.

Anyway, just a thought.  I can live with HTML 4 for now.

Thanks,
Krys

Loving TG BTW. :-)

Kevin Dangoor wrote:

>On 10/1/05, Robert Leftwich <[EMAIL PROTECTED]> wrote:
>  
>
>>I'm attempting to return xml from TurboGears but the returned document always
>>has a transitional html doctype and the element names are all upper case. I'm
>>setting turbogearsfmt = 'xml' and cherrypy.response.headerMap["Content-Type"] 
>>=
>>"application/xml". How can I tell Kid to use an XML serialiser rather than the
>>HTML serialiser?
>>    
>>
>
>it looks like there's no means to do so using built in mechanisms at
>present. Which is not to say it's difficult, just more manual. This is
>something that needs to be fixed soon.
>
>from turbogears import view
>
>class Foo:
>    @turbogears.expose()
>    def index(self):
>        tclass = view.lookupTemplate("yourpackage.templates.templatename")
>        t = tclass(yourdictionary)
>        t.std = view.stdvars()
>        return t.serialize(output="xml")
>
>Kevin
>
>--
>Kevin Dangoor
>Author of the Zesty News RSS newsreader
>
>email: [EMAIL PROTECTED]
>company: http://www.BlazingThings.com
>blog: http://www.BlueSkyOnMars.com
>
>  
>

Reply via email to