ppdo wrote:
Being a beginner with Turbogears, I bumped into a problem while trying
to generate some WML pages.
...
the page comes out like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>

Reading some threads in this forum and other sources, it seems the
problem is the serializer of Kid: is there set it so it passes the
DOCTYPE specified in the .kid page or, at least, to bypass it?

Kid output can be tweaked easily in regard to xml flavor and formatting. Though WML is not one of the predefined formats, you can easily create it like that:

wml_doctype = ('wml', "-//WAPFORUM//DTD WML 1.1//EN",
        "http://www.wapforum.org/DTD/wml_1.1.xml";)
format_wml = kid.XMLSerializer(doctype=wml_doctype)

Then, you would use it like this:

@expose(template="rooster.templates.welcome", format=format_wml)

I have added WML as a predefined output method to Kid now, so in Kid 0.9.5 you will be able to write format='wml' or configure it globally with kid.outputformat="wml" in your app.cfg file.

-- Christoph

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to