kerinin wrote:
> Is there any way to make the XML produced by kid to look a little
> cleaner?  Every time I use a widget the XML that's produced looses it's
> indentation.  It would be nice if widget content was indented to match
> the indentation of ${} call in the parent template.  It makes it
> difficult to read the code that's produced.
> 
> I know this is a minor issue, but it's annoying.

The serializers of the new Kid version 0.9.4 have a "format" argument. 
You can specify all kinds of output formatting here, including 
auto-indentation (see http://kid-templating.org/guide.html#id4).

Please don't confuse this with the "format" argument of the TurboGears 
expose decorator which actually corresponds to the "output" argument of 
Kid serializers and determines whether you want xml, html, xhtml or 
plain format.

Currently the format feature is not well integrated because it was not 
there when TurboKid was written. You probably have to use it that way:

import kid
format_pretty = kid.HTMLSerializer(doctype='html', format='pretty')

@expose(template="...", format=format_pretty)

I think it would be good to integrate TurboKid into the next Kid release 
(or even better, support the more generic API that is also used for 
Genshi), and make it more easy to specify Kid's output format.

But I need some TurboGears expert to tell me exactly which methods Kid 
should provide to support this API so that we can get rid of TurboKid. 
You can make comments or suggestions concerning this issue here:
http://www.kid-templating.org/trac/ticket/188

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