arelle.utils.validate.Document¶
Module Contents¶
Functions¶
Checks the encoding of documents on the ModelXbrl against a list of allowed encodings. If documentType is not specified, all documents except INLINEXBRLDOCUMENTSET are checked. If documentType is specified, only documents of that type are checked. |
|
Returns a list of ModelObjects that are referenced by referenceType. |
API¶
- arelle.utils.validate.Document.checkDocumentEncoding(val: arelle.ValidateXbrl.ValidateXbrl, encodings: list[str], taxonomyUrlPrefixes: frozenset[str], documentType: int | None = None) list[arelle.ModelDocument.ModelDocument]¶
Checks the encoding of documents on the ModelXbrl against a list of allowed encodings. If documentType is not specified, all documents except INLINEXBRLDOCUMENTSET are checked. If documentType is specified, only documents of that type are checked.
- Parameters:
val – validateXbrl object containing the modelXbrl with the documents to check.
encodings – lower case list of allowed encodings (e.g., [‘utf-8’, ‘iso-8859-1’, ‘utf-8-sig’])
taxonomyUrlPrefixes – frozenset of URL prefixes that identify taxonomy documents (e.g., {‘http://www.xbrl.org/2003/linkbase’, ‘http://www.xbrl.org/2003/instance’})
documentType – optional ModelDocumentType to filter documents by type (e.g., ModelDocumentType.INSTANCE). If None, all non-INLINEXBRLDOCUMENTSET document types are checked.
- Returns:
list of ModelDocument objects that have a disallowed encoding.
- arelle.utils.validate.Document.getReferencedModelObjects(val: arelle.ValidateXbrl.ValidateXbrl, modelDocumentType: int, referenceType: str) list[arelle.ModelObject.ModelObject]¶
Returns a list of ModelObjects that are referenced by referenceType.
- Parameters:
val – validateXbrl object containing the modelXbrl with the documents to check.
modelDocumentType – integer representation of the document type used to filter=(e.g., ModelDocumentType.INSTANCE).
referenceType – local name of the reference type to check for (e.g., “schemaRef”).
- Returns:
list of ModelObjects that are referenced.