class TMImporter - A SAX document handler that produces a Topic Map datastructure from a SAX event stream.

Declared in module tmutils

Inheritance hierarchy:

tmutils.TMImporter
  xml.sax.saxlib.HandlerBase

Synopsis

class TMImporter(HandlerBase):
    def __init__(self, topic_map_name, tm_module_name, tm_module_keywords) # Initialize a new instance.
    def _get_module(self, module_name)
    def characters(self, data, start_ix, length) # Handle a character data event.
    def endDocument(self) # Handle an event for the end of a document.
    def endElement(self, name) # Handle an event for the end of an element.
    def get_topic_map(self) # Get the imported TopicMap object.
    def ignorableWhitespace(self, data, start_ix, length) # Handle an event for ignorable whitespace in element content.
    def processingInstruction(self, target, remainder) # Handle a processing instruction event.
    def set_arch_handler(self, arch_handler) # Set the architecture document handler that is used for architectural processing.
    def set_tm_module(self, tm_module)
    def set_tm_module_by_name(self, tm_module_name)
    def startDocument(self) # Handle an event for the beginning of a document.
    def startElement(self, name, amap) # Handle an event for the beginning of an element.

    # Inherited from xml.sax.saxlib.EntityResolver
    def resolveEntity(self, publicId, systemId) # Resolve the system identifier of an entity.

    # Inherited from xml.sax.saxlib.ErrorHandler
    def error(self, exception) # Handle a recoverable error.
    def fatalError(self, exception) # Handle a non-recoverable error.
    def warning(self, exception) # Handle a warning.

    # Inherited from xml.sax.saxlib.DTDHandler
    def notationDecl(self, name, publicId, systemId) # Handle a notation declaration event.
    def unparsedEntityDecl(self, name, publicId, systemId, ndata) # Handle an unparsed entity declaration event.

    # Inherited from xml.sax.saxlib.DocumentHandler
    def characters(self, ch, start, length) # Handle a character data event.
    def endDocument(self) # Handle an event for the end of a document.
    def endElement(self, name) # Handle an event for the end of an element.
    def ignorableWhitespace(self, ch, start, length) # Handle an event for ignorable whitespace in element content.
    def processingInstruction(self, target, data) # Handle a processing instruction event.
    def setDocumentLocator(self, locator) # Receive an object for locating the origin of SAX document events.
    def startDocument(self) # Handle an event for the beginning of a document.
    def startElement(self, name, atts) # Handle an event for the beginning of an element.

    # Inherited from xml.sax.saxlib.HandlerBase
    def __init__(self)

Description

The input data must conform to the ISO/IEC 13250:1999 interchange format.

An instance of this class should be passed as a SAX DocumentHandler to a parser driver that implements the SAX interfaces. The Topic Map modules only have to implement the one-object-set methods and the add methods.

Implicit topics are created automatically. They only contain their sgml id by default .