HTML
====

.. py:module:: pyslet.html40_19991224

This module defines functions and classes for working with HTML documents.  The
version of the standard implemented is, loosely speaking, the HTML 4.0.1
Specification: http://www.w3.org/TR/html401/

This module contains code that can help parse HTML documents into classes based
on the basic :mod:`xml20081126` XML module, acting as a gateway to XHTML.

This module also exposes a number of internal functions typically defined
privately in HTML parser implementations which make it easier to reuse concepts
from HTML in other modules.  For example, the :class:`LengthType` used for
storing HTML lengths (which can be pixel or relative) is used extensively by
:mod:`imsqtiv2p1`.


..	data:: HTML40_PUBLICID

	The public ID to use in the declaration of an HTML document

..	data:: XHTML_NAMESPACE

	The namespace to use in the delcaration of an XHTML document


(X)HTML Documents
-----------------

This module contains an experimental class for working with HTML documents.  At
the time of writing the implementation is designed to provide just enough HTML
parsing to support the use of HTML within other standards (such as Atom and
QTI).

.. autoclass:: XHTMLDocument
	:members:
	:show-inheritance:
	

Basic Types
-----------

Length Values
~~~~~~~~~~~~~

Length values are used in many places in HTML, the most common being the width
and height values on images.  There are two ways of specifying a Length, a
simple integer number of pixels or a percentage of some base length defined by
the context (such as the width of the browser window).

..	autoclass:: LengthType
	:members:
	:show-inheritance:
	:special-members:


Coordinate Values
~~~~~~~~~~~~~~~~~

Coordinate values are simple lists of Lengths.  In most cases Pyslet doesn't
define special types for lists of basic types but coordinates are represented in
attribute values using comma separation, not space-separation.  As a result they
require special processing in order to be decoded/encoded correctly from/to XML
streams.

..	autoclass:: Coords
	:members:
	:show-inheritance:
	:special-members:


URIs
~~~~

URIs are represented by instances of the underlying :class:`pyselt.rfc2396.URI`
class, these functions provide a simple wrapper around the functions defined in
that module.

..	autofunction:: DecodeURI

..	autofunction:: EncodeURI






