You might want to try to set the content-type to xhtml in the expose decorator

@expose(template="...", content_type="application/xhtml+xml")

On 7/17/06, Donald Ball <[EMAIL PROTECTED]> wrote:
>
> Hey guys, boy, do I feel stupid today. I'm trying to coerce turbogears/kid
> into returning my pages as application/xhtml+xml so that they can be
> parsed via XmlHttpRequest.responseXML and I can use that fancy
> MochiKit.DOM.swapDOM function. Basically, I'm writing a little poll tool
> and want users to have the option to have the form submitted via AJAX and
> the poll results show up inline in place of the form.
>
> Sadly, nothing is working, apparently because my app keeps returning the
> results as text/html. I've changed the .cfg files to contain:
>
> kid.outputformat="xhtml"
>
> and edited master.kid and the other relevant kid files to contain the
> basic preamble:
>
> <?xml version="1.0"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> <?python import sitetemplate ?>
> <html xmlns="http://www.w3.org/1999/xhtml";
> xmlns:py="http://purl.org/kid/ns#"; py:extends="sitetemplate">
>
> <head>
>      <meta content="application/xhtml+xml; charset=UTF-8"
> http-equiv="content-type" py:replace="''"/>
>
> (One wonders both why the kid templates don't contain the xml header if
> they use the xhtml dtd and namespace, and why the kid templates even
> bother with content-type meta header elements instead of setting those
> values in the actual heders... but that's neither here nor there ;))
>
> Any suggestions or gotchas for me? Thanks muchly.
>
> - donald
>
> >
>


-- 
cheers
    elvelind grandin

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to