4Suite API Documentation: Ft.Xml.Catalog

4Suite™ API Documentation

# ► Module Ft.Xml.Catalog

Classes and functions that help implement OASIS XML and TR9401 Catalogs. Resolution with Catalogs is handled via the Ft.Xml.InputSource module.

    Based on a contribution to PyXML from Tarn Weisner Burton
    <twburton@users.sf.net>. See
    http://sourceforge.net/tracker/index.php?func=detail&aid=490069&group_id=6473&atid=306473

    Copyright 2005 Fourthought, Inc. (USA).
    Detailed license and copyright information: http://4suite.org/COPYRIGHT
    Project home, documentation, distributions: http://4suite.org/

Classes: Catalog |  |  |  | Functions: GetDefaultCatalog

## Classes

class Catalog
  Reads and provides access to a catalog, providing mappings of public and system IDs to URIs, etc.

      It is implemented as a SAX ContentHandler and is able to read
      OASIS TR 9401 Catalogs <http://www.oasis-open.org/specs/a401.htm>
      and OASIS XML Catalogs <http://www.oasis-open.org/committees/entity/spec.html>

  ### Methods

  __init__(self, uri, quiet=True)
  endElementNS(self, (namespace, name), qualifiedName)
    Handle an element end event for the XML parser. This is a SAX ContentHandler method.
  resolveEntity(self, publicId, systemId)
    Return the applicable URI.

        If an external identifier (PUBLIC or SYSTEM) entry exists in the
        Catalog for the identifier(s) specified, return the mapped value.

        External identifiers identify the external subset, entities, and
        notations of an XML document.

  resolveURI(self, uri)
    Return the applicable URI.

        If a URI entry exists in the Catalog for the URI specified, return
        the mapped value.

        URI references, for example namespace names, stylesheets, included
        files, graphics, and hypertext references, simply identify other
        resources.

  startElementNS(self, (namespace, name), qualifiedName, attrs)
    Handle an element start event for the XML parser. This is a SAX ContentHandler method.

## Functions

GetDefaultCatalog(basename='default.cat')
  Load the default catalog file(s).