Back to index

python3.2  3.2.2
Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Attributes
xml.dom.minidom.DOMImplementation Class Reference
Inheritance diagram for xml.dom.minidom.DOMImplementation:
Inheritance graph
[legend]
Collaboration diagram for xml.dom.minidom.DOMImplementation:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def hasFeature
def createDocument
def createDocumentType
def getInterface
def createDOMBuilder
def createDOMWriter
def createDOMInputSource

Static Public Attributes

int MODE_SYNCHRONOUS = 1
int MODE_ASYNCHRONOUS = 2

Private Member Functions

def _create_document

Static Private Attributes

list _features

Detailed Description

Definition at line 1371 of file minidom.py.


Member Function Documentation

Definition at line 1447 of file minidom.py.

01447 
01448     def _create_document(self):
01449         return Document()

Here is the caller graph for this function:

def xml.dom.minidom.DOMImplementation.createDocument (   self,
  namespaceURI,
  qualifiedName,
  doctype 
)

Definition at line 1387 of file minidom.py.

01387 
01388     def createDocument(self, namespaceURI, qualifiedName, doctype):
01389         if doctype and doctype.parentNode is not None:
01390             raise xml.dom.WrongDocumentErr(
01391                 "doctype object owned by another DOM tree")
01392         doc = self._create_document()
01393 
01394         add_root_element = not (namespaceURI is None
01395                                 and qualifiedName is None
01396                                 and doctype is None)
01397 
01398         if not qualifiedName and add_root_element:
01399             # The spec is unclear what to raise here; SyntaxErr
01400             # would be the other obvious candidate. Since Xerces raises
01401             # InvalidCharacterErr, and since SyntaxErr is not listed
01402             # for createDocument, that seems to be the better choice.
01403             # XXX: need to check for illegal characters here and in
01404             # createElement.
01405 
01406             # DOM Level III clears this up when talking about the return value
01407             # of this function.  If namespaceURI, qName and DocType are
01408             # Null the document is returned without a document element
01409             # Otherwise if doctype or namespaceURI are not None
01410             # Then we go back to the above problem
01411             raise xml.dom.InvalidCharacterErr("Element with no name")
01412 
01413         if add_root_element:
01414             prefix, localname = _nssplit(qualifiedName)
01415             if prefix == "xml" \
01416                and namespaceURI != "http://www.w3.org/XML/1998/namespace":
01417                 raise xml.dom.NamespaceErr("illegal use of 'xml' prefix")
01418             if prefix and not namespaceURI:
01419                 raise xml.dom.NamespaceErr(
01420                     "illegal use of prefix without namespaces")
01421             element = doc.createElementNS(namespaceURI, qualifiedName)
01422             if doctype:
01423                 doc.appendChild(doctype)
01424             doc.appendChild(element)
01425 
01426         if doctype:
01427             doctype.parentNode = doctype.ownerDocument = doc
01428 
01429         doc.doctype = doctype
01430         doc.implementation = self
01431         return doc

Here is the call graph for this function:

def xml.dom.minidom.DOMImplementation.createDocumentType (   self,
  qualifiedName,
  publicId,
  systemId 
)

Definition at line 1432 of file minidom.py.

01432 
01433     def createDocumentType(self, qualifiedName, publicId, systemId):
01434         doctype = DocumentType(qualifiedName)
01435         doctype.publicId = publicId
01436         doctype.systemId = systemId
01437         return doctype

def xml.dom.xmlbuilder.DOMImplementationLS.createDOMBuilder (   self,
  mode,
  schemaType 
) [inherited]

Definition at line 370 of file xmlbuilder.py.

00370 
00371     def createDOMBuilder(self, mode, schemaType):
00372         if schemaType is not None:
00373             raise xml.dom.NotSupportedErr(
00374                 "schemaType not yet supported")
00375         if mode == self.MODE_SYNCHRONOUS:
00376             return DOMBuilder()
00377         if mode == self.MODE_ASYNCHRONOUS:
00378             raise xml.dom.NotSupportedErr(
00379                 "asynchronous builders are not supported")
00380         raise ValueError("unknown value for mode")

Definition at line 385 of file xmlbuilder.py.

00385 
00386     def createDOMInputSource(self):
00387         return DOMInputSource()

Definition at line 381 of file xmlbuilder.py.

00381 
00382     def createDOMWriter(self):
00383         raise NotImplementedError(
00384             "the writer interface hasn't been written yet!")

def xml.dom.minidom.DOMImplementation.getInterface (   self,
  feature 
)

Definition at line 1440 of file minidom.py.

01440 
01441     def getInterface(self, feature):
01442         if self.hasFeature(feature, None):
01443             return self
01444         else:
01445             return None

Here is the call graph for this function:

def xml.dom.minidom.DOMImplementation.hasFeature (   self,
  feature,
  version 
)

Definition at line 1382 of file minidom.py.

01382 
01383     def hasFeature(self, feature, version):
01384         if version == "":
01385             version = None
01386         return (feature.lower(), version) in self._features

Here is the caller graph for this function:


Member Data Documentation

Initial value:
[("core", "1.0"),
                 ("core", "2.0"),
                 ("core", None),
                 ("xml", "1.0"),
                 ("xml", "2.0"),
                 ("xml", None),
                 ("ls-load", "3.0"),
                 ("ls-load", None),
                 ]

Definition at line 1372 of file minidom.py.

Definition at line 368 of file xmlbuilder.py.

Definition at line 367 of file xmlbuilder.py.


The documentation for this class was generated from the following file: