Package Bio :: Package EUtils :: Module POM
[show private | hide private]
[frames | no frames]

Module Bio.EUtils.POM

This module implements the XML POM -- the Python Object Model for XML. It is something like DOM, but more Python-ic, and easier to use. These base classes are used to build POM source files which are self-validating python-based XML constructor objects. The major parts of the dtd2py command line tool are also here.
Classes
AttributeList  
CDATA  
Comment  
ContentModel Represents and validates a content model.
DTDConsumerForSourceGeneration  
ElementNode  
ENTITIES  
ENTITY  
Enumeration  
Fragments Fragments is a special holder class to hold 'loose' markup fragments.
ID  
IDREF  
IDREFS  
IndentedText  
NMTOKEN  
NMTOKENS  
ObjectParserHandler  
PCDATA  
POMDocument  
Text  
XMLAttribute  
_AttributeType  
_ContentModelGenerator _ContentModelGenerator(rawmodel) The DTD parser generated and final content model are so different that a different content model generator is used for this object.

Exceptions
ValidationError ValidationError This exception is raised when an attempt is made to construct an XML POM tree that would be invalid.

Function Summary
  escape(s)
  get_dtd_compiler(fo, mixinmodule, toupper)
  get_mod_file(sourcefilename)
get_mod_file(sourcefilename) Converts a file name into a file name inside the dtds package.
  get_parser(handlerclass, callback, module)
  IF(test, tv, fv)
  make_node(path, modules, value)
make_Node(path, modules, [value]) Makes a node or an XML fragment given a path, element module list, and an optional value.
  unescape(s)
  _construct_node(name, modules)
  _default_parser_callback(obj)
  _find_element(elname, modules)

Variable Summary
bool ANY = True
int AT_CDATA = 1                                                                     
int AT_ENTITIES = 6                                                                     
int AT_ENTITY = 5                                                                     
int AT_ID = 2                                                                     
int AT_IDREF = 3                                                                     
int AT_IDREFS = 4                                                                     
int AT_NMTOKEN = 7                                                                     
int AT_NMTOKENS = 8                                                                     
int DEFAULT = 13                                                                    
NoneType EMPTY = None                                                                  
int FIXED = 14                                                                    
int IMPLIED = 12                                                                    
int REQUIRED = 11                                                                    
dict _ATTRCLASSMAP = {1: <class 'Bio.EUtils.POM.CDATA'>, 2: <...
dict _ATTRTYPEMAP = {'NMTOKEN': 7, 'ENTITY': 5, 'ENTITIES': 6...
dict _DEFAULTMAP = {u'#FIXED': 14, u'#REQUIRED': 11, u'#DEFAU...

Function Details

get_mod_file(sourcefilename)

get_mod_file(sourcefilename) Converts a file name into a file name inside the dtds package. This file name is the destination for generated python files.

make_node(path, modules, value=None)

make_Node(path, modules, [value]) Makes a node or an XML fragment given a path, element module list, and an optional value.

Variable Details

ANY

Type:
bool
Value:
True                                                                   

AT_CDATA

Type:
int
Value:
1                                                                     

AT_ENTITIES

Type:
int
Value:
6                                                                     

AT_ENTITY

Type:
int
Value:
5                                                                     

AT_ID

Type:
int
Value:
2                                                                     

AT_IDREF

Type:
int
Value:
3                                                                     

AT_IDREFS

Type:
int
Value:
4                                                                     

AT_NMTOKEN

Type:
int
Value:
7                                                                     

AT_NMTOKENS

Type:
int
Value:
8                                                                     

DEFAULT

Type:
int
Value:
13                                                                    

EMPTY

Type:
NoneType
Value:
None                                                                  

FIXED

Type:
int
Value:
14                                                                    

IMPLIED

Type:
int
Value:
12                                                                    

REQUIRED

Type:
int
Value:
11                                                                    

_ATTRCLASSMAP

Type:
dict
Value:
{1: <class 'Bio.EUtils.POM.CDATA'>,
 2: <class 'Bio.EUtils.POM.ID'>,
 3: <class 'Bio.EUtils.POM.IDREF'>,
 4: <class 'Bio.EUtils.POM.IDREFS'>,
 5: <class 'Bio.EUtils.POM.ENTITY'>,
 6: <class 'Bio.EUtils.POM.ENTITIES'>,
 7: <class 'Bio.EUtils.POM.NMTOKEN'>,
 8: <class 'Bio.EUtils.POM.NMTOKENS'>}                                 

_ATTRTYPEMAP

Type:
dict
Value:
{'CDATA': 1,
 'ENTITIES': 6,
 'ENTITY': 5,
 'ID': 2,
 'IDREF': 3,
 'IDREFS': 4,
 'NMTOKEN': 7,
 'NMTOKENS': 8}                                                        

_DEFAULTMAP

Type:
dict
Value:
{u'#FIXED': 14, u'#REQUIRED': 11, u'#DEFAULT': 13, u'#IMPLIED': 12}    

Generated by Epydoc 2.1 on Thu Jun 30 22:06:13 2005 http://epydoc.sf.net