2005-10-29 06:25:58

Abstraction module for Domlette SAX usage.

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

Interface for a set of XML attributes.

Contains a set of XML attributes, accessible by expanded name.

Alias for has_key.

Removes the attribute with the given name.

Alias for getValue.

Returns the number of attributes in the list.

Return the value associated with attribute name; if it is not available, then return the alternative.

Returns the qualified name of the attribute with the given name.

Returns the value of the attribute with the given name.

Returns True if the attribute name is in the list, False otherwise.

Return a list of (attribute_name, value) pairs.

Returns a list of the names of all attribute in the list.

Return a list of all attribute values.

Interface for receiving logical document content events.

This is the main callback interface for the Parser. The order of events in this interface mirrors the order of the information in the document.

Receive notification of character data.

The parser will call this method to report each chunk of character data. The parser will return all contiguous character data in a single chunk.

Receive notification of the end of a document.

The parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.

Signals the end of an element.

The uri parameter is None for elements which have no namespace, the qualifiedName parameter is the raw XML name used in the source document.

End the scope of a prefix-URI mapping.

See startPrefixMapping for details. This event will always occur after the corresponding endElementNS event, but the order of endPrefixMapping events is not otherwise guaranteed.

Called by the parser to give the application a locator for locating the origin of document events.

The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine.

Note that the locator will return correct information only during the invocation of the events in this interface. The application should not attempt to use it at any other time.

Receive notification of the beginning of a document.

The parser will invoke this method only once, before any other methods in this interface.

Signals the start of an element.

The uri parameter is None for elements which have no namespace, the qualifiedName parameter is the raw XML name used in the source document, and the atts parameter holds an instance of the Attributes class containing the attributes of the element.

Begin the scope of a prefix-URI Namespace mapping.

The information from this event is not necessary for normal Namespace processing: the XmlParser will automatically replace prefixes for element and attribute names.

There are cases, however, when applications need to use prefixes in character data or in attribute values, where they cannot safely be expanded automatically; the start/endPrefixMapping event supplies the information to the application to expand prefixes in those contexts itself, if necessary.

Note that start/endPrefixMapping events are not guaranteed to be properly nested relative to each-other: all startPrefixMapping events will occur before the corresponding startElementNS event, and all endPrefixMapping events will occur after the corresponding endElementNS event, but their order is not guaranteed.

A ContentHandler that is used to construct a Domlette Document.

Returns the newly constructed Document instance.

Interface for associating a parse event with a document location. A locator object will return valid results only during calls to ContentHandler methods; at any other time, the results are unpredictable.

Return the column number where the current event ends.

Return the line number where the current event ends.

Return the system identifier for the current event.

'http://4suite.org/sax/features/generator'
'http://4suite.org/sax/features/process-xincludes'
'http://4suite.org/sax/properties/whitespace-rules'
'http://4suite.org/sax/properties/yield-result'
u'http://www.w3.org/2000/xmlns/'