I had come to exactly the same comclusion earlier today.

I need to add ENTITY tags, and change the doctype and this is is done the same way.

We need a way to pass in options to the serializer

I think the best way is to modify the render function
both in
http://trac.turbogears.org/turbogears/browser/trunk/turbogears/view/base.py#L100
and
http://trac.turbogears.org/turbogears/browser/trunk/plugins/kid/turbokid/kidsupport.py#L124
and of course if the other templates suport it there too.

adding a kw argument that will be pass all the posible arguments to the serializer.

maybe we can get away with it having TurboKid load the config files?

Then add a set of entries to the [global] #VIEW under app.cfg

to send stuff to the serializer, what you think?

I think this belongs to the trunk mailing list now, if you agree I'll submit a bug I don't know how this part of TG works so I'm not sure if I can make the patch for it. but if noone comes out I'll add it to my todo list.

On 5/16/06, Ivo Looser <[EMAIL PROTECTED]> wrote:

Hi Together

I got an answer about this on the Kid Mailinglist.

Solution One was:
# assuming your template is stored in test.kid
import kid
from kid.serialization import XMLSerializer
template = kid.load_template('test.kid')
t = template.Template()
serializer = XMLSerializer(decl=1)
serializer.strip_whitespace = True
print t.serialize(output=serializer)


Solution Two was:
serializer = kid.HTMLSerializer()
serializer.strip_whitespace = True
print your_template.serialize(output=serializer)


How is the way when i work with turbogear widgets? is there a way to
override the Render method?

Thanks best Regards Ivo

2006/5/10, Ivo Looser <[EMAIL PROTECTED]>:
> Hi Together
>
> First i just Time to say thanks to all Contributors for the new Release.
>
> Now the Question:-)
> I have a Widget witch has a Template like this.
>
> <div xmlns:py="http://purl.org/kid/ns#" class="tests" id="test"
> py:if="len(products) > 0">
> <h2>a aktionen</h2>
>    <table>
>        <tr>
>           <td>test...</td>
>        </tr>
>    </table>
> </div>
>
>
> Because it should no space or tab be visible in the output i whould
> like to strip all tabs and spaces.
>
> Basicly the Output should look like this:
> <h2>a aktionen</h2><table><tr><td>test...</td></tr></table>
>
> Someone now how i can do that in kid?
>
> Thanks alot.
>





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