

def resolveUri(self, hrefObject=None, uri=None, dtsModelXbrl=None):
    "Returns the modelObject within modelDocment that resolves a URI based on arguments relative\n        to this element\n        \n        :param hrefObject: an optional tuple of (hrefElement, modelDocument, id), or\n        :param uri: An (element scheme pointer), and dtsModelXbrl (both required together if for a multi-instance href)\n        :type uri: str\n        :param dtsModelXbrl: DTS of href resolution (default is the element's own modelXbrl)\n        :type dtsModelXbrl: ModelXbrl\n        :returns: ModelObject -- Document node corresponding to the href or resolved uri\n        "
    if (dtsModelXbrl is None):
        dtsModelXbrl = self.modelXbrl
    doc = None
    if hrefObject:
        (hrefElt, doc, id) = hrefObject
    elif uri:
        from arelle import UrlUtil
        (url, id) = UrlUtil.splitDecodeFragment(uri)
        if (url == ''):
            doc = self.modelDocument
        else:
            normalizedUrl = self.modelXbrl.modelManager.cntlr.webCache.normalizeUrl(url, self.modelDocument.baseForElement(self))
            doc = dtsModelXbrl.urlDocs.get(normalizedUrl)
    from arelle import ModelDocument
    if isinstance(doc, ModelDocument.ModelDocument):
        if (doc is None):
            return doc
        elif (id in doc.idObjects):
            return doc.idObjects[id]
        else:
            from arelle.XmlUtil import xpointerElement
            xpointedElement = xpointerElement(doc, id)
            for docModelObject in doc.xmlRootElement.iter():
                if (docModelObject == xpointedElement):
                    doc.idObjects[id] = docModelObject
                    return docModelObject
    return None

dataset/ETHPy150Open Arelle/Arelle/arelle/ModelObject.py ModelObject.resolveUri/VarMisuse@161/432 `id`->`doc`