[Python-checkins] python/dist/src/Lib/xml/sax handler.py,1.8,1.9

loewis@users.sourceforge.net loewis@users.sourceforge.net
Sun, 30 Jun 2002 00:38:52 -0700


Update of /cvsroot/python/python/dist/src/Lib/xml/sax
In directory usw-pr-cvs1:/tmp/cvs-serv5079

Modified Files:
	handler.py 
Log Message:
Merge from PyXML:
[1.3] Added documentation of the namespace URI for elements with no namespace.
[1.4] New property http://www.python.org/sax/properties/encoding.
[1.5] Support optional string interning in pyexpat.


Index: handler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/handler.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** handler.py	23 Oct 2000 18:09:50 -0000	1.8
--- handler.py	30 Jun 2002 07:38:50 -0000	1.9
***************
*** 145,149 ****
          name used in the source document, and the attrs parameter
          holds an instance of the Attributes class containing the
!         attributes of the element."""
  
      def endElementNS(self, name, qname):
--- 145,152 ----
          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."""
  
      def endElementNS(self, name, qname):
***************
*** 316,321 ****
  # access: read-only
  
  all_properties = [property_lexical_handler,
                    property_dom_node,
                    property_declaration_handler,
!                   property_xml_string]
--- 319,345 ----
  # access: read-only
  
+ property_encoding = "http://www.python.org/sax/properties/encoding"
+ # data type: String
+ # description: The name of the encoding to assume for input data.
+ # access: write: set the encoding, e.g. established by a higher-level
+ #                protocol. May change during parsing (e.g. after
+ #                processing a META tag)
+ #         read:  return the current encoding (possibly established through
+ #                auto-detection.
+ # initial value: UTF-8 
+ #
+ 
+ property_interning_dict = "http://www.python.org/sax/properties/interning-dict"
+ # data type: Dictionary
+ # description: The dictionary used to intern common strings in the document
+ # access: write: Request that the parser uses a specific dictionary, to
+ #                allow interning across different documents
+ #         read:  return the current interning dictionary, or None
+ #
+ 
  all_properties = [property_lexical_handler,
                    property_dom_node,
                    property_declaration_handler,
!                   property_xml_string,
!                   property_encoding,
!                   property_interning_dict]