def quote_attrib(self, inStr):
        """
        Transforms characters between xml notation and python notation.
        """
        s1 = (isinstance(inStr, basestring) and inStr or
              '%s' % inStr)
        s1 = s1.replace('&', '&amp;')
        s1 = s1.replace('<', '&lt;')
        s1 = s1.replace('>', '&gt;')
        if '"' in s1:
        #    if "'" in s1:
            s1 = '%s' % s1.replace('"', "&quot;")
        #    else:
        #        s1 = "'%s'" % s1
        #else:
        #    s1 = '"%s"' % s1
        return s1
#--------------------------------------------------------------------------#
# Below are classes that define attribute sets that pysvg uses for convenience.
# There exist no corresponding attribute sets in svg.
# We simply use these classes as containers for often used attributes.
#--------------------------------------------------------------------------#
dataset/ETHPy150Open ofermend/medicare-demo/socialite/jython/Lib/site-packages/pysvg/core.py/BaseElement.quote_attrib/original