2005-04-12 06:28:23

cDomlette implementation: a very fast DOM-like library tailored for use in XPath/XSLT

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

Called when the DTD is completely parsed.

Called when DTD parsing starts.

Reports a comment anywhere in the document (including the DTD and outside the document element).

content is a string that holds the contents of the comment.

Receive notification of character data.

The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.

Report the start of the DTD declarations, if the document has an associated DTD.

A startEntity event will be reported before declaration events from the external DTD subset are reported, and this can be used to infer from which subset DTD declarations derive.

name is the name of the document element type, publicId the public identifier of the DTD (or None if none were supplied) and systemId the system identfier of the external subset (or None if none were supplied).

Signals the end of an element in non-namespace mode.

The name parameter contains the name of the element type, just as with the startElement event.

Receive notification of character data.

The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.

Receive notification of a processing instruction.

The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element.

A SAX parser should never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method.

Signals the start of an element in non-namespace mode.

The name parameter contains the raw XML 1.0 name of the element type as a string and the attrs parameter holds an instance of the Attributes class containing the attributes of the element.

Receives the declaration of a new attribute.

Receives the declaration of an element type.

Receives external general entity declarations. 'ndata' is the empty string if the entity is parsed.

Receives external parameter entity declarations.

Receives internal general entity declarations.

Receives notation declarations.

Receives internal parameter entity declarations.

CreateParser([readExtDtd]) -> Parser

Return a new XML parser object.
[readExtDtd]

GetAllNs(node) -> dict

Get all of the namespaces defined in scope of this node.
node

nonvalParse(isrc[, readExtDtd[, parseAsEntity]]) -> Document

isrc[, readExtDtd[, parseAsEntity]]

parse(isrc[, readExtDtd[, parseAsEntity]]) -> Document

isrc[, readExtDtd[, parseAsEntity]]

Take an XPointer fragment and return a structure suitable for the cDomlette parser to update state tables Xptr e.g. xmlns(x=http://uche.ogbuji.net/eg) xpointer(/x:spam/x:eggs)

SeekNss(node) -> dict

Traverses the tree to seek an approximate set of defined namespaces.
node

3
2
1
None
10
u'http://www.w3.org/2001/XInclude'
u'http://www.w3.org/2000/xmlns/'
u'http://www.w3.org/XML/1998/namespace'
20
['implementation', 'NonvalParse', 'Parse', 'CreateParser', 'GetAllNs', 'SeekNss', 'ValParse']

The DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.

<DOMImplementation>