[ Module Hierarchy | Class Hierarchy ]

# Class Hierarchy

- markupbase.ParserBase: Parser base class which provides some common support methods used by the SGML/HTML and XHTML parsers.
  - HTMLParser.HTMLParser: Find tags and other markup and call handler functions.
    - genshi.input.HTMLParser: Parser for HTML input based on the Python HTMLParser module.
- object: The most base type
  - genshi.template.plugin.AbstractTemplateEnginePlugin: Implementation of the plugin API.
    - genshi.template.plugin.MarkupTemplateEnginePlugin: Implementation of the plugin API for markup templates.
    - genshi.template.plugin.TextTemplateEnginePlugin: Implementation of the plugin API for text templates.
  - exceptions.BaseException: Common base class for all exceptions
    - exceptions.Exception: Common base class for all non-exit exceptions.
      - genshi.input.ParseError: Exception raised when fatal syntax errors are found in the input being parsed.
      - genshi.path.PathSyntaxError: Exception raised when an XPath expression is syntactically incorrect.
      - exceptions.StandardError: Base class for all standard Python exceptions that do not represent interpreter exiting.
        - exceptions.ValueError: Inappropriate argument value (of correct type).
          - genshi.template.plugin.ConfigurationError: Exception raised when invalid plugin options are encountered.
      - genshi.template.base.TemplateError: Base exception class for errors related to template processing.
        - genshi.template.loader.TemplateNotFound: Exception raised when a specific template file could not be found.
        - genshi.template.base.TemplateRuntimeError: Exception raised when an the evaluation of a Python expression in a template causes an error.
          - genshi.template.eval.UndefinedError: Exception thrown when a template expression attempts to access a variable not defined in the context.
        - genshi.template.base.TemplateSyntaxError: Exception raised when an expression in a template causes a Python syntax error, or the template is not well-formed.
          - genshi.template.base.BadDirectiveError: Exception raised when an unknown directive is encountered when parsing a template.
  - genshi.template.eval.Code: Abstract base class for the Expression and Suite classes.
    - genshi.template.eval.Expression: Evaluates Python expressions used in templates.
    - genshi.template.eval.Suite: Executes Python statements used in templates.
  - genshi.template.base.Context: Container for template input data.
  - genshi.template.directives.Directive: Abstract base class for template directives.
    - genshi.template.directives.AttrsDirective: Implementation of the `py:attrs` template directive.
    - genshi.template.directives.ChooseDirective: Implementation of the `py:choose` directive for conditionally selecting one of several body elements to display.
    - genshi.template.directives.ContentDirective: Implementation of the `py:content` template directive.
    - genshi.template.directives.DefDirective: Implementation of the `py:def` template directive.
    - genshi.template.directives.ForDirective: Implementation of the `py:for` template directive for repeating an element based on an iterable in the context data.
    - genshi.template.directives.IfDirective: Implementation of the `py:if` template directive for conditionally excluding elements from being output.
    - genshi.template.directives.MatchDirective: Implementation of the `py:match` template directive.
    - genshi.template.directives.OtherwiseDirective: Implementation of the `py:otherwise` directive for nesting in a parent with the `py:choose` directive.
    - genshi.template.directives.ReplaceDirective: Implementation of the `py:replace` template directive.
    - genshi.template.directives.StripDirective: Implementation of the `py:strip` template directive.
    - genshi.template.directives.WhenDirective: Implementation of the `py:when` directive for nesting in a parent with the `py:choose` directive.
    - genshi.template.directives.WithDirective: Implementation of the `py:with` template directive, which allows shorthand access to variables and expressions.
  - genshi.output.DocType: Defines a number of commonly used DOCTYPE declarations as constants.
  - genshi.builder.ElementFactory: Factory for Element objects.
  - genshi.builder.Fragment: Represents a markup fragment, which is basically just a list of element or text nodes.
    - genshi.builder.Element: Simple XML output generator based on the builder pattern.
  - genshi.filters.html.HTMLFormFiller: A stream filter that can populate HTML forms from a dictionary of values.
  - genshi.input.HTMLParser: Parser for HTML input based on the Python HTMLParser module.
  - genshi.filters.html.HTMLSanitizer: A filter that removes potentially dangerous HTML tags and attributes from the stream.
  - genshi.filters.transform.InjectorTransformation: Abstract base class for transformations that inject content into a stream.
  - genshi.template.eval.LookupBase: Abstract base class for variable lookup implementations.
    - genshi.template.eval.LenientLookup: Default variable lookup mechanism for expressions.
    - genshi.template.eval.StrictLookup: Strict variable lookup mechanism for expressions.
  - genshi.core.Namespace: Utility class creating and testing elements with a namespace.
  - genshi.path.Path: Implements basic XPath support on streams.
  - genshi.core.Stream: Represents a stream of markup events.
    - genshi.filters.transform.StreamBuffer: Stream event buffer used for cut and copy transformations.
  - genshi.template.base.Template: Abstract template base class.
    - genshi.template.markup.MarkupTemplate: Implementation of the template language for XML-based templates.
    - genshi.template.text.NewTextTemplate: Implementation of a simple text-based template engine.
    - genshi.template.text.OldTextTemplate: Legacy implementation of the old syntax text-based templates.
  - genshi.template.loader.TemplateLoader: Responsible for loading templates from files on the specified search path.
  - genshi.output.TextSerializer: Produces plain text from an event stream.
  - genshi.filters.transform.Transformer: Stream filter that can apply a variety of different transformations to a stream.
  - genshi.filters.i18n.Translator: Can extract and translate localizable strings from markup streams and templates.
  - genshi.template.eval.Undefined: Represents a reference to an undefined variable.
  - genshi.input.XMLParser: Generator-based XML parser based on roughly equivalent code in Kid/ElementTree.
  - genshi.output.XMLSerializer: Produces XML text from an event stream.
    - genshi.output.XHTMLSerializer: Produces XHTML text from an event stream.
      - genshi.output.HTMLSerializer: Produces HTML text from an event stream.
  - basestring: Type basestring cannot be instantiated; it is the base for str and unicode.
    - unicode: unicode(string [, encoding[, errors]]) -> object
      - genshi.core.Markup: Marks a string as being safe for inclusion in HTML/XML output without needing to be escaped.
      - genshi.core.QName: A qualified element or attribute name.
  - dict: dict() -> new empty dictionary.
    - genshi.util.LRUCache: A dictionary-like object that stores only a certain number of items, and discards its least recently used item when full.
  - tuple: tuple() -> an empty tuple tuple(sequence) -> tuple initialized from sequence's items
    - genshi.core.Attrs: Immutable sequence type that stores the attributes of an element.
  - type: type(object) -> the object's type type(name, bases, dict) -> a new type
    - genshi.template.directives.DirectiveMeta: Meta class for template directives.
    - genshi.template.base.TemplateMeta: Meta class for templates.