| [3225] | 1 | """Registration facilities for DOM. This module should not be used
|
|---|
| 2 | directly. Instead, the functions getDOMImplementation and
|
|---|
| 3 | registerDOMImplementation should be imported from xml.dom."""
|
|---|
| 4 |
|
|---|
| 5 | from 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 |
|
|---|
| 11 | well_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 |
|
|---|
| 19 | registered = {}
|
|---|
| 20 |
|
|---|
| 21 | def 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)."""
|
|---|
| |
|---|