'Return a LangInfo instance matching any of the specified
pieces of doctype info, or None if no match is found.
The behaviour when doctype info from multiple LangInfo classes
collide is undefined (in the current impl, the last one wins).
Notes on doctype info canonicalization:
- I\'m not sure if there is specified canonicalization of
doctype names or public-ids, but matching is done
case-insensitively here.
- Technically doctype system-id comparison is of URI (with
non-trivial but well-defined canonicalization rules). For
simplicity we just compare case-insensitively.'

def langinfo_from_doctype(self, public_id=None, system_id=None):

    if (self._li_from_doctype_public_id is None):
        self._build_tables()
    if ((public_id is not None) and (public_id in self._li_from_doctype_public_id)):
        return self._li_from_doctype_public_id[public_id]
    if ((system_id is not None) and (system_id in self._li_from_doctype_system_id)):
        return self._li_from_doctype_system_id[system_id]
