I submitted the patch
http://trac.turbogears.org/turbogears/ticket/403

to fix the problem on TurboKid.

From my understand, the first number is used to tell is the Element must be used as event type (in Pull terminology) like START_TAG, END_TAG... and Element provide by the generator are only used to store tag's name and its attributes, but not its children Elements.

Regards

FYI : I expect to release ASAP a fork of Widget, created without Kid and my feedback about this approach.

Kevin Dangoor a écrit :
On 1/16/06, David Bernard <[EMAIL PROTECTED]> wrote:

My PluginTemplate works in the other way, produce Elements (nativ
format) in transform and flatten the tree of Element to string into
render.

My question is about what must be return by engine.transform() and
widget.insert()

Both are important because, I've got widget that doesn't use engine to
provide the insert method.


I see. It's always interesting to hear of the unexpected things people
think of :)

You're right that the transform documentation is just plain wrong.

In [2]:t = kid.Template("<html><p>Data</p></html>")

In [3]:t.transform()
Out[3]:<generator object at 0x5dc670>

In [4]:list(t.transform())
Out[4]:
[(1, <Element u'html' at 0x5c0d10>),
 (1, <Element u'p' at 0x5c0da0>),
 (3, u'Data'),
 (2, <Element u'p' at 0x5c0da0>),
 (2, <Element u'html' at 0x5c0d10>)]

David Stanek probably knows offhand what the first part of those tuples are.

Kevin

--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com


--
--------------------------------------------------------------
David "Dwayne" Bernard            Freelance Developer
                                  mailto:[EMAIL PROTECTED]
      \|/                         http://dwayne.java-fan.com
--o0O @.@ O0o-------------------------------------------------

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to