Christoph Zwerschke wrote:
> [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.
> 
Unfortunately it wouldn't be that easy, as the code is, as I mentioned, 
an existing application with bits of the content generated all over the 
place. I'd be happy to send you the whole thing, but it's currently a mess.

Your awareness of the problem is sufficient - I'm currently back using 
the original HTML generation methods for the moment.

> 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
> 
Right. I searched the group, but didn't look at the Trac instance.

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

Right. Please don't regard this as a complaint: it was just feedback 
(albeit duplicating other users' concerns). We've had similar problems 
with the system that generates www.python.org, and those are by no means 
fully solved yet. Parser error message generation is still a difficult 
problem fifty years on :-)

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb       http://holdenweb.blogspot.com
Recent Ramblings     http://del.icio.us/steve.holden

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