[lxml-dev] problem with e-factory input text field

Dominique.Holzwarth at ch.delarue.com Dominique.Holzwarth at ch.delarue.com
Mon Jul 14 09:40:42 CEST 2008


Hi everyone

I'm trying to generate a HTML page with the E-Factory (from lxml.html import builder as E) but I'm having some problem with checkboxes...
The output I'd like to get is the following:

<input type="checkbox" name="something" value="1">label text</input>

I'm creating the input field with:

E.INPUT("label text", name="something", type="checkbox", value="1") but when i do a lxml.html.tostring(...) of my whole page object the "label" text" will be missing and the tag will look like that:

<input type="checkbox" name="something" value="1"> <-- Note: no closing tag and no text-node

When i do a lxml.etree.tostring of just that tag the result is perfect, but that method will cause troubles with tags like <script type="text/javascript" src="..."> so I think I can't use that on the whole page...
Does anyone got an idea how to create the above state output?

Greetings
Dominique

Dominique Holzwarth | De La Rue International Limited
Software Engineer
dominique.holzwarth at ch.delarue.com<mailto:dominique.holzwarth at ch.delarue.com> | tel: +41 (0) 31 997 56 13 | fax: +41 (0) 997 56 80
Berne Branch, Morgenstrasse 131, 3018 Berne, Switzerland | www.delarue.com<http://www.delarue.com/>



*****************************************************************************
This e-mail and any files attached are strictly confidential, may be legally
privileged and are intended solely for the addressee. If you are not the
intended recipient please notify the sender immediately by return email and
then delete the e-mail and any attachments immediately.

The views and or opinions expressed in this e-mail are not necessarily the
views of De La Rue plc or any of its subsidiaries and the De La Rue Group
of companies, their directors, officers and employees make no representation
about and accept no liability for its accuracy or completeness.

You should ensure that you have adequate virus protection as the De La Rue
Group of companies do not accept liability for any viruses.

De La Rue plc Registered No.3834125, De La Rue Holdings plc Registered
No 58025 and De La Rue International Limited Registered No 720284 are all
registered in England with their registered office at:
De La Rue House, Jays Close, Viables, Hampshire RG22 4BS
*****************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/lxml-dev/attachments/20080714/40f72d48/attachment-0001.htm 


More information about the lxml-dev mailing list