Mercurial > cpython-lru_cache-weakref
diff Doc/lib/xmlsaxhandler.tex @ 23989:33ea522dd3d2 legacy-trunk
Talk about interfaces rather than implementation classes where appropriate.
Add hyperlinks to make the documentation on the Attributes and AttributesNS
interfaces more discoverable.
Closes SF bug #484603.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Tue, 25 Jun 2002 17:10:50 +0000 |
| parents | 57c791a5f81c |
| children | 462a4c3118bb |
line wrap: on
line diff
--- a/Doc/lib/xmlsaxhandler.tex Tue Jun 25 16:58:58 2002 +0000 +++ b/Doc/lib/xmlsaxhandler.tex Tue Jun 25 17:10:50 2002 +0000 @@ -193,25 +193,27 @@ 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. + expanded automatically; the \method{startPrefixMapping()} and + \method{endPrefixMapping()} events supply 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 - \method{startPrefixMapping()} events will occur before the - corresponding \method{startElement()} event, and all - \method{endPrefixMapping()} events will occur after the - corresponding \method{endElement()} event, but their order is not - guaranteed. + Note that \method{startPrefixMapping()} and + \method{endPrefixMapping()} events are not guaranteed to be properly + nested relative to each-other: all \method{startPrefixMapping()} + events will occur before the corresponding \method{startElement()} + event, and all \method{endPrefixMapping()} events will occur after + the corresponding \method{endElement()} event, but their order is + not guaranteed. \end{methoddesc} \begin{methoddesc}[ContentHandler]{endPrefixMapping}{prefix} End the scope of a prefix-URI mapping. - - See \method{startPrefixMapping()} for details. This event will always - occur after the corresponding endElement event, but the order of - endPrefixMapping events is not otherwise guaranteed. + + See \method{startPrefixMapping()} for details. This event will + always occur after the corresponding \method{endElement()} event, + but the order of \method{endPrefixMapping()} events is not otherwise + guaranteed. \end{methoddesc} \begin{methoddesc}[ContentHandler]{startElement}{name, attrs} @@ -219,9 +221,10 @@ The \var{name} parameter contains the raw XML 1.0 name of the element type as a string and the \var{attrs} parameter holds an - instance of the \class{Attributes} class containing the attributes - of the element. The object passed as \var{attrs} may be re-used by - the parser; holding on to a reference to it is not a reliable way to + object of the \ulink{\class{Attributes} + interface}{attributes-objects.html} containing the attributes of the + element. The object passed as \var{attrs} may be re-used by the + parser; holding on to a reference to it is not a reliable way to keep a copy of the attributes. To keep a copy of the attributes, use the \method{copy()} method of the \var{attrs} object. \end{methoddesc} @@ -230,7 +233,7 @@ Signals the end of an element in non-namespace mode. The \var{name} parameter contains the name of the element type, just - as with the startElement event. + as with the \method{startElement()} event. \end{methoddesc} \begin{methoddesc}[ContentHandler]{startElementNS}{name, qname, attrs} @@ -239,8 +242,9 @@ The \var{name} parameter contains the name of the element type as a \code{(\var{uri}, \var{localname})} tuple, the \var{qname} parameter contains the raw XML 1.0 name used in the source document, and the - \var{attrs} parameter holds an instance of the \class{AttributesNS} - class containing the attributes of the element. If no namespace is + \var{attrs} parameter holds an instance of the + \ulink{\class{AttributesNS} interface}{attributes-ns-objects.html} + containing the attributes of the element. If no namespace is associated with the element, the \var{uri} component of \var{name} will be \code{None}. The object passed as \var{attrs} may be re-used by the parser; holding on to a reference to it is not a
