[EMAIL PROTECTED] wrote:
> Unfortunately this initially (until I can start making proper use of
> Kid) required me to insert various generated chunks of HTML into Kid
> templates using the ${XML(...)} feature. Alas, when the HTML isn't
> properly-formed I get a huge traceback which ends with the information
> that there's a problem at line 1, column 41. But it doesn't show me the
> XML source it's complaining about. As of this writing I have spent
> about an hour looking for an XML problem and I'm about ready to give
> up.

This is a problem caused by Kid's way of operating by compiling XML to
Python and then using pull streams. Two things could be done:

First, in many cases, Kid should supplement the usual traceback with an
output of the data or Python expression it was processing when the error
occurred. This was already implemented for py:attrs expressions, for
instance. Maybe I can do something similar for the XML() feature. Can
you send me a small example template where you get such a meaningless
message with XML()? I'll try to improve this and get it in Kid 0.9.4
which I think should appear soon.

Second, in the long run, we will also need to implement some way of
preserving the context. Some suggestions have been made, e.g. here:
http://www.kid-templating.org/trac/ticket/95
This should be best discussed on the Kid mailing list:
https://lists.sourceforge.net/lists/listinfo/kid-template-discuss

Also, please note that there Genshi now (http://genshi.edgewall.org)
that may supersede Kid in the long run, because it uses a different
approach that allows for much better error messages.

Anyway, I think there is still a lot of potential for Kid to be improved
and I would like to see Kid alive for quite a while, since it is still
very useful and elegant.

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

Reply via email to