# {py:mod}`arelle.ModelDocument` ```{py:module} arelle.ModelDocument ``` ```{autodoc2-docstring} arelle.ModelDocument :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`Type ` - ```{autodoc2-docstring} arelle.ModelDocument.Type :summary: ``` * - {py:obj}`ModelDocument ` - ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument :summary: ``` * - {py:obj}`ModelDocumentReference ` - ```{autodoc2-docstring} arelle.ModelDocument.ModelDocumentReference :summary: ``` ```` ### Functions ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`load ` - ```{autodoc2-docstring} arelle.ModelDocument.load :summary: ``` * - {py:obj}`loadSchemalocatedSchema ` - ```{autodoc2-docstring} arelle.ModelDocument.loadSchemalocatedSchema :summary: ``` * - {py:obj}`create ` - ```{autodoc2-docstring} arelle.ModelDocument.create :summary: ``` * - {py:obj}`inlineIxdsDiscover ` - ```{autodoc2-docstring} arelle.ModelDocument.inlineIxdsDiscover :summary: ``` ```` ### Data ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`creationSoftwareNames ` - ```{autodoc2-docstring} arelle.ModelDocument.creationSoftwareNames :summary: ``` * - {py:obj}`schemaBottom ` - ```{autodoc2-docstring} arelle.ModelDocument.schemaBottom :summary: ``` * - {py:obj}`fractionParts ` - ```{autodoc2-docstring} arelle.ModelDocument.fractionParts :summary: ``` ```` ### API ````{py:data} creationSoftwareNames :canonical: arelle.ModelDocument.creationSoftwareNames :value: > None ```{autodoc2-docstring} arelle.ModelDocument.creationSoftwareNames ``` ```` ````{py:function} load(modelXbrl, uri, base=None, referringElement=None, isEntry=False, isDiscovered=False, isIncluded=None, isSupplemental=False, namespace=None, reloadCache=False, **kwargs) -> ModelDocument | None :canonical: arelle.ModelDocument.load ```{autodoc2-docstring} arelle.ModelDocument.load ``` ```` ````{py:function} loadSchemalocatedSchema(modelXbrl, element, relativeUrl, namespace, baseUrl) :canonical: arelle.ModelDocument.loadSchemalocatedSchema ```{autodoc2-docstring} arelle.ModelDocument.loadSchemalocatedSchema ``` ```` ````{py:function} create(modelXbrl, type, uri, schemaRefs=None, isEntry=False, initialXml=None, initialComment=None, base=None, discover=True, documentEncoding='utf-8', xbrliNamespacePrefix=None) -> ModelDocument :canonical: arelle.ModelDocument.create ```{autodoc2-docstring} arelle.ModelDocument.create ``` ```` `````{py:class} Type :canonical: arelle.ModelDocument.Type ```{autodoc2-docstring} arelle.ModelDocument.Type ``` ````{py:attribute} UnknownXML :canonical: arelle.ModelDocument.Type.UnknownXML :value: > 0 ```{autodoc2-docstring} arelle.ModelDocument.Type.UnknownXML ``` ```` ````{py:attribute} UnknownNonXML :canonical: arelle.ModelDocument.Type.UnknownNonXML :value: > 1 ```{autodoc2-docstring} arelle.ModelDocument.Type.UnknownNonXML ``` ```` ````{py:attribute} UnknownTypes :canonical: arelle.ModelDocument.Type.UnknownTypes :value: > 1 ```{autodoc2-docstring} arelle.ModelDocument.Type.UnknownTypes ``` ```` ````{py:attribute} firstXBRLtype :canonical: arelle.ModelDocument.Type.firstXBRLtype :value: > 2 ```{autodoc2-docstring} arelle.ModelDocument.Type.firstXBRLtype ``` ```` ````{py:attribute} SCHEMA :canonical: arelle.ModelDocument.Type.SCHEMA :value: > 2 ```{autodoc2-docstring} arelle.ModelDocument.Type.SCHEMA ``` ```` ````{py:attribute} LINKBASE :canonical: arelle.ModelDocument.Type.LINKBASE :value: > 3 ```{autodoc2-docstring} arelle.ModelDocument.Type.LINKBASE ``` ```` ````{py:attribute} INSTANCE :canonical: arelle.ModelDocument.Type.INSTANCE :value: > 4 ```{autodoc2-docstring} arelle.ModelDocument.Type.INSTANCE ``` ```` ````{py:attribute} INLINEXBRL :canonical: arelle.ModelDocument.Type.INLINEXBRL :value: > 5 ```{autodoc2-docstring} arelle.ModelDocument.Type.INLINEXBRL ``` ```` ````{py:attribute} lastXBRLtype :canonical: arelle.ModelDocument.Type.lastXBRLtype :value: > 5 ```{autodoc2-docstring} arelle.ModelDocument.Type.lastXBRLtype ``` ```` ````{py:attribute} DTSENTRIES :canonical: arelle.ModelDocument.Type.DTSENTRIES :value: > 6 ```{autodoc2-docstring} arelle.ModelDocument.Type.DTSENTRIES ``` ```` ````{py:attribute} INLINEXBRLDOCUMENTSET :canonical: arelle.ModelDocument.Type.INLINEXBRLDOCUMENTSET :value: > 7 ```{autodoc2-docstring} arelle.ModelDocument.Type.INLINEXBRLDOCUMENTSET ``` ```` ````{py:attribute} VERSIONINGREPORT :canonical: arelle.ModelDocument.Type.VERSIONINGREPORT :value: > 8 ```{autodoc2-docstring} arelle.ModelDocument.Type.VERSIONINGREPORT ``` ```` ````{py:attribute} TESTCASESINDEX :canonical: arelle.ModelDocument.Type.TESTCASESINDEX :value: > 9 ```{autodoc2-docstring} arelle.ModelDocument.Type.TESTCASESINDEX ``` ```` ````{py:attribute} TESTCASE :canonical: arelle.ModelDocument.Type.TESTCASE :value: > 10 ```{autodoc2-docstring} arelle.ModelDocument.Type.TESTCASE ``` ```` ````{py:attribute} REGISTRY :canonical: arelle.ModelDocument.Type.REGISTRY :value: > 11 ```{autodoc2-docstring} arelle.ModelDocument.Type.REGISTRY ``` ```` ````{py:attribute} REGISTRYTESTCASE :canonical: arelle.ModelDocument.Type.REGISTRYTESTCASE :value: > 12 ```{autodoc2-docstring} arelle.ModelDocument.Type.REGISTRYTESTCASE ``` ```` ````{py:attribute} XPATHTESTSUITE :canonical: arelle.ModelDocument.Type.XPATHTESTSUITE :value: > 13 ```{autodoc2-docstring} arelle.ModelDocument.Type.XPATHTESTSUITE ``` ```` ````{py:attribute} RSSFEED :canonical: arelle.ModelDocument.Type.RSSFEED :value: > 14 ```{autodoc2-docstring} arelle.ModelDocument.Type.RSSFEED ``` ```` ````{py:attribute} ARCSINFOSET :canonical: arelle.ModelDocument.Type.ARCSINFOSET :value: > 15 ```{autodoc2-docstring} arelle.ModelDocument.Type.ARCSINFOSET ``` ```` ````{py:attribute} FACTDIMSINFOSET :canonical: arelle.ModelDocument.Type.FACTDIMSINFOSET :value: > 16 ```{autodoc2-docstring} arelle.ModelDocument.Type.FACTDIMSINFOSET ``` ```` ````{py:attribute} HTML :canonical: arelle.ModelDocument.Type.HTML :value: > 17 ```{autodoc2-docstring} arelle.ModelDocument.Type.HTML ``` ```` ````{py:attribute} TESTCASETYPES :canonical: arelle.ModelDocument.Type.TESTCASETYPES :value: > () ```{autodoc2-docstring} arelle.ModelDocument.Type.TESTCASETYPES ``` ```` ````{py:attribute} typeName :canonical: arelle.ModelDocument.Type.typeName :value: > ('unknown XML', 'unknown non-XML', 'schema', 'linkbase', 'instance', 'inline XBRL instance', 'entry ... ```{autodoc2-docstring} arelle.ModelDocument.Type.typeName ``` ```` ````{py:method} identify(filesource: arelle.FileSource.FileSource, filepath: str) -> int :canonical: arelle.ModelDocument.Type.identify :staticmethod: ```{autodoc2-docstring} arelle.ModelDocument.Type.identify ``` ```` ````` ````{py:data} schemaBottom :canonical: arelle.ModelDocument.schemaBottom :value: > None ```{autodoc2-docstring} arelle.ModelDocument.schemaBottom ``` ```` ````{py:data} fractionParts :canonical: arelle.ModelDocument.fractionParts :value: > None ```{autodoc2-docstring} arelle.ModelDocument.fractionParts ``` ```` `````{py:class} ModelDocument(modelXbrl, type, uri, filepath, xmlDocument) :canonical: arelle.ModelDocument.ModelDocument ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.__init__ ``` ````{py:attribute} documentEncoding :canonical: arelle.ModelDocument.ModelDocument.documentEncoding :type: str :value: > None ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.documentEncoding ``` ```` ````{py:attribute} xmlRootElement :canonical: arelle.ModelDocument.ModelDocument.xmlRootElement :type: typing.Any :value: > None ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.xmlRootElement ``` ```` ````{py:attribute} targetXbrlRootElement :canonical: arelle.ModelDocument.ModelDocument.targetXbrlRootElement :type: arelle.ModelObject.ModelObject :value: > None ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.targetXbrlRootElement ``` ```` ````{py:method} objectId(refId='') :canonical: arelle.ModelDocument.ModelDocument.objectId ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.objectId ``` ```` ````{py:property} qname :canonical: arelle.ModelDocument.ModelDocument.qname ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.qname ``` ```` ````{py:method} relativeUri(uri) :canonical: arelle.ModelDocument.ModelDocument.relativeUri ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.relativeUri ``` ```` ````{py:property} modelDocument :canonical: arelle.ModelDocument.ModelDocument.modelDocument ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.modelDocument ``` ```` ````{py:property} displayUri :canonical: arelle.ModelDocument.ModelDocument.displayUri ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.displayUri ``` ```` ````{py:property} basename :canonical: arelle.ModelDocument.ModelDocument.basename ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.basename ``` ```` ````{py:property} filepathdir :canonical: arelle.ModelDocument.ModelDocument.filepathdir ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.filepathdir ``` ```` ````{py:property} propertyView :canonical: arelle.ModelDocument.ModelDocument.propertyView ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.propertyView ``` ```` ````{py:method} __repr__() :canonical: arelle.ModelDocument.ModelDocument.__repr__ ```` ````{py:method} setTitle(cntlr) :canonical: arelle.ModelDocument.ModelDocument.setTitle ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.setTitle ``` ```` ````{py:method} setTitleInBackground() :canonical: arelle.ModelDocument.ModelDocument.setTitleInBackground ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.setTitleInBackground ``` ```` ````{py:method} updateFileHistoryIfNeeded() :canonical: arelle.ModelDocument.ModelDocument.updateFileHistoryIfNeeded ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.updateFileHistoryIfNeeded ``` ```` ````{py:method} save(overrideFilepath=None, outputZip=None, outputFile=None, updateFileHistory=True, encoding='utf-8', zipDir=None, **kwargs) -> None :canonical: arelle.ModelDocument.ModelDocument.save ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.save ``` ```` ````{py:method} close(visited=None, urlDocs=None) -> None :canonical: arelle.ModelDocument.ModelDocument.close ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.close ``` ```` ````{py:method} gettype() :canonical: arelle.ModelDocument.ModelDocument.gettype ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.gettype ``` ```` ````{py:property} creationSoftwareComment :canonical: arelle.ModelDocument.ModelDocument.creationSoftwareComment ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.creationSoftwareComment ``` ```` ````{py:property} creationSoftware :canonical: arelle.ModelDocument.ModelDocument.creationSoftware :type: str ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.creationSoftware ``` ```` ````{py:method} creationSoftwareMatches(text: str | None) -> list[str] :canonical: arelle.ModelDocument.ModelDocument.creationSoftwareMatches ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.creationSoftwareMatches ``` ```` ````{py:property} processingInstructions :canonical: arelle.ModelDocument.ModelDocument.processingInstructions ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.processingInstructions ``` ```` ````{py:method} schemaDiscover(rootElement, isIncluded, isSupplemental, namespace) :canonical: arelle.ModelDocument.ModelDocument.schemaDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.schemaDiscover ``` ```` ````{py:method} schemaDiscoverChildElements(parentModelObject, isSupplemental=False) :canonical: arelle.ModelDocument.ModelDocument.schemaDiscoverChildElements ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.schemaDiscoverChildElements ``` ```` ````{py:method} baseForElement(element) :canonical: arelle.ModelDocument.ModelDocument.baseForElement ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.baseForElement ``` ```` ````{py:method} importDiscover(element) :canonical: arelle.ModelDocument.ModelDocument.importDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.importDiscover ``` ```` ````{py:method} schemalocateElementNamespace(element) :canonical: arelle.ModelDocument.ModelDocument.schemalocateElementNamespace ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.schemalocateElementNamespace ``` ```` ````{py:method} loadSchemalocatedSchemas() -> None :canonical: arelle.ModelDocument.ModelDocument.loadSchemalocatedSchemas ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.loadSchemalocatedSchemas ``` ```` ````{py:method} schemaLinkbaseRefsDiscover(tree) :canonical: arelle.ModelDocument.ModelDocument.schemaLinkbaseRefsDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.schemaLinkbaseRefsDiscover ``` ```` ````{py:method} schemaLinkbaseRefDiscover(element) :canonical: arelle.ModelDocument.ModelDocument.schemaLinkbaseRefDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.schemaLinkbaseRefDiscover ``` ```` ````{py:method} linkbasesDiscover(tree) :canonical: arelle.ModelDocument.ModelDocument.linkbasesDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.linkbasesDiscover ``` ```` ````{py:method} linkbaseDiscover(linkbaseElement, inInstance=False) :canonical: arelle.ModelDocument.ModelDocument.linkbaseDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.linkbaseDiscover ``` ```` ````{py:method} discoverHref(element, nonDTS=False, urlRewritePluginClass=None) :canonical: arelle.ModelDocument.ModelDocument.discoverHref ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.discoverHref ``` ```` ````{py:method} instanceDiscover(xbrlElement) :canonical: arelle.ModelDocument.ModelDocument.instanceDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.instanceDiscover ``` ```` ````{py:method} instanceContentsDiscover(xbrlElement) :canonical: arelle.ModelDocument.ModelDocument.instanceContentsDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.instanceContentsDiscover ``` ```` ````{py:method} contextDiscover(modelContext, setTargetModelXbrl=False) -> None :canonical: arelle.ModelDocument.ModelDocument.contextDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.contextDiscover ``` ```` ````{py:method} unitDiscover(unitElement, setTargetModelXbrl=False) -> None :canonical: arelle.ModelDocument.ModelDocument.unitDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.unitDiscover ``` ```` ````{py:method} inlineXbrlDiscover(htmlElement) :canonical: arelle.ModelDocument.ModelDocument.inlineXbrlDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.inlineXbrlDiscover ``` ```` ````{py:method} factDiscover(modelFact, parentModelFacts=None, parentElement=None) -> None :canonical: arelle.ModelDocument.ModelDocument.factDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.factDiscover ``` ```` ````{py:method} testcasesIndexDiscover(rootNode, validateTestcaseSchema) :canonical: arelle.ModelDocument.ModelDocument.testcasesIndexDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.testcasesIndexDiscover ``` ```` ````{py:method} testcaseDiscover(testcaseElement, validateTestcaseSchema) :canonical: arelle.ModelDocument.ModelDocument.testcaseDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.testcaseDiscover ``` ```` ````{py:method} registryDiscover(rootNode) :canonical: arelle.ModelDocument.ModelDocument.registryDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.registryDiscover ``` ```` ````{py:method} xPathTestSuiteDiscover(rootNode) :canonical: arelle.ModelDocument.ModelDocument.xPathTestSuiteDiscover ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.xPathTestSuiteDiscover ``` ```` ````{py:method} addDocumentReference(doc, referenceType, referringModelObject=None) :canonical: arelle.ModelDocument.ModelDocument.addDocumentReference ```{autodoc2-docstring} arelle.ModelDocument.ModelDocument.addDocumentReference ``` ```` ````` ````{py:function} inlineIxdsDiscover(modelXbrl, modelIxdsDocument, setTargetModelXbrl=False) :canonical: arelle.ModelDocument.inlineIxdsDiscover ```{autodoc2-docstring} arelle.ModelDocument.inlineIxdsDiscover ``` ```` ```{py:exception} LoadingException() :canonical: arelle.ModelDocument.LoadingException Bases: {py:obj}`Exception` ``` `````{py:class} ModelDocumentReference(referenceType, referringModelObject=None) :canonical: arelle.ModelDocument.ModelDocumentReference ```{autodoc2-docstring} arelle.ModelDocument.ModelDocumentReference ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} arelle.ModelDocument.ModelDocumentReference.__init__ ``` ````{py:property} referringXlinkRole :canonical: arelle.ModelDocument.ModelDocumentReference.referringXlinkRole ```{autodoc2-docstring} arelle.ModelDocument.ModelDocumentReference.referringXlinkRole ``` ```` `````