source: vendor/python/2.5/Lib/xml/dom/domreg.py

Last change on this file was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 3.4 KB
RevLine 
[3225]1"""Registration facilities for DOM. This module should not be used
2directly. Instead, the functions getDOMImplementation and
3registerDOMImplementation should be imported from xml.dom."""
4
5from xml.dom.minicompat import * # isinstance, StringTypes
6
7# This is a list of well-known implementations. Well-known names
8# should be published by posting to [email protected], and are
9# subsequently recorded in this file.
10
11well_known_implementations = {
12 'minidom':'xml.dom.minidom',
13 '4DOM': 'xml.dom.DOMImplementation',
14 }
15
16# DOM implementations not officially registered should register
17# themselves with their
18
19registered = {}
20
21def registerDOMImplementation(name, factory):
22 """registerDOMImplementation(name, factory)
23
24 Register the factory function with the name. The factory function
25 should return an object which implements the DOMImplementation
26 interface. The factory function can either return the same object,
27 or a new one (e.g. if that implementation supports some
28 customization)."""