�`^c@s�dZdZddd��YZddd��YZddd��YZddd ��YZd
ZdZdZd
Z dZ
dZeeee e
egZdZ
dZdZdZdZdZe
eeeeegZdS(s0
This module contains the core classes of version 2.0 of SAX for Python.
This file provides only default classes with absolutely minimum
functionality, from which drivers and applications can be subclassed.
Many of these classes are empty and are included only as documentation
of the interfaces.
$Id$
s2.0betatErrorHandlercBs)eZdZd�Zd�Zd�ZRS(s�Basic interface for SAX error handlers.
If you create an object that implements this interface, then
register the object with your XMLReader, the parser will call the
methods in your object to report all warnings and errors. There
are three levels of errors available: warnings, (possibly)
recoverable errors, and unrecoverable errors. All methods take a
SAXParseException as the only parameter.cCs
|�dS(sHandle a recoverable error.N((tselft exception((s%/sys/lib/python2.7/xml/sax/handler.pyterror scCs
|�dS(sHandle a non-recoverable error.N((RR((s%/sys/lib/python2.7/xml/sax/handler.pyt
fatalError$scCs |GHdS(sHandle a warning.N((RR((s%/sys/lib/python2.7/xml/sax/handler.pytwarning(s(t__name__t
__module__t__doc__RRR(((s%/sys/lib/python2.7/xml/sax/handler.pyRs tContentHandlercBs�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z
d �Zd
�Zd�Z
d�Zd
�Zd�ZRS(s�Interface for receiving logical document content events.
This is the main callback interface in SAX, and the one most
important to applications. The order of events in this interface
mirrors the order of the information in the document.cCs
d|_dS(N(tNonet_locator(R((s%/sys/lib/python2.7/xml/sax/handler.pyt__init__6scCs
||_dS(s#Called by the parser to give the application a locator for
locating the origin of document events.
SAX parsers are strongly encouraged (though not absolutely
required) to supply a locator: if it does so, it must supply
the locator to the application by invoking this method before
invoking any of the other methods in the DocumentHandler
interface.
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.N(R(Rtlocator((s%/sys/lib/python2.7/xml/sax/handler.pytsetDocumentLocator9scCsdS(s�Receive notification of the beginning of a document.
The SAX parser will invoke this method only once, before any
other methods in this interface or in DTDHandler (except for
setDocumentLocator).N((R((s%/sys/lib/python2.7/xml/sax/handler.pyt
startDocumentPscCsdS(sQReceive notification of the end of a document.
The SAX 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.N((R((s%/sys/lib/python2.7/xml/sax/handler.pytendDocumentWscCsdS(sBegin the scope of a prefix-URI Namespace mapping.
The information from this event is not necessary for normal
Namespace processing: the SAX XML reader will automatically
replace prefixes for element and attribute names when the
http://xml.org/sax/features/namespaces feature is true (the
default).
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
startElement event, and all endPrefixMapping events will occur
after the corresponding endElement event, but their order is
not guaranteed.N((Rtprefixturi((s%/sys/lib/python2.7/xml/sax/handler.pytstartPrefixMapping`scCsdS(s�End the scope of a prefix-URI mapping.
See startPrefixMapping for details. This event will always
occur after the corresponding endElement event, but the order
of endPrefixMapping events is not otherwise guaranteed.N((RR((s%/sys/lib/python2.7/xml/sax/handler.pytendPrefixMappingwscCsdS(sSignals 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.N((Rtnametattrs((s%/sys/lib/python2.7/xml/sax/handler.pytstartElement~scCsdS(s�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.N((RR((s%/sys/lib/python2.7/xml/sax/handler.pyt
endElement�scCsdS(s�Signals the start of an element in namespace mode.
The name parameter contains the name of the element type as a
(uri, localname) tuple, the qname parameter the raw XML 1.0
name used in the source document, and the attrs parameter
holds an instance of the Attributes class containing the
attributes of the element.
The uri part of the name tuple is None for elements which have
no namespace.N((RRtqnameR((s%/sys/lib/python2.7/xml/sax/handler.pytstartElementNS�scCsdS(s�Signals the end of an element in namespace mode.
The name parameter contains the name of the element type, just
as with the startElementNS event.N((RRR((s%/sys/lib/python2.7/xml/sax/handler.pytendElementNS�scCsdS(s�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.N((Rtcontent((s%/sys/lib/python2.7/xml/sax/handler.pyt
characters�scCsdS(swReceive notification of ignorable whitespace in element content.
Validating Parsers must use this method to report each chunk
of ignorable whitespace (see the W3C XML 1.0 recommendation,
section 2.10): non-validating parsers may also use this method
if they are capable of parsing and using content models.
SAX parsers may return all contiguous whitespace 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.N((Rt
whitespace((s%/sys/lib/python2.7/xml/sax/handler.pytignorableWhitespace�scCsdS(s�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.N((Rttargettdata((s%/sys/lib/python2.7/xml/sax/handler.pytprocessingInstruction�scCsdS(sReceive notification of a skipped entity.
The Parser will invoke this method once for each entity
skipped. Non-validating processors may skip entities if they
have not seen the declarations (because, for example, the
entity was declared in an external DTD subset). All processors
may skip external entities, depending on the values of the
http://xml.org/sax/features/external-general-entities and the
http://xml.org/sax/features/external-parameter-entities
properties.N((RR((s%/sys/lib/python2.7/xml/sax/handler.pyt
skippedEntity�s(RRRRRRRRRRRRRRRR"R#(((s%/sys/lib/python2.7/xml/sax/handler.pyR /s
t
DTDHandlercBs eZdZd�Zd�ZRS(s�Handle DTD events.
This interface specifies only those DTD events required for basic
parsing (unparsed entities and attributes).cCsdS(s$Handle a notation declaration event.N((RRtpublicIdtsystemId((s%/sys/lib/python2.7/xml/sax/handler.pytnotationDecl�scCsdS(s,Handle an unparsed entity declaration event.N((RRR%R&tndata((s%/sys/lib/python2.7/xml/sax/handler.pytunparsedEntityDecl�s(RRRR'R)(((s%/sys/lib/python2.7/xml/sax/handler.pyR$�s tEntityResolvercBseZdZd�ZRS(s7Basic interface for resolving entities. If you create an object
implementing this interface, then register the object with your
Parser, the parser will call the method in your object to
resolve all external entities. Note that DefaultHandler implements
this interface with the default behaviour.cCs|S(s�Resolve the system identifier of an entity and return either
the system identifier to read from as a string, or an InputSource
to read from.((RR%R&((s%/sys/lib/python2.7/xml/sax/handler.pyt
resolveEntity�s(RRRR+(((s%/sys/lib/python2.7/xml/sax/handler.pyR*�ss&http://xml.org/sax/features/namespacess.http://xml.org/sax/features/namespace-prefixess,http://xml.org/sax/features/string-internings&http://xml.org/sax/features/validations5http://xml.org/sax/features/external-general-entitiess7http://xml.org/sax/features/external-parameter-entitiess-http://xml.org/sax/properties/lexical-handlers1http://xml.org/sax/properties/declaration-handlers&http://xml.org/sax/properties/dom-nodes(http://xml.org/sax/properties/xml-strings-http://www.python.org/sax/properties/encodings3http://www.python.org/sax/properties/interning-dictN(((((RtversionRR R$R*tfeature_namespacestfeature_namespace_prefixestfeature_string_interningtfeature_validationtfeature_external_gestfeature_external_pestall_featurestproperty_lexical_handlertproperty_declaration_handlertproperty_dom_nodetproperty_xml_stringtproperty_encodingtproperty_interning_dicttall_properties(((s%/sys/lib/python2.7/xml/sax/handler.pyt<module>
s:
�
|