Cheers for the suggestion but it doesn't seem to have any effect.

I realise I'm probably posting in the wrong group, but I'd rather let
Pylons take care of Kid so any Pylons solution is going to be easier
(rather than wrangling Kid directly and bypassing Pylons here). I'm
confident it's probably me not configuring something correctly...

I've noticed that I get an error if Kid detects I've entered invalid
XML in my template file. I presume that this validation process must
be close to the bit that is doing the conversion.
I input an invalid tag and get the following stack trace:

The function call is, as suggested,
render_response(template,format="xhtml")

http://pylonshq.com/pasties/259

To my inexperienced eyes it looks like from line 45 Kid is parsing my
template and running the python code, so I presume it is somewhere
around there that the conversion happens, but I can't see where.

For reference, my middleware.py uses this line to tell pylons to use
Kid:
config.init_app(global_conf, app_conf, package='myapplication',
template_engine='kid')

I notice this line in environment.py:
# The following template options are passed to your template engines
    tmpl_options = {}
Adding 'format':'xhtml' doesn't make a difference here either.

There is nothing in development.ini that refers to Kid or templating
options

Sorry again about posting this to the pylons group but I'm convinced
there are some Pylons configuration options that might fix it if only
I knew where to look :)

Cheers for patience,
Ben

On May 1, 6:31 pm, Ben Bangert <[EMAIL PROTECTED]> wrote:
> On May 1, 2007, at 8:49 AM, [EMAIL PROTECTED] wrote:
>
> > All my kid templates work great, but they seem to be parsed through
> > some kind of filter (pylons is using HTMLSerializer from Kid maybe?)
> > that converts all my tags into HTML 4.01 versions: <title> becomes
> > <TITLE> and <img src="blah" /> becomes <IMG SRC="blah">
>
> > what is it that is doing this? Is there some way for me to switch it
> > to spit out XHTML? or just to preferably leave my code as I wrote it?
> > It worries me that the server is going through this extra conversion
> > process for every page it renders.
>
> I believe this is Kid doing that. Pylons has no output filtering of
> its own. You probably need to specify a default format for Kid of
> xhtml (though I'm pretty certain that the Pylons Kid defaults already
> set the format to xhtml...).
>
> Alternatively, you can specify format='xhtml' to render_response or
> render which should be passed to Kid.
>
> HTH,
> Ben


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to