4Y~gc @ s- d Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z y e j e j
g Z Wn e k
r e j g Z n Xd Z
i d Z i d Z i d Z d Z d e j f d YZ d
e j f d YZ d e j f d
YZ d d Z d S( sn A library of useful helper classes to the SAX classes, for the
convenience of application and driver writers.
iNc C s3 x, | j D] \ } } | j | | } q
W| S( s2 Replace substrings of a string using a dictionary.( t itemst replace( t st dt keyt value( ( s5 /opt/alt/python27/lib64/python2.7/xml/sax/saxutils.pyt __dict_replace s c C sR | j d d } | j d d } | j d d } | rN t | | } n | S( s Escape &, <, and > in a string of data.
You can escape other strings of data by passing a dictionary as
the optional entities parameter. The keys and values must all be
strings; each key will be replaced with its corresponding value.
t &s &t >s >t