'Convert entity references.
As an alternative to overriding this method; one can tailor the
results by setting up the self.entitydefs mapping appropriately.'

def convert_entityref(self, name):

    table = self.entitydefs
    if (name in table):
        return table[name]
    else:
        return
