form – Form related elements

This XIST module contains convenience classes for form elements. These are just abbreviations for the various <input type="..."> elements.

class ll.xist.ns.form.text(*content, **attrs)[source]

Bases: ll.xist.ns.html.input

class Attrs(*args, **kwargs)[source]

Bases: ll.xist.ns.html.Attrs

convert(converter)[source]

implementation of the conversion method. When you define your own element classes you have to overwrite this method and implement the desired conversion.

This method must return an instance of Node. It may not change self.

class ll.xist.ns.form.checkbox(*content, **attrs)[source]

Bases: ll.xist.ns.html.input

class Attrs(*args, **kwargs)[source]

Bases: ll.xist.ns.html.Attrs

convert(converter)[source]

implementation of the conversion method. When you define your own element classes you have to overwrite this method and implement the desired conversion.

This method must return an instance of Node. It may not change self.

class ll.xist.ns.form.radio(*content, **attrs)[source]

Bases: ll.xist.ns.html.input

class Attrs(*args, **kwargs)[source]

Bases: ll.xist.ns.html.Attrs

convert(converter)[source]

implementation of the conversion method. When you define your own element classes you have to overwrite this method and implement the desired conversion.

This method must return an instance of Node. It may not change self.

class ll.xist.ns.form.file(*content, **attrs)[source]

Bases: ll.xist.ns.html.input

class Attrs(*args, **kwargs)[source]

Bases: ll.xist.ns.html.Attrs

convert(converter)[source]

implementation of the conversion method. When you define your own element classes you have to overwrite this method and implement the desired conversion.

This method must return an instance of Node. It may not change self.

class ll.xist.ns.form.submit(*content, **attrs)[source]

Bases: ll.xist.ns.html.input

class Attrs(*args, **kwargs)[source]

Bases: ll.xist.ns.html.Attrs

convert(converter)[source]

implementation of the conversion method. When you define your own element classes you have to overwrite this method and implement the desired conversion.

This method must return an instance of Node. It may not change self.

class ll.xist.ns.form.button(*content, **attrs)[source]

Bases: ll.xist.ns.html.input

class Attrs(*args, **kwargs)[source]

Bases: ll.xist.ns.html.Attrs

convert(converter)[source]

implementation of the conversion method. When you define your own element classes you have to overwrite this method and implement the desired conversion.

This method must return an instance of Node. It may not change self.

class ll.xist.ns.form.textarea(*content, **attrs)[source]

Bases: ll.xist.ns.html.textarea

class Attrs(*args, **kwargs)[source]

Bases: ll.xist.ns.html.Attrs

class value(*content)[source]

Bases: ll.xist.xsc.TextAttr

convert(converter)[source]

implementation of the conversion method. When you define your own element classes you have to overwrite this method and implement the desired conversion.

This method must return an instance of Node. It may not change self.

class ll.xist.ns.form.hidden(*content, **attrs)[source]

Bases: ll.xist.ns.html.input

class Attrs(*args, **kwargs)[source]

Bases: ll.xist.ns.html.Attrs

__str__()[source]

Return the character content of self as a string. This means that comments and processing instructions will be filtered out. For elements you’ll get the element content.

__str__() can be used everywhere where a plain string representation of the node is required.

For example:

>>> from ll.xist.ns import html
>>> e = html.html(
...    html.head(
...       html.title("The page")
...    ),
...    html.body(
...       html.h1("The header"),
...       html.p("The content", class_="content")
...    )
... )
>>> print(e)
The pageThe headerThe content
convert(converter)[source]

implementation of the conversion method. When you define your own element classes you have to overwrite this method and implement the desired conversion.

This method must return an instance of Node. It may not change self.