Package docutils :: Module nodes :: Class document
[show private | hide private]
[frames | no frames]

Class document

  Node --+    
         |    
   Element --+
             |
      Root --+
             |
Structural --+
             |
            document


Method Summary
  __init__(self, settings, reporter, *args, **kwargs)
  asdom(self, dom)
Return a DOM representation of this document.
  copy(self)
Return a copy of self.
  has_name(self, name)
  note_anonymous_ref(self, ref)
  note_anonymous_target(self, target)
  note_autofootnote(self, footnote)
  note_autofootnote_ref(self, ref)
  note_citation(self, citation)
  note_citation_ref(self, ref)
  note_explicit_target(self, target, msgnode)
  note_external_target(self, target)
  note_footnote(self, footnote)
  note_footnote_ref(self, ref)
  note_implicit_target(self, target, msgnode)
  note_indirect_target(self, target)
  note_internal_target(self, target)
  note_parse_message(self, message)
  note_pending(self, pending, priority)
  note_refid(self, node)
  note_refname(self, node)
  note_source(self, source, offset)
  note_substitution_def(self, subdef, def_name, msgnode)
  note_substitution_ref(self, subref, refname)
  note_symbol_footnote(self, footnote)
  note_symbol_footnote_ref(self, ref)
  note_transform_message(self, message)
  set_duplicate_name_id(self, node, id, name, msgnode, explicit)
  set_id(self, node, msgnode)
  set_name_id_map(self, node, id, msgnode, explicit)
self.nameids maps names to IDs, while self.nametypes maps names to booleans representing hyperlink type (True==explicit, False==implicit).
    Inherited from Element
  __add__(self, other)
  __delitem__(self, key)
  __getitem__(self, key)
  __iadd__(self, other)
Append a node or a list of nodes to self.children.
  __len__(self)
  __radd__(self, other)
  __repr__(self)
  __setitem__(self, key, item)
  __str__(self)
  __unicode__(self)
  append(self, item)
  astext(self)
  attlist(self)
  delattr(self, attr)
  emptytag(self)
  endtag(self)
  extend(self, item)
  first_child_matching_class(self, childclass, start, end)
Return the index of the first child whose class exactly matches.
  first_child_not_matching_class(self, childclass, start, end)
Return the index of the first child whose class does not match.
  get(self, key, failobj)
  get_children(self)
Return this element's children.
  has_key(self, attr)
  hasattr(self, attr)
  index(self, item)
  insert(self, index, item)
  pformat(self, indent, level)
Return an indented pseudo-XML representation, for test purposes.
  pop(self, i)
  remove(self, item)
  replace(self, old, new)
Replace one child Node with another child or children.
  set_class(self, name)
Add a new name to the "class" attribute.
  setdefault(self, key, failobj)
  shortrepr(self)
  starttag(self)
    Inherited from Node
  __nonzero__(self)
Node instances are always true, even if they're empty.
  setup_child(self, child)
  walk(self, visitor)
Traverse a tree of Node objects, calling visit_... methods of visitor when entering each node.
  walkabout(self, visitor)
Perform a tree traversal similarly to Node.walk() (which see), except also call depart_... methods before exiting each node.

Class Variable Summary
    Inherited from Element
str child_text_separator = '\n\n'
NoneType tagname = None                                                                  
    Inherited from Node
NoneType document = None                                                                  
NoneType line = None                                                                  
NoneType parent = None                                                                  
NoneType source = None                                                                  

Method Details

asdom(self, dom=<module 'xml.dom.minidom' from '/usr/lib/python2.2/site-p...)

Return a DOM representation of this document.
Overrides:
docutils.nodes.Node.asdom

copy(self)

Return a copy of self.
Overrides:
docutils.nodes.Element.copy (inherited documentation)

set_name_id_map(self, node, id, msgnode=None, explicit=None)

self.nameids maps names to IDs, while self.nametypes maps names to booleans representing hyperlink type (True==explicit, False==implicit). This method updates the mappings.

The following state transition table shows how self.nameids ("ids") and self.nametypes ("types") change with new input (a call to this method), and what actions are performed:

Old State Input Action New State Notes
ids types new type sys.msg. dupname ids types  

--

--

explicit

--

--

new True  

--

--

implicit

--

--

new False  
None False explicit

--

--

new True  
old False explicit implicit old new True  
None True explicit explicit new None True  
old True explicit explicit new,old None True 1
None False implicit implicit new None False  
old False implicit implicit new,old None False  
None True implicit implicit new None True  
old True implicit implicit new old True  
[1]Do not clear the name-to-id map or invalidate the old target if both old and new targets are external and refer to identical URIs. The new target is invalidated regardless.

Generated by Epydoc 2.0 on Tue Jul 22 05:30:20 2003 http://epydoc.sf.net