specials – Common useful elements

An XIST module that contains a collection of useful elements that can be used for all conversion targets, because they only generate text.

class ll.xist.ns.specials.filesize[source]

Bases: ll.xist.xsc.Element

The size (in bytes) of the file whose URL is the attribute href as a text node.

class Attrs[source]

Bases: ll.xist.xsc.Attrs

class href[source]

Bases: ll.xist.xsc.URLAttr

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.specials.filetime[source]

Bases: ll.xist.xsc.Element

The time of the last modification of the file whose URL is in the attribute href as a text node. This will always be an UTC timestamp.

class Attrs[source]

Bases: ll.xist.xsc.Attrs

class href[source]

Bases: ll.xist.xsc.URLAttr

The URL of the file.

class format[source]

Bases: ll.xist.xsc.TextAttr

A strftime() compatible formatstring for formatting the timestamp.

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.specials.time[source]

Bases: ll.xist.xsc.Element

the current time (i.e. the time when convert() is called). You can specify the format of the string in the attribute format, which is a strftime() compatible string.

class Attrs[source]

Bases: ll.xist.xsc.Attrs

class format[source]

Bases: ll.xist.xsc.TextAttr

A strftime() compatible formatstring for formatting the timestamp.

class utc[source]

Bases: ll.xist.xsc.BoolAttr

Should UTC be used or local time?

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.specials.ignore[source]

Bases: ll.xist.xsc.Element

Element that will be ignored when converted.

ignore can be used to comment out stuff. The content of the element must of course still be wellformed.

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.specials.include[source]

Bases: ll.xist.xsc.Element

class Attrs[source]

Bases: ll.xist.xsc.Attrs

class src[source]

Bases: ll.xist.xsc.URLAttr

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.specials.loremipsum[source]

Bases: ll.xist.xsc.Element

class Attrs[source]

Bases: ll.xist.xsc.Attrs

class len[source]

Bases: ll.xist.xsc.IntAttr

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.specials.wrap[source]

Bases: ll.xist.xsc.Element

A wrapper element that returns its content when converted.

This is e.g. useful if you want to parse a file that starts with ll.xist.ns.jsp processing instructions.

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.specials.AttrDecorator[source]

Bases: ll.xist.xsc.Element

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.specials.literal[source]

Bases: ll.xist.xsc.ProcInst

literal is a processing instruction that will output its content literally when published.

publish(publisher)[source]

Generate unicode strings for the node. publisher must be an instance of ll.xist.xsc.Publisher.

The encoding and xhtml specification are taken from the publisher.

class ll.xist.ns.specials.url[source]

Bases: ll.xist.xsc.ProcInst

url is a processing instruction containing an URL. On publishing it will be replaced by an URL that is relative to the base URL of the publisher.

parsed(parser, start=None)[source]

This method will be called by the parser parser once after self is created by the parser (This is used e.g. by URLAttr to incorporate the base URL into the attribute).

event is the parser event that initiated the call.

publish(publisher)[source]

Generate unicode strings for the node. publisher must be an instance of ll.xist.xsc.Publisher.

The encoding and xhtml specification are taken from the publisher.

class ll.xist.ns.specials.lf[source]

Bases: ll.xist.xsc.CharRef

line feed

class ll.xist.ns.specials.cr[source]

Bases: ll.xist.xsc.CharRef

carriage return

class ll.xist.ns.specials.tab[source]

Bases: ll.xist.xsc.CharRef

horizontal tab

class ll.xist.ns.specials.esc[source]

Bases: ll.xist.xsc.CharRef

escape