@staticmethod
    def _add_item_details(data, table, details=None, prefix=False):

        tablename = table._tablename
        if details is None:
            details = []
        first = None
        firstString = None
        header = None
        for child in data:
            f = child.get("field", None)
            if f not in table.fields:
                continue
            elif f == "wkt":
                # Skip bulky WKT fields
                continue
            field = table[f]
            ftype = str(field.type)
            value = child.get("value", None)
            if not value:
                value = S3XML.xml_decode(child.text)
            try:
                value = S3Importer._decode_data(field, value)
            except:
                pass
            if value:
                value = s3_unicode(value)
            else:
                value = ""
            if f != None and value != None:
                headerText = P(B("%s: " % f), value)
                if not first:
                    first = headerText
                if ftype == "string" and not firstString:
                    firstString = headerText
                if f == "name":
                    header = headerText
                if prefix:
                    details.append(TR(TH("%s.%s:" % (tablename, f)), TD(value)))
                else:
                    details.append(TR(TH("%s:" % f), TD(value)))
        if not header:
            if firstString:
                header = firstString
            else:
                header = first
        return (header, details)

    # -------------------------------------------------------------------------
<chars to translate> <chars to replace those with> <text>
dataset/ETHPy150Open sahana/eden/modules/s3/s3import.py/S3Importer._add_item_details--crossover with--dataset/ETHPy150Open ProgVal/Limnoria/plugins/Format/plugin.py/Format.translate