Package tdi :: Package markup :: Package text :: Module builder :: Class TextBuilder
[frames] | no frames]

Class TextBuilder

source code

object --+
         |
        TextBuilder

Text Template tree builder
Instance Methods
 
__init__(self, encoder, decoder, analyzer=None)
Initialization
source code
 
handle_text(self, data) source code
 
handle_escape(self, escaped, data) source code
 
handle_starttag(self, name, attr, closed, data) source code
 
handle_endtag(self, name, data) source code
 
handle_comment(self, data) source code
 
handle_pi(self, data) source code
 
handle_msection(self, name, value, data) source code
 
handle_decl(self, name, value, data) source code
 
handle_encoding(self, encoding) source code
 
finalize(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  __implements__ = [<class 'tdi.interfaces.BuilderInterface'>, <...
Instance Variables
str encoding = 'utf-8'
Template encoding
AttributeAnalyzerInterface analyze
Attribute analyzer
DecoderInterface decoder
Decoder
EncoderInterface encoder
Encoder
Properties

Inherited from object: __class__

Method Details

__init__(self, encoder, decoder, analyzer=None)
(Constructor)

source code 
Initialization
Parameters:
  • encoder (callable) - Encoder factory
  • decoder (callable) - Decoder factory
  • analyzer (AttributeAnalyzerInterface) - Attribute analyzer
Overrides: object.__init__

handle_text(self, data)

source code 

See Also: ListenerInterface

handle_escape(self, escaped, data)

source code 

See Also: ListenerInterface

handle_starttag(self, name, attr, closed, data)

source code 

See Also: ListenerInterface

handle_endtag(self, name, data)

source code 

See Also: ListenerInterface

handle_comment(self, data)

source code 

See Also: ListenerInterface

handle_pi(self, data)

source code 

See Also: ListenerInterface

handle_msection(self, name, value, data)

source code 

See Also: ListenerInterface

handle_decl(self, name, value, data)

source code 

See Also: ListenerInterface

handle_encoding(self, encoding)

source code 
Raises:

finalize(self)

source code 

Class Variable Details

__implements__

Value:
[<class 'tdi.interfaces.BuilderInterface'>,
 <class 'tdi.interfaces.BuildingListenerInterface'>]

Instance Variable Details

encoding

Template encoding
Type:
str
Value:
'utf-8'

analyze

Attribute analyzer
Type:
AttributeAnalyzerInterface

decoder

Decoder
Type:
DecoderInterface

encoder

Encoder
Type:
EncoderInterface