arelle-release 2.17.1__py3-none-any.whl → 2.37.71__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- arelle/Aspect.py +6 -3
- arelle/BetaFeatures.py +3 -0
- arelle/Cntlr.py +117 -413
- arelle/CntlrCmdLine.py +364 -227
- arelle/CntlrQuickBooks.py +4 -2
- arelle/CntlrWebMain.py +179 -119
- arelle/CntlrWinMain.py +342 -124
- arelle/DialogAbout.py +1 -1
- arelle/DialogArcroleGroup.py +1 -1
- arelle/DialogFind.py +1 -1
- arelle/DialogFormulaParameters.py +2 -2
- arelle/DialogLanguage.py +45 -36
- arelle/DialogNewFactItem.py +1 -1
- arelle/DialogOpenArchive.py +30 -34
- arelle/DialogPackageManager.py +11 -8
- arelle/DialogPluginManager.py +43 -89
- arelle/DialogRssWatch.py +2 -2
- arelle/DialogURL.py +1 -1
- arelle/DialogUserPassword.py +1 -1
- arelle/DisclosureSystem.py +69 -1
- arelle/ErrorManager.py +321 -0
- arelle/FileSource.py +201 -99
- arelle/FunctionFn.py +44 -5
- arelle/FunctionIxt.py +16 -13
- arelle/FunctionUtil.py +1 -1
- arelle/FunctionXfi.py +68 -24
- arelle/FunctionXs.py +1 -1
- arelle/HtmlUtil.py +5 -4
- arelle/LeiUtil.py +63 -43
- arelle/LinkbaseType.py +94 -0
- arelle/LocalViewer.py +8 -2
- arelle/Locale.py +239 -79
- arelle/ModelDocument.py +180 -48
- arelle/ModelDtsObject.py +32 -27
- arelle/ModelFormulaObject.py +14 -6
- arelle/ModelInstanceObject.py +43 -14
- arelle/ModelManager.py +6 -1
- arelle/ModelObject.py +12 -8
- arelle/ModelObjectFactory.py +18 -2
- arelle/ModelRelationshipSet.py +46 -3
- arelle/ModelRenderingObject.py +899 -951
- arelle/ModelRssItem.py +2 -4
- arelle/ModelTestcaseObject.py +41 -4
- arelle/ModelValue.py +42 -14
- arelle/ModelVersReport.py +1 -1
- arelle/ModelXbrl.py +133 -273
- arelle/PackageManager.py +202 -176
- arelle/PluginManager.py +551 -239
- arelle/PluginUtils.py +54 -0
- arelle/PrototypeInstanceObject.py +53 -12
- arelle/PythonUtil.py +166 -25
- arelle/RuntimeOptions.py +32 -18
- arelle/SocketUtils.py +3 -0
- arelle/SystemInfo.py +1 -1
- arelle/TkTableWrapper.py +33 -5
- arelle/UITkTable.py +27 -21
- arelle/Updater.py +7 -3
- arelle/UrlUtil.py +6 -2
- arelle/Validate.py +596 -402
- arelle/ValidateDuplicateFacts.py +584 -0
- arelle/ValidateFileSource.py +38 -0
- arelle/ValidateFilingText.py +46 -29
- arelle/ValidateInfoset.py +104 -32
- arelle/ValidateUtr.py +31 -4
- arelle/ValidateXbrl.py +144 -120
- arelle/ValidateXbrlCalcs.py +51 -66
- arelle/ValidateXbrlDTS.py +98 -29
- arelle/Version.py +2 -7
- arelle/ViewFile.py +2 -0
- arelle/ViewFileDTS.py +7 -2
- arelle/ViewFileFactList.py +1 -1
- arelle/ViewFileFactTable.py +4 -4
- arelle/ViewFileRelationshipSet.py +36 -19
- arelle/ViewFileRenderedGrid.py +164 -753
- arelle/ViewFileRenderedLayout.py +174 -0
- arelle/ViewFileRenderedStructure.py +108 -0
- arelle/ViewWinDTS.py +4 -1
- arelle/ViewWinFactList.py +1 -1
- arelle/ViewWinFactTable.py +1 -1
- arelle/ViewWinRelationshipSet.py +14 -8
- arelle/ViewWinRenderedGrid.py +397 -287
- arelle/ViewWinRssFeed.py +4 -0
- arelle/ViewWinTree.py +15 -9
- arelle/ViewWinXml.py +1 -1
- arelle/WebCache.py +510 -272
- arelle/XbrlConst.py +202 -196
- arelle/XbrlUtil.py +2 -1
- arelle/XhtmlValidate.py +9 -23
- arelle/XmlUtil.py +24 -19
- arelle/XmlValidate.py +95 -67
- arelle/XmlValidateParticles.py +4 -4
- arelle/_version.py +33 -3
- arelle/api/Session.py +183 -0
- arelle/config/creationSoftwareNames.json +24 -10
- arelle/config/disclosuresystems.xml +1 -1
- arelle/config/disclosuresystems.xsd +3 -0
- arelle/config/sbr-text-formatting.xsd +737 -0
- arelle/conformance/CSVTestcaseLoader.py +102 -0
- arelle/formula/FactAspectsCache.py +10 -4
- arelle/formula/ValidateFormula.py +82 -194
- arelle/formula/XPathContext.py +42 -28
- arelle/formula/XPathParser.py +15 -9
- arelle/locale/ar_EG/LC_MESSAGES/ar_EG.po +3 -4
- arelle/locale/messages.pot +1 -2
- arelle/locale/ru/LC_MESSAGES/ru.po +2 -2
- arelle/logging/formatters/LogFormatter.py +47 -0
- arelle/logging/handlers/LogHandlerWithXml.py +94 -0
- arelle/logging/handlers/LogToBufferHandler.py +20 -0
- arelle/logging/handlers/LogToPrintHandler.py +41 -0
- arelle/logging/handlers/LogToXmlHandler.py +244 -0
- arelle/logging/handlers/StructuredMessageLogHandler.py +74 -0
- arelle/model/CommentBase.py +3 -0
- arelle/model/ElementBase.py +3 -0
- arelle/model/PIBase.py +3 -0
- arelle/model/__init__.py +3 -0
- arelle/oim/Load.py +2869 -0
- arelle/oim/Validate.py +155 -0
- arelle/oim/xml/Save.py +21 -0
- arelle/packages/PackageConst.py +7 -0
- arelle/packages/PackageType.py +13 -0
- arelle/packages/PackageUtils.py +22 -0
- arelle/packages/PackageValidation.py +200 -0
- arelle/packages/report/DetectReportPackage.py +13 -0
- arelle/packages/report/ReportPackage.py +265 -0
- arelle/packages/report/ReportPackageConst.py +79 -0
- arelle/packages/report/ReportPackageValidator.py +207 -0
- arelle/plugin/EdgarRendererAllReports.py +12 -12
- arelle/plugin/OimTaxonomy/ModelValueMore.py +15 -0
- arelle/plugin/OimTaxonomy/ValidateDTS.py +484 -0
- arelle/plugin/OimTaxonomy/ViewXbrlTxmyObj.py +239 -0
- arelle/plugin/OimTaxonomy/XbrlAbstract.py +16 -0
- arelle/plugin/OimTaxonomy/XbrlConcept.py +68 -0
- arelle/plugin/OimTaxonomy/XbrlConst.py +261 -0
- arelle/plugin/OimTaxonomy/XbrlCube.py +91 -0
- arelle/plugin/OimTaxonomy/XbrlDimension.py +38 -0
- arelle/plugin/OimTaxonomy/XbrlDts.py +152 -0
- arelle/plugin/OimTaxonomy/XbrlEntity.py +16 -0
- arelle/plugin/OimTaxonomy/XbrlGroup.py +22 -0
- arelle/plugin/OimTaxonomy/XbrlImportedTaxonomy.py +22 -0
- arelle/plugin/OimTaxonomy/XbrlLabel.py +31 -0
- arelle/plugin/OimTaxonomy/XbrlNetwork.py +100 -0
- arelle/plugin/OimTaxonomy/XbrlProperty.py +28 -0
- arelle/plugin/OimTaxonomy/XbrlReference.py +33 -0
- arelle/plugin/OimTaxonomy/XbrlReport.py +24 -0
- arelle/plugin/OimTaxonomy/XbrlTableTemplate.py +35 -0
- arelle/plugin/OimTaxonomy/XbrlTaxonomy.py +93 -0
- arelle/plugin/OimTaxonomy/XbrlTaxonomyObject.py +154 -0
- arelle/plugin/OimTaxonomy/XbrlTransform.py +17 -0
- arelle/plugin/OimTaxonomy/XbrlTypes.py +23 -0
- arelle/plugin/OimTaxonomy/XbrlUnit.py +17 -0
- arelle/plugin/OimTaxonomy/__init__.py +1037 -0
- arelle/plugin/OimTaxonomy/resources/iso4217.json +4479 -0
- arelle/plugin/OimTaxonomy/resources/oim-taxonomy-schema.json +935 -0
- arelle/plugin/OimTaxonomy/resources/ref.json +333 -0
- arelle/plugin/OimTaxonomy/resources/transform-types.json +2481 -0
- arelle/plugin/OimTaxonomy/resources/types.json +727 -0
- arelle/plugin/OimTaxonomy/resources/utr.json +3046 -0
- arelle/plugin/OimTaxonomy/resources/xbrlSpec.json +1082 -0
- arelle/plugin/formulaLoader.py +3 -3
- arelle/plugin/formulaSaver.py +4 -4
- arelle/plugin/inlineXbrlDocumentSet.py +331 -102
- arelle/plugin/internet/proxyNTLM/HTTPNtlmAuthHandler.py +1 -1
- arelle/plugin/loadFromExcel.py +13 -10
- arelle/plugin/loadFromOIM.py +16 -3096
- arelle/plugin/logging/saveMessages.py +1 -1
- arelle/plugin/saveHtmlEBAtables.py +293 -213
- arelle/plugin/saveLoadableOIM.py +652 -361
- arelle/plugin/saveOIMTaxonomy.py +311 -0
- arelle/plugin/streamingExtensions.py +1 -1
- arelle/plugin/systemInfo.py +46 -0
- arelle/plugin/transforms/tester.py +4 -4
- arelle/plugin/validate/CIPC/Const.py +18 -0
- arelle/plugin/validate/CIPC/__init__.py +34 -13
- arelle/plugin/validate/DBA/DisclosureSystems.py +12 -0
- arelle/plugin/validate/DBA/PluginValidationDataExtension.py +165 -0
- arelle/plugin/validate/DBA/ValidationPluginExtension.py +545 -0
- arelle/plugin/validate/DBA/__init__.py +49 -0
- arelle/plugin/validate/DBA/resources/config.xml +21 -0
- arelle/plugin/validate/DBA/rules/__init__.py +323 -0
- arelle/plugin/validate/DBA/rules/fr.py +1377 -0
- arelle/plugin/validate/DBA/rules/tc.py +45 -0
- arelle/plugin/validate/DBA/rules/th.py +172 -0
- arelle/plugin/validate/DBA/rules/tm.py +351 -0
- arelle/plugin/validate/DBA/rules/tr.py +373 -0
- arelle/plugin/validate/EBA/__init__.py +11 -12
- arelle/plugin/validate/EDINET/Constants.py +208 -0
- arelle/plugin/validate/EDINET/ContextRequirement.py +58 -0
- arelle/plugin/validate/EDINET/ControllerPluginData.py +298 -0
- arelle/plugin/validate/EDINET/CoverItemRequirements.py +42 -0
- arelle/plugin/validate/EDINET/DeiRequirements.py +118 -0
- arelle/plugin/validate/EDINET/DisclosureSystems.py +1 -0
- arelle/plugin/validate/EDINET/FilingFormat.py +275 -0
- arelle/plugin/validate/EDINET/FormType.py +134 -0
- arelle/plugin/validate/EDINET/ManifestInstance.py +236 -0
- arelle/plugin/validate/EDINET/PluginValidationDataExtension.py +640 -0
- arelle/plugin/validate/EDINET/ReportFolderType.py +162 -0
- arelle/plugin/validate/EDINET/Statement.py +139 -0
- arelle/plugin/validate/EDINET/TableOfContentsBuilder.py +493 -0
- arelle/plugin/validate/EDINET/UploadContents.py +48 -0
- arelle/plugin/validate/EDINET/ValidationPluginExtension.py +64 -0
- arelle/plugin/validate/EDINET/__init__.py +109 -0
- arelle/plugin/validate/EDINET/resources/config.xml +22 -0
- arelle/plugin/validate/EDINET/resources/cover-item-requirements.json +793 -0
- arelle/plugin/validate/EDINET/resources/dei-requirements.csv +27 -0
- arelle/plugin/validate/EDINET/resources/edinet-taxonomies.xml +62 -0
- arelle/plugin/validate/EDINET/rules/contexts.py +547 -0
- arelle/plugin/validate/EDINET/rules/edinet.py +1991 -0
- arelle/plugin/validate/EDINET/rules/frta.py +301 -0
- arelle/plugin/validate/EDINET/rules/gfm.py +2394 -0
- arelle/plugin/validate/EDINET/rules/manifests.py +88 -0
- arelle/plugin/validate/EDINET/rules/upload.py +1370 -0
- arelle/plugin/validate/ESEF/Const.py +16 -75
- arelle/plugin/validate/ESEF/Dimensions.py +2 -2
- arelle/plugin/validate/ESEF/ESEF_2021/DTS.py +6 -1
- arelle/plugin/validate/ESEF/ESEF_2021/Image.py +7 -4
- arelle/plugin/validate/ESEF/ESEF_2021/ValidateXbrlFinally.py +80 -57
- arelle/plugin/validate/ESEF/ESEF_Current/DTS.py +60 -22
- arelle/plugin/validate/ESEF/ESEF_Current/ValidateXbrlFinally.py +272 -133
- arelle/plugin/validate/ESEF/Util.py +5 -19
- arelle/plugin/validate/ESEF/__init__.py +61 -46
- arelle/plugin/validate/ESEF/resources/authority-validations.json +120 -10
- arelle/plugin/validate/ESEF/resources/config.xml +44 -3
- arelle/plugin/validate/FERC/__init__.py +31 -18
- arelle/plugin/validate/FERC/config.xml +18 -18
- arelle/plugin/validate/NL/DisclosureSystems.py +19 -3
- arelle/plugin/validate/NL/PluginValidationDataExtension.py +710 -7
- arelle/plugin/validate/NL/ValidationPluginExtension.py +117 -12
- arelle/plugin/validate/NL/__init__.py +21 -10
- arelle/plugin/validate/NL/resources/config.xml +27 -6
- arelle/plugin/validate/NL/rules/br_kvk.py +81 -21
- arelle/plugin/validate/NL/rules/fg_nl.py +292 -0
- arelle/plugin/validate/NL/rules/fr_kvk.py +60 -7
- arelle/plugin/validate/NL/rules/fr_nl.py +705 -24
- arelle/plugin/validate/NL/rules/nl_kvk.py +2182 -0
- arelle/plugin/validate/ROS/DisclosureSystems.py +1 -0
- arelle/plugin/validate/ROS/PluginValidationDataExtension.py +109 -0
- arelle/plugin/validate/ROS/ValidationPluginExtension.py +27 -0
- arelle/plugin/validate/ROS/__init__.py +28 -341
- arelle/plugin/validate/ROS/resources/config.xml +20 -0
- arelle/plugin/validate/ROS/rules/__init__.py +56 -0
- arelle/plugin/validate/ROS/rules/ros.py +393 -0
- arelle/plugin/validate/UK/ValidateUK.py +1372 -0
- arelle/plugin/validate/{HMRC → UK}/__init__.py +195 -189
- arelle/plugin/validate/{HMRC → UK}/config.xml +1 -1
- arelle/plugin/xbrlDB/SqlDb.py +1 -1
- arelle/plugin/xbrlDB/XbrlOpenSqlDB.py +5 -5
- arelle/plugin/xbrlDB/XbrlPublicPostgresDB.py +1 -1
- arelle/plugin/xbrlDB/XbrlSemanticJsonDB.py +1 -1
- arelle/plugin/xbrlDB/XbrlSemanticRdfDB.py +1 -1
- arelle/plugin/xbrlDB/__init__.py +4 -1
- arelle/{RenderingEvaluator.py → rendering/RenderingEvaluator.py} +120 -99
- arelle/rendering/RenderingLayout.py +476 -0
- arelle/rendering/RenderingResolution.py +814 -0
- arelle/resources/cache/http/www.eurofiling.info/eu/fr/xbrl/ext/filing-indicators.xsd +20 -0
- arelle/resources/cache/http/www.w3.org/2001/03/xml.xsd +117 -0
- arelle/resources/cache/http/www.w3.org/2001/XMLSchema.xsd +2534 -0
- arelle/resources/cache/http/www.w3.org/2001/xml.xsd +287 -0
- arelle/resources/cache/http/www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd +779 -0
- arelle/resources/cache/http/www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd +486 -0
- arelle/resources/cache/http/www.xbrl.org/2003/xl-2003-12-31.xsd +251 -0
- arelle/resources/cache/http/www.xbrl.org/2003/xlink-2003-12-31.xsd +121 -0
- arelle/resources/cache/http/www.xbrl.org/2004/ref-2004-08-10.xsd +129 -0
- arelle/resources/cache/http/www.xbrl.org/2005/xbrldt-2005.xsd +53 -0
- arelle/resources/cache/http/www.xbrl.org/2006/ref-2006-02-27.xsd +120 -0
- arelle/resources/cache/http/www.xbrl.org/2006/xbrldi-2006.xsd +41 -0
- arelle/resources/cache/http/www.xbrl.org/2008/boolean-filter.xsd +51 -0
- arelle/resources/cache/http/www.xbrl.org/2008/concept-filter.xsd +127 -0
- arelle/resources/cache/http/www.xbrl.org/2008/conformance.xsd +116 -0
- arelle/resources/cache/http/www.xbrl.org/2008/conformanceFunction.xsd +51 -0
- arelle/resources/cache/http/www.xbrl.org/2008/consistency-assertion.xsd +66 -0
- arelle/resources/cache/http/www.xbrl.org/2008/dimension-filter.xsd +86 -0
- arelle/resources/cache/http/www.xbrl.org/2008/entity-filter.xsd +92 -0
- arelle/resources/cache/http/www.xbrl.org/2008/existence-assertion.xsd +44 -0
- arelle/resources/cache/http/www.xbrl.org/2008/formula.xsd +261 -0
- arelle/resources/cache/http/www.xbrl.org/2008/function.xsd +90 -0
- arelle/resources/cache/http/www.xbrl.org/2008/general-filter.xsd +38 -0
- arelle/resources/cache/http/www.xbrl.org/2008/generic-label.xsd +80 -0
- arelle/resources/cache/http/www.xbrl.org/2008/generic-link.xsd +81 -0
- arelle/resources/cache/http/www.xbrl.org/2008/generic-reference.xsd +63 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xbrl/xbrl-instance-2003-12-31-ixmod.xsd +788 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xbrl/xbrl-linkbase-2003-12-31-ixmod.xsd +488 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xbrl/xl-2003-12-31.xsd +248 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xbrl/xlink-2003-12-31.xsd +117 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xframes-1.xsd +166 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-applet-1.xsd +66 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-attribs-1.xsd +72 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-base-1.xsd +36 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-basic-form-1.xsd +195 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-basic-table-1.xsd +169 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-basic10-model-1.xsd +376 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-basic10-module-redefines-1.xsd +61 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-basic10-modules-1.xsd +259 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-basic10.xsd +98 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-bdo-1.xsd +78 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-blkphras-1.xsd +161 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-blkpres-1.xsd +37 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-blkstruct-1.xsd +49 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-charent-1.xsd +38 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-copyright-1.xsd +29 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-csismap-1.xsd +96 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-datatypes-1.xsd +128 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-edit-1.xsd +39 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-events-1.xsd +130 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-form-1.xsd +326 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-frames-1.xsd +113 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-framework-1.xsd +66 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-hypertext-1.xsd +47 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-iframe-1.xsd +68 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-image-1.xsd +45 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-inlphras-1.xsd +163 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-inlpres-1.xsd +39 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-inlstruct-1.xsd +50 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-inlstyle-1.xsd +27 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-legacy-1.xsd +97 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-link-1.xsd +45 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-list-1.xsd +99 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-meta-1.xsd +42 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-misc-1.xsd +441 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-nameident-1.xsd +63 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-notations-1.xsd +69 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-object-1.xsd +76 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-param-1.xsd +51 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-pres-1.xsd +51 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-ruby-1.xsd +171 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-ruby-basic-1.xsd +89 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-script-1.xsd +70 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-ssismap-1.xsd +43 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-struct-1.xsd +112 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-style-1.xsd +52 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-table-1.xsd +272 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-target-1.xsd +53 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml-text-1.xsd +67 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml11-model-1.xsd +677 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml11-module-redefines-1.xsd +335 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml11-modules-1.xsd +528 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml11.xsd +104 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xhtml2.xsd +21 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xml-events-1.xsd +73 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xml-events-2.xsd +74 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xml-events-attribs-1.xsd +73 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xml-events-attribs-2.xsd +75 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xml-events-copyright-1.xsd +34 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xml-events-copyright-2.xsd +34 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml/xml-handlers-2.xsd +98 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml-inlinexbrl-1_0-definitions.xsd +225 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml-inlinexbrl-1_0-model.xsd +681 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml-inlinexbrl-1_0-modules.xsd +535 -0
- arelle/resources/cache/http/www.xbrl.org/2008/inlinexbrl/xhtml-inlinexbrl-1_0.xsd +40 -0
- arelle/resources/cache/http/www.xbrl.org/2008/match-filter.xsd +94 -0
- arelle/resources/cache/http/www.xbrl.org/2008/period-filter.xsd +86 -0
- arelle/resources/cache/http/www.xbrl.org/2008/registry.xsd +145 -0
- arelle/resources/cache/http/www.xbrl.org/2008/relative-filter.xsd +38 -0
- arelle/resources/cache/http/www.xbrl.org/2008/segment-scenario-filter.xsd +41 -0
- arelle/resources/cache/http/www.xbrl.org/2008/tuple-filter.xsd +83 -0
- arelle/resources/cache/http/www.xbrl.org/2008/unit-filter.xsd +58 -0
- arelle/resources/cache/http/www.xbrl.org/2008/validation.xsd +78 -0
- arelle/resources/cache/http/www.xbrl.org/2008/value-assertion.xsd +43 -0
- arelle/resources/cache/http/www.xbrl.org/2008/value-filter.xsd +43 -0
- arelle/resources/cache/http/www.xbrl.org/2008/variable.xsd +240 -0
- arelle/resources/cache/http/www.xbrl.org/2010/aspect-cover-filter.xsd +67 -0
- arelle/resources/cache/http/www.xbrl.org/2010/concept-relation-filter.xsd +108 -0
- arelle/resources/cache/http/www.xbrl.org/2010/custom-function-implementation.xsd +71 -0
- arelle/resources/cache/http/www.xbrl.org/2010/generic-message.xsd +68 -0
- arelle/resources/cache/http/www.xbrl.org/2010/validation-message.xsd +50 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xbrl/xbrl-instance-2003-12-31-ixmod.xsd +788 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xbrl/xbrl-linkbase-2003-12-31-ixmod.xsd +488 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xbrl/xl-2003-12-31.xsd +248 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xbrl/xlink-2003-12-31.xsd +117 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xframes-1.xsd +166 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-applet-1.xsd +66 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-attribs-1.xsd +72 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-base-1.xsd +36 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-basic-form-1.xsd +195 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-basic-table-1.xsd +169 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-basic10-model-1.xsd +376 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-basic10-module-redefines-1.xsd +61 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-basic10-modules-1.xsd +259 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-basic10.xsd +98 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-bdo-1.xsd +78 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-blkphras-1.xsd +161 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-blkpres-1.xsd +37 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-blkstruct-1.xsd +49 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-charent-1.xsd +38 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-copyright-1.xsd +29 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-csismap-1.xsd +96 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-datatypes-1.xsd +128 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-edit-1.xsd +39 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-events-1.xsd +130 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-form-1.xsd +326 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-frames-1.xsd +113 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-framework-1.xsd +66 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-hypertext-1.xsd +47 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-iframe-1.xsd +68 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-image-1.xsd +45 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-inlphras-1.xsd +163 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-inlpres-1.xsd +39 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-inlstruct-1.xsd +50 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-inlstyle-1.xsd +27 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-legacy-1.xsd +97 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-link-1.xsd +45 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-list-1.xsd +99 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-meta-1.xsd +42 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-misc-1.xsd +441 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-nameident-1.xsd +63 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-notations-1.xsd +69 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-object-1.xsd +76 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-param-1.xsd +51 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-pres-1.xsd +51 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-ruby-1.xsd +171 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-ruby-basic-1.xsd +89 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-script-1.xsd +70 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-ssismap-1.xsd +43 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-struct-1.xsd +112 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-style-1.xsd +52 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-table-1.xsd +272 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-target-1.xsd +53 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml-text-1.xsd +67 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml11-model-1.xsd +677 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml11-module-redefines-1.xsd +335 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml11-modules-1.xsd +528 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml11.xsd +104 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xhtml2.xsd +21 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xml-events-1.xsd +73 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xml-events-2.xsd +74 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xml-events-attribs-1.xsd +73 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xml-events-attribs-2.xsd +75 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xml-events-copyright-1.xsd +34 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xml-events-copyright-2.xsd +34 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml/xml-handlers-2.xsd +98 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml-inlinexbrl-1_1-definitions.xsd +252 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml-inlinexbrl-1_1-model.xsd +681 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml-inlinexbrl-1_1-modules.xsd +535 -0
- arelle/resources/cache/http/www.xbrl.org/2013/inlineXBRL/xhtml-inlinexbrl-1_1.xsd +40 -0
- arelle/resources/cache/http/www.xbrl.org/2013/match-filter.xsd +94 -0
- arelle/resources/cache/http/www.xbrl.org/2013/preferred-label.xsd +12 -0
- arelle/resources/cache/http/www.xbrl.org/2013/versioning-base.xsd +142 -0
- arelle/resources/cache/http/www.xbrl.org/2013/versioning-concept-details.xsd +143 -0
- arelle/resources/cache/http/www.xbrl.org/2013/versioning-concept-use.xsd +64 -0
- arelle/resources/cache/http/www.xbrl.org/2013/versioning-dimensions.xsd +162 -0
- arelle/resources/cache/http/www.xbrl.org/2014/extensible-enumerations.xsd +27 -0
- arelle/resources/cache/http/www.xbrl.org/2014/table.xsd +356 -0
- arelle/resources/cache/http/www.xbrl.org/2014/tablemodel.xsd +156 -0
- arelle/resources/cache/http/www.xbrl.org/2016/assertion-severity.xsd +29 -0
- arelle/resources/cache/http/www.xbrl.org/2016/severities.xml +21 -0
- arelle/resources/cache/http/www.xbrl.org/2016/taxonomy-package-catalog.xsd +38 -0
- arelle/resources/cache/http/www.xbrl.org/2016/taxonomy-package.xsd +154 -0
- arelle/resources/cache/http/www.xbrl.org/2022/assertion-severity.xsd +43 -0
- arelle/resources/cache/http/www.xbrl.org/2022/severities.xml +21 -0
- arelle/resources/cache/http/www.xbrl.org/dtr/type/nonNumeric-2009-12-16.xsd +76 -0
- arelle/resources/cache/http/www.xbrl.org/dtr/type/numeric-2009-12-16.xsd +78 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/arcrole/accounting-arcrole-2023-01-04.xsd +39 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/arcrole/deprecated-2009-12-16.xsd +29 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/arcrole/esma-arcrole-2018-11-21.xsd +14 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/arcrole/factExplanatory-2009-12-16.xsd +13 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/arcrole/jpfr-arcrole-2007-11-07.xsd +27 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/arcrole/parent-child-2013-09-19.xsd +12 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/role/deprecated-2009-12-16.xsd +17 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/role/jpfr-role-2007-11-07.xsd +47 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/role/negated-2008-03-31.xsd +30 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/role/negated-2009-12-16.xsd +33 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/role/negative-2009-12-16.xsd +25 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/role/net-2009-12-16.xsd +13 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/role/positive-2009-12-16.xsd +25 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/role/property-2022-09-28.xsd +15 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/role/reference-2009-12-16.xsd +21 -0
- arelle/resources/cache/http/www.xbrl.org/lrr/role/restated-2006-02-21.xsd +19 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2012-01-30/utr.xml +4543 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2012-10-31/utr.xml +4510 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2012-11-30/utr.xml +4567 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2013-02-28/utr.xml +5180 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2013-05-17/utr.xml +5349 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2016-08-10/utr.xml +5363 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2017-07-12/utr.xml +6164 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2021-02-16/utr.xml +6370 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2021-12-08/utr.xml +6493 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2022-02-16/utr.xml +6551 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2022-07-20/utr.xml +6638 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2023-12-20/utr.xml +6680 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2024-01-31/utr.xml +6680 -0
- arelle/resources/cache/http/www.xbrl.org/utr/2024-10-22/utr.xml +6693 -0
- arelle/resources/cache/http/www.xbrl.org/utr/utr.xml +6693 -0
- arelle/resources/cache/https/www.xbrl.org/2005/conformance.xsd +87 -0
- arelle/resources/cache/https/www.xbrl.org/2020/extensible-enumerations-2.0.xsd +51 -0
- arelle/resources/cache/https/www.xbrl.org/2023/calculation-1.1.xsd +27 -0
- arelle/resources/cache/https/www.xbrl.org/dtr/type/2020-01-21/types.xsd +812 -0
- arelle/resources/cache/https/www.xbrl.org/dtr/type/2022-03-31/types.xsd +847 -0
- arelle/resources/cache/https/www.xbrl.org/dtr/type/2024-01-31/types.xsd +897 -0
- arelle/resources/cache/https/www.xbrl.org/taxonomy/int/filing-indicators/REC/2021-02-03/filing-indicators-def.xml +68 -0
- arelle/resources/cache/https/www.xbrl.org/taxonomy/int/filing-indicators/REC/2021-02-03/filing-indicators-label.xml +84 -0
- arelle/resources/cache/https/www.xbrl.org/taxonomy/int/filing-indicators/REC/2021-02-03/filing-indicators.xsd +67 -0
- arelle/resources/libs/Tktable2.11/linux-x86_64/README.txt +149 -0
- arelle/resources/libs/Tktable2.11/linux-x86_64/html/tkTable.html +2039 -0
- arelle/resources/libs/Tktable2.11/linux-x86_64/libTktable2.11.so +0 -0
- arelle/resources/libs/Tktable2.11/linux-x86_64/license.txt +51 -0
- arelle/resources/libs/Tktable2.11/linux-x86_64/pkgIndex.tcl +3 -0
- arelle/resources/libs/Tktable2.11/linux-x86_64/tkTable.tcl +825 -0
- arelle/resources/libs/Tktable2.11/linux-x86_64/tktable.py +674 -0
- arelle/resources/libs/Tktable2.11/macos-arm64/README.txt +149 -0
- arelle/resources/libs/Tktable2.11/macos-arm64/html/tkTable.html +2039 -0
- arelle/resources/libs/Tktable2.11/macos-arm64/libTktable2.11.dylib +0 -0
- arelle/resources/libs/Tktable2.11/macos-arm64/license.txt +51 -0
- arelle/resources/libs/Tktable2.11/macos-arm64/pkgIndex.tcl +2 -0
- arelle/resources/libs/Tktable2.11/macos-arm64/tkTable.tcl +825 -0
- arelle/resources/libs/Tktable2.11/macos-arm64/tktable.py +674 -0
- arelle/resources/libs/Tktable2.11/macos-x86_64/README.txt +149 -0
- arelle/resources/libs/Tktable2.11/macos-x86_64/html/tkTable.html +2039 -0
- arelle/resources/libs/Tktable2.11/macos-x86_64/libTktable2.11.dylib +0 -0
- arelle/resources/libs/Tktable2.11/macos-x86_64/license.txt +51 -0
- arelle/resources/libs/Tktable2.11/macos-x86_64/pkgIndex.tcl +2 -0
- arelle/resources/libs/Tktable2.11/macos-x86_64/tkTable.tcl +825 -0
- arelle/resources/libs/Tktable2.11/macos-x86_64/tktable.py +674 -0
- arelle/resources/libs/Tktable2.11/win-x86_64/Tktable.dll +0 -0
- arelle/resources/libs/Tktable2.11/win-x86_64/pkgIndex.tcl +2 -0
- arelle/resources/libs/Tktable2.11/win-x86_64/tkTable.tcl +825 -0
- arelle/typing.py +9 -4
- arelle/utils/Contexts.py +38 -0
- arelle/utils/EntryPointDetection.py +139 -0
- arelle/utils/Equivalence.py +22 -0
- arelle/utils/{validate/PluginValidationData.py → PluginData.py} +5 -2
- arelle/utils/PluginHooks.py +256 -5
- arelle/utils/Units.py +36 -0
- arelle/utils/validate/Decorator.py +5 -3
- arelle/utils/validate/DetectScriptsInXhtml.py +99 -0
- arelle/utils/validate/ESEFImage.py +283 -0
- arelle/utils/validate/Validation.py +9 -1
- arelle/utils/validate/ValidationPlugin.py +74 -11
- arelle/utils/validate/ValidationUtil.py +55 -0
- arelle/webserver/bottle.py +5 -4424
- {arelle_release-2.17.1.dist-info → arelle_release-2.37.71.dist-info}/METADATA +51 -42
- arelle_release-2.37.71.dist-info/RECORD +697 -0
- {arelle_release-2.17.1.dist-info → arelle_release-2.37.71.dist-info}/WHEEL +1 -1
- {arelle_release-2.17.1.dist-info → arelle_release-2.37.71.dist-info/licenses}/LICENSE.md +1 -4
- {arelle_release-2.17.1.dist-info → arelle_release-2.37.71.dist-info}/top_level.txt +0 -1
- arelle/DialogOpenTaxonomyPackage.py +0 -1
- arelle/RenderingResolver.py +0 -624
- arelle/examples/.pydevproject +0 -5
- arelle/examples/CustomLogger.py +0 -43
- arelle/examples/LoadEFMvalidate.py +0 -32
- arelle/examples/LoadSavePreLbCsv.py +0 -26
- arelle/examples/LoadValidate.cs +0 -31
- arelle/examples/LoadValidate.py +0 -36
- arelle/examples/LoadValidateCmdLine.java +0 -69
- arelle/examples/LoadValidatePostedZip.java +0 -57
- arelle/examples/LoadValidateWebService.java +0 -34
- arelle/examples/SaveTableToExelle.py +0 -140
- arelle/examples/TR3toTR4.py +0 -88
- arelle/examples/plugin/bigInstance.py +0 -394
- arelle/examples/plugin/cmdWebServerExtension.py +0 -42
- arelle/examples/plugin/crashTest.py +0 -38
- arelle/examples/plugin/formulaSuiteConverter.py +0 -212
- arelle/examples/plugin/functionsCustom.py +0 -59
- arelle/examples/plugin/hello_dolly.py +0 -64
- arelle/examples/plugin/hello_i18n.pot +0 -26
- arelle/examples/plugin/hello_i18n.py +0 -32
- arelle/examples/plugin/importTestChild1.py +0 -21
- arelle/examples/plugin/importTestChild2.py +0 -22
- arelle/examples/plugin/importTestGrandchild1.py +0 -21
- arelle/examples/plugin/importTestGrandchild2.py +0 -21
- arelle/examples/plugin/importTestImported1.py +0 -23
- arelle/examples/plugin/importTestImported11.py +0 -22
- arelle/examples/plugin/importTestParent.py +0 -48
- arelle/examples/plugin/locale/fr/LC_MESSAGES/hello_i18n.po +0 -25
- arelle/examples/plugin/packagedImportTest/__init__.py +0 -47
- arelle/examples/plugin/packagedImportTest/importTestChild1.py +0 -21
- arelle/examples/plugin/packagedImportTest/importTestChild2.py +0 -22
- arelle/examples/plugin/packagedImportTest/importTestGrandchild1.py +0 -21
- arelle/examples/plugin/packagedImportTest/importTestGrandchild2.py +0 -21
- arelle/examples/plugin/packagedImportTest/importTestImported1.py +0 -24
- arelle/examples/plugin/packagedImportTest/importTestImported11.py +0 -21
- arelle/examples/plugin/packagedImportTest/subdir/importTestImported111.py +0 -21
- arelle/examples/plugin/packagedImportTest/subdir/subsubdir/importTestImported1111.py +0 -21
- arelle/examples/plugin/sakaCalendar.py +0 -215
- arelle/examples/plugin/saveInstanceInfoset.py +0 -121
- arelle/examples/plugin/streamingExtensions.py +0 -335
- arelle/examples/plugin/testcaseCalc11ValidateSetup.py +0 -32
- arelle/examples/plugin/testcaseIxExpectedHtmlFixup.py +0 -45
- arelle/examples/plugin/updateTableLB.py +0 -242
- arelle/examples/plugin/validate/XYZ/DisclosureSystems.py +0 -2
- arelle/examples/plugin/validate/XYZ/PluginValidationDataExtension.py +0 -10
- arelle/examples/plugin/validate/XYZ/ValidationPluginExtension.py +0 -49
- arelle/examples/plugin/validate/XYZ/__init__.py +0 -75
- arelle/examples/plugin/validate/XYZ/resources/config.xml +0 -16
- arelle/examples/plugin/validate/XYZ/rules/rules01.py +0 -109
- arelle/examples/plugin/validate/XYZ/rules/rules02.py +0 -58
- arelle/examples/plugin/validateSchemaLxml.py +0 -156
- arelle/examples/plugin/validateTableInfoset.py +0 -52
- arelle/examples/us-gaap-dei-docType-extraction-frm.xml +0 -90
- arelle/examples/us-gaap-dei-ratio-cash-frm.xml +0 -150
- arelle/plugin/functionsXmlCreation.py +0 -106
- arelle/plugin/instanceInfo.py +0 -306
- arelle/plugin/loadFromOIM-2018.py +0 -1282
- arelle/plugin/objectmaker.py +0 -285
- arelle/plugin/sphinx/FormulaGenerator.py +0 -823
- arelle/plugin/sphinx/SphinxContext.py +0 -404
- arelle/plugin/sphinx/SphinxEvaluator.py +0 -783
- arelle/plugin/sphinx/SphinxMethods.py +0 -1287
- arelle/plugin/sphinx/SphinxParser.py +0 -1093
- arelle/plugin/sphinx/SphinxValidator.py +0 -163
- arelle/plugin/sphinx/US-GAAP Ratios Example.xsr +0 -52
- arelle/plugin/sphinx/__init__.py +0 -285
- arelle/plugin/transforms/SEC/__init__.py +0 -308
- arelle/plugin/transforms/SEC/conf/README.md +0 -39
- arelle/plugin/transforms/SEC/conf/extractTestcase.sh +0 -2
- arelle/plugin/transforms/SEC/conf/extractTestcase.xsl +0 -109
- arelle/plugin/transforms/SEC/conf/runIxtSecTests.sh +0 -16
- arelle/plugin/transforms/SEC/conf/saxon9.jar +0 -0
- arelle/plugin/transforms/SEC/conf/testcase.xml +0 -7117
- arelle/plugin/transforms/SEC/conf/tests.xml +0 -848
- arelle/plugin/transforms/SEC/text2num.py +0 -110
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-boolballotbox.xml +0 -66
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-countrynameen.xml +0 -65
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-datequarterend.xml +0 -66
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-durday.xml +0 -61
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-durhour.xml +0 -69
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-durmonth.xml +0 -71
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-durweek.xml +0 -70
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-durwordsen.xml +0 -56
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-duryear.xml +0 -64
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-edgarprovcountryen.xml +0 -65
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-entityfilercategoryen.xml +0 -63
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-exchnameen.xml +0 -86
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-numwordsen.xml +0 -55
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-stateprovnameen.xml +0 -64
- arelle/plugin/transforms/SEC/transformationRegistry/registry/ixt-sec-yesnoballotbox.xml +0 -66
- arelle/plugin/transforms/SEC/transformationRegistry/registry/transform-registry.xml +0 -314
- arelle/plugin/transforms/SEC/transformationRegistry/schema/inlinexbrl-sec-transformation.xsd +0 -418
- arelle/plugin/validate/EFM/Consts.py +0 -362
- arelle/plugin/validate/EFM/DTS.py +0 -569
- arelle/plugin/validate/EFM/Dimensions.py +0 -264
- arelle/plugin/validate/EFM/Document.py +0 -206
- arelle/plugin/validate/EFM/Filing.py +0 -4383
- arelle/plugin/validate/EFM/IsolateSeparateIXDSes.py +0 -19
- arelle/plugin/validate/EFM/MessageNumericId.py +0 -142
- arelle/plugin/validate/EFM/PreCalAlignment.py +0 -324
- arelle/plugin/validate/EFM/Util.py +0 -688
- arelle/plugin/validate/EFM/__init__.py +0 -843
- arelle/plugin/validate/EFM/config.xml +0 -333
- arelle/plugin/validate/EFM/resources/README.md +0 -57
- arelle/plugin/validate/EFM/resources/axiswarnings.json +0 -27
- arelle/plugin/validate/EFM/resources/cef-deprecated-concepts.json +0 -8
- arelle/plugin/validate/EFM/resources/country-deprecated-concepts.json +0 -19
- arelle/plugin/validate/EFM/resources/currency-deprecated-concepts.json +0 -7
- arelle/plugin/validate/EFM/resources/dei-deprecated-concepts.json +0 -8
- arelle/plugin/validate/EFM/resources/dei-validations.json +0 -2884
- arelle/plugin/validate/EFM/resources/dqc-us-rules.json +0 -1389
- arelle/plugin/validate/EFM/resources/ecd-deprecated-concepts.json +0 -1
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-16-4.xml +0 -115
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-17-0-4.xml +0 -300
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-17-1.xml +0 -304
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-17-2.xml +0 -290
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-17-3-1.xml +0 -294
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-18.1.xml +0 -549
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-18.2.xml +0 -506
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-18.3.xml +0 -496
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-19-1.xml +0 -662
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-19-2.xml +0 -3761
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-19-3.xml +0 -3577
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-20-1.xml +0 -4020
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-20-2.xml +0 -3320
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-20-3.xml +0 -2998
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-2012.xml +0 -957
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-2013.xml +0 -982
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-2014.xml +0 -1001
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-2015.xml +0 -1076
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-2016.xml +0 -120
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-21-1.xml +0 -3329
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-21-2.xml +0 -1230
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-21-3.xml +0 -1113
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-21-4.xml +0 -1321
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-22-1-preview.xml +0 -1721
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-22-1.xml +0 -1841
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-22-2-2.xml +0 -1450
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-22-2.xml +0 -1429
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-22-4.xml +0 -1527
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-23-1-1.xml +0 -2049
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-23-1.xml +0 -2065
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-23-2.xml +0 -1674
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-23-3.xml +0 -1715
- arelle/plugin/validate/EFM/resources/edgartaxonomies/edgartaxonomies-all-years.xml +0 -10671
- arelle/plugin/validate/EFM/resources/edgartaxonomies/erxl.xsd +0 -69
- arelle/plugin/validate/EFM/resources/edgartaxonomies/extendedtaxonomies-all-years.xml +0 -18
- arelle/plugin/validate/EFM/resources/edgartaxonomies/ifrs-taxonomies.xml +0 -3126
- arelle/plugin/validate/EFM/resources/edgartaxonomies/ifrstaxonomies-all-years.xml +0 -22
- arelle/plugin/validate/EFM/resources/ex26-validations.json +0 -255
- arelle/plugin/validate/EFM/resources/exch-deprecated-concepts.json +0 -163
- arelle/plugin/validate/EFM/resources/ifrs-full-deprecated-concepts.json +0 -204
- arelle/plugin/validate/EFM/resources/invest-deprecated-concepts.json +0 -99
- arelle/plugin/validate/EFM/resources/ixbrl-transform-registries.json +0 -16
- arelle/plugin/validate/EFM/resources/naics-deprecated-concepts.json +0 -295
- arelle/plugin/validate/EFM/resources/oef-deprecated-concepts.json +0 -59
- arelle/plugin/validate/EFM/resources/other-standard-taxonomies.json +0 -12
- arelle/plugin/validate/EFM/resources/rr-deprecated-concepts.json +0 -14
- arelle/plugin/validate/EFM/resources/rxp-deprecated-concepts.json +0 -1
- arelle/plugin/validate/EFM/resources/shr-deprecated-concepts.json +0 -1
- arelle/plugin/validate/EFM/resources/sic-deprecated-concepts.json +0 -1
- arelle/plugin/validate/EFM/resources/signwarnings.json +0 -112
- arelle/plugin/validate/EFM/resources/srt-deprecated-concepts.json +0 -1
- arelle/plugin/validate/EFM/resources/stpr-deprecated-concepts.json +0 -1
- arelle/plugin/validate/EFM/resources/taxonomy-compatibility.json +0 -79
- arelle/plugin/validate/EFM/resources/us-gaap-deprecated-concepts.json +0 -2886
- arelle/plugin/validate/EFM/resources/us-gaap-rels-2020.json +0 -29068
- arelle/plugin/validate/EFM/resources/us-gaap-rels-2021.json +0 -29598
- arelle/plugin/validate/EFM/resources/us-gaap-rels-2022.json +0 -29141
- arelle/plugin/validate/EFM/resources/us-gaap-rels-2023.json +0 -29400
- arelle/plugin/validate/EFM/resources/vip-deprecated-concepts.json +0 -1
- arelle/plugin/validate/EFM/tools/CheckTxmyRefs.py +0 -180
- arelle/plugin/validate/EFM-htm/Const.py +0 -205
- arelle/plugin/validate/EFM-htm/__init__.py +0 -217
- arelle/plugin/validate/EFM-htm/config.xml +0 -17
- arelle/plugin/validate/EFM-htm/resources/efm-htm.dtd +0 -664
- arelle/plugin/validate/ESEF/ESEF_Current/Image.py +0 -199
- arelle/plugin/validate/ESEF_2022/__init__.py +0 -47
- arelle/plugin/validate/GFM/__init__.py +0 -59
- arelle/plugin/validate/GFM/config.xml +0 -82
- arelle/plugin/validate/SBRnl/CustomLoader.py +0 -19
- arelle/plugin/validate/SBRnl/DTS.py +0 -305
- arelle/plugin/validate/SBRnl/Dimensions.py +0 -357
- arelle/plugin/validate/SBRnl/Document.py +0 -799
- arelle/plugin/validate/SBRnl/Filing.py +0 -467
- arelle/plugin/validate/SBRnl/__init__.py +0 -75
- arelle/plugin/validate/SBRnl/config.xml +0 -26
- arelle/plugin/validate/SBRnl/sbr-nl-taxonomies.xml +0 -754
- arelle/plugin/validate/USBestPractices.py +0 -570
- arelle/plugin/validate/USCorpAction.py +0 -557
- arelle/plugin/validate/USSecTagging.py +0 -337
- arelle/plugin/validate/XDC/__init__.py +0 -77
- arelle/plugin/validate/XDC/config.xml +0 -20
- arelle/plugin/validate/XFsyntax/__init__.py +0 -64
- arelle/plugin/validate/XFsyntax/xf.py +0 -2227
- arelle/plugin/validate/__init__.py +0 -20
- arelle/plugin/validate/calc2.py +0 -536
- arelle/plugin/validateSBRnl.py +0 -530
- arelle/scripts-macOS/startWebServer.command +0 -3
- arelle/scripts-unix/startWebServer.sh +0 -1
- arelle/scripts-windows/startWebServer.bat +0 -5
- arelle_release-2.17.1.dist-info/RECORD +0 -676
- tests/__init__.py +0 -0
- tests/integration_tests/ui_tests/ArelleGUITest/ArelleGUITest/ArelleGUITest.csproj +0 -30
- tests/integration_tests/ui_tests/ArelleGUITest/ArelleGUITest/Tests.cs +0 -381
- tests/integration_tests/ui_tests/ArelleGUITest/ArelleGUITest/Usings.cs +0 -1
- tests/integration_tests/ui_tests/ArelleGUITest/ArelleGUITest.sln +0 -31
- tests/integration_tests/ui_tests/resources/workiva.zip +0 -0
- tests/integration_tests/validation/README.md +0 -50
- tests/integration_tests/validation/conformance_suite_config.py +0 -59
- tests/integration_tests/validation/conformance_suite_configs.py +0 -63
- tests/integration_tests/validation/conformance_suite_configurations/efm_current.py +0 -261
- tests/integration_tests/validation/conformance_suite_configurations/esef_ixbrl_2021.py +0 -85
- tests/integration_tests/validation/conformance_suite_configurations/esef_ixbrl_2022.py +0 -90
- tests/integration_tests/validation/conformance_suite_configurations/esef_xhtml_2021.py +0 -15
- tests/integration_tests/validation/conformance_suite_configurations/esef_xhtml_2022.py +0 -15
- tests/integration_tests/validation/conformance_suite_configurations/nl_nt16.py +0 -13
- tests/integration_tests/validation/conformance_suite_configurations/nl_nt17.py +0 -13
- tests/integration_tests/validation/conformance_suite_configurations/nl_nt18.py +0 -13
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_2_1.py +0 -34
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_calculations_1_1.py +0 -40
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_dimensions_1_0.py +0 -28
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_extensible_enumerations_1_0.py +0 -10
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_extensible_enumerations_2_0.py +0 -10
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_formula_1_0.py +0 -9
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_formula_1_0_assertion_severity_2_0.py +0 -9
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_formula_1_0_function_registry.py +0 -14
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_ixbrl_1_1.py +0 -22
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_link_role_registry_1_0.py +0 -11
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_oim_1_0.py +0 -19
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_table_linkbase_1_0.py +0 -296
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_taxonomy_packages_1_0.py +0 -13
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_transformation_registry_3.py +0 -13
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_transformation_registry_4.py +0 -13
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_transformation_registry_5.py +0 -13
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_utr_malformed_1_0.py +0 -31
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_utr_registry_1_0.py +0 -22
- tests/integration_tests/validation/conformance_suite_configurations/xbrl_utr_structure_1_0.py +0 -18
- tests/integration_tests/validation/conftest.py +0 -24
- tests/integration_tests/validation/discover_tests.py +0 -22
- tests/integration_tests/validation/download_conformance_suites.py +0 -47
- tests/integration_tests/validation/run_conformance_suites.py +0 -175
- tests/integration_tests/validation/test_conformance_suites.py +0 -14
- tests/integration_tests/validation/validation_util.py +0 -271
- tests/resources/conformance_suites/nl_nt16/br_kvk/2-04-invalid-period.xbrl +0 -63
- tests/resources/conformance_suites/nl_nt16/br_kvk/2-04-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt16/br_kvk/3-01-missing.xbrl +0 -53
- tests/resources/conformance_suites/nl_nt16/br_kvk/3-01-multiple.xbrl +0 -60
- tests/resources/conformance_suites/nl_nt16/br_kvk/3-01-testcase.xml +0 -33
- tests/resources/conformance_suites/nl_nt16/br_kvk/4-07-invalid.xbrl +0 -57
- tests/resources/conformance_suites/nl_nt16/br_kvk/4-07-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt16/br_kvk/4-10-invalid.xbrl +0 -58
- tests/resources/conformance_suites/nl_nt16/br_kvk/4-10-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt16/br_kvk/4-12-invalid.xbrl +0 -63
- tests/resources/conformance_suites/nl_nt16/br_kvk/4-12-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt16/br_kvk/4-16-missing.xbrl +0 -61
- tests/resources/conformance_suites/nl_nt16/br_kvk/4-16-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt16/br_kvk/4-20-invalid-date.xbrl +0 -89
- tests/resources/conformance_suites/nl_nt16/br_kvk/4-20-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt16/fr_kvk/1-01-invalid-file-extension.xml +0 -56
- tests/resources/conformance_suites/nl_nt16/fr_kvk/1-01-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt16/fr_kvk/2-01-invalid-lang.xbrl +0 -56
- tests/resources/conformance_suites/nl_nt16/fr_kvk/2-01-missing-lang.xbrl +0 -55
- tests/resources/conformance_suites/nl_nt16/fr_kvk/2-01-testcase.xml +0 -33
- tests/resources/conformance_suites/nl_nt16/fr_kvk/2-03-entrypoint.xsd +0 -6
- tests/resources/conformance_suites/nl_nt16/fr_kvk/2-03-invalid-entrypoint.xbrl +0 -63
- tests/resources/conformance_suites/nl_nt16/fr_kvk/2-03-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt16/fr_kvk/5-01-invalid-decimals.xbrl +0 -49
- tests/resources/conformance_suites/nl_nt16/fr_kvk/5-01-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt16/fr_kvk/5-02-invalid-decimals.xbrl +0 -49
- tests/resources/conformance_suites/nl_nt16/fr_kvk/5-02-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt16/fr_nl/1-01-invalid-file.xbrl +0 -2
- tests/resources/conformance_suites/nl_nt16/fr_nl/1-01-invalid-zip.zip +0 -0
- tests/resources/conformance_suites/nl_nt16/fr_nl/1-01-testcase.xml +0 -33
- tests/resources/conformance_suites/nl_nt16/fr_nl/1-03-invalid-doctype.xbrl +0 -4
- tests/resources/conformance_suites/nl_nt16/fr_nl/1-03-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt16/fr_nl/1-05-invalid-encoding.xbrl +0 -0
- tests/resources/conformance_suites/nl_nt16/fr_nl/1-05-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt16/fr_nl/1-06-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt16/fr_nl/1-06.invalid.xbrl +0 -2
- tests/resources/conformance_suites/nl_nt16/fr_nl/2-06-invalid-file.xbrl +0 -8
- tests/resources/conformance_suites/nl_nt16/fr_nl/2-06-invalid-zip.zip +0 -0
- tests/resources/conformance_suites/nl_nt16/fr_nl/2-06-testcase.xml +0 -33
- tests/resources/conformance_suites/nl_nt16/index.xml +0 -20
- tests/resources/conformance_suites/nl_nt17/br_kvk/2-04-invalid-period.xbrl +0 -63
- tests/resources/conformance_suites/nl_nt17/br_kvk/2-04-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt17/br_kvk/3-01-missing.xbrl +0 -53
- tests/resources/conformance_suites/nl_nt17/br_kvk/3-01-multiple.xbrl +0 -60
- tests/resources/conformance_suites/nl_nt17/br_kvk/3-01-testcase.xml +0 -33
- tests/resources/conformance_suites/nl_nt17/br_kvk/4-07-invalid.xbrl +0 -57
- tests/resources/conformance_suites/nl_nt17/br_kvk/4-07-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt17/br_kvk/4-10-invalid.xbrl +0 -58
- tests/resources/conformance_suites/nl_nt17/br_kvk/4-10-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt17/br_kvk/4-12-invalid.xbrl +0 -63
- tests/resources/conformance_suites/nl_nt17/br_kvk/4-12-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt17/br_kvk/4-16-missing.xbrl +0 -61
- tests/resources/conformance_suites/nl_nt17/br_kvk/4-16-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt17/br_kvk/4-20-invalid-date.xbrl +0 -89
- tests/resources/conformance_suites/nl_nt17/br_kvk/4-20-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt17/fr_kvk/1-01-invalid-file-extension.xml +0 -56
- tests/resources/conformance_suites/nl_nt17/fr_kvk/1-01-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt17/fr_kvk/2-01-invalid-lang.xbrl +0 -56
- tests/resources/conformance_suites/nl_nt17/fr_kvk/2-01-missing-lang.xbrl +0 -55
- tests/resources/conformance_suites/nl_nt17/fr_kvk/2-01-testcase.xml +0 -33
- tests/resources/conformance_suites/nl_nt17/fr_kvk/2-03-entrypoint.xsd +0 -6
- tests/resources/conformance_suites/nl_nt17/fr_kvk/2-03-invalid-entrypoint.xbrl +0 -63
- tests/resources/conformance_suites/nl_nt17/fr_kvk/2-03-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt17/fr_kvk/5-01-invalid-decimals.xbrl +0 -49
- tests/resources/conformance_suites/nl_nt17/fr_kvk/5-01-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt17/fr_kvk/5-02-invalid-decimals.xbrl +0 -49
- tests/resources/conformance_suites/nl_nt17/fr_kvk/5-02-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt17/fr_nl/1-01-invalid-file.xbrl +0 -2
- tests/resources/conformance_suites/nl_nt17/fr_nl/1-01-invalid-zip.zip +0 -0
- tests/resources/conformance_suites/nl_nt17/fr_nl/1-01-testcase.xml +0 -33
- tests/resources/conformance_suites/nl_nt17/fr_nl/1-03-invalid-doctype.xbrl +0 -4
- tests/resources/conformance_suites/nl_nt17/fr_nl/1-03-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt17/fr_nl/1-05-invalid-encoding.xbrl +0 -0
- tests/resources/conformance_suites/nl_nt17/fr_nl/1-05-testcases.xml +0 -22
- tests/resources/conformance_suites/nl_nt17/fr_nl/1-06-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt17/fr_nl/1-06.invalid.xbrl +0 -2
- tests/resources/conformance_suites/nl_nt17/fr_nl/2-06-invalid-file.xbrl +0 -8
- tests/resources/conformance_suites/nl_nt17/fr_nl/2-06-invalid-zip.zip +0 -0
- tests/resources/conformance_suites/nl_nt17/fr_nl/2-06-testcase.xml +0 -33
- tests/resources/conformance_suites/nl_nt17/index.xml +0 -20
- tests/resources/conformance_suites/nl_nt18/fr_nl/1-03-invalid-doctype.xbrl +0 -4
- tests/resources/conformance_suites/nl_nt18/fr_nl/1-03-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt18/fr_nl/1-05-invalid-encoding.xbrl +0 -0
- tests/resources/conformance_suites/nl_nt18/fr_nl/1-05-testcases.xml +0 -22
- tests/resources/conformance_suites/nl_nt18/fr_nl/1-06-testcase.xml +0 -22
- tests/resources/conformance_suites/nl_nt18/fr_nl/1-06.invalid.xbrl +0 -2
- tests/resources/conformance_suites/nl_nt18/fr_nl/1.01-invalid-file.xbrl +0 -2
- tests/resources/conformance_suites/nl_nt18/fr_nl/1.01-invalid-zip.zip +0 -0
- tests/resources/conformance_suites/nl_nt18/fr_nl/1.01-testcase.xml +0 -33
- tests/resources/conformance_suites/nl_nt18/fr_nl/2-06-invalid-file.xbrl +0 -8
- tests/resources/conformance_suites/nl_nt18/fr_nl/2-06-invalid-zip.zip +0 -0
- tests/resources/conformance_suites/nl_nt18/fr_nl/2-06-testcase.xml +0 -33
- tests/resources/conformance_suites/nl_nt18/index.xml +0 -8
- tests/unit_tests/arelle/conftest.py +0 -16
- tests/unit_tests/arelle/formula/test_fact_aspects_cache.py +0 -170
- tests/unit_tests/arelle/plugin/test_loadfromoim.py +0 -40
- tests/unit_tests/arelle/plugin/test_plugin_imports.py +0 -27
- tests/unit_tests/arelle/test_betafeatures.py +0 -81
- tests/unit_tests/arelle/test_cntlr.py +0 -28
- tests/unit_tests/arelle/test_import.py +0 -40
- tests/unit_tests/arelle/test_locale.py +0 -73
- tests/unit_tests/arelle/test_modelmanager.py +0 -15
- tests/unit_tests/arelle/test_packagemanager.py +0 -65
- tests/unit_tests/arelle/test_pluginmanager.py +0 -176
- tests/unit_tests/arelle/test_qname.py +0 -140
- tests/unit_tests/arelle/test_runtimeoptions.py +0 -56
- tests/unit_tests/arelle/test_system_info.py +0 -26
- tests/unit_tests/arelle/test_updater.py +0 -507
- tests/unit_tests/arelle/test_urlutil.py +0 -49
- tests/unit_tests/arelle/test_version.py +0 -46
- tests/unit_tests/arelle/utils/validate/test_decorator.py +0 -59
- /arelle/{examples/plugin/validate/XYZ → plugin/validate/EDINET}/rules/__init__.py +0 -0
- /arelle/plugin/validate/{HMRC → UK}/consistencyChecksByName.json +0 -0
- /arelle/plugin/validate/{HMRC → UK}/hmrc-taxonomies.xml +0 -0
- {arelle_release-2.17.1.dist-info → arelle_release-2.37.71.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,2394 @@
|
|
|
1
|
+
"""
|
|
2
|
+
See COPYRIGHT.md for copyright information.
|
|
3
|
+
"""
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import contextlib
|
|
7
|
+
from collections import defaultdict
|
|
8
|
+
from datetime import timedelta
|
|
9
|
+
from typing import Any, cast, Iterable
|
|
10
|
+
|
|
11
|
+
import regex
|
|
12
|
+
|
|
13
|
+
from arelle import ModelDocument, UrlUtil, XbrlConst, XmlUtil
|
|
14
|
+
from arelle.HtmlUtil import attrValue
|
|
15
|
+
from arelle.LinkbaseType import LinkbaseType
|
|
16
|
+
from arelle.ModelDtsObject import ModelConcept, ModelResource
|
|
17
|
+
from arelle.ModelInstanceObject import ModelFact, ModelInlineFootnote
|
|
18
|
+
from arelle.ModelObject import ModelObject, ModelComment
|
|
19
|
+
from arelle.ModelValue import QName
|
|
20
|
+
from arelle.PrototypeDtsObject import LocPrototype, ArcPrototype
|
|
21
|
+
from arelle.UrlUtil import isHttpUrl, splitDecodeFragment
|
|
22
|
+
from arelle.ValidateXbrl import ValidateXbrl
|
|
23
|
+
from arelle.ValidateXbrlCalcs import insignificantDigits
|
|
24
|
+
from arelle.XbrlConst import qnXbrlScenario, qnXbrldiExplicitMember, xhtmlBaseIdentifier, xmlBaseIdentifier
|
|
25
|
+
from arelle.XmlValidate import VALID
|
|
26
|
+
from arelle.typing import TypeGetText
|
|
27
|
+
from arelle.utils.Contexts import getDuplicateContextGroups
|
|
28
|
+
from arelle.utils.PluginHooks import ValidationHook
|
|
29
|
+
from arelle.utils.Units import getDuplicateUnitGroups
|
|
30
|
+
from arelle.utils.validate.Decorator import validation
|
|
31
|
+
from arelle.utils.validate.Validation import Validation
|
|
32
|
+
from ..Constants import JAPAN_LANGUAGE_CODES, NUMERIC_LABEL_ROLES, domainItemTypeQname, LC3_NAME_PATTERN, HALF_KANA
|
|
33
|
+
from ..DisclosureSystems import (DISCLOSURE_SYSTEM_EDINET)
|
|
34
|
+
from ..PluginValidationDataExtension import PluginValidationDataExtension
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
_: TypeGetText
|
|
38
|
+
|
|
39
|
+
DISALLOWED_LABEL_WHITE_SPACE_CHARACTERS = regex.compile(r'\s{2,}')
|
|
40
|
+
XBRLI_IDENTIFIER_PATTERN = regex.compile(r"^[A-Z]\d{5}-\d{3}$")
|
|
41
|
+
GFM_CONTEXT_DATE_PATTERN = regex.compile(r"^[12][0-9]{3}-[01][0-9]-[0-3][0-9]$")
|
|
42
|
+
GFM_RECOMMENDED_NAMESPACE_PREFIXES = {
|
|
43
|
+
XbrlConst.xbrli: ("xbrli",),
|
|
44
|
+
XbrlConst.xsi: ("xsi",),
|
|
45
|
+
XbrlConst.xsd: ("xs", "xsd",),
|
|
46
|
+
XbrlConst.link: ("link",),
|
|
47
|
+
XbrlConst.xl: ("xl",),
|
|
48
|
+
XbrlConst.xlink: ("xlink",),
|
|
49
|
+
XbrlConst.ref2004: ("ref",),
|
|
50
|
+
XbrlConst.ref2006: ("ref",),
|
|
51
|
+
XbrlConst.xbrldt: ("xbrldt",),
|
|
52
|
+
XbrlConst.xbrldi: ("xbrldi",),
|
|
53
|
+
XbrlConst.ixbrl: ("ix",),
|
|
54
|
+
XbrlConst.ixt: ("ixt",),
|
|
55
|
+
XbrlConst.xhtml: ("xhtml",),
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@validation(
|
|
60
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
61
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
62
|
+
)
|
|
63
|
+
def rule_gfm_1_1_3(
|
|
64
|
+
pluginData: PluginValidationDataExtension,
|
|
65
|
+
val: ValidateXbrl,
|
|
66
|
+
*args: Any,
|
|
67
|
+
**kwargs: Any,
|
|
68
|
+
) -> Iterable[Validation]:
|
|
69
|
+
"""
|
|
70
|
+
EDINET.EC5700W: [GFM 1.1.3] The URI content of the xlink:href attribute,
|
|
71
|
+
the xsi:schemaLocation attribute and the schemaLocation attribute must
|
|
72
|
+
be relative and contain no forward slashes, or a recognized external
|
|
73
|
+
location of a standard taxonomy schema file, or a "#" followed by a
|
|
74
|
+
shorthand xpointer.
|
|
75
|
+
"""
|
|
76
|
+
values = []
|
|
77
|
+
for modelDocument in val.modelXbrl.urlDocs.values():
|
|
78
|
+
if pluginData.isStandardTaxonomyUrl(modelDocument.uri, val.modelXbrl):
|
|
79
|
+
continue
|
|
80
|
+
rootElt = modelDocument.xmlRootElement
|
|
81
|
+
for elt in rootElt.iterdescendants(XbrlConst.qnLinkLoc.clarkNotation):
|
|
82
|
+
uri = elt.attrib.get(XbrlConst.qnXlinkHref.clarkNotation)
|
|
83
|
+
values.append((modelDocument, elt, uri))
|
|
84
|
+
for elt in rootElt.iterdescendants(XbrlConst.qnXsdImport.clarkNotation):
|
|
85
|
+
uri = elt.attrib.get('schemaLocation')
|
|
86
|
+
values.append((modelDocument, elt, uri))
|
|
87
|
+
for elt in rootElt.iterdescendants(XbrlConst.qnLinkLinkbase.clarkNotation):
|
|
88
|
+
uri = elt.attrib.get(XbrlConst.qnXsiSchemaLocation.clarkNotation)
|
|
89
|
+
values.append((modelDocument, elt, uri))
|
|
90
|
+
for elt in rootElt.iterdescendants(XbrlConst.qnLinkLinkbaseRef.clarkNotation):
|
|
91
|
+
uri = elt.attrib.get(XbrlConst.qnXlinkHref.clarkNotation)
|
|
92
|
+
values.append((modelDocument, elt, uri))
|
|
93
|
+
for modelDocument, elt, uri in values:
|
|
94
|
+
if uri is None:
|
|
95
|
+
continue
|
|
96
|
+
if uri in val.modelXbrl.urlUnloadableDocs:
|
|
97
|
+
continue # Already blocked, error fired.
|
|
98
|
+
if not isHttpUrl(uri):
|
|
99
|
+
if '/' not in uri:
|
|
100
|
+
continue # Valid relative path
|
|
101
|
+
if pluginData.isStandardTaxonomyUrl(uri, val.modelXbrl):
|
|
102
|
+
continue # Valid external URL
|
|
103
|
+
splitUri, hrefId = splitDecodeFragment(uri)
|
|
104
|
+
if pluginData.isStandardTaxonomyUrl(splitUri, val.modelXbrl):
|
|
105
|
+
if hrefId is None or len(hrefId) == 0:
|
|
106
|
+
continue # Valid external URL
|
|
107
|
+
if not any(scheme == "element" for scheme, __ in XmlUtil.xpointerSchemes(hrefId)):
|
|
108
|
+
continue # Valid shorthand xpointer
|
|
109
|
+
yield Validation.warning(
|
|
110
|
+
codes='EDINET.EC5700W.GFM.1.1.3',
|
|
111
|
+
msg=_("The URI content of the xlink:href attribute, the xsi:schemaLocation "
|
|
112
|
+
"attribute and the schemaLocation attribute must be relative and "
|
|
113
|
+
"contain no forward slashes, or a recognized external location of "
|
|
114
|
+
"a standard taxonomy schema file, or a '#' followed by a shorthand "
|
|
115
|
+
"xpointer. The URI '%(uri)s' is not valid."),
|
|
116
|
+
uri=uri,
|
|
117
|
+
modelObject=elt,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
@validation(
|
|
122
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
123
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
124
|
+
)
|
|
125
|
+
def rule_gfm_1_1_6(
|
|
126
|
+
pluginData: PluginValidationDataExtension,
|
|
127
|
+
val: ValidateXbrl,
|
|
128
|
+
*args: Any,
|
|
129
|
+
**kwargs: Any,
|
|
130
|
+
) -> Iterable[Validation]:
|
|
131
|
+
"""
|
|
132
|
+
EDINET.EC5700W: [GFM 1.1.6] Filing must have one or more submitter specific(extension) taxonomies
|
|
133
|
+
"""
|
|
134
|
+
if not hasattr(val, 'hasExtensionSchema'):
|
|
135
|
+
val.hasExtensionSchema = False
|
|
136
|
+
for modelDocument in val.modelXbrl.urlDocs.values():
|
|
137
|
+
if pluginData.isExtensionUri(modelDocument.uri, val.modelXbrl) and modelDocument.type == ModelDocument.Type.SCHEMA:
|
|
138
|
+
val.hasExtensionSchema = True
|
|
139
|
+
break
|
|
140
|
+
if not val.hasExtensionSchema:
|
|
141
|
+
yield Validation.warning(
|
|
142
|
+
codes='EDINET.EC5700W.GFM.1.1.6',
|
|
143
|
+
msg=_("Filing is missing an extension taxonomy."),
|
|
144
|
+
modelObject=val.modelXbrl,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
@validation(
|
|
149
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
150
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
151
|
+
)
|
|
152
|
+
def rule_gfm_1_1_7(
|
|
153
|
+
pluginData: PluginValidationDataExtension,
|
|
154
|
+
val: ValidateXbrl,
|
|
155
|
+
*args: Any,
|
|
156
|
+
**kwargs: Any,
|
|
157
|
+
) -> Iterable[Validation]:
|
|
158
|
+
"""
|
|
159
|
+
EDINET.EC5700W: [GFM 1.1.7] Attribute xml:base must not appear in any filing document.
|
|
160
|
+
This check has been updated to check for the xhtml:base attribute in order to account for iXBRL filings.
|
|
161
|
+
|
|
162
|
+
Original GFM text: Attribute xml:base must not appear in any filing document.
|
|
163
|
+
"""
|
|
164
|
+
baseElements = []
|
|
165
|
+
for rootElt in val.modelXbrl.ixdsHtmlElements:
|
|
166
|
+
for uncast_elt in rootElt.iter():
|
|
167
|
+
elt = cast(Any, uncast_elt)
|
|
168
|
+
if elt.get(xmlBaseIdentifier) is not None:
|
|
169
|
+
baseElements.append(elt)
|
|
170
|
+
if elt.tag == xhtmlBaseIdentifier:
|
|
171
|
+
baseElements.append(elt)
|
|
172
|
+
if len(baseElements) > 0:
|
|
173
|
+
yield Validation.warning(
|
|
174
|
+
codes='EDINET.EC5700W.GFM.1.1.7',
|
|
175
|
+
msg=_("Attribute xml:base must not appear in any filing document."),
|
|
176
|
+
modelObject=baseElements,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
@validation(
|
|
181
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
182
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
183
|
+
)
|
|
184
|
+
def rule_gfm_1_2_1(
|
|
185
|
+
pluginData: PluginValidationDataExtension,
|
|
186
|
+
val: ValidateXbrl,
|
|
187
|
+
*args: Any,
|
|
188
|
+
**kwargs: Any,
|
|
189
|
+
) -> Iterable[Validation]:
|
|
190
|
+
"""
|
|
191
|
+
EDINET.EC5700W: [GFM 1.2.1] The scheme of the entity identifier must be http://disclosure.edinet-fsa.go.jp
|
|
192
|
+
"""
|
|
193
|
+
entityIdentifierValues = val.modelXbrl.entityIdentifiersInDocument()
|
|
194
|
+
for entityId in entityIdentifierValues:
|
|
195
|
+
if entityId[0] != 'http://disclosure.edinet-fsa.go.jp':
|
|
196
|
+
yield Validation.warning(
|
|
197
|
+
codes='EDINET.EC5700W.GFM.1.2.1',
|
|
198
|
+
msg=_("The scheme of the entity identifier is: '%(scheme)s' but it must be 'http://disclosure.edinet-fsa.go.jp'."),
|
|
199
|
+
scheme=entityId[0],
|
|
200
|
+
modelObject=entityId,
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
@validation(
|
|
205
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
206
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
207
|
+
)
|
|
208
|
+
def rule_gfm_1_2_2(
|
|
209
|
+
pluginData: PluginValidationDataExtension,
|
|
210
|
+
val: ValidateXbrl,
|
|
211
|
+
*args: Any,
|
|
212
|
+
**kwargs: Any,
|
|
213
|
+
) -> Iterable[Validation]:
|
|
214
|
+
"""
|
|
215
|
+
EDINET.EC5700W: [GFM 1.2.2] The entity identifier element must match the following: X00000-000
|
|
216
|
+
"""
|
|
217
|
+
entityIdentifierValues = val.modelXbrl.entityIdentifiersInDocument()
|
|
218
|
+
for entityId in entityIdentifierValues:
|
|
219
|
+
if not XBRLI_IDENTIFIER_PATTERN.match(entityId[1]):
|
|
220
|
+
yield Validation.warning(
|
|
221
|
+
codes='EDINET.EC5700W.GFM.1.2.2',
|
|
222
|
+
msg=_("The entity identifier element: '%(element)s' is incorrect. It must take the form of 'X00000-000'."),
|
|
223
|
+
element=entityId[1],
|
|
224
|
+
modelObject=entityId,
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
@validation(
|
|
229
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
230
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
231
|
+
)
|
|
232
|
+
def rule_gfm_1_2_3(
|
|
233
|
+
pluginData: PluginValidationDataExtension,
|
|
234
|
+
val: ValidateXbrl,
|
|
235
|
+
*args: Any,
|
|
236
|
+
**kwargs: Any,
|
|
237
|
+
) -> Iterable[Validation]:
|
|
238
|
+
"""
|
|
239
|
+
EDINET.EC5700W: [GFM 1.2.3] All xbrli:identifier elements in an instance must have identical content.
|
|
240
|
+
"""
|
|
241
|
+
entityIdentifierValues = val.modelXbrl.entityIdentifiersInDocument()
|
|
242
|
+
if len(entityIdentifierValues) >1:
|
|
243
|
+
yield Validation.warning(
|
|
244
|
+
codes='EDINET.EC5700W.GFM.1.2.3',
|
|
245
|
+
msg=_('All identifier elements must be identical.'),
|
|
246
|
+
modelObject = val.modelXbrl
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
@validation(
|
|
251
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
252
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
253
|
+
)
|
|
254
|
+
def rule_gfm_1_2_4(
|
|
255
|
+
pluginData: PluginValidationDataExtension,
|
|
256
|
+
val: ValidateXbrl,
|
|
257
|
+
*args: Any,
|
|
258
|
+
**kwargs: Any,
|
|
259
|
+
) -> Iterable[Validation]:
|
|
260
|
+
"""
|
|
261
|
+
EDINET.EC5700W: [GFM 1.2.4] Segment must not be used in the context.
|
|
262
|
+
"""
|
|
263
|
+
allContexts = val.modelXbrl.contextsByDocument()
|
|
264
|
+
contextsWithSegments =[]
|
|
265
|
+
for contexts in allContexts.values():
|
|
266
|
+
for context in contexts:
|
|
267
|
+
if context.hasSegment:
|
|
268
|
+
contextsWithSegments.append(context)
|
|
269
|
+
if len(contextsWithSegments) > 0:
|
|
270
|
+
yield Validation.warning(
|
|
271
|
+
codes='EDINET.EC5700W.GFM.1.2.4',
|
|
272
|
+
msg=_('Set the scenario element in the context. Do not set the segment element.'),
|
|
273
|
+
modelObject = contextsWithSegments
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
@validation(
|
|
278
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
279
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
280
|
+
)
|
|
281
|
+
def rule_gfm_1_2_5(
|
|
282
|
+
pluginData: PluginValidationDataExtension,
|
|
283
|
+
val: ValidateXbrl,
|
|
284
|
+
*args: Any,
|
|
285
|
+
**kwargs: Any,
|
|
286
|
+
) -> Iterable[Validation]:
|
|
287
|
+
"""
|
|
288
|
+
EDINET.EC5700W: [GFM 1.2.5] If an xbrli:scenario element appears in a context, then its children
|
|
289
|
+
must be one or more xbrldi:explicitMember elements.
|
|
290
|
+
"""
|
|
291
|
+
allContexts = val.modelXbrl.contextsByDocument()
|
|
292
|
+
contextsWithDisallowedScenarioChildren =[]
|
|
293
|
+
for contexts in allContexts.values():
|
|
294
|
+
for context in contexts:
|
|
295
|
+
for elt in context.iterdescendants(qnXbrlScenario.clarkNotation):
|
|
296
|
+
if isinstance(elt, ModelObject):
|
|
297
|
+
if any(isinstance(child, ModelObject) and child.tag != qnXbrldiExplicitMember.clarkNotation
|
|
298
|
+
for child in elt.iterchildren()):
|
|
299
|
+
contextsWithDisallowedScenarioChildren.append(context)
|
|
300
|
+
if len(contextsWithDisallowedScenarioChildren) > 0:
|
|
301
|
+
yield Validation.warning(
|
|
302
|
+
codes='EDINET.EC5700W.GFM.1.2.5',
|
|
303
|
+
msg=_('Please delete all child elements other than the xbrldi:explicitMember '
|
|
304
|
+
'element from the segment element or scenario element.'),
|
|
305
|
+
modelObject = contextsWithDisallowedScenarioChildren
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
@validation(
|
|
310
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
311
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
312
|
+
)
|
|
313
|
+
def rule_gfm_1_2_7(
|
|
314
|
+
pluginData: PluginValidationDataExtension,
|
|
315
|
+
val: ValidateXbrl,
|
|
316
|
+
*args: Any,
|
|
317
|
+
**kwargs: Any,
|
|
318
|
+
) -> Iterable[Validation]:
|
|
319
|
+
"""
|
|
320
|
+
EDINET.EC5700W: [GFM 1.2.7] An instance must not contain duplicate xbrli:context elements.
|
|
321
|
+
"""
|
|
322
|
+
for contexts in getDuplicateContextGroups(val.modelXbrl):
|
|
323
|
+
yield Validation.warning(
|
|
324
|
+
codes='EDINET.EC5700W.GFM.1.2.7',
|
|
325
|
+
msg=_('Duplicate context. Remove the duplicate.'),
|
|
326
|
+
modelObject = contexts
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
@validation(
|
|
331
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
332
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
333
|
+
)
|
|
334
|
+
def rule_gfm_1_2_8(
|
|
335
|
+
pluginData: PluginValidationDataExtension,
|
|
336
|
+
val: ValidateXbrl,
|
|
337
|
+
*args: Any,
|
|
338
|
+
**kwargs: Any,
|
|
339
|
+
) -> Iterable[Validation]:
|
|
340
|
+
"""
|
|
341
|
+
EDINET.EC5700W: [GFM 1.2.8] Every xbrli:context element must appear in at least one
|
|
342
|
+
contextRef attribute in the same instance.
|
|
343
|
+
"""
|
|
344
|
+
unusedContexts = list(set(val.modelXbrl.contexts.values()) - set(val.modelXbrl.contextsInUse))
|
|
345
|
+
unusedContexts.extend(val.modelXbrl.ixdsUnmappedContexts.values())
|
|
346
|
+
unusedContexts.sort(key=lambda x: x.id if x.id is not None else "")
|
|
347
|
+
for context in unusedContexts:
|
|
348
|
+
yield Validation.warning(
|
|
349
|
+
codes='EDINET.EC5700W.GFM.1.2.8',
|
|
350
|
+
msg=_('If you are not using a context, delete it if it is not needed.'),
|
|
351
|
+
modelObject=context
|
|
352
|
+
)
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
@validation(
|
|
356
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
357
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
358
|
+
)
|
|
359
|
+
def rule_gfm_1_2_9(
|
|
360
|
+
pluginData: PluginValidationDataExtension,
|
|
361
|
+
val: ValidateXbrl,
|
|
362
|
+
*args: Any,
|
|
363
|
+
**kwargs: Any,
|
|
364
|
+
) -> Iterable[Validation]:
|
|
365
|
+
"""
|
|
366
|
+
EDINET.EC5700W: [GFM 1.2.9] The same date must not appear as the content of both an xbrli:startDate and
|
|
367
|
+
an xbrli:endDate in an instance.
|
|
368
|
+
"""
|
|
369
|
+
invalidDurationContexts = []
|
|
370
|
+
for contexts in val.modelXbrl.contextsByDocument().values():
|
|
371
|
+
for context in contexts:
|
|
372
|
+
if not context.isInstantPeriod:
|
|
373
|
+
if context.endDatetime and context.startDatetime and context.startDatetime == context.endDatetime - timedelta(days=1):
|
|
374
|
+
invalidDurationContexts.append(context)
|
|
375
|
+
if len(invalidDurationContexts) > 0:
|
|
376
|
+
for context in invalidDurationContexts:
|
|
377
|
+
yield Validation.warning(
|
|
378
|
+
codes='EDINET.EC5700W.GFM.1.2.9',
|
|
379
|
+
msg=_("Set the context's startDate and endDate elements to different dates."),
|
|
380
|
+
modelObject=context
|
|
381
|
+
)
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
@validation(
|
|
385
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
386
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
387
|
+
)
|
|
388
|
+
def rule_gfm_1_2_10(
|
|
389
|
+
pluginData: PluginValidationDataExtension,
|
|
390
|
+
val: ValidateXbrl,
|
|
391
|
+
*args: Any,
|
|
392
|
+
**kwargs: Any,
|
|
393
|
+
) -> Iterable[Validation]:
|
|
394
|
+
"""
|
|
395
|
+
EDINET.EC5700W: [GFM 1.2.10] Element xbrli:xbrl must not have duplicate child xbrli:unit elements.
|
|
396
|
+
"""
|
|
397
|
+
for duplicateUnits in getDuplicateUnitGroups(val.modelXbrl):
|
|
398
|
+
yield Validation.warning(
|
|
399
|
+
codes='EDINET.EC5700W.GFM.1.2.10',
|
|
400
|
+
msg=_('The unit element contains duplicate content. Please remove the duplicates.'),
|
|
401
|
+
modelObject = duplicateUnits
|
|
402
|
+
)
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
@validation(
|
|
406
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
407
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
408
|
+
)
|
|
409
|
+
def rule_gfm_1_2_13(
|
|
410
|
+
pluginData: PluginValidationDataExtension,
|
|
411
|
+
val: ValidateXbrl,
|
|
412
|
+
*args: Any,
|
|
413
|
+
**kwargs: Any,
|
|
414
|
+
) -> Iterable[Validation]:
|
|
415
|
+
"""
|
|
416
|
+
EDINET.EC5700W: [GFM 1.2.13] An instance having a fact with non-nil content and the xml:lang
|
|
417
|
+
attribute of value different than the default language must also contain a fact using the same element
|
|
418
|
+
and all other attributes with an xml:lang attribute that represents the default language.
|
|
419
|
+
"""
|
|
420
|
+
defaultLang = cast(str, val.disclosureSystem.defaultXmlLang)
|
|
421
|
+
languageFacts: dict[str,dict[QName, set[ModelFact]]] = defaultdict(lambda: defaultdict(set))
|
|
422
|
+
for fact in val.modelXbrl.facts:
|
|
423
|
+
if fact.xValid >= VALID and fact.xmlLang is not None and not fact.isNil:
|
|
424
|
+
languageFacts[fact.xmlLang][fact.qname].add(fact)
|
|
425
|
+
for language, qnames in languageFacts.items():
|
|
426
|
+
if language != defaultLang:
|
|
427
|
+
for qname, facts in qnames.items():
|
|
428
|
+
matchingQnames = languageFacts[defaultLang][qname]
|
|
429
|
+
for fact in facts:
|
|
430
|
+
if not any(fact.context.isEqualTo(mq.context) for mq in matchingQnames):
|
|
431
|
+
yield Validation.warning(
|
|
432
|
+
codes='EDINET.EC5700W.GFM.1.2.13',
|
|
433
|
+
msg=_('There is an element whose xml:lang attribute is in a language other than Japanese, '
|
|
434
|
+
'but there is no element whose xml:lang attribute is in Japanese. Delete the non-Japanese element, '
|
|
435
|
+
'or set an element whose xml:lang attribute is in Japanese.'),
|
|
436
|
+
modelObject = fact
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
@validation(
|
|
441
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
442
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
443
|
+
)
|
|
444
|
+
def rule_gfm_1_2_14(
|
|
445
|
+
pluginData: PluginValidationDataExtension,
|
|
446
|
+
val: ValidateXbrl,
|
|
447
|
+
*args: Any,
|
|
448
|
+
**kwargs: Any,
|
|
449
|
+
) -> Iterable[Validation]:
|
|
450
|
+
"""
|
|
451
|
+
EDINET.EC5700W: [GFM.1.2.14] The content of an element with a data type of nonnum:textBlockItemType is not well-formed XML
|
|
452
|
+
(a format that conforms to XML grammar, such as all start and end tags being paired, and the end tag of a nested tag not coming after the end tag of its parent tag, etc.).
|
|
453
|
+
Please modify it so that it is well-formed.
|
|
454
|
+
"""
|
|
455
|
+
problematicFacts = pluginData.getProblematicTextBlocks(val.modelXbrl)
|
|
456
|
+
if len(problematicFacts) > 0:
|
|
457
|
+
yield Validation.warning(
|
|
458
|
+
codes='EDINET.EC5700W.GFM.1.2.14',
|
|
459
|
+
msg=_('The content of an element with a data type of nonnum:textBlockItemType is not well-formed XML (a format that conforms to XML grammar, '
|
|
460
|
+
'such as all start and end tags being in pairs, and the end tag of a nested tag not coming after the end tag of its parent tag). '
|
|
461
|
+
'Correct the content so that it is well-formed.'),
|
|
462
|
+
modelObject = problematicFacts
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
@validation(
|
|
467
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
468
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
469
|
+
)
|
|
470
|
+
def rule_gfm_1_2_16(
|
|
471
|
+
pluginData: PluginValidationDataExtension,
|
|
472
|
+
val: ValidateXbrl,
|
|
473
|
+
*args: Any,
|
|
474
|
+
**kwargs: Any,
|
|
475
|
+
) -> Iterable[Validation]:
|
|
476
|
+
"""
|
|
477
|
+
EDINET.EC5700W: [GFM 1.2.16] Use the decimals attribute instead of the precision attribute.
|
|
478
|
+
|
|
479
|
+
Original GFM text: The xbrli:xbrl element must not have any facts with the precision attribute.
|
|
480
|
+
"""
|
|
481
|
+
errors = []
|
|
482
|
+
for fact in val.modelXbrl.facts:
|
|
483
|
+
concept = fact.concept
|
|
484
|
+
if concept is None:
|
|
485
|
+
continue
|
|
486
|
+
if not concept.isNumeric:
|
|
487
|
+
continue
|
|
488
|
+
if fact.precision is not None:
|
|
489
|
+
errors.append(fact)
|
|
490
|
+
if len(errors) > 0:
|
|
491
|
+
yield Validation.warning(
|
|
492
|
+
codes='EDINET.EC5700W.GFM.1.2.16',
|
|
493
|
+
msg=_("Use the decimals attribute instead of the precision attribute."),
|
|
494
|
+
modelObject=errors,
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
@validation(
|
|
499
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
500
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
501
|
+
)
|
|
502
|
+
def rule_gfm_1_2_22(
|
|
503
|
+
pluginData: PluginValidationDataExtension,
|
|
504
|
+
val: ValidateXbrl,
|
|
505
|
+
*args: Any,
|
|
506
|
+
**kwargs: Any,
|
|
507
|
+
) -> Iterable[Validation]:
|
|
508
|
+
"""
|
|
509
|
+
EDINET.EC5700W: [GFM 1.2.22] In your taxonomy, do not expand the
|
|
510
|
+
xlink:arcrole attribute of the link:footnoteArc element. Modify the value
|
|
511
|
+
of the xlink:arcrole attribute to "http://www.xbrl.org/2003/arcrole/fact-footnote".
|
|
512
|
+
|
|
513
|
+
Original GFM text: The xlink:arcrole attribute of a link:footnoteArc element must
|
|
514
|
+
be defined in the XBRL Specification 2.1 or declared in a standard taxonomy schema.
|
|
515
|
+
"""
|
|
516
|
+
errors = []
|
|
517
|
+
for elt in pluginData.getFootnoteLinkElements(val.modelXbrl):
|
|
518
|
+
for child in elt:
|
|
519
|
+
if not isinstance(child, (ModelObject, LocPrototype, ArcPrototype)):
|
|
520
|
+
continue
|
|
521
|
+
xlinkType = child.get(XbrlConst.qnXlinkType.clarkNotation)
|
|
522
|
+
if xlinkType == "arc":
|
|
523
|
+
arcrole = child.get(XbrlConst.qnXlinkArcRole.clarkNotation)
|
|
524
|
+
if arcrole != XbrlConst.factFootnote:
|
|
525
|
+
errors.append(child)
|
|
526
|
+
if len(errors) > 0:
|
|
527
|
+
yield Validation.warning(
|
|
528
|
+
codes='EDINET.EC5700W.GFM.1.2.22',
|
|
529
|
+
msg=_("Do not use extension arcroles for the link:footnoteArc element. "
|
|
530
|
+
"Use the standard 'http://www.xbrl.org/2003/arcrole/fact-footnote' arcrole instead."),
|
|
531
|
+
modelObject=errors,
|
|
532
|
+
)
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
@validation(
|
|
536
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
537
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
538
|
+
)
|
|
539
|
+
def rule_gfm_1_2_25(
|
|
540
|
+
pluginData: PluginValidationDataExtension,
|
|
541
|
+
val: ValidateXbrl,
|
|
542
|
+
*args: Any,
|
|
543
|
+
**kwargs: Any,
|
|
544
|
+
) -> Iterable[Validation]:
|
|
545
|
+
"""
|
|
546
|
+
EDINET.EC5700W: [GFM 1.2.25] Set the date in the period element in the
|
|
547
|
+
following format: YYYY-MM-DD.
|
|
548
|
+
|
|
549
|
+
Original GFM text: Dates in period element of the context must comply with
|
|
550
|
+
yyyy-mm-dd format. No time is allowed in the value for dates.
|
|
551
|
+
"""
|
|
552
|
+
errors = []
|
|
553
|
+
for context in val.modelXbrl.contexts.values():
|
|
554
|
+
for elt in context.iterdescendants(
|
|
555
|
+
XbrlConst.qnXbrliStartDate.clarkNotation,
|
|
556
|
+
XbrlConst.qnXbrliEndDate.clarkNotation,
|
|
557
|
+
XbrlConst.qnXbrliInstant.clarkNotation
|
|
558
|
+
):
|
|
559
|
+
elt = cast(ModelObject, elt)
|
|
560
|
+
dateText = XmlUtil.text(elt)
|
|
561
|
+
if not GFM_CONTEXT_DATE_PATTERN.match(dateText):
|
|
562
|
+
errors.append(elt)
|
|
563
|
+
if len(errors) > 0:
|
|
564
|
+
yield Validation.warning(
|
|
565
|
+
codes='EDINET.EC5700W.GFM.1.2.25',
|
|
566
|
+
msg=_("Set the date in the period element in the following "
|
|
567
|
+
"format: YYYY-MM-DD."),
|
|
568
|
+
modelObject=errors,
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
@validation(
|
|
573
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
574
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
575
|
+
)
|
|
576
|
+
def rule_gfm_1_2_26(
|
|
577
|
+
pluginData: PluginValidationDataExtension,
|
|
578
|
+
val: ValidateXbrl,
|
|
579
|
+
*args: Any,
|
|
580
|
+
**kwargs: Any,
|
|
581
|
+
) -> Iterable[Validation]:
|
|
582
|
+
"""
|
|
583
|
+
EDINET.EC5700W: [GFM 1.2.26] The decimals attribute value must not cause truncation of
|
|
584
|
+
non-zero digits in the fact value. Update the fact value to match the precision of
|
|
585
|
+
the decimals attribute, or update the decimals attribute.
|
|
586
|
+
|
|
587
|
+
Original GFM text: The decimals attribute value must not cause non-zero digits in
|
|
588
|
+
the fact value to be changed to zero.
|
|
589
|
+
"""
|
|
590
|
+
errors = []
|
|
591
|
+
for fact in val.modelXbrl.facts:
|
|
592
|
+
if (
|
|
593
|
+
fact.context is None or
|
|
594
|
+
fact.concept is None or
|
|
595
|
+
fact.concept.type is None or
|
|
596
|
+
getattr(fact,"xValid", 0) < VALID or
|
|
597
|
+
fact.isNil or
|
|
598
|
+
not fact.isNumeric or
|
|
599
|
+
not fact.decimals or
|
|
600
|
+
fact.decimals == "INF"
|
|
601
|
+
):
|
|
602
|
+
continue
|
|
603
|
+
try:
|
|
604
|
+
insignificance = insignificantDigits(fact.xValue, decimals=fact.decimals)
|
|
605
|
+
if insignificance is not None:
|
|
606
|
+
errors.append(fact)
|
|
607
|
+
except (ValueError,TypeError):
|
|
608
|
+
errors.append(fact)
|
|
609
|
+
if len(errors) > 0:
|
|
610
|
+
yield Validation.warning(
|
|
611
|
+
codes='EDINET.EC5700W.GFM.1.2.26',
|
|
612
|
+
msg=_("The decimals attribute value must not cause truncation of "
|
|
613
|
+
"non-zero digits in the fact value. Update the fact value to "
|
|
614
|
+
"match the precision of the decimals attribute, or update the"
|
|
615
|
+
"decimals attribute."),
|
|
616
|
+
modelObject=errors,
|
|
617
|
+
)
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
@validation(
|
|
621
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
622
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
623
|
+
)
|
|
624
|
+
def rule_gfm_1_2_27(
|
|
625
|
+
pluginData: PluginValidationDataExtension,
|
|
626
|
+
val: ValidateXbrl,
|
|
627
|
+
*args: Any,
|
|
628
|
+
**kwargs: Any,
|
|
629
|
+
) -> Iterable[Validation]:
|
|
630
|
+
"""
|
|
631
|
+
EDINET.EC5700W: [GFM 1.2.27] An instance must not contain unused units.
|
|
632
|
+
"""
|
|
633
|
+
# TODO: Consolidate validations involving unused units
|
|
634
|
+
unusedUnits = list(set(val.modelXbrl.units.values()) - set(val.modelXbrl.unitsInUse))
|
|
635
|
+
unusedUnits.extend(val.modelXbrl.ixdsUnmappedUnits.values())
|
|
636
|
+
unusedUnits.sort(key=lambda x: x.hash)
|
|
637
|
+
if len(unusedUnits) > 0:
|
|
638
|
+
yield Validation.warning(
|
|
639
|
+
codes='EDINET.EC5700W.GFM.1.2.27',
|
|
640
|
+
msg=_("Delete unused units from the instance."),
|
|
641
|
+
modelObject=unusedUnits
|
|
642
|
+
)
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
@validation(
|
|
646
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
647
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
648
|
+
)
|
|
649
|
+
def rule_gfm_1_2_28(
|
|
650
|
+
pluginData: PluginValidationDataExtension,
|
|
651
|
+
val: ValidateXbrl,
|
|
652
|
+
*args: Any,
|
|
653
|
+
**kwargs: Any,
|
|
654
|
+
) -> Iterable[Validation]:
|
|
655
|
+
"""
|
|
656
|
+
EDINET.EC5700W: [GFM 1.2.28] The prefix declaration for the namespace is incorrect.
|
|
657
|
+
"""
|
|
658
|
+
for doc in val.modelXbrl.urlDocs.values():
|
|
659
|
+
rootElt = doc.xmlRootElement
|
|
660
|
+
for prefix, namespace in rootElt.nsmap.items():
|
|
661
|
+
if prefix is None:
|
|
662
|
+
continue
|
|
663
|
+
if namespace not in GFM_RECOMMENDED_NAMESPACE_PREFIXES:
|
|
664
|
+
continue
|
|
665
|
+
if prefix in GFM_RECOMMENDED_NAMESPACE_PREFIXES[namespace]:
|
|
666
|
+
continue
|
|
667
|
+
yield Validation.warning(
|
|
668
|
+
codes='EDINET.EC5700W.GFM.1.2.28',
|
|
669
|
+
msg=_("The prefix declaration '%(prefix)s' for the namespace '%(namespace)s' "
|
|
670
|
+
"is incorrect. "
|
|
671
|
+
"Correct the prefix (%(prefixes)s)."),
|
|
672
|
+
prefix=prefix,
|
|
673
|
+
namespace=namespace,
|
|
674
|
+
prefixes=", ".join(GFM_RECOMMENDED_NAMESPACE_PREFIXES[namespace]),
|
|
675
|
+
modelObject=rootElt
|
|
676
|
+
)
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
@validation(
|
|
680
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
681
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
682
|
+
)
|
|
683
|
+
def rule_gfm_1_2_30(
|
|
684
|
+
pluginData: PluginValidationDataExtension,
|
|
685
|
+
val: ValidateXbrl,
|
|
686
|
+
*args: Any,
|
|
687
|
+
**kwargs: Any,
|
|
688
|
+
) -> Iterable[Validation]:
|
|
689
|
+
"""
|
|
690
|
+
EDINET.EC5700W: [GFM 1.2.30] A context must not contain the xbrli:forever element.
|
|
691
|
+
"""
|
|
692
|
+
errors = []
|
|
693
|
+
for context in val.modelXbrl.contexts.values():
|
|
694
|
+
for elt in context.iterdescendants(XbrlConst.qnXbrliForever.clarkNotation):
|
|
695
|
+
errors.append(elt)
|
|
696
|
+
if len(errors) > 0:
|
|
697
|
+
yield Validation.warning(
|
|
698
|
+
codes='EDINET.EC5700W.GFM.1.2.30',
|
|
699
|
+
msg=_("A context must not contain the xbrli:forever element."),
|
|
700
|
+
modelObject=errors
|
|
701
|
+
)
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
@validation(
|
|
705
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
706
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
707
|
+
)
|
|
708
|
+
def rule_gfm_1_3_1(
|
|
709
|
+
pluginData: PluginValidationDataExtension,
|
|
710
|
+
val: ValidateXbrl,
|
|
711
|
+
*args: Any,
|
|
712
|
+
**kwargs: Any,
|
|
713
|
+
) -> Iterable[Validation]:
|
|
714
|
+
"""
|
|
715
|
+
EDINET.EC5700W: [GFM 1.3.1] The submitter-specific taxonomy contains include elements.
|
|
716
|
+
"""
|
|
717
|
+
warnings = []
|
|
718
|
+
for modelDocument in val.modelXbrl.urlDocs.values():
|
|
719
|
+
if pluginData.isStandardTaxonomyUrl(modelDocument.uri, val.modelXbrl):
|
|
720
|
+
continue
|
|
721
|
+
rootElt = modelDocument.xmlRootElement
|
|
722
|
+
for elt in rootElt.iterdescendants(XbrlConst.qnXsdInclude.clarkNotation):
|
|
723
|
+
warnings.append(elt)
|
|
724
|
+
if len(warnings) > 0:
|
|
725
|
+
yield Validation.warning(
|
|
726
|
+
codes='EDINET.EC5700W.GFM.1.3.1',
|
|
727
|
+
msg=_("The submitter-specific taxonomy contains include elements."),
|
|
728
|
+
modelObject=warnings
|
|
729
|
+
)
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
@validation(
|
|
733
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
734
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
735
|
+
)
|
|
736
|
+
def rule_gfm_1_3_2(
|
|
737
|
+
pluginData: PluginValidationDataExtension,
|
|
738
|
+
val: ValidateXbrl,
|
|
739
|
+
*args: Any,
|
|
740
|
+
**kwargs: Any,
|
|
741
|
+
) -> Iterable[Validation]:
|
|
742
|
+
"""
|
|
743
|
+
EDINET.EC5700W: [GFM 1.3.2] The schemaLocation attribute of the xsd:import element specifying the EDINET taxonomy does not point to a valid location.
|
|
744
|
+
|
|
745
|
+
GFM-1.3.2: If an xsd:import element has a namespace attribute equal to a standard taxonomy
|
|
746
|
+
schema, then its schemaLocation attribute must be the standard taxonomy assigned
|
|
747
|
+
to that namespace.
|
|
748
|
+
"""
|
|
749
|
+
for document in val.modelXbrl.urlDocs.values():
|
|
750
|
+
if not pluginData.isExtensionUri(document.uri, val.modelXbrl) or not document.type == ModelDocument.Type.SCHEMA:
|
|
751
|
+
continue
|
|
752
|
+
for refDoc in document.referencesDocument.values():
|
|
753
|
+
if 'import' not in refDoc.referenceTypes:
|
|
754
|
+
continue
|
|
755
|
+
namespace = refDoc.referringModelObject.attrib.get('namespace')
|
|
756
|
+
schemaLocation = refDoc.referringModelObject.attrib.get('schemaLocation')
|
|
757
|
+
if not namespace or not schemaLocation:
|
|
758
|
+
continue
|
|
759
|
+
expectedXSDLocationSet = val.disclosureSystem.standardTaxonomiesDict.get(namespace)
|
|
760
|
+
if expectedXSDLocationSet is not None and schemaLocation not in expectedXSDLocationSet:
|
|
761
|
+
yield Validation.warning(
|
|
762
|
+
codes='EDINET.EC5700W.GFM.1.3.2',
|
|
763
|
+
msg=_("The schemaLocation attribute of the xsd:import element specifying the EDINET taxonomy does not point to a valid location. "
|
|
764
|
+
"The schemaLocation attribute value '%(schemaLocation)s'."),
|
|
765
|
+
schemaLocation = schemaLocation,
|
|
766
|
+
modelObject = refDoc.referringModelObject
|
|
767
|
+
)
|
|
768
|
+
|
|
769
|
+
|
|
770
|
+
@validation(
|
|
771
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
772
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
773
|
+
)
|
|
774
|
+
def rule_gfm_1_3_8(
|
|
775
|
+
pluginData: PluginValidationDataExtension,
|
|
776
|
+
val: ValidateXbrl,
|
|
777
|
+
*args: Any,
|
|
778
|
+
**kwargs: Any,
|
|
779
|
+
) -> Iterable[Validation]:
|
|
780
|
+
"""
|
|
781
|
+
EDINET.EC5700W: [GFM 1.3.8] TThe submitter-specific taxonomy has an embedded linkbase.
|
|
782
|
+
"""
|
|
783
|
+
embeddedElements = []
|
|
784
|
+
for modelDocument in val.modelXbrl.urlDocs.values():
|
|
785
|
+
if pluginData.isStandardTaxonomyUrl(modelDocument.uri, val.modelXbrl):
|
|
786
|
+
continue
|
|
787
|
+
rootElt = modelDocument.xmlRootElement
|
|
788
|
+
for elt in rootElt.iterdescendants(XbrlConst.qnLinkLinkbaseRef.clarkNotation):
|
|
789
|
+
if elt.attrib.get(XbrlConst.qnXlinkType.clarkNotation) in ('extended', 'arc', 'resource', 'locator'):
|
|
790
|
+
embeddedElements.append(elt)
|
|
791
|
+
if len(embeddedElements) > 0:
|
|
792
|
+
yield Validation.warning(
|
|
793
|
+
codes='EDINET.EC5700W.GFM.1.3.8',
|
|
794
|
+
msg=_("The submitter-specific taxonomy has an embedded linkbase."),
|
|
795
|
+
modelObject=embeddedElements
|
|
796
|
+
)
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
@validation(
|
|
800
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
801
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
802
|
+
)
|
|
803
|
+
def rule_gfm_1_3_10(
|
|
804
|
+
pluginData: PluginValidationDataExtension,
|
|
805
|
+
val: ValidateXbrl,
|
|
806
|
+
*args: Any,
|
|
807
|
+
**kwargs: Any,
|
|
808
|
+
) -> Iterable[Validation]:
|
|
809
|
+
"""
|
|
810
|
+
EDINET.EC5700W: [GFM 1.3.10] Remove the duplicate link:roleType element.
|
|
811
|
+
"""
|
|
812
|
+
for modelRoleTypes in val.modelXbrl.roleTypes.values():
|
|
813
|
+
if modelRoleTypes and len(modelRoleTypes) > 1:
|
|
814
|
+
yield Validation.warning(
|
|
815
|
+
codes='EDINET.EC5700W.GFM.1.3.10',
|
|
816
|
+
msg=_("Remove the duplicate link:roleType element. Duplicate roleURI: %(roleURI)s"),
|
|
817
|
+
roleURI=modelRoleTypes[0].roleURI,
|
|
818
|
+
modelObject=modelRoleTypes
|
|
819
|
+
)
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
@validation(
|
|
823
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
824
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
825
|
+
)
|
|
826
|
+
def rule_gfm_1_3_11(
|
|
827
|
+
pluginData: PluginValidationDataExtension,
|
|
828
|
+
val: ValidateXbrl,
|
|
829
|
+
*args: Any,
|
|
830
|
+
**kwargs: Any,
|
|
831
|
+
) -> Iterable[Validation]:
|
|
832
|
+
"""
|
|
833
|
+
EDINET.EC5700W: [GFM 1.3.11] The usedOn attribute of the extended link role should be set to include all of link:presentationLink, link:calculationLink, and link:definitionLink.
|
|
834
|
+
"""
|
|
835
|
+
requiredUsedOns = {XbrlConst.qnLinkPresentationLink,
|
|
836
|
+
XbrlConst.qnLinkCalculationLink,
|
|
837
|
+
XbrlConst.qnLinkDefinitionLink}
|
|
838
|
+
for modelRoleTypes in val.modelXbrl.roleTypes.values():
|
|
839
|
+
if len(modelRoleTypes) > 0:
|
|
840
|
+
modelRoleType = modelRoleTypes[0]
|
|
841
|
+
usedOns = modelRoleType.usedOns
|
|
842
|
+
if not usedOns.isdisjoint(requiredUsedOns) and len(requiredUsedOns - usedOns) > 0:
|
|
843
|
+
yield Validation.warning(
|
|
844
|
+
codes='EDINET.EC5700W.GFM.1.3.11',
|
|
845
|
+
msg=_("The usedOn attribute of the extended link role should be set to include all of link:presentationLink, link:calculationLink, and link:definitionLink. "
|
|
846
|
+
"Extended link role roleURI: %(roleURI)s is missing %(usedOn)s."),
|
|
847
|
+
roleURI=modelRoleType.roleURI,
|
|
848
|
+
modelObject=modelRoleType
|
|
849
|
+
)
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
@validation(
|
|
853
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
854
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
855
|
+
)
|
|
856
|
+
def rule_gfm_1_3_13(
|
|
857
|
+
pluginData: PluginValidationDataExtension,
|
|
858
|
+
val: ValidateXbrl,
|
|
859
|
+
*args: Any,
|
|
860
|
+
**kwargs: Any,
|
|
861
|
+
) -> Iterable[Validation]:
|
|
862
|
+
"""
|
|
863
|
+
EDINET.EC5700W: [GFM 1.3.13] Remove any leading or trailing XML whitespace and newline
|
|
864
|
+
characters from the "link:definition" of your extended link role.
|
|
865
|
+
"""
|
|
866
|
+
for modelRoleTypes in val.modelXbrl.roleTypes.values():
|
|
867
|
+
if len(modelRoleTypes) > 0:
|
|
868
|
+
modelRoleType = modelRoleTypes[0]
|
|
869
|
+
if (
|
|
870
|
+
modelRoleType.definition and modelRoleType.definitionNotStripped
|
|
871
|
+
and modelRoleType.definition != modelRoleType.definitionNotStripped
|
|
872
|
+
):
|
|
873
|
+
yield Validation.warning(
|
|
874
|
+
codes='EDINET.EC5700W.GFM.1.3.13',
|
|
875
|
+
msg=_("Remove any leading or trailing XML whitespace and newline characters from "
|
|
876
|
+
"the `link:definition` of your extended link role. Definition: %(definition)s"),
|
|
877
|
+
definition=modelRoleTypes[0].definitionNotStripped,
|
|
878
|
+
modelObject=modelRoleTypes[0]
|
|
879
|
+
)
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
@validation(
|
|
883
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
884
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
885
|
+
)
|
|
886
|
+
def rule_gfm_1_3_16(
|
|
887
|
+
pluginData: PluginValidationDataExtension,
|
|
888
|
+
val: ValidateXbrl,
|
|
889
|
+
*args: Any,
|
|
890
|
+
**kwargs: Any,
|
|
891
|
+
) -> Iterable[Validation]:
|
|
892
|
+
"""
|
|
893
|
+
EDINET.EC5700W: [GFM 1.3.16] Remove the duplicate link:arcroleType element.
|
|
894
|
+
"""
|
|
895
|
+
for modelArcRoleTypes in val.modelXbrl.arcroleTypes.values():
|
|
896
|
+
if len(modelArcRoleTypes) > 1:
|
|
897
|
+
yield Validation.warning(
|
|
898
|
+
codes='EDINET.EC5700W.GFM.1.3.16',
|
|
899
|
+
msg=_("Remove the duplicate link:arcroleType element. Duplicate arcroleURI: %(arcroleURI)s"),
|
|
900
|
+
arcroleURI=modelArcRoleTypes[0].arcroleURI,
|
|
901
|
+
modelObject=modelArcRoleTypes
|
|
902
|
+
)
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
@validation(
|
|
906
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
907
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
908
|
+
)
|
|
909
|
+
def rule_gfm_1_3_17(
|
|
910
|
+
pluginData: PluginValidationDataExtension,
|
|
911
|
+
val: ValidateXbrl,
|
|
912
|
+
*args: Any,
|
|
913
|
+
**kwargs: Any,
|
|
914
|
+
) -> Iterable[Validation]:
|
|
915
|
+
"""
|
|
916
|
+
EDINET.EC5700W: [GFM 1.3.17] Add a link:definition to the link:arcroleType element.
|
|
917
|
+
"""
|
|
918
|
+
for modelArcRoleTypes in val.modelXbrl.arcroleTypes.values():
|
|
919
|
+
modelArcRoleType = modelArcRoleTypes[0]
|
|
920
|
+
if not modelArcRoleType.definition:
|
|
921
|
+
yield Validation.warning(
|
|
922
|
+
codes='EDINET.EC5700W.GFM.1.3.17',
|
|
923
|
+
msg=_("Add a link:definition to the link:arcroleType element. ArcroleURI: %(arcroleURI)s"),
|
|
924
|
+
arcroleURI=modelArcRoleType.arcroleURI,
|
|
925
|
+
modelObject=modelArcRoleType
|
|
926
|
+
)
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
@validation(
|
|
930
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
931
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
932
|
+
)
|
|
933
|
+
def rule_gfm_1_3_18(
|
|
934
|
+
pluginData: PluginValidationDataExtension,
|
|
935
|
+
val: ValidateXbrl,
|
|
936
|
+
*args: Any,
|
|
937
|
+
**kwargs: Any,
|
|
938
|
+
) -> Iterable[Validation]:
|
|
939
|
+
"""
|
|
940
|
+
EDINET.EC5700W: [GFM 1.3.18] The submitter's taxonomy contains an element whose name matches an element in the EDINET taxonomy.
|
|
941
|
+
Modify the element name so that it does not match the EDINET taxonomy, or use the element in the EDINET taxonomy and delete the
|
|
942
|
+
element added in the submitter's taxonomy.
|
|
943
|
+
"""
|
|
944
|
+
for extensionConcept in pluginData.getExtensionConcepts(val.modelXbrl):
|
|
945
|
+
name = extensionConcept.get("name")
|
|
946
|
+
if name is not None:
|
|
947
|
+
concepts = val.modelXbrl.nameConcepts.get(name, [])
|
|
948
|
+
for concept in concepts:
|
|
949
|
+
if not pluginData.isExtensionUri(concept.document.uri, val.modelXbrl):
|
|
950
|
+
yield Validation.warning(
|
|
951
|
+
codes='EDINET.EC5700W.GFM.1.3.18',
|
|
952
|
+
msg=_("Your extension taxonomy contains an element, %(concept)s, which has the same name as an element "
|
|
953
|
+
"in the base taxonomy, %(standardConcept)s. Please ensure that this extension is appropriate and "
|
|
954
|
+
"if so, please change the extension concept."),
|
|
955
|
+
concept=name,
|
|
956
|
+
standardConcept=concept
|
|
957
|
+
)
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
@validation(
|
|
961
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
962
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
963
|
+
)
|
|
964
|
+
def rule_gfm_1_3_19(
|
|
965
|
+
pluginData: PluginValidationDataExtension,
|
|
966
|
+
val: ValidateXbrl,
|
|
967
|
+
*args: Any,
|
|
968
|
+
**kwargs: Any,
|
|
969
|
+
) -> Iterable[Validation]:
|
|
970
|
+
"""
|
|
971
|
+
EDINET.EC5700W: [GFM 1.3.19] The id attribute of the element defined in the submitter-specific taxonomy
|
|
972
|
+
should be set in the following format:{namespace prefix}_{element name}.
|
|
973
|
+
"""
|
|
974
|
+
improperlyFormattedIds = set()
|
|
975
|
+
for concept in pluginData.getExtensionConcepts(val.modelXbrl):
|
|
976
|
+
prefix = concept.qname.prefix or ""
|
|
977
|
+
name = concept.qname.localName
|
|
978
|
+
requiredId = f"{prefix}_{name}"
|
|
979
|
+
if concept.id != requiredId or not prefix:
|
|
980
|
+
improperlyFormattedIds.add(concept)
|
|
981
|
+
if len(improperlyFormattedIds) > 0:
|
|
982
|
+
yield Validation.warning(
|
|
983
|
+
codes='EDINET.EC5700W.GFM.1.3.19',
|
|
984
|
+
msg=_("The id attribute of the element defined in the submitter-specific taxonomy should be set in the following format: {namespace prefix}_{element name}"),
|
|
985
|
+
modelObject=improperlyFormattedIds
|
|
986
|
+
)
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
@validation(
|
|
990
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
991
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
992
|
+
)
|
|
993
|
+
def rule_gfm_1_3_20(
|
|
994
|
+
pluginData: PluginValidationDataExtension,
|
|
995
|
+
val: ValidateXbrl,
|
|
996
|
+
*args: Any,
|
|
997
|
+
**kwargs: Any,
|
|
998
|
+
) -> Iterable[Validation]:
|
|
999
|
+
"""
|
|
1000
|
+
EDINET.EC5700W: [GFM 1.3.20] Set the nillable attribute value to "true".
|
|
1001
|
+
|
|
1002
|
+
GFM 1.3.20 The nillable attribute value of an xsd:element must equal "true".
|
|
1003
|
+
"""
|
|
1004
|
+
nonNillableElements = set()
|
|
1005
|
+
for concept in val.modelXbrl.qnameConcepts.values():
|
|
1006
|
+
if concept.namespaceURI == XbrlConst.xsd:
|
|
1007
|
+
if concept.get("nillable") == "false":
|
|
1008
|
+
nonNillableElements.add(concept)
|
|
1009
|
+
if len(nonNillableElements) > 0:
|
|
1010
|
+
yield Validation.warning(
|
|
1011
|
+
codes='EDINET.EC5700W.GFM.1.3.20',
|
|
1012
|
+
msg=_("Set the nillable attribute value to 'true'."),
|
|
1013
|
+
modelObject=nonNillableElements
|
|
1014
|
+
)
|
|
1015
|
+
|
|
1016
|
+
|
|
1017
|
+
@validation(
|
|
1018
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1019
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1020
|
+
)
|
|
1021
|
+
def rule_gfm_1_3_21(
|
|
1022
|
+
pluginData: PluginValidationDataExtension,
|
|
1023
|
+
val: ValidateXbrl,
|
|
1024
|
+
*args: Any,
|
|
1025
|
+
**kwargs: Any,
|
|
1026
|
+
) -> Iterable[Validation]:
|
|
1027
|
+
"""
|
|
1028
|
+
EDINET.EC5700W: [GFM 1.3.21] Remove the tuple definition.
|
|
1029
|
+
"""
|
|
1030
|
+
tupleConcepts = [
|
|
1031
|
+
concept for concept in pluginData.getExtensionConcepts(val.modelXbrl)
|
|
1032
|
+
if concept.isTuple
|
|
1033
|
+
]
|
|
1034
|
+
if len(tupleConcepts) > 0:
|
|
1035
|
+
yield Validation.warning(
|
|
1036
|
+
codes='EDINET.EC5700W.GFM.1.3.21',
|
|
1037
|
+
msg=_("Remove the tuple definition."),
|
|
1038
|
+
modelObject=tupleConcepts
|
|
1039
|
+
)
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
@validation(
|
|
1043
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1044
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1045
|
+
)
|
|
1046
|
+
def rule_gfm_1_3_22(
|
|
1047
|
+
pluginData: PluginValidationDataExtension,
|
|
1048
|
+
val: ValidateXbrl,
|
|
1049
|
+
*args: Any,
|
|
1050
|
+
**kwargs: Any,
|
|
1051
|
+
) -> Iterable[Validation]:
|
|
1052
|
+
"""
|
|
1053
|
+
EDINET.EC5700W: [GFM 1.3.22] Do not set the xbrldt:typedDomainRef attribute on elements defined in submitter-specific taxonomies.
|
|
1054
|
+
"""
|
|
1055
|
+
typedDomainConcepts = [
|
|
1056
|
+
concept for concept in pluginData.getExtensionConcepts(val.modelXbrl)
|
|
1057
|
+
if concept.isTypedDimension
|
|
1058
|
+
]
|
|
1059
|
+
|
|
1060
|
+
if len(typedDomainConcepts) > 0:
|
|
1061
|
+
yield Validation.warning(
|
|
1062
|
+
codes='EDINET.EC5700W.GFM.1.3.22',
|
|
1063
|
+
msg=_("Do not set the xbrldt:typedDomainRef attribute on elements defined in submitter-specific taxonomies."),
|
|
1064
|
+
modelObject=typedDomainConcepts
|
|
1065
|
+
)
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
@validation(
|
|
1069
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1070
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1071
|
+
)
|
|
1072
|
+
def rule_gfm_1_3_23(
|
|
1073
|
+
pluginData: PluginValidationDataExtension,
|
|
1074
|
+
val: ValidateXbrl,
|
|
1075
|
+
*args: Any,
|
|
1076
|
+
**kwargs: Any,
|
|
1077
|
+
) -> Iterable[Validation]:
|
|
1078
|
+
"""
|
|
1079
|
+
EDINET.EC5700W: [GFM 1.3.23] Set the periodType attribute to "duration".
|
|
1080
|
+
|
|
1081
|
+
GFM 1.3.23 If the abstract attribute of xsd:element is "true", then the
|
|
1082
|
+
xbrli:periodType attribute must be "duration".
|
|
1083
|
+
"""
|
|
1084
|
+
instantAbstractElements = set()
|
|
1085
|
+
for concept in val.modelXbrl.qnameConcepts.values():
|
|
1086
|
+
if concept.abstract == "true" and concept.periodType == "instant":
|
|
1087
|
+
instantAbstractElements.add(concept)
|
|
1088
|
+
if len(instantAbstractElements) > 0:
|
|
1089
|
+
yield Validation.warning(
|
|
1090
|
+
codes='EDINET.EC5700W.GFM.1.3.23',
|
|
1091
|
+
msg=_("Set the periodType attribute to 'duration'."),
|
|
1092
|
+
modelObject=instantAbstractElements
|
|
1093
|
+
)
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
@validation(
|
|
1097
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1098
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1099
|
+
)
|
|
1100
|
+
def rule_gfm_1_3_25(
|
|
1101
|
+
pluginData: PluginValidationDataExtension,
|
|
1102
|
+
val: ValidateXbrl,
|
|
1103
|
+
*args: Any,
|
|
1104
|
+
**kwargs: Any,
|
|
1105
|
+
) -> Iterable[Validation]:
|
|
1106
|
+
"""
|
|
1107
|
+
EDINET.EC5700W: [GFM 1.3.25] Correct the element name so that it does not end with "Axis", or correct the
|
|
1108
|
+
substitutionGroup to "xbrldt:dimensionItem".
|
|
1109
|
+
|
|
1110
|
+
GFM 1.3.25: The xsd:element substitutionGroup attribute must equal "xbrldt:dimensionItem" if
|
|
1111
|
+
and only if the name attribute ends with "Axis".
|
|
1112
|
+
"""
|
|
1113
|
+
for concept in pluginData.getExtensionConcepts(val.modelXbrl):
|
|
1114
|
+
if concept.qname.localName.endswith("Axis") != (concept.substitutionGroupQname == XbrlConst.qnXbrldtDimensionItem):
|
|
1115
|
+
yield Validation.warning(
|
|
1116
|
+
codes='EDINET.EC5700W.GFM.1.3.25',
|
|
1117
|
+
msg=_("Modify the element name, '%(conceptName)s', so that it does not end with 'Axis', or modify the substitutionGroup to 'xbrldt:dimensionItem'."),
|
|
1118
|
+
conceptName=concept.qname.localName,
|
|
1119
|
+
modelObject=concept,
|
|
1120
|
+
)
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
@validation(
|
|
1124
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1125
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1126
|
+
)
|
|
1127
|
+
def rule_gfm_1_3_26(
|
|
1128
|
+
pluginData: PluginValidationDataExtension,
|
|
1129
|
+
val: ValidateXbrl,
|
|
1130
|
+
*args: Any,
|
|
1131
|
+
**kwargs: Any,
|
|
1132
|
+
) -> Iterable[Validation]:
|
|
1133
|
+
"""
|
|
1134
|
+
EDINET.EC5700W: [GFM 1.3.26] Correct the element name so that it does not end with "Table", or correct the
|
|
1135
|
+
substitutionGroup to "xbrldt:hypercubeItem".
|
|
1136
|
+
|
|
1137
|
+
GFM 1.3.26: The xsd:element name attribute must ends with "Table" if and only if
|
|
1138
|
+
substitutionGroup attribute equals "xbrldt:hypercubeItem".
|
|
1139
|
+
"""
|
|
1140
|
+
for concept in pluginData.getExtensionConcepts(val.modelXbrl):
|
|
1141
|
+
if concept.qname.localName.endswith("Table") != (concept.substitutionGroupQname == XbrlConst.qnXbrldtHypercubeItem):
|
|
1142
|
+
yield Validation.warning(
|
|
1143
|
+
codes='EDINET.EC5700W.GFM.1.3.26',
|
|
1144
|
+
msg=_("The substitution group 'xbrldt:hypercubeItem' is only allowed with an element name that ends with 'Table'."
|
|
1145
|
+
"Please change %(conceptName)s or change the substitutionGroup."),
|
|
1146
|
+
conceptName=concept.qname.localName,
|
|
1147
|
+
modelObject=concept
|
|
1148
|
+
)
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
@validation(
|
|
1152
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1153
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1154
|
+
)
|
|
1155
|
+
def rule_gfm_1_3_28(
|
|
1156
|
+
pluginData: PluginValidationDataExtension,
|
|
1157
|
+
val: ValidateXbrl,
|
|
1158
|
+
*args: Any,
|
|
1159
|
+
**kwargs: Any,
|
|
1160
|
+
) -> Iterable[Validation]:
|
|
1161
|
+
"""
|
|
1162
|
+
EDINET.EC5700W: [GFM 1.3.28] If the element name of an element extended by a submitter-specific taxonomy ends with "LineItems",
|
|
1163
|
+
set the abstract attribute to "true".
|
|
1164
|
+
"""
|
|
1165
|
+
for concept in pluginData.getExtensionConcepts(val.modelXbrl):
|
|
1166
|
+
if concept.qname.localName.endswith("LineItems") and not concept.isAbstract:
|
|
1167
|
+
yield Validation.warning(
|
|
1168
|
+
codes='EDINET.EC5700W.GFM.1.3.28',
|
|
1169
|
+
msg=_("If the element name of an element extended by a submitter-specific taxonomy ends with 'LineItems', "
|
|
1170
|
+
"set the abstract attribute to 'true'. For the element, '%(conceptName)s', the abstract attribute is 'false'."),
|
|
1171
|
+
conceptName=concept.qname.localName,
|
|
1172
|
+
modelObject=concept
|
|
1173
|
+
)
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
@validation(
|
|
1177
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1178
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1179
|
+
)
|
|
1180
|
+
def rule_gfm_1_3_29(
|
|
1181
|
+
pluginData: PluginValidationDataExtension,
|
|
1182
|
+
val: ValidateXbrl,
|
|
1183
|
+
*args: Any,
|
|
1184
|
+
**kwargs: Any,
|
|
1185
|
+
) -> Iterable[Validation]:
|
|
1186
|
+
"""
|
|
1187
|
+
EDINET.EC5700W: [GFM 1.3.29] If the element name of an element extended by the submitter-specific taxonomy ends with
|
|
1188
|
+
"Domain" or "Member", please set the type attribute to "nonnum:domainItemType".
|
|
1189
|
+
|
|
1190
|
+
GFM 1.3.29: The xsd:element name attribute must end with "Domain" or "Member" if and only
|
|
1191
|
+
if the type attribute equals "nonnum:domainItemType".
|
|
1192
|
+
"""
|
|
1193
|
+
for concept in pluginData.getExtensionConcepts(val.modelXbrl):
|
|
1194
|
+
isConceptDomain = concept.type.isDomainItemType if concept.type is not None else False
|
|
1195
|
+
if ((concept.qname.localName.endswith("Domain") or concept.qname.localName.endswith("Member")) != isConceptDomain):
|
|
1196
|
+
yield Validation.warning(
|
|
1197
|
+
codes='EDINET.EC5700W.GFM.1.3.29',
|
|
1198
|
+
msg=_("The type 'us-types:domainItemType' is only allowed with an element name that ends with 'Domain' or 'Member'. "
|
|
1199
|
+
"Please change %(conceptName)s or change the type."),
|
|
1200
|
+
conceptName=concept.qname.localName,
|
|
1201
|
+
modelObject=concept
|
|
1202
|
+
)
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
@validation(
|
|
1206
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1207
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1208
|
+
)
|
|
1209
|
+
def rule_gfm_1_3_30(
|
|
1210
|
+
pluginData: PluginValidationDataExtension,
|
|
1211
|
+
val: ValidateXbrl,
|
|
1212
|
+
*args: Any,
|
|
1213
|
+
**kwargs: Any,
|
|
1214
|
+
) -> Iterable[Validation]:
|
|
1215
|
+
"""
|
|
1216
|
+
EDINET.EC5700W: [GFM 1.3.30] Set the periodType attribute to "duration".
|
|
1217
|
+
|
|
1218
|
+
GFM 1.3.30 If xsd:element type attribute equals "nonnum:domainItemType" then
|
|
1219
|
+
the xbrli:periodType attribute must equal "duration".
|
|
1220
|
+
"""
|
|
1221
|
+
instantDomainElements = set()
|
|
1222
|
+
for concept in val.modelXbrl.qnameConcepts.values():
|
|
1223
|
+
if concept.type is not None and concept.type.isDomainItemType and concept.periodType == "instant":
|
|
1224
|
+
instantDomainElements.add(concept)
|
|
1225
|
+
if len(instantDomainElements) > 0:
|
|
1226
|
+
yield Validation.warning(
|
|
1227
|
+
codes='EDINET.EC5700W.GFM.1.3.30',
|
|
1228
|
+
msg=_("Set the periodType attribute to 'duration'."),
|
|
1229
|
+
modelObject=instantDomainElements
|
|
1230
|
+
)
|
|
1231
|
+
|
|
1232
|
+
@validation(
|
|
1233
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1234
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1235
|
+
)
|
|
1236
|
+
def rule_gfm_1_3_31(
|
|
1237
|
+
pluginData: PluginValidationDataExtension,
|
|
1238
|
+
val: ValidateXbrl,
|
|
1239
|
+
*args: Any,
|
|
1240
|
+
**kwargs: Any,
|
|
1241
|
+
) -> Iterable[Validation]:
|
|
1242
|
+
"""
|
|
1243
|
+
EDINET.EC5700W: [GFM 1.3.31] Set the abstract attribute to "true".
|
|
1244
|
+
|
|
1245
|
+
GFM 1.3.31: If xsd:element type attribute equals "nonnum:domainItemType" then
|
|
1246
|
+
the abstract attribute must equal to "true".
|
|
1247
|
+
"""
|
|
1248
|
+
nonAbstractDomainElements = set()
|
|
1249
|
+
for concept in val.modelXbrl.qnameConcepts.values():
|
|
1250
|
+
if concept.type is not None and concept.type.isDomainItemType and concept.abstract != "true":
|
|
1251
|
+
nonAbstractDomainElements.add(concept)
|
|
1252
|
+
if len(nonAbstractDomainElements) > 0:
|
|
1253
|
+
yield Validation.warning(
|
|
1254
|
+
codes='EDINET.EC5700W.GFM.1.3.31',
|
|
1255
|
+
msg=_("Set the abstract attribute to 'true'."),
|
|
1256
|
+
modelObject=nonAbstractDomainElements
|
|
1257
|
+
)
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
@validation(
|
|
1261
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1262
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1263
|
+
)
|
|
1264
|
+
def rule_gfm_1_4_4(
|
|
1265
|
+
pluginData: PluginValidationDataExtension,
|
|
1266
|
+
val: ValidateXbrl,
|
|
1267
|
+
*args: Any,
|
|
1268
|
+
**kwargs: Any,
|
|
1269
|
+
) -> Iterable[Validation]:
|
|
1270
|
+
"""
|
|
1271
|
+
EDINET.EC5700W: [GFM 1.4.4] If the type attribute is "extended" or "resource", set the xlink:role attribute to the extended link role.
|
|
1272
|
+
|
|
1273
|
+
GFM 1.4.4: The xlink:role attribute of an element with a type="extended" attribute or a
|
|
1274
|
+
type="resource" attribute must be present and must not be empty.
|
|
1275
|
+
"""
|
|
1276
|
+
for modelDocument in val.modelXbrl.urlDocs.values():
|
|
1277
|
+
if pluginData.isStandardTaxonomyUrl(modelDocument.uri, val.modelXbrl):
|
|
1278
|
+
continue
|
|
1279
|
+
rootElt = modelDocument.xmlRootElement
|
|
1280
|
+
ns = {'xlink': 'http://www.w3.org/1999/xlink'}
|
|
1281
|
+
for elt in rootElt.xpath('//*[@xlink:type="extended" or @xlink:type="resource"]', namespaces=ns):
|
|
1282
|
+
xlinkRole = elt.get(XbrlConst.qnXlinkRole.clarkNotation)
|
|
1283
|
+
if not xlinkRole:
|
|
1284
|
+
yield Validation.warning(
|
|
1285
|
+
codes='EDINET.EC5700W.GFM.1.4.4',
|
|
1286
|
+
msg=_("If the type attribute is 'extended' or 'resource', set the xlink:role attribute to the extended link role."
|
|
1287
|
+
"%(element)s is missing an xlink:role"),
|
|
1288
|
+
modelObject=elt, element=elt.qname
|
|
1289
|
+
)
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
@validation(
|
|
1293
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1294
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1295
|
+
)
|
|
1296
|
+
def rule_gfm_1_4_6(
|
|
1297
|
+
pluginData: PluginValidationDataExtension,
|
|
1298
|
+
val: ValidateXbrl,
|
|
1299
|
+
*args: Any,
|
|
1300
|
+
**kwargs: Any,
|
|
1301
|
+
) -> Iterable[Validation]:
|
|
1302
|
+
"""
|
|
1303
|
+
EDINET.EC5700W: [GFM 1.4.6] Please correct the value of the link:arcroleRef attribute to
|
|
1304
|
+
one specified in the XBRL 2.1 specification or the EDINET taxonomy.
|
|
1305
|
+
GFM 1.4.6: The text preceding a sharp sign "#" in an xlink:href attribute of link:arcroleRef must
|
|
1306
|
+
be a standard taxonomy or in a file recognised in the disclosure system.
|
|
1307
|
+
"""
|
|
1308
|
+
|
|
1309
|
+
for modelDocument in val.modelXbrl.urlDocs.values():
|
|
1310
|
+
if pluginData.isStandardTaxonomyUrl(modelDocument.uri, val.modelXbrl):
|
|
1311
|
+
continue
|
|
1312
|
+
rootElt = modelDocument.xmlRootElement
|
|
1313
|
+
for elt in rootElt.iter(XbrlConst.qnLinkArcroleRef.clarkNotation):
|
|
1314
|
+
refUri = elt.get("arcroleURI")
|
|
1315
|
+
hrefAttr = elt.get(XbrlConst.qnXlinkHref.clarkNotation)
|
|
1316
|
+
hrefUri, hrefId = UrlUtil.splitDecodeFragment(hrefAttr)
|
|
1317
|
+
if hrefUri not in val.disclosureSystem.standardTaxonomiesDict:
|
|
1318
|
+
yield Validation.warning(
|
|
1319
|
+
codes='EDINET.EC5700W.GFM.1.4.6',
|
|
1320
|
+
msg=_("Please correct the value of the link:arcroleRef attribute to one specified in the XBRL 2.1 specification or the EDINET taxonomy."
|
|
1321
|
+
" link:arcroleRef: %(xlinkHref)s, arcrole: %(refURI)s,"),
|
|
1322
|
+
modelObject=elt,
|
|
1323
|
+
refURI=refUri,
|
|
1324
|
+
xlinkHref=hrefUri
|
|
1325
|
+
)
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
@validation(
|
|
1329
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1330
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1331
|
+
)
|
|
1332
|
+
def rule_gfm_1_4_8(
|
|
1333
|
+
pluginData: PluginValidationDataExtension,
|
|
1334
|
+
val: ValidateXbrl,
|
|
1335
|
+
*args: Any,
|
|
1336
|
+
**kwargs: Any,
|
|
1337
|
+
) -> Iterable[Validation]:
|
|
1338
|
+
"""
|
|
1339
|
+
EDINET.EC5700W: [GFM 1.4.8] Correct the priority attribute value so that it is less than 10.
|
|
1340
|
+
"""
|
|
1341
|
+
|
|
1342
|
+
for modelDocument in val.modelXbrl.urlDocs.values():
|
|
1343
|
+
if pluginData.isStandardTaxonomyUrl(modelDocument.uri, val.modelXbrl):
|
|
1344
|
+
continue
|
|
1345
|
+
rootElt = modelDocument.xmlRootElement
|
|
1346
|
+
ns = {'xlink': 'http://www.w3.org/1999/xlink'}
|
|
1347
|
+
for elt in rootElt.xpath('//*[@xlink:type="arc"][@priority]', namespaces=ns):
|
|
1348
|
+
priority = elt.get("priority")
|
|
1349
|
+
with contextlib.suppress(ValueError, TypeError):
|
|
1350
|
+
if int(priority) >= 10:
|
|
1351
|
+
yield Validation.warning(
|
|
1352
|
+
codes='EDINET.EC5700W.GFM.1.4.8',
|
|
1353
|
+
msg=_("Correct the priority attribute value so that it is less than 10. Arc element: %(arcName)s, priority: %(priority)s"),
|
|
1354
|
+
arcName=elt.qname,
|
|
1355
|
+
modelObject=elt,
|
|
1356
|
+
priority=priority,
|
|
1357
|
+
)
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
@validation(
|
|
1361
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1362
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1363
|
+
)
|
|
1364
|
+
def rule_gfm_1_5_1(
|
|
1365
|
+
pluginData: PluginValidationDataExtension,
|
|
1366
|
+
val: ValidateXbrl,
|
|
1367
|
+
*args: Any,
|
|
1368
|
+
**kwargs: Any,
|
|
1369
|
+
) -> Iterable[Validation]:
|
|
1370
|
+
"""
|
|
1371
|
+
EDINET.EC5700W: [GFM 1.5.1] An element used in a fact or xbrldi:explicitMember in an instance must have a Japanese
|
|
1372
|
+
language standard label in the DTS of that instance.
|
|
1373
|
+
"""
|
|
1374
|
+
usedConcepts = pluginData.getUsedConcepts(val.modelXbrl)
|
|
1375
|
+
labelRelationshipSet = val.modelXbrl.relationshipSet(XbrlConst.conceptLabel)
|
|
1376
|
+
if labelRelationshipSet is None:
|
|
1377
|
+
return
|
|
1378
|
+
for concept in usedConcepts:
|
|
1379
|
+
labelRels = labelRelationshipSet.fromModelObject(concept)
|
|
1380
|
+
labelExists = False
|
|
1381
|
+
for rel in labelRels:
|
|
1382
|
+
label = rel.toModelObject
|
|
1383
|
+
if (label is not None and
|
|
1384
|
+
label.role == XbrlConst.standardLabel and
|
|
1385
|
+
label.xmlLang in JAPAN_LANGUAGE_CODES):
|
|
1386
|
+
labelExists = True
|
|
1387
|
+
break
|
|
1388
|
+
if not labelExists:
|
|
1389
|
+
yield Validation.warning(
|
|
1390
|
+
codes='EDINET.EC5700W.GFM.1.5.1',
|
|
1391
|
+
msg=_("The used concept of '%(concept)s' is missing a standard label in Japanese"),
|
|
1392
|
+
concept=concept.qname.localName,
|
|
1393
|
+
modelObject=concept
|
|
1394
|
+
)
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
@validation(
|
|
1398
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1399
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1400
|
+
)
|
|
1401
|
+
def rule_gfm_1_5_2(
|
|
1402
|
+
pluginData: PluginValidationDataExtension,
|
|
1403
|
+
val: ValidateXbrl,
|
|
1404
|
+
*args: Any,
|
|
1405
|
+
**kwargs: Any,
|
|
1406
|
+
) -> Iterable[Validation]:
|
|
1407
|
+
"""
|
|
1408
|
+
EDINET.EC5700W: [GFM 1.5.2] An element used in a fact or xbrldi:explicitMember in an instance must have at most one
|
|
1409
|
+
label for any combination of the xlink:role attribute and the xml:lang attribute in the
|
|
1410
|
+
DTS of that instance.
|
|
1411
|
+
"""
|
|
1412
|
+
usedConcepts = pluginData.getUsedConcepts(val.modelXbrl)
|
|
1413
|
+
labelRelationshipSet = val.modelXbrl.relationshipSet(XbrlConst.conceptLabel)
|
|
1414
|
+
if labelRelationshipSet is None:
|
|
1415
|
+
return
|
|
1416
|
+
for concept in usedConcepts:
|
|
1417
|
+
labelRels = labelRelationshipSet.fromModelObject(concept)
|
|
1418
|
+
labelsByRoleAndLang = defaultdict(list)
|
|
1419
|
+
for rel in labelRels:
|
|
1420
|
+
label = rel.toModelObject
|
|
1421
|
+
if label is None:
|
|
1422
|
+
continue
|
|
1423
|
+
labelsByRoleAndLang[(label.role, label.xmlLang)].append(label)
|
|
1424
|
+
warningLabels = []
|
|
1425
|
+
for key, labels in labelsByRoleAndLang.items():
|
|
1426
|
+
if len(labels) > 1:
|
|
1427
|
+
warningLabels.append(key)
|
|
1428
|
+
if len(warningLabels) > 0:
|
|
1429
|
+
yield Validation.warning(
|
|
1430
|
+
codes='EDINET.EC5700W.GFM.1.5.2',
|
|
1431
|
+
msg=_("The used concept of '%(concept)s' has more than one label for the given role/lang pairs: %(pairs)s."),
|
|
1432
|
+
concept=concept.qname.localName,
|
|
1433
|
+
pairs=warningLabels,
|
|
1434
|
+
modelObject=concept
|
|
1435
|
+
)
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
@validation(
|
|
1439
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1440
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1441
|
+
)
|
|
1442
|
+
def rule_gfm_1_5_3(
|
|
1443
|
+
pluginData: PluginValidationDataExtension,
|
|
1444
|
+
val: ValidateXbrl,
|
|
1445
|
+
*args: Any,
|
|
1446
|
+
**kwargs: Any,
|
|
1447
|
+
) -> Iterable[Validation]:
|
|
1448
|
+
"""
|
|
1449
|
+
EDINET.EC5700W: [GFM 1.5.3] If an element used in an instance is assigned a label in the DTS whose xml:lang
|
|
1450
|
+
attribute does not reflect the default language, then the DTS must also contain a
|
|
1451
|
+
link:label for the same element and all other attributes with an xml:lang attribute
|
|
1452
|
+
reflecting the default language.
|
|
1453
|
+
"""
|
|
1454
|
+
usedConcepts = pluginData.getUsedConcepts(val.modelXbrl)
|
|
1455
|
+
labelRelationshipSet = val.modelXbrl.relationshipSet(XbrlConst.conceptLabel)
|
|
1456
|
+
if labelRelationshipSet is None:
|
|
1457
|
+
return
|
|
1458
|
+
for concept in usedConcepts:
|
|
1459
|
+
labelRels = labelRelationshipSet.fromModelObject(concept)
|
|
1460
|
+
labelsByRole = defaultdict(list)
|
|
1461
|
+
for rel in labelRels:
|
|
1462
|
+
label = rel.toModelObject
|
|
1463
|
+
if label is None:
|
|
1464
|
+
continue
|
|
1465
|
+
labelsByRole[label.role].append(label)
|
|
1466
|
+
warningRoles = []
|
|
1467
|
+
for role, labels in labelsByRole.items():
|
|
1468
|
+
if len([label for label in labels if label.xmlLang in JAPAN_LANGUAGE_CODES]) == 0:
|
|
1469
|
+
warningRoles.append(role)
|
|
1470
|
+
if len(warningRoles) > 0:
|
|
1471
|
+
yield Validation.warning(
|
|
1472
|
+
codes='EDINET.EC5700W.GFM.1.5.3',
|
|
1473
|
+
msg=_("The used concept of '%(concept)s' is missing a label in Japanese in the following roles: %(roles)s."),
|
|
1474
|
+
concept=concept.qname.localName,
|
|
1475
|
+
roles=warningRoles,
|
|
1476
|
+
modelObject=concept
|
|
1477
|
+
)
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
@validation(
|
|
1481
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1482
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1483
|
+
)
|
|
1484
|
+
def rule_gfm_1_5_5(
|
|
1485
|
+
pluginData: PluginValidationDataExtension,
|
|
1486
|
+
val: ValidateXbrl,
|
|
1487
|
+
*args: Any,
|
|
1488
|
+
**kwargs: Any,
|
|
1489
|
+
) -> Iterable[Validation]:
|
|
1490
|
+
"""
|
|
1491
|
+
EDINET.EC5700W: [GFM 1.5.5] A label linkbase must not have a documentation label for an element defined in a
|
|
1492
|
+
standard taxonomy.
|
|
1493
|
+
"""
|
|
1494
|
+
labelRelationshipSet = val.modelXbrl.relationshipSet(XbrlConst.conceptLabel)
|
|
1495
|
+
if labelRelationshipSet is None:
|
|
1496
|
+
return
|
|
1497
|
+
for concept in val.modelXbrl.qnameConcepts.values():
|
|
1498
|
+
if concept.namespaceURI is not None and not pluginData.isStandardTaxonomyUrl(concept.namespaceURI, val.modelXbrl):
|
|
1499
|
+
continue
|
|
1500
|
+
labelRels = labelRelationshipSet.fromModelObject(concept)
|
|
1501
|
+
for rel in labelRels:
|
|
1502
|
+
label = rel.toModelObject
|
|
1503
|
+
if (label is not None and
|
|
1504
|
+
not pluginData.isStandardTaxonomyUrl(label.modelDocument.uri, val.modelXbrl) and
|
|
1505
|
+
label.role == XbrlConst.documentationLabel):
|
|
1506
|
+
yield Validation.warning(
|
|
1507
|
+
codes='EDINET.EC5700W.GFM.1.5.5',
|
|
1508
|
+
msg=_("The standard concept of '%(concept)s' must not have a documentation label defined."),
|
|
1509
|
+
concept=concept.qname.localName,
|
|
1510
|
+
modelObject=label
|
|
1511
|
+
)
|
|
1512
|
+
|
|
1513
|
+
|
|
1514
|
+
@validation(
|
|
1515
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1516
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1517
|
+
)
|
|
1518
|
+
def rule_gfm_1_5_6(
|
|
1519
|
+
pluginData: PluginValidationDataExtension,
|
|
1520
|
+
val: ValidateXbrl,
|
|
1521
|
+
*args: Any,
|
|
1522
|
+
**kwargs: Any,
|
|
1523
|
+
) -> Iterable[Validation]:
|
|
1524
|
+
"""
|
|
1525
|
+
EDINET.EC5700W: [GFM 1.5.6] The length of a label must be less than 511 characters unless its role is documentation.
|
|
1526
|
+
"""
|
|
1527
|
+
labelRelationshipSet = val.modelXbrl.relationshipSet(XbrlConst.conceptLabel)
|
|
1528
|
+
if labelRelationshipSet is None:
|
|
1529
|
+
return
|
|
1530
|
+
for concept in val.modelXbrl.qnameConcepts.values():
|
|
1531
|
+
labelRels = labelRelationshipSet.fromModelObject(concept)
|
|
1532
|
+
for rel in labelRels:
|
|
1533
|
+
label = rel.toModelObject
|
|
1534
|
+
if (label is not None and
|
|
1535
|
+
label.role != XbrlConst.documentationLabel and
|
|
1536
|
+
label.viewText() is not None and
|
|
1537
|
+
len(label.viewText()) >= 511):
|
|
1538
|
+
yield Validation.warning(
|
|
1539
|
+
codes='EDINET.EC5700W.GFM.1.5.6',
|
|
1540
|
+
msg=_("The concept of '%(concept)s' has a label classified as '%(role)s' that is greater than or equal to 511 characters: %(label)s"),
|
|
1541
|
+
concept=concept.qname,
|
|
1542
|
+
role=label.role,
|
|
1543
|
+
label=label.viewText(),
|
|
1544
|
+
modelObject=label
|
|
1545
|
+
)
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
@validation(
|
|
1549
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1550
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1551
|
+
)
|
|
1552
|
+
def rule_gfm_1_5_7(
|
|
1553
|
+
pluginData: PluginValidationDataExtension,
|
|
1554
|
+
val: ValidateXbrl,
|
|
1555
|
+
*args: Any,
|
|
1556
|
+
**kwargs: Any,
|
|
1557
|
+
) -> Iterable[Validation]:
|
|
1558
|
+
"""
|
|
1559
|
+
EDINET.EC5700W: [GFM 1.5.7] A label cannot contain the "<" character or consecutive white space characters including
|
|
1560
|
+
but not limited to: space, carriage return, line feed or tab.
|
|
1561
|
+
"""
|
|
1562
|
+
labelRelationshipSet = val.modelXbrl.relationshipSet(XbrlConst.conceptLabel)
|
|
1563
|
+
if labelRelationshipSet is None:
|
|
1564
|
+
return
|
|
1565
|
+
for concept in val.modelXbrl.qnameConcepts.values():
|
|
1566
|
+
labelRels = labelRelationshipSet.fromModelObject(concept)
|
|
1567
|
+
for rel in labelRels:
|
|
1568
|
+
label = rel.toModelObject
|
|
1569
|
+
if label is not None and label.role != XbrlConst.documentationLabel and label.textValue is not None:
|
|
1570
|
+
if '<' in label.textValue:
|
|
1571
|
+
yield Validation.warning(
|
|
1572
|
+
codes='EDINET.EC5700W.GFM.1.5.7',
|
|
1573
|
+
msg=_("The concept of '%(concept)s' has a label classified as '%(role)s that contains the '<' character: %(label)s"),
|
|
1574
|
+
concept=concept.qname,
|
|
1575
|
+
role=label.role,
|
|
1576
|
+
label=label.textValue,
|
|
1577
|
+
modelObject=label
|
|
1578
|
+
)
|
|
1579
|
+
elif DISALLOWED_LABEL_WHITE_SPACE_CHARACTERS.search(label.textValue):
|
|
1580
|
+
yield Validation.warning(
|
|
1581
|
+
codes='EDINET.EC5700W.GFM.1.5.7',
|
|
1582
|
+
msg=_("The concept of '%(concept)s' has a label classified as '%(role)s' that contains consecutive white space characters: %(label)s"),
|
|
1583
|
+
concept=concept.qname,
|
|
1584
|
+
role=label.role,
|
|
1585
|
+
label=label.textValue,
|
|
1586
|
+
modelObject=label
|
|
1587
|
+
)
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
@validation(
|
|
1591
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1592
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1593
|
+
)
|
|
1594
|
+
def rule_gfm_1_5_8(
|
|
1595
|
+
pluginData: PluginValidationDataExtension,
|
|
1596
|
+
val: ValidateXbrl,
|
|
1597
|
+
*args: Any,
|
|
1598
|
+
**kwargs: Any,
|
|
1599
|
+
) -> Iterable[Validation]:
|
|
1600
|
+
"""
|
|
1601
|
+
EDINET.EC5700W: [GFM 1.5.8] A label should not begin or end with a white space character
|
|
1602
|
+
"""
|
|
1603
|
+
labelRelationshipSet = val.modelXbrl.relationshipSet(XbrlConst.conceptLabel)
|
|
1604
|
+
if labelRelationshipSet is None:
|
|
1605
|
+
return
|
|
1606
|
+
for concept in val.modelXbrl.qnameConcepts.values():
|
|
1607
|
+
labelRels = labelRelationshipSet.fromModelObject(concept)
|
|
1608
|
+
for rel in labelRels:
|
|
1609
|
+
label = rel.toModelObject
|
|
1610
|
+
if label is not None and label.textValue is not None and label.textValue != label.textValue.strip():
|
|
1611
|
+
yield Validation.warning(
|
|
1612
|
+
codes='EDINET.EC5700W.GFM.1.5.8',
|
|
1613
|
+
msg=_("The concept of '%(concept)s' has a label that contains disallowed white space either at the begining or the end: '%(label)s'"),
|
|
1614
|
+
concept=concept.qname,
|
|
1615
|
+
label=label.textValue,
|
|
1616
|
+
modelObject=label
|
|
1617
|
+
)
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
@validation(
|
|
1621
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1622
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1623
|
+
)
|
|
1624
|
+
def rule_gfm_1_5_10(
|
|
1625
|
+
pluginData: PluginValidationDataExtension,
|
|
1626
|
+
val: ValidateXbrl,
|
|
1627
|
+
*args: Any,
|
|
1628
|
+
**kwargs: Any,
|
|
1629
|
+
) -> Iterable[Validation]:
|
|
1630
|
+
"""
|
|
1631
|
+
EDINET.EC5700W: [GFM 1.5.10] A non-numeric concept should not have a label with a numeric role
|
|
1632
|
+
"""
|
|
1633
|
+
labelRelationshipSet = val.modelXbrl.relationshipSet(XbrlConst.conceptLabel)
|
|
1634
|
+
if labelRelationshipSet is None:
|
|
1635
|
+
return
|
|
1636
|
+
for concept in val.modelXbrl.qnameConcepts.values():
|
|
1637
|
+
if concept.isNumeric:
|
|
1638
|
+
continue
|
|
1639
|
+
labelRels = labelRelationshipSet.fromModelObject(concept)
|
|
1640
|
+
for rel in labelRels:
|
|
1641
|
+
label = rel.toModelObject
|
|
1642
|
+
if (label is not None and
|
|
1643
|
+
not pluginData.isStandardTaxonomyUrl(label.modelDocument.uri, val.modelXbrl) and
|
|
1644
|
+
label.role in NUMERIC_LABEL_ROLES):
|
|
1645
|
+
yield Validation.warning(
|
|
1646
|
+
codes='EDINET.EC5700W.GFM.1.5.10',
|
|
1647
|
+
msg=_("The non-numeric concept of '%(concept)s' has a label with a numeric role of '%(labelrole)s'"),
|
|
1648
|
+
concept=concept.qname,
|
|
1649
|
+
labelrole=label.role,
|
|
1650
|
+
modelObject=label
|
|
1651
|
+
)
|
|
1652
|
+
|
|
1653
|
+
|
|
1654
|
+
@validation(
|
|
1655
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1656
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1657
|
+
)
|
|
1658
|
+
def rule_gfm_1_6_1(
|
|
1659
|
+
pluginData: PluginValidationDataExtension,
|
|
1660
|
+
val: ValidateXbrl,
|
|
1661
|
+
*args: Any,
|
|
1662
|
+
**kwargs: Any,
|
|
1663
|
+
) -> Iterable[Validation]:
|
|
1664
|
+
"""
|
|
1665
|
+
EDINET.EC5700W: [GFM 1.6.1] All presentation relationships must have an order attribute
|
|
1666
|
+
"""
|
|
1667
|
+
presentationRelationshipSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.PRESENTATION.getArcroles()))
|
|
1668
|
+
if presentationRelationshipSet is None:
|
|
1669
|
+
return
|
|
1670
|
+
for rel in presentationRelationshipSet.modelRelationships:
|
|
1671
|
+
if not rel.arcElement.get("order"):
|
|
1672
|
+
yield Validation.warning(
|
|
1673
|
+
codes='EDINET.EC5700W.GFM.1.6.1',
|
|
1674
|
+
msg=_("The presentation relationship is missing the order attribute"),
|
|
1675
|
+
modelObject=rel
|
|
1676
|
+
)
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
@validation(
|
|
1680
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1681
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1682
|
+
)
|
|
1683
|
+
def rule_gfm_1_6_2(
|
|
1684
|
+
pluginData: PluginValidationDataExtension,
|
|
1685
|
+
val: ValidateXbrl,
|
|
1686
|
+
*args: Any,
|
|
1687
|
+
**kwargs: Any,
|
|
1688
|
+
) -> Iterable[Validation]:
|
|
1689
|
+
"""
|
|
1690
|
+
EDINET.EC5700W: [GFM 1.6.2] Presentation relationships must have unique order attributes
|
|
1691
|
+
"""
|
|
1692
|
+
presentationRelationshipSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.PRESENTATION.getArcroles()))
|
|
1693
|
+
if presentationRelationshipSet is None:
|
|
1694
|
+
return
|
|
1695
|
+
for modelObject, rels in presentationRelationshipSet.fromModelObjects().items():
|
|
1696
|
+
if len(rels) <= 1:
|
|
1697
|
+
continue
|
|
1698
|
+
relsByOrder = defaultdict(list)
|
|
1699
|
+
for rel in rels:
|
|
1700
|
+
order = rel.arcElement.get("order")
|
|
1701
|
+
if order is not None:
|
|
1702
|
+
relsByOrder[(order, rel.linkrole)].append(rel)
|
|
1703
|
+
for key, orderRels in relsByOrder.items():
|
|
1704
|
+
if len(orderRels) > 1:
|
|
1705
|
+
yield Validation.warning(
|
|
1706
|
+
codes='EDINET.EC5700W.GFM.1.6.2',
|
|
1707
|
+
msg=_("The presentation relationships have the same order attribute: '%(order)s'"),
|
|
1708
|
+
order=key[0],
|
|
1709
|
+
modelObject=orderRels
|
|
1710
|
+
)
|
|
1711
|
+
|
|
1712
|
+
|
|
1713
|
+
@validation(
|
|
1714
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1715
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1716
|
+
)
|
|
1717
|
+
def rule_gfm_1_6_5(
|
|
1718
|
+
pluginData: PluginValidationDataExtension,
|
|
1719
|
+
val: ValidateXbrl,
|
|
1720
|
+
*args: Any,
|
|
1721
|
+
**kwargs: Any,
|
|
1722
|
+
) -> Iterable[Validation]:
|
|
1723
|
+
"""
|
|
1724
|
+
EDINET.EC5700W: [GFM 1.6.5] If an element used in an instance is the target in the instance DTS of more than one
|
|
1725
|
+
effective presentation arc in a base set with the same source element, then the
|
|
1726
|
+
presentation arcs must have distinct values of the preferredLabel attribute.
|
|
1727
|
+
"""
|
|
1728
|
+
presentationRelationshipSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.PRESENTATION.getArcroles()))
|
|
1729
|
+
if presentationRelationshipSet is None:
|
|
1730
|
+
return
|
|
1731
|
+
for modelObject, rels in presentationRelationshipSet.toModelObjects().items():
|
|
1732
|
+
if len(rels) <= 1:
|
|
1733
|
+
continue
|
|
1734
|
+
relsByFrom = defaultdict(list)
|
|
1735
|
+
for rel in rels:
|
|
1736
|
+
relsByFrom[(rel.fromModelObject, rel.preferredLabel, rel.linkrole)].append(rel)
|
|
1737
|
+
for key, fromRels in relsByFrom.items():
|
|
1738
|
+
if len(fromRels) > 1:
|
|
1739
|
+
yield Validation.warning(
|
|
1740
|
+
codes='EDINET.EC5700W.GFM.1.6.5',
|
|
1741
|
+
msg=_("The presentation relationships must have distinct values of the preferredLabel attribute "
|
|
1742
|
+
"when they have the same source and target elements"),
|
|
1743
|
+
modelObject=fromRels
|
|
1744
|
+
)
|
|
1745
|
+
|
|
1746
|
+
|
|
1747
|
+
@validation(
|
|
1748
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1749
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1750
|
+
)
|
|
1751
|
+
def rule_gfm_1_7_1(
|
|
1752
|
+
pluginData: PluginValidationDataExtension,
|
|
1753
|
+
val: ValidateXbrl,
|
|
1754
|
+
*args: Any,
|
|
1755
|
+
**kwargs: Any,
|
|
1756
|
+
) -> Iterable[Validation]:
|
|
1757
|
+
"""
|
|
1758
|
+
EDINET.EC5700W: [GFM 1.7.1] All calculation relationships must have an order attribute
|
|
1759
|
+
"""
|
|
1760
|
+
calculationRelationshipSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.CALCULATION.getArcroles()))
|
|
1761
|
+
if calculationRelationshipSet is None:
|
|
1762
|
+
return
|
|
1763
|
+
for rel in calculationRelationshipSet.modelRelationships:
|
|
1764
|
+
if not rel.arcElement.get("order"):
|
|
1765
|
+
yield Validation.warning(
|
|
1766
|
+
codes='EDINET.EC5700W.GFM.1.7.1',
|
|
1767
|
+
msg=_("The calculation relationship is missing the order attribute"),
|
|
1768
|
+
modelObject=rel
|
|
1769
|
+
)
|
|
1770
|
+
|
|
1771
|
+
|
|
1772
|
+
@validation(
|
|
1773
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1774
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1775
|
+
)
|
|
1776
|
+
def rule_gfm_1_7_2(
|
|
1777
|
+
pluginData: PluginValidationDataExtension,
|
|
1778
|
+
val: ValidateXbrl,
|
|
1779
|
+
*args: Any,
|
|
1780
|
+
**kwargs: Any,
|
|
1781
|
+
) -> Iterable[Validation]:
|
|
1782
|
+
"""
|
|
1783
|
+
EDINET.EC5700W: [GFM 1.7.2] All calculation relationships must have a weight of either 1 or -1
|
|
1784
|
+
"""
|
|
1785
|
+
calculationRelationshipSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.CALCULATION.getArcroles()))
|
|
1786
|
+
if calculationRelationshipSet is None:
|
|
1787
|
+
return
|
|
1788
|
+
for rel in calculationRelationshipSet.modelRelationships:
|
|
1789
|
+
if rel.weight not in [1, -1]:
|
|
1790
|
+
yield Validation.warning(
|
|
1791
|
+
codes='EDINET.EC5700W.GFM.1.7.2',
|
|
1792
|
+
msg=_("The calculation relationship must have a weight of 1 or -1, actual weight: '%(weight)s'"),
|
|
1793
|
+
weight=rel.weight,
|
|
1794
|
+
modelObject=rel
|
|
1795
|
+
)
|
|
1796
|
+
|
|
1797
|
+
|
|
1798
|
+
@validation(
|
|
1799
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1800
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1801
|
+
)
|
|
1802
|
+
def rule_gfm_1_7_3(
|
|
1803
|
+
pluginData: PluginValidationDataExtension,
|
|
1804
|
+
val: ValidateXbrl,
|
|
1805
|
+
*args: Any,
|
|
1806
|
+
**kwargs: Any,
|
|
1807
|
+
) -> Iterable[Validation]:
|
|
1808
|
+
"""
|
|
1809
|
+
EDINET.EC5700W: [GFM 1.7.3] The concepts participating in a calculation relationship must have the same period type
|
|
1810
|
+
"""
|
|
1811
|
+
calculationRelationshipSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.CALCULATION.getArcroles()))
|
|
1812
|
+
if calculationRelationshipSet is None:
|
|
1813
|
+
return
|
|
1814
|
+
for rel in calculationRelationshipSet.modelRelationships:
|
|
1815
|
+
fromConcept = rel.fromModelObject
|
|
1816
|
+
toConcept = rel.toModelObject
|
|
1817
|
+
if fromConcept is not None and toConcept is not None and fromConcept.periodType != toConcept.periodType:
|
|
1818
|
+
yield Validation.warning(
|
|
1819
|
+
codes='EDINET.EC5700W.GFM.1.7.3',
|
|
1820
|
+
msg=_("The concepts participating in a calculation relationship must have the same period types. "
|
|
1821
|
+
"The concept of '%(concept1)s' has a period type of '%(concept1PeriodType)s' and the concept "
|
|
1822
|
+
"of '%(concept2)s' has a period type of '%(concept2PeriodType)s'"),
|
|
1823
|
+
concept1=fromConcept.qname,
|
|
1824
|
+
concept1PeriodType=fromConcept.periodType,
|
|
1825
|
+
concept2=toConcept.qname,
|
|
1826
|
+
concept2PeriodType=toConcept.periodType,
|
|
1827
|
+
modelObject=rel
|
|
1828
|
+
)
|
|
1829
|
+
|
|
1830
|
+
|
|
1831
|
+
@validation(
|
|
1832
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1833
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1834
|
+
)
|
|
1835
|
+
def rule_gfm_1_7_5(
|
|
1836
|
+
pluginData: PluginValidationDataExtension,
|
|
1837
|
+
val: ValidateXbrl,
|
|
1838
|
+
*args: Any,
|
|
1839
|
+
**kwargs: Any,
|
|
1840
|
+
) -> Iterable[Validation]:
|
|
1841
|
+
"""
|
|
1842
|
+
EDINET.EC5700W: [GFM 1.7.5] The source and target of a calculation relationship must appear in either:
|
|
1843
|
+
1) a presentation relationship within each other
|
|
1844
|
+
2) two presentation relationships with any other elements that also share the same ELR.
|
|
1845
|
+
"""
|
|
1846
|
+
calculationRelationshipSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.CALCULATION.getArcroles()))
|
|
1847
|
+
if calculationRelationshipSet is None:
|
|
1848
|
+
return
|
|
1849
|
+
for rel in calculationRelationshipSet.modelRelationships:
|
|
1850
|
+
conceptsMissingRels = []
|
|
1851
|
+
concepts = []
|
|
1852
|
+
for concept in [rel.fromModelObject, rel.toModelObject]:
|
|
1853
|
+
if concept is not None:
|
|
1854
|
+
conceptFacts = val.modelXbrl.factsByQname.get(concept.qname, set())
|
|
1855
|
+
if len([fact for fact in conceptFacts if fact.xValid >= VALID and not fact.isNil]) > 0:
|
|
1856
|
+
concepts.append(concept)
|
|
1857
|
+
if len(concepts) > 0:
|
|
1858
|
+
presentationRelationshipSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.PRESENTATION.getArcroles()), rel.linkrole)
|
|
1859
|
+
if presentationRelationshipSet is None:
|
|
1860
|
+
conceptsMissingRels.extend(concepts)
|
|
1861
|
+
else:
|
|
1862
|
+
for concept in concepts:
|
|
1863
|
+
if (len(presentationRelationshipSet.fromModelObject(concept)) == 0 and
|
|
1864
|
+
len(presentationRelationshipSet.toModelObject(concept)) == 0):
|
|
1865
|
+
conceptsMissingRels.append(concept)
|
|
1866
|
+
if len(conceptsMissingRels) > 0:
|
|
1867
|
+
yield Validation.warning(
|
|
1868
|
+
codes='EDINET.EC5700W.GFM.1.7.5',
|
|
1869
|
+
msg=_("The concepts participating in a calculation relationship must also participate in a presentation "
|
|
1870
|
+
"relationship within the same extended link role. The concept(s) of '%(concepts)s' "
|
|
1871
|
+
"do not appear in a presentation relationship within the extended link role of '%(elr)s'."),
|
|
1872
|
+
concepts=' and '.join([concept.qname.localName for concept in conceptsMissingRels]),
|
|
1873
|
+
elr=rel.linkrole,
|
|
1874
|
+
modelObject=rel
|
|
1875
|
+
)
|
|
1876
|
+
|
|
1877
|
+
|
|
1878
|
+
@validation(
|
|
1879
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1880
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1881
|
+
)
|
|
1882
|
+
def rule_gfm_1_7_6(
|
|
1883
|
+
pluginData: PluginValidationDataExtension,
|
|
1884
|
+
val: ValidateXbrl,
|
|
1885
|
+
*args: Any,
|
|
1886
|
+
**kwargs: Any,
|
|
1887
|
+
) -> Iterable[Validation]:
|
|
1888
|
+
"""
|
|
1889
|
+
EDINET.EC5700W: [GFM 1.7.6] Calculation relationships must have unique order attributes
|
|
1890
|
+
"""
|
|
1891
|
+
calculationRelationshipSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.CALCULATION.getArcroles()))
|
|
1892
|
+
if calculationRelationshipSet is None:
|
|
1893
|
+
return
|
|
1894
|
+
for modelObject, rels in calculationRelationshipSet.fromModelObjects().items():
|
|
1895
|
+
if len(rels) <= 1:
|
|
1896
|
+
continue
|
|
1897
|
+
relsByOrder = defaultdict(list)
|
|
1898
|
+
for rel in rels:
|
|
1899
|
+
order = rel.arcElement.get("order")
|
|
1900
|
+
if order is not None:
|
|
1901
|
+
relsByOrder[(order, rel.linkrole)].append(rel)
|
|
1902
|
+
for key, orderRels in relsByOrder.items():
|
|
1903
|
+
if len(orderRels) > 1:
|
|
1904
|
+
yield Validation.warning(
|
|
1905
|
+
codes='EDINET.EC5700W.GFM.1.7.6',
|
|
1906
|
+
msg=_("The calculation relationships have the same order attribute: '%(order)s'"),
|
|
1907
|
+
order=key[0],
|
|
1908
|
+
modelObject=orderRels
|
|
1909
|
+
)
|
|
1910
|
+
|
|
1911
|
+
|
|
1912
|
+
@validation(
|
|
1913
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1914
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1915
|
+
)
|
|
1916
|
+
def rule_gfm_1_8_1(
|
|
1917
|
+
pluginData: PluginValidationDataExtension,
|
|
1918
|
+
val: ValidateXbrl,
|
|
1919
|
+
*args: Any,
|
|
1920
|
+
**kwargs: Any,
|
|
1921
|
+
) -> Iterable[Validation]:
|
|
1922
|
+
"""
|
|
1923
|
+
EDINET.EC5700W: [GFM 1.8.1] All definition relationships must have an order attribute
|
|
1924
|
+
"""
|
|
1925
|
+
definitionRelationshipSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.DEFINITION.getArcroles()))
|
|
1926
|
+
if definitionRelationshipSet is None:
|
|
1927
|
+
return
|
|
1928
|
+
for rel in definitionRelationshipSet.modelRelationships:
|
|
1929
|
+
if not rel.arcElement.get("order"):
|
|
1930
|
+
yield Validation.warning(
|
|
1931
|
+
codes='EDINET.EC5700W.GFM.1.8.1',
|
|
1932
|
+
msg=_("The definition relationship is missing the order attribute"),
|
|
1933
|
+
modelObject=rel
|
|
1934
|
+
)
|
|
1935
|
+
|
|
1936
|
+
|
|
1937
|
+
@validation(
|
|
1938
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1939
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1940
|
+
)
|
|
1941
|
+
def rule_gfm_1_8_3(
|
|
1942
|
+
pluginData: PluginValidationDataExtension,
|
|
1943
|
+
val: ValidateXbrl,
|
|
1944
|
+
*args: Any,
|
|
1945
|
+
**kwargs: Any,
|
|
1946
|
+
) -> Iterable[Validation]:
|
|
1947
|
+
"""
|
|
1948
|
+
EDINET.EC5700W: [GFM 1.8.3] The target of an effective arc with an xlink:arcrole attribute equal to
|
|
1949
|
+
"http://xbrl.org/int/dim/arcrole/dimension-domain" or
|
|
1950
|
+
"http://xbrl.org/int/arcrole/dimension-default" must be of type
|
|
1951
|
+
nonnum:domainItemType.
|
|
1952
|
+
"""
|
|
1953
|
+
dimensionRelationshipSet = val.modelXbrl.relationshipSet((XbrlConst.dimensionDomain, XbrlConst.dimensionDefault))
|
|
1954
|
+
if dimensionRelationshipSet is None:
|
|
1955
|
+
return
|
|
1956
|
+
for rel in dimensionRelationshipSet.modelRelationships:
|
|
1957
|
+
toConcept = rel.toModelObject
|
|
1958
|
+
if toConcept is not None and toConcept.typeQname != domainItemTypeQname:
|
|
1959
|
+
yield Validation.warning(
|
|
1960
|
+
codes='EDINET.EC5700W.GFM.1.8.3',
|
|
1961
|
+
msg=_("The definition relationship target concept of '%(concept)s' has a type of '%(type)s' instead of 'nonnum:domainItemType'."),
|
|
1962
|
+
concept=toConcept.qname,
|
|
1963
|
+
type=toConcept.typeQname,
|
|
1964
|
+
modelObject=rel
|
|
1965
|
+
)
|
|
1966
|
+
|
|
1967
|
+
|
|
1968
|
+
@validation(
|
|
1969
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1970
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
1971
|
+
)
|
|
1972
|
+
def rule_gfm_1_8_5(
|
|
1973
|
+
pluginData: PluginValidationDataExtension,
|
|
1974
|
+
val: ValidateXbrl,
|
|
1975
|
+
*args: Any,
|
|
1976
|
+
**kwargs: Any,
|
|
1977
|
+
) -> Iterable[Validation]:
|
|
1978
|
+
"""
|
|
1979
|
+
EDINET.EC5700W: [GFM 1.8.5] Each ELR can have at most one effective arc with the role of http://xbrl.org/int/dim/arcrole/all.
|
|
1980
|
+
"""
|
|
1981
|
+
dimensionAllRelationshipSet = val.modelXbrl.relationshipSet(XbrlConst.all)
|
|
1982
|
+
if dimensionAllRelationshipSet is None:
|
|
1983
|
+
return
|
|
1984
|
+
relsByLinkrole = defaultdict(list)
|
|
1985
|
+
for rel in dimensionAllRelationshipSet.modelRelationships:
|
|
1986
|
+
relsByLinkrole[rel.linkrole].append(rel)
|
|
1987
|
+
for linkrole, rels in relsByLinkrole.items():
|
|
1988
|
+
if len(rels) > 1:
|
|
1989
|
+
yield Validation.warning(
|
|
1990
|
+
codes='EDINET.EC5700W.GFM.1.8.5',
|
|
1991
|
+
msg=_("The extended link role of '%(elr)s' has more than one effective arc with the role of 'http://xbrl.org/int/dim/arcrole/all'"),
|
|
1992
|
+
elr=linkrole,
|
|
1993
|
+
modelObject=rels
|
|
1994
|
+
)
|
|
1995
|
+
|
|
1996
|
+
|
|
1997
|
+
@validation(
|
|
1998
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
1999
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
2000
|
+
)
|
|
2001
|
+
def rule_gfm_1_8_10(
|
|
2002
|
+
pluginData: PluginValidationDataExtension,
|
|
2003
|
+
val: ValidateXbrl,
|
|
2004
|
+
*args: Any,
|
|
2005
|
+
**kwargs: Any,
|
|
2006
|
+
) -> Iterable[Validation]:
|
|
2007
|
+
"""
|
|
2008
|
+
EDINET.EC5700W: [GFM 1.8.10] Definition relationships must have unique order attributes
|
|
2009
|
+
"""
|
|
2010
|
+
definitionRelationshipSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.DEFINITION.getArcroles()))
|
|
2011
|
+
if definitionRelationshipSet is None:
|
|
2012
|
+
return
|
|
2013
|
+
for modelObject, rels in definitionRelationshipSet.loadModelRelationshipsFrom().items():
|
|
2014
|
+
if len(rels) <= 1:
|
|
2015
|
+
continue
|
|
2016
|
+
relsByOrder = defaultdict(list)
|
|
2017
|
+
for rel in rels:
|
|
2018
|
+
order = rel.arcElement.get("order")
|
|
2019
|
+
if order is not None:
|
|
2020
|
+
relsByOrder[(order, rel.linkrole, rel.arcrole)].append(rel)
|
|
2021
|
+
for key, orderRels in relsByOrder.items():
|
|
2022
|
+
if len(orderRels) > 1:
|
|
2023
|
+
yield Validation.warning(
|
|
2024
|
+
codes='EDINET.EC5700W.GFM.1.8.10',
|
|
2025
|
+
msg=_("The definition relationships have the same order attribute: '%(order)s'"),
|
|
2026
|
+
order=key[0],
|
|
2027
|
+
modelObject=orderRels
|
|
2028
|
+
)
|
|
2029
|
+
|
|
2030
|
+
|
|
2031
|
+
@validation(
|
|
2032
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
2033
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
2034
|
+
)
|
|
2035
|
+
def rule_gfm_1_8_11(
|
|
2036
|
+
pluginData: PluginValidationDataExtension,
|
|
2037
|
+
val: ValidateXbrl,
|
|
2038
|
+
*args: Any,
|
|
2039
|
+
**kwargs: Any,
|
|
2040
|
+
) -> Iterable[Validation]:
|
|
2041
|
+
"""
|
|
2042
|
+
EDINET.EC5700W: [GFM 1.8.11] Definition relationships can not have the xbrldt:usable attribute set to False
|
|
2043
|
+
"""
|
|
2044
|
+
definitionRelationshipSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.DEFINITION.getArcroles()))
|
|
2045
|
+
if definitionRelationshipSet is None:
|
|
2046
|
+
return
|
|
2047
|
+
for rel in definitionRelationshipSet.modelRelationships:
|
|
2048
|
+
if rel.arcrole in [XbrlConst.dimensionDomain, XbrlConst.domainMember]:
|
|
2049
|
+
continue
|
|
2050
|
+
if not rel.isUsable:
|
|
2051
|
+
yield Validation.warning(
|
|
2052
|
+
codes='EDINET.EC5700W.GFM.1.8.11',
|
|
2053
|
+
msg=_("The definition relationship can not have the xbrldt:usable attribute set to False"),
|
|
2054
|
+
modelObject=rel
|
|
2055
|
+
)
|
|
2056
|
+
|
|
2057
|
+
|
|
2058
|
+
@validation(
|
|
2059
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
2060
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
2061
|
+
)
|
|
2062
|
+
def rule_gfm_1_9_1(
|
|
2063
|
+
pluginData: PluginValidationDataExtension,
|
|
2064
|
+
val: ValidateXbrl,
|
|
2065
|
+
*args: Any,
|
|
2066
|
+
**kwargs: Any,
|
|
2067
|
+
) -> Iterable[Validation]:
|
|
2068
|
+
"""
|
|
2069
|
+
EDINET.EC5700W: [GFM 1.9.1] References should not be defined for extension concepts.
|
|
2070
|
+
"""
|
|
2071
|
+
conceptReferenceSet = val.modelXbrl.relationshipSet(XbrlConst.conceptReference)
|
|
2072
|
+
for modelConcept in conceptReferenceSet.fromModelObjects():
|
|
2073
|
+
if not isinstance(modelConcept, ModelConcept):
|
|
2074
|
+
continue
|
|
2075
|
+
if modelConcept.qname is None or modelConcept.qname.namespaceURI is None:
|
|
2076
|
+
continue
|
|
2077
|
+
if pluginData.isExtensionUri(modelConcept.document.uri, val.modelXbrl):
|
|
2078
|
+
yield Validation.warning(
|
|
2079
|
+
codes='EDINET.EC5700W.GFM.1.9.1',
|
|
2080
|
+
msg=_("References should not be defined for extension concepts: %(conceptName)s"),
|
|
2081
|
+
conceptName=modelConcept.qname,
|
|
2082
|
+
modelObject=modelConcept
|
|
2083
|
+
)
|
|
2084
|
+
|
|
2085
|
+
|
|
2086
|
+
@validation(
|
|
2087
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
2088
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
2089
|
+
)
|
|
2090
|
+
def rule_gfm_1_10_3(
|
|
2091
|
+
pluginData: PluginValidationDataExtension,
|
|
2092
|
+
val: ValidateXbrl,
|
|
2093
|
+
*args: Any,
|
|
2094
|
+
**kwargs: Any,
|
|
2095
|
+
) -> Iterable[Validation]:
|
|
2096
|
+
"""
|
|
2097
|
+
EDINET.EC5700W: [GFM 1.10.3] The Inline XBRL document must contain all necessary namespace declarations including
|
|
2098
|
+
those for QName values of attributes. These namespace declarations must be on the root html element.
|
|
2099
|
+
"""
|
|
2100
|
+
for ixdsHtmlRootElt in val.modelXbrl.ixdsHtmlElements:
|
|
2101
|
+
for elt in ixdsHtmlRootElt.iterdescendants():
|
|
2102
|
+
if not isinstance(elt, ModelObject):
|
|
2103
|
+
continue
|
|
2104
|
+
parent = elt.getparent()
|
|
2105
|
+
if parent is None or elt.nsmap == parent.nsmap:
|
|
2106
|
+
continue
|
|
2107
|
+
yield Validation.warning(
|
|
2108
|
+
codes='EDINET.EC5700W.GFM.1.10.3',
|
|
2109
|
+
msg=_('The Inline XBRL document must contain all necessary namespace declarations on the root html '
|
|
2110
|
+
'element. Found namespace declaration on descendant element %(elementName)s.'),
|
|
2111
|
+
elementName=elt.tag,
|
|
2112
|
+
modelObject=elt
|
|
2113
|
+
)
|
|
2114
|
+
|
|
2115
|
+
|
|
2116
|
+
@validation(
|
|
2117
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
2118
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
2119
|
+
)
|
|
2120
|
+
def rule_charsets(
|
|
2121
|
+
pluginData: PluginValidationDataExtension,
|
|
2122
|
+
val: ValidateXbrl,
|
|
2123
|
+
*args: Any,
|
|
2124
|
+
**kwargs: Any,
|
|
2125
|
+
) -> Iterable[Validation]:
|
|
2126
|
+
"""
|
|
2127
|
+
EDINET.EC1010E: The charset specification in the content attribute of the HTML <meta> tag must be UTF-8.
|
|
2128
|
+
EDINET.EC5000E: The encoding of the file must be UTF-8.
|
|
2129
|
+
EDINET.EC5003E: Prohibited characters must not be used.
|
|
2130
|
+
EDINET.EC5700W: [GFM 1.10.4] The document encoding must be set in both the XML document declaration and the HTML
|
|
2131
|
+
meta element for content type.
|
|
2132
|
+
"""
|
|
2133
|
+
for modelDocument in val.modelXbrl.urlDocs.values():
|
|
2134
|
+
if pluginData.isStandardTaxonomyUrl(modelDocument.uri, val.modelXbrl):
|
|
2135
|
+
continue
|
|
2136
|
+
|
|
2137
|
+
if modelDocument.type != ModelDocument.Type.INLINEXBRLDOCUMENTSET:
|
|
2138
|
+
if modelDocument.documentEncoding is None or modelDocument.documentEncoding.lower() not in ('utf-8', 'utf-8-sig'):
|
|
2139
|
+
yield Validation.error(
|
|
2140
|
+
codes='EDINET.EC5000E',
|
|
2141
|
+
msg=_("The encoding is not UTF-8. "
|
|
2142
|
+
"File name: '%(path)s'. "
|
|
2143
|
+
"Please change the encoding of the relevant file to UTF-8."),
|
|
2144
|
+
path=modelDocument.uri,
|
|
2145
|
+
modelObject=modelDocument,
|
|
2146
|
+
)
|
|
2147
|
+
|
|
2148
|
+
# TODO: Consolidate wtih NL.FR-NL-1.02
|
|
2149
|
+
for elt in modelDocument.xmlRootElement.iter():
|
|
2150
|
+
if isinstance(elt, ModelComment):
|
|
2151
|
+
texts = [getattr(elt, 'text')]
|
|
2152
|
+
else:
|
|
2153
|
+
texts = [elt.elementAttributesStr, elt.textValue]
|
|
2154
|
+
illegalChars: set[str] = set()
|
|
2155
|
+
for text in texts:
|
|
2156
|
+
illegalChars.update(HALF_KANA.intersection(set(text)))
|
|
2157
|
+
if len(illegalChars) > 0:
|
|
2158
|
+
yield Validation.error(
|
|
2159
|
+
codes='EDINET.EC5003E',
|
|
2160
|
+
msg=_("Prohibited characters (%(chars)s) are used. "
|
|
2161
|
+
"File name: '%(file)s' (line %(line)s). "
|
|
2162
|
+
"The file in question contains prohibited characters. "
|
|
2163
|
+
"Please correct the prohibited characters. "),
|
|
2164
|
+
chars=', '.join(sorted(illegalChars)),
|
|
2165
|
+
file=modelDocument.basename,
|
|
2166
|
+
line=elt.sourceline,
|
|
2167
|
+
modelObject=elt,
|
|
2168
|
+
)
|
|
2169
|
+
|
|
2170
|
+
if modelDocument.type != ModelDocument.Type.INLINEXBRL:
|
|
2171
|
+
continue
|
|
2172
|
+
|
|
2173
|
+
xmlDeclaredEncoding = None
|
|
2174
|
+
try:
|
|
2175
|
+
with val.modelXbrl.fileSource.file(modelDocument.filepath)[0] as f:
|
|
2176
|
+
fileContent = cast(str, f.read(512))
|
|
2177
|
+
match = XmlUtil.xmlEncodingPattern.match(fileContent)
|
|
2178
|
+
if match:
|
|
2179
|
+
xmlDeclaredEncoding = match.group(1)
|
|
2180
|
+
except Exception:
|
|
2181
|
+
pass
|
|
2182
|
+
|
|
2183
|
+
if xmlDeclaredEncoding is None:
|
|
2184
|
+
yield Validation.warning(
|
|
2185
|
+
codes='EDINET.EC5700W.GFM.1.10.4',
|
|
2186
|
+
msg=_("The document encoding must be declared in an XML document declaration"),
|
|
2187
|
+
modelObject=modelDocument
|
|
2188
|
+
)
|
|
2189
|
+
|
|
2190
|
+
metaCharsetDeclared = False
|
|
2191
|
+
for metaElt in modelDocument.xmlRootElement.iterdescendants(tag=XbrlConst.qnXhtmlMeta.clarkNotation):
|
|
2192
|
+
metaCharset = None
|
|
2193
|
+
httpEquiv = metaElt.get("http-equiv", "").lower()
|
|
2194
|
+
if httpEquiv == "content-type":
|
|
2195
|
+
content = metaElt.get("content")
|
|
2196
|
+
if content:
|
|
2197
|
+
metaCharset = attrValue(content)
|
|
2198
|
+
if metaCharset is not None:
|
|
2199
|
+
metaCharsetDeclared = True
|
|
2200
|
+
if xmlDeclaredEncoding is not None and metaCharset.lower() != xmlDeclaredEncoding.lower():
|
|
2201
|
+
yield Validation.warning(
|
|
2202
|
+
codes='EDINET.EC5700W.GFM.1.10.4',
|
|
2203
|
+
msg=_("The XML declaration encoding '%(xmlEncoding)s' does not match the HTML meta charset '%(metaCharset)s'"),
|
|
2204
|
+
xmlEncoding=xmlDeclaredEncoding,
|
|
2205
|
+
metaCharset=metaCharset,
|
|
2206
|
+
modelObject=metaElt
|
|
2207
|
+
)
|
|
2208
|
+
if metaCharset.lower() != 'utf-8':
|
|
2209
|
+
yield Validation.error(
|
|
2210
|
+
codes='EDINET.EC1010E',
|
|
2211
|
+
msg=_("The charset specification in the content attribute of the HTML <meta> tag is not UTF-8. "
|
|
2212
|
+
"File name: '%(path)s'. "
|
|
2213
|
+
"Please set the character code of the file to UTF-8."),
|
|
2214
|
+
path=modelDocument.uri,
|
|
2215
|
+
modelObject=metaElt,
|
|
2216
|
+
)
|
|
2217
|
+
|
|
2218
|
+
if not metaCharsetDeclared:
|
|
2219
|
+
yield Validation.warning(
|
|
2220
|
+
codes='EDINET.EC5700W.GFM.1.10.4',
|
|
2221
|
+
msg=_("The document encoding must be declared in an HTML meta element charset"),
|
|
2222
|
+
modelObject=modelDocument
|
|
2223
|
+
)
|
|
2224
|
+
|
|
2225
|
+
|
|
2226
|
+
@validation(
|
|
2227
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
2228
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
2229
|
+
)
|
|
2230
|
+
def rule_gfm_1_10_12(
|
|
2231
|
+
pluginData: PluginValidationDataExtension,
|
|
2232
|
+
val: ValidateXbrl,
|
|
2233
|
+
*args: Any,
|
|
2234
|
+
**kwargs: Any,
|
|
2235
|
+
) -> Iterable[Validation]:
|
|
2236
|
+
"""
|
|
2237
|
+
EDINET.EC5700W: [GFM 1.10.12] In all inline XBRL files, multiple target attribute values are not allowed.
|
|
2238
|
+
Correct the target attribute value. (A warning will be issued if the target attribute is not specified and is
|
|
2239
|
+
specified at the same time.)
|
|
2240
|
+
"""
|
|
2241
|
+
targets: set[str | None] = set()
|
|
2242
|
+
for ixdsHtmlRootElt in val.modelXbrl.ixdsHtmlElements:
|
|
2243
|
+
targetEltTags = [qname.clarkNotation for qname in XbrlConst.ixbrlAllTargetElements]
|
|
2244
|
+
for elt in ixdsHtmlRootElt.iter(targetEltTags):
|
|
2245
|
+
targets.add(elt.get("target"))
|
|
2246
|
+
if len(targets) > 1:
|
|
2247
|
+
if None in targets:
|
|
2248
|
+
msg = _("Inline document set may not use multiple target documents. Found targets: default, %(targets)s")
|
|
2249
|
+
else:
|
|
2250
|
+
msg = _("Inline document set may not use multiple target documents. Found targets: %(targets)s")
|
|
2251
|
+
yield Validation.warning(
|
|
2252
|
+
codes='EDINET.EC5700W.GFM.1.10.12',
|
|
2253
|
+
msg=msg,
|
|
2254
|
+
targets=",".join(target for target in targets if target is not None),
|
|
2255
|
+
modelObject=val.modelXbrl,
|
|
2256
|
+
)
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
@validation(
|
|
2260
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
2261
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
2262
|
+
)
|
|
2263
|
+
def rule_gfm_1_10_14(
|
|
2264
|
+
pluginData: PluginValidationDataExtension,
|
|
2265
|
+
val: ValidateXbrl,
|
|
2266
|
+
*args: Any,
|
|
2267
|
+
**kwargs: Any,
|
|
2268
|
+
) -> Iterable[Validation]:
|
|
2269
|
+
"""
|
|
2270
|
+
EDINET.EC5700W: [GFM 1.10.14] All non-empty footnotes must be referenced by an element
|
|
2271
|
+
"""
|
|
2272
|
+
footnotes = set()
|
|
2273
|
+
usedFootnoteIDs = set()
|
|
2274
|
+
for ixdsHtmlRootElt in val.modelXbrl.ixdsHtmlElements:
|
|
2275
|
+
for elt in ixdsHtmlRootElt.iterdescendants(XbrlConst.qnIXbrlFootnote.clarkNotation, XbrlConst.qnIXbrl11Footnote.clarkNotation):
|
|
2276
|
+
if isinstance(elt, ModelInlineFootnote) and elt.value != '':
|
|
2277
|
+
footnotes.add(elt)
|
|
2278
|
+
for rel in val.modelXbrl.relationshipSet("XBRL-footnotes").modelRelationships:
|
|
2279
|
+
if rel.fromModelObject is not None and rel.toModelObject is not None:
|
|
2280
|
+
usedFootnoteIDs.add(rel.toModelObject.footnoteID)
|
|
2281
|
+
for footnote in footnotes:
|
|
2282
|
+
if footnote.footnoteID not in usedFootnoteIDs:
|
|
2283
|
+
yield Validation.warning(
|
|
2284
|
+
codes='EDINET.EC5700W.GFM.1.10.14',
|
|
2285
|
+
msg=_("A non-empty footnote is not referenced by an element"),
|
|
2286
|
+
modelObject=footnote
|
|
2287
|
+
)
|
|
2288
|
+
|
|
2289
|
+
|
|
2290
|
+
@validation(
|
|
2291
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
2292
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
2293
|
+
)
|
|
2294
|
+
def rule_gfm_2_3_5(
|
|
2295
|
+
pluginData: PluginValidationDataExtension,
|
|
2296
|
+
val: ValidateXbrl,
|
|
2297
|
+
*args: Any,
|
|
2298
|
+
**kwargs: Any,
|
|
2299
|
+
) -> Iterable[Validation]:
|
|
2300
|
+
"""
|
|
2301
|
+
EDINET.EC5700W: [GFM 2.3.5] The name attribute of an xsd:element should consist of
|
|
2302
|
+
capitalized words corresponding to the standard label, a convention called Label
|
|
2303
|
+
Camel Case Concatenation (LC3).
|
|
2304
|
+
1. The first character of a name attribute must not be underscore.
|
|
2305
|
+
2. The first character of a name attribute must be capitalized.
|
|
2306
|
+
3. The following characters are not allowed in a name attribute:
|
|
2307
|
+
()*+[]?\\/^{}|@#%^=~`“‘;:,<>&$₤€
|
|
2308
|
+
4. Do not use digits in the name attribute unless the element is
|
|
2309
|
+
being declared specifically because it must identify a regulation
|
|
2310
|
+
known by a number (“12b-1 Fees”, “FAS 132”). Always begin the name
|
|
2311
|
+
with a letter (e.g., “Rule12b1Fees”) and conform to LC3 (e.g., “Fas132”).
|
|
2312
|
+
5. Convert acronyms to Proper case (e.g., FAS becomes Fas, FHLC becomes
|
|
2313
|
+
Fhlc). Treat digits in an acronym as word separators (e.g., WIN2K becomes Win2K).
|
|
2314
|
+
|
|
2315
|
+
Note: "corresponding to the standard label" is not enforceable, this implementation
|
|
2316
|
+
only checks the LC3 formatting rules. Similarly, rule 4 and 5 are not enforced here.
|
|
2317
|
+
"""
|
|
2318
|
+
for name, concepts in val.modelXbrl.nameConcepts.items():
|
|
2319
|
+
for concept in concepts:
|
|
2320
|
+
if pluginData.isStandardTaxonomyUrl(concept.modelDocument.uri, val.modelXbrl):
|
|
2321
|
+
continue
|
|
2322
|
+
if not LC3_NAME_PATTERN.fullmatch(name):
|
|
2323
|
+
yield Validation.warning(
|
|
2324
|
+
codes='EDINET.EC5700W.GFM.2.3.5',
|
|
2325
|
+
msg=_("Element names should be set using capitalized words "
|
|
2326
|
+
"(LC3 conversion rules) that correspond to standard labels."),
|
|
2327
|
+
modelObject=concept
|
|
2328
|
+
)
|
|
2329
|
+
|
|
2330
|
+
|
|
2331
|
+
@validation(
|
|
2332
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
2333
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
2334
|
+
)
|
|
2335
|
+
def rule_gfm_2_5_1(
|
|
2336
|
+
pluginData: PluginValidationDataExtension,
|
|
2337
|
+
val: ValidateXbrl,
|
|
2338
|
+
*args: Any,
|
|
2339
|
+
**kwargs: Any,
|
|
2340
|
+
) -> Iterable[Validation]:
|
|
2341
|
+
"""
|
|
2342
|
+
EDINET.EC5700W: [GFM 2.5.1] A presentation linkbase of a standard taxonomy should not be included in the DTS of an instance.
|
|
2343
|
+
"""
|
|
2344
|
+
for elt in pluginData.getStandardTaxonomyExtensionLinks(LinkbaseType.PRESENTATION, val.modelXbrl):
|
|
2345
|
+
yield Validation.warning(
|
|
2346
|
+
codes='EDINET.EC5700W.GFM.2.5.1',
|
|
2347
|
+
msg=_("A presentation linkbase from the standard taxonomy file of '%(uri)s' is not allowed."),
|
|
2348
|
+
uri=elt.attr(XbrlConst.qnXlinkHref.clarkNotation),
|
|
2349
|
+
modelObject=elt
|
|
2350
|
+
)
|
|
2351
|
+
|
|
2352
|
+
|
|
2353
|
+
@validation(
|
|
2354
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
2355
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
2356
|
+
)
|
|
2357
|
+
def rule_gfm_2_6_1(
|
|
2358
|
+
pluginData: PluginValidationDataExtension,
|
|
2359
|
+
val: ValidateXbrl,
|
|
2360
|
+
*args: Any,
|
|
2361
|
+
**kwargs: Any,
|
|
2362
|
+
) -> Iterable[Validation]:
|
|
2363
|
+
"""
|
|
2364
|
+
EDINET.EC5700W: [GFM 2.6.1] A calculation linkbase of a standard taxonomy should not be included in the DTS of an instance.
|
|
2365
|
+
"""
|
|
2366
|
+
for elt in pluginData.getStandardTaxonomyExtensionLinks(LinkbaseType.CALCULATION, val.modelXbrl):
|
|
2367
|
+
yield Validation.warning(
|
|
2368
|
+
codes='EDINET.EC5700W.GFM.2.6.1',
|
|
2369
|
+
msg=_("A calculation linkbase from the standard taxonomy file of '%(uri)s' is not allowed."),
|
|
2370
|
+
uri=elt.attr(XbrlConst.qnXlinkHref.clarkNotation),
|
|
2371
|
+
modelObject=elt
|
|
2372
|
+
)
|
|
2373
|
+
|
|
2374
|
+
|
|
2375
|
+
@validation(
|
|
2376
|
+
hook=ValidationHook.XBRL_FINALLY,
|
|
2377
|
+
disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
|
|
2378
|
+
)
|
|
2379
|
+
def rule_gfm_2_8_1(
|
|
2380
|
+
pluginData: PluginValidationDataExtension,
|
|
2381
|
+
val: ValidateXbrl,
|
|
2382
|
+
*args: Any,
|
|
2383
|
+
**kwargs: Any,
|
|
2384
|
+
) -> Iterable[Validation]:
|
|
2385
|
+
"""
|
|
2386
|
+
EDINET.EC5700W: [GFM 2.8.1] A reference linkbase of a standard taxonomy should not be included in the DTS of an instance.
|
|
2387
|
+
"""
|
|
2388
|
+
for elt in pluginData.getStandardTaxonomyExtensionLinks(LinkbaseType.REFERENCE, val.modelXbrl):
|
|
2389
|
+
yield Validation.warning(
|
|
2390
|
+
codes='EDINET.EC5700W.GFM.2.8.1',
|
|
2391
|
+
msg=_("A reference linkbase from the standard taxonomy file of '%(uri)s' is not allowed."),
|
|
2392
|
+
uri=elt.attr(XbrlConst.qnXlinkHref.clarkNotation),
|
|
2393
|
+
modelObject=elt
|
|
2394
|
+
)
|