> Out of curiosity, is this conversion done by formencode, Kid, or is this
> something you've added?
It's a formencode (or ElementTree I'm not sur, htmlgen is a wrapper
around it) convention to be able to define namespace for an attribute.
Currently the only thing I could create with it are <? .... ?>
fragment, for this I define raw XML.
> Also, which documentation are you using for widgets?
I used an older/customized version of widget. So I can't help you. My
first test with the current version give something like
...
from formencode.htmlgen import html as T
...
class DivForm(TableForm):
template = str(
T.form(name="${widget.name}",
xmlns__py="http://purl.org/kid/ns#", action="${getattr(self, 'action',
None)}", method="${getattr(self, 'method', 'post')}", onsubmit="return
validateForm(this)")(
T.div(id="f_${widget.name}_errors_",
class_="formFieldErrors")(
T.span(py__if="getattr(self, errors, None)",
py__replace="getattr(self, errors, None)")
),
T.div(py__for="widget in widgets",
py__replace="XML(widget.insert(getattr(self, widget.name, None),
input_values, widget_error.get(widget.name, None)))"),
T.div(id="f_${widget.name}_actions_",
class_="formActions")(
T.input(type="submit", id="btn_save",
name="btn_save", value="save", class_="button")
),
)
)