--- rest25/library/pyexpat.rst	2008-12-19 16:58:07.000000000 +0900
+++ rest262/library/pyexpat.rst	2009-04-05 05:02:09.000000000 +0900
@@ -1,55 +1,52 @@
 
 :mod:`xml.parsers.expat` --- Fast XML parsing using Expat
 =========================================================
 
 .. module:: xml.parsers.expat
    :synopsis: An interface to the Expat non-validating XML parser.
 .. moduleauthor:: Paul Prescod <paul@prescod.net>
 
 
-.. % Markup notes:
-.. % 
-.. % Many of the attributes of the XMLParser objects are callbacks.
-.. % Since signature information must be presented, these are described
-.. % using the methoddesc environment.  Since they are attributes which
-.. % are set by client code, in-text references to these attributes
-.. % should be marked using the \member macro and should not include the
-.. % parentheses used when marking functions and methods.
+.. Markup notes:
+
+   Many of the attributes of the XMLParser objects are callbacks.  Since
+   signature information must be presented, these are described using the method
+   directive.  Since they are attributes which are set by client code, in-text
+   references to these attributes should be marked using the :member: role.
 
 .. versionadded:: 2.0
 
 .. index:: single: Expat
 
-The :mod:`xml.parsers.expat` module is a Python interface to the Expat non-
-validating XML parser. The module provides a single extension type,
+The :mod:`xml.parsers.expat` module is a Python interface to the Expat
+non-validating XML parser. The module provides a single extension type,
 :class:`xmlparser`, that represents the current state of an XML parser.  After
 an :class:`xmlparser` object has been created, various attributes of the object
 can be set to handler functions.  When an XML document is then fed to the
 parser, the handler functions are called for the character data and markup in
 the XML document.
 
 .. index:: module: pyexpat
 
 This module uses the :mod:`pyexpat` module to provide access to the Expat
 parser.  Direct use of the :mod:`pyexpat` module is deprecated.
 
 This module provides one exception and one type object:
 
 
 .. exception:: ExpatError
 
    The exception raised when Expat reports an error.  See section
-   :ref:`expaterror-objects`, "ExpatError Exceptions," for more information on
-   interpreting Expat errors.
+   :ref:`expaterror-objects` for more information on interpreting Expat errors.
 
 
 .. exception:: error
 
    Alias for :exc:`ExpatError`.
 
 
 .. data:: XMLParserType
 
    The type of the return values from the :func:`ParserCreate` function.
 
 The :mod:`xml.parsers.expat` module contains two functions:
@@ -57,25 +54,25 @@
 
 .. function:: ErrorString(errno)
 
    Returns an explanatory string for a given error number *errno*.
 
 
 .. function:: ParserCreate([encoding[, namespace_separator]])
 
    Creates and returns a new :class:`xmlparser` object.   *encoding*, if specified,
    must be a string naming the encoding  used by the XML data.  Expat doesn't
    support as many encodings as Python does, and its repertoire of encodings can't
    be extended; it supports UTF-8, UTF-16, ISO-8859-1 (Latin1), and ASCII.  If
-   *encoding* is given it will override the implicit or explicit encoding of the
+   *encoding* [1]_ is given it will override the implicit or explicit encoding of the
    document.
 
    Expat can optionally do XML namespace processing for you, enabled by providing a
    value for *namespace_separator*.  The value must be a one-character string; a
    :exc:`ValueError` will be raised if the string has an illegal length (``None``
    is considered the same as omission).  When namespace processing is enabled,
    element type names and attribute names that belong to a namespace will be
    expanded.  The element name passed to the element handlers
    :attr:`StartElementHandler` and :attr:`EndElementHandler` will be the
    concatenation of the namespace URI, the namespace separator character, and the
    local part of the name.  If the namespace separator is a zero byte (``chr(0)``)
    then the namespace URI and the local part will be concatenated without any
@@ -113,26 +110,26 @@
 :class:`xmlparser` objects have the following methods:
 
 
 .. method:: xmlparser.Parse(data[, isfinal])
 
    Parses the contents of the string *data*, calling the appropriate handler
    functions to process the parsed data.  *isfinal* must be true on the final call
    to this method.  *data* can be the empty string at any time.
 
 
 .. method:: xmlparser.ParseFile(file)
 
-   Parse XML data reading from the object *file*.  *file* only needs to provide the
-   :meth:`read(nbytes)` method, returning the empty string when there's no more
+   Parse XML data reading from the object *file*.  *file* only needs to provide
+   the ``read(nbytes)`` method, returning the empty string when there's no more
    data.
 
 
 .. method:: xmlparser.SetBase(base)
 
    Sets the base to be used for resolving relative URIs in system identifiers in
    declarations.  Resolving relative identifiers is left to the application: this
    value will be passed through as the *base* argument to the
    :func:`ExternalEntityRefHandler`, :func:`NotationDeclHandler`, and
    :func:`UnparsedEntityDeclHandler` functions.
 
 
@@ -176,29 +173,33 @@
    This method can only be called before the :meth:`Parse` or :meth:`ParseFile`
    methods are called; calling it after either of those have been called causes
    :exc:`ExpatError` to be raised with the :attr:`code` attribute set to
    :const:`errors.XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING`.
 
    .. versionadded:: 2.3
 
 :class:`xmlparser` objects have the following attributes:
 
 
 .. attribute:: xmlparser.buffer_size
 
-   The size of the buffer used when :attr:`buffer_text` is true.  This value cannot
-   be changed at this time.
+   The size of the buffer used when :attr:`buffer_text` is true.
+   A new buffer size can be set by assigning a new integer value
+   to this attribute.
+   When the size is changed, the buffer will be flushed.
 
    .. versionadded:: 2.3
 
+   .. versionchanged:: 2.6
+      The buffer size can now be changed.
 
 .. attribute:: xmlparser.buffer_text
 
    Setting this to true causes the :class:`xmlparser` object to buffer textual
    content returned by Expat to avoid multiple calls to the
    :meth:`CharacterDataHandler` callback whenever possible.  This can improve
    performance substantially since Expat normally breaks character data into chunks
    at every line ending.  This attribute is false by default, and may be changed at
    any time.
 
    .. versionadded:: 2.3
 
@@ -875,12 +876,20 @@
 
 .. data:: XML_ERROR_FINISHED
    :noindex:
 
    The requested operation was made on a parser which was finished parsing input,
    but isn't allowed.  This includes attempts to provide additional input or to
    stop the parser.
 
 
 .. data:: XML_ERROR_SUSPEND_PE
    :noindex:
 
+
+.. rubric:: Footnotes
+
+.. [#] The encoding string included in XML output should conform to the
+   appropriate standards. For example, "UTF-8" is valid, but "UTF8" is
+   not. See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl
+   and http://www.iana.org/assignments/character-sets .
+
