Package genshi :: Module output :: Class DocType

Class DocType



object --+
         |
        DocType

Defines a number of commonly used DOCTYPE declarations as constants.

Instance Methods

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods
 
get(cls, name)
Return the (name, pubid, sysid) tuple of the DOCTYPE declaration for the specified name.
Class Variables
  HTML_STRICT = ('html', '-//W3C//DTD HTML 4.01//EN', 'http://ww...
  HTML_TRANSITIONAL = ('html', '-//W3C//DTD HTML 4.01 Transition...
  HTML_FRAMESET = ('html', '-//W3C//DTD HTML 4.01 Frameset//EN',...
  HTML = ('html', '-//W3C//DTD HTML 4.01//EN', 'http://www.w3.or...
  HTML5 = ('html', None, None)
  XHTML_STRICT = ('html', '-//W3C//DTD XHTML 1.0 Strict//EN', 'h...
  XHTML_TRANSITIONAL = ('html', '-//W3C//DTD XHTML 1.0 Transitio...
  XHTML_FRAMESET = ('html', '-//W3C//DTD XHTML 1.0 Frameset//EN'...
  XHTML = ('html', '-//W3C//DTD XHTML 1.0 Strict//EN', 'http://w...
Properties

Inherited from object: __class__

Method Details

get(cls, name)
Class Method

 

Return the (name, pubid, sysid) tuple of the DOCTYPE declaration for the specified name.

The following names are recognized in this version:
  • "html" or "html-strict" for the HTML 4.01 strict DTD
  • "html-transitional" for the HTML 4.01 transitional DTD
  • "html-transitional" for the HTML 4.01 frameset DTD
  • "html5" for the DOCTYPE proposed for HTML5
  • "xhtml" or "xhtml-strict" for the XHTML 1.0 strict DTD
  • "xhtml-transitional" for the XHTML 1.0 transitional DTD
  • "xhtml-frameset" for the XHTML 1.0 frameset DTD
Parameters:
  • name - the name of the DOCTYPE
Returns:
the (name, pubid, sysid) tuple for the requested DOCTYPE, or None if the name is not recognized

Since: version 0.4.1


Class Variable Details

HTML_STRICT

Value:
('html',
 '-//W3C//DTD HTML 4.01//EN',
 'http://www.w3.org/TR/html4/strict.dtd')

HTML_TRANSITIONAL

Value:
('html',
 '-//W3C//DTD HTML 4.01 Transitional//EN',
 'http://www.w3.org/TR/html4/loose.dtd')

HTML_FRAMESET

Value:
('html',
 '-//W3C//DTD HTML 4.01 Frameset//EN',
 'http://www.w3.org/TR/html4/frameset.dtd')

HTML

Value:
('html',
 '-//W3C//DTD HTML 4.01//EN',
 'http://www.w3.org/TR/html4/strict.dtd')

XHTML_STRICT

Value:
('html',
 '-//W3C//DTD XHTML 1.0 Strict//EN',
 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd')

XHTML_TRANSITIONAL

Value:
('html',
 '-//W3C//DTD XHTML 1.0 Transitional//EN',
 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd')

XHTML_FRAMESET

Value:
('html',
 '-//W3C//DTD XHTML 1.0 Frameset//EN',
 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd')

XHTML

Value:
('html',
 '-//W3C//DTD XHTML 1.0 Strict//EN',
 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd')