PyDocs

Nav

Structured Markup Processing Tools

ContentHandler.startPrefixMapping

  • ContentHandler.startPrefixMapping(prefix, uri)
Begin 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.
0 Examples
No examples for xml.sax.handler/ContentHandler.startPrefixMapping.
See Also
No see-alsos for xml.sax.handler/ContentHandler.startPrefixMapping
0 Notes
No notes for ContentHandler.startPrefixMapping