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
arelle/ModelRenderingObject.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
See COPYRIGHT.md for copyright information.
|
|
3
3
|
'''
|
|
4
4
|
import inspect, os
|
|
5
|
+
from collections import defaultdict, OrderedDict
|
|
5
6
|
from arelle import XmlUtil, XbrlConst, Locale
|
|
6
7
|
from arelle.formula import XPathContext, XPathParser
|
|
7
8
|
from arelle.ModelDtsObject import ModelResource
|
|
@@ -9,228 +10,295 @@ from arelle.ModelInstanceObject import ModelDimensionValue
|
|
|
9
10
|
from arelle.ModelValue import qname, QName
|
|
10
11
|
from arelle.ModelObject import ModelObject
|
|
11
12
|
from arelle.ModelFormulaObject import (Trace, ModelFormulaResource, ModelFormulaRules, ModelConceptName,
|
|
12
|
-
ModelParameter
|
|
13
|
+
ModelParameter)
|
|
14
|
+
from arelle.Aspect import Aspect, aspectStr, aspectModels, aspectRuleAspects, aspectModelAspect
|
|
13
15
|
from arelle.ModelInstanceObject import ModelFact
|
|
14
16
|
from arelle.formula.FormulaEvaluator import (filterFacts as formulaEvaluatorFilterFacts,
|
|
15
17
|
aspectsMatch, factsPartitions, VariableBinding)
|
|
16
18
|
from arelle.PrototypeInstanceObject import FactPrototype
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
CHILDREN_BUT_NO_ROLLUP = 3
|
|
22
|
-
|
|
23
|
-
OPEN_ASPECT_ENTRY_SURROGATE = '\uDBFF'
|
|
24
|
-
|
|
20
|
+
NoneType = type(None)
|
|
21
|
+
OPEN_ASPECT_ENTRY_SURROGATE = '\uDBFF' # this needs to be a utf-8 compatible char
|
|
22
|
+
UNREPORTED_ASPECT_SORT_VALUE = '\uDBFE' # high sort order for unreported aspect
|
|
25
23
|
EMPTY_SET = set()
|
|
24
|
+
EMPTY_DICT = {}
|
|
25
|
+
ROLLUP_SPECIFIES_MEMBER = 1
|
|
26
|
+
ROLLUP_IMPLIES_DEFAULT_MEMBER = 2
|
|
27
|
+
ROLLUP_FOR_CONCEPT_RELATIONSHIP_NODE = 3
|
|
28
|
+
ROLLUP_FOR_DIMENSION_RELATIONSHIP_NODE = 4
|
|
29
|
+
ROLLUP_FOR_CLOSED_DEFINITION_NODE = 5
|
|
30
|
+
ROLLUP_FOR_OPEN_DEFINITION_NODE = 6
|
|
31
|
+
ROLLUP_FOR_DEFINITION_NODE = 7
|
|
32
|
+
|
|
33
|
+
TABLE_PERIOD_SELECTORS = {"table.periodStart", "table.periodEnd"}
|
|
34
|
+
|
|
35
|
+
class ResolutionException(Exception):
|
|
36
|
+
def __init__(self, code, message, **kwargs):
|
|
37
|
+
self.kwargs = kwargs
|
|
38
|
+
self.code = code
|
|
39
|
+
self.message = message
|
|
40
|
+
self.args = ( self.__repr__(), )
|
|
41
|
+
def __repr__(self):
|
|
42
|
+
return _('[{0}] exception {1}').format(self.code, self.message % self.kwargs)
|
|
26
43
|
|
|
44
|
+
class LytMdlTableModel:
|
|
45
|
+
def __init__(self, entryPointUrl):
|
|
46
|
+
self.entryPointUrl = entryPointUrl
|
|
47
|
+
self.lytMdlTableSets = []
|
|
48
|
+
def __repr__(self):
|
|
49
|
+
return (f"LytMdlTableModel[{self.entryPointUrl}]")
|
|
50
|
+
class LytMdlTableSet:
|
|
51
|
+
def __init__(self, lytMdlTableModel, strctMdlTableSet, label, srcFile, srcLine, srcLinkrole):
|
|
52
|
+
self.lytMdlTableModel = lytMdlTableModel
|
|
53
|
+
self.strctMdlTableSet = strctMdlTableSet
|
|
54
|
+
self.label = label
|
|
55
|
+
self.srcFile = srcFile
|
|
56
|
+
self.srcLine = srcLine
|
|
57
|
+
self.srcLinkrole = srcLinkrole
|
|
58
|
+
lytMdlTableModel.lytMdlTableSets.append(self)
|
|
59
|
+
self.lytMdlTables = []
|
|
60
|
+
def __repr__(self):
|
|
61
|
+
return (f"LytMdlTableSet[{self.label}]")
|
|
62
|
+
class LytMdlTable:
|
|
63
|
+
def __init__(self, lytMdlTableSet, strctMdlTable):
|
|
64
|
+
self.lytMdlParentTableSet = lytMdlTableSet
|
|
65
|
+
self.strctMdlTable = strctMdlTable
|
|
66
|
+
self.lytMdlHeaders = []
|
|
67
|
+
lytMdlTableSet.lytMdlTables.append(self)
|
|
68
|
+
self.lytMdlBodyChildren = []
|
|
69
|
+
def lytMdlAxisHeaders(self, axis):
|
|
70
|
+
for lytMdlHeader in self.lytMdlHeaders:
|
|
71
|
+
if lytMdlHeader.axis == axis:
|
|
72
|
+
return lytMdlHeader
|
|
73
|
+
return None
|
|
74
|
+
def headerDepth(self, axis, includeOpenAspectEntrySurrogates=False):
|
|
75
|
+
# number of column header rows or number, row header columns, etc
|
|
76
|
+
return sum(lytMdlHeader.maxNumLabels
|
|
77
|
+
for lytMdlGroup in self.lytMdlAxisHeaders(axis).lytMdlGroups
|
|
78
|
+
for lytMdlHeader in lytMdlGroup.lytMdlHeaders
|
|
79
|
+
if includeOpenAspectEntrySurrogates or
|
|
80
|
+
not all(lytMdlCell.isOpenAspectEntrySurrogate
|
|
81
|
+
for lytMdlCell in lytMdlHeader.lytMdlCells))
|
|
82
|
+
def numBodyCells(self, axis):
|
|
83
|
+
return max((sum(lytMdlCell.span
|
|
84
|
+
for lytMdlHdr in lytMdlGrp.lytMdlHeaders
|
|
85
|
+
for lytMdlCell in lytMdlHdr.lytMdlCells)
|
|
86
|
+
for lytMdlGrp in self.lytMdlAxisHeaders(axis).lytMdlGroups))
|
|
87
|
+
def __repr__(self):
|
|
88
|
+
return ("LytMdlTable[]")
|
|
89
|
+
class LytMdlHeaders:
|
|
90
|
+
def __init__(self, lytMdlTable, axis):
|
|
91
|
+
self.lytMdlParentTable = lytMdlTable
|
|
92
|
+
self.axis = axis
|
|
93
|
+
lytMdlTable.lytMdlHeaders.append(self)
|
|
94
|
+
self.lytMdlGroups = []
|
|
95
|
+
def __repr__(self):
|
|
96
|
+
return (f"LytMdlHeaders[{self.axis}]")
|
|
97
|
+
class LytMdlGroup:
|
|
98
|
+
def __init__(self, lytMdlHeaders, label, srcFile, srcLine):
|
|
99
|
+
self.lytMdlParentHeaders = lytMdlHeaders
|
|
100
|
+
self.label = label
|
|
101
|
+
self.srcFile = srcFile
|
|
102
|
+
self.srcLine = srcLine
|
|
103
|
+
lytMdlHeaders.lytMdlGroups.append(self)
|
|
104
|
+
self.lytMdlHeaders = []
|
|
105
|
+
def __repr__(self):
|
|
106
|
+
return (f"LytMdlGroup[{self.label}]")
|
|
107
|
+
class LytMdlHeader:
|
|
108
|
+
def __init__(self, lytMdlGroup):
|
|
109
|
+
self.lytMdlParentGroup = lytMdlGroup
|
|
110
|
+
lytMdlGroup.lytMdlHeaders.append(self)
|
|
111
|
+
self.lytMdlCells = []
|
|
112
|
+
@property
|
|
113
|
+
def maxNumLabels(self):
|
|
114
|
+
return max(len(lytMdlCell.labels) for lytMdlCell in self.lytMdlCells)
|
|
115
|
+
def __repr__(self):
|
|
116
|
+
return ("LytMdlHeader[]")
|
|
117
|
+
class LytMdlCell:
|
|
118
|
+
def __init__(self):
|
|
119
|
+
self.lytMdlParentHeader = None
|
|
120
|
+
self.labels = []
|
|
121
|
+
self.span = 1
|
|
122
|
+
self.rollup = self.id = self.isOpenAspectEntrySurrogate = None
|
|
123
|
+
self.lytMdlConstraints = []
|
|
124
|
+
def labelXmlText(self, iLabel, default=""):
|
|
125
|
+
if iLabel < len(self.labels):
|
|
126
|
+
return self.labels[iLabel][0]
|
|
127
|
+
return default
|
|
128
|
+
def __repr__(self):
|
|
129
|
+
return (f"LytMdlCell[{self.labels}]")
|
|
130
|
+
class LytMdlConstraint:
|
|
131
|
+
def __init__(self, lytMdlCell, tag):
|
|
132
|
+
self.lytMdlParentCell = lytMdlCell
|
|
133
|
+
self.tag = tag
|
|
134
|
+
self.aspect = self.value = None
|
|
135
|
+
lytMdlCell.lytMdlConstraints.append(self)
|
|
136
|
+
def __repr__(self):
|
|
137
|
+
return (f"LytMdlConstraint[{self.aspect}]")
|
|
138
|
+
class LytMdlBodyCells:
|
|
139
|
+
def __init__(self, lytMdlParent, axis):
|
|
140
|
+
self.lytMdlParent = lytMdlParent
|
|
141
|
+
self.axis = axis
|
|
142
|
+
self.lytMdlBodyChildren = [] # z body cells contain y's body cells; y body cells contain x's body cells; x's body cells contain individual cells
|
|
143
|
+
lytMdlParent.lytMdlBodyChildren.append(self)
|
|
144
|
+
def __repr__(self):
|
|
145
|
+
return (f"LytMdlBodyCells[{self.axis}]")
|
|
146
|
+
class LytMdlBodyCell:
|
|
147
|
+
def __init__(self, lytMdlParent, isOpenAspectEntrySurrogate=False):
|
|
148
|
+
self.lytMdlParent = lytMdlParent
|
|
149
|
+
self.isOpenAspectEntrySurrogate = isOpenAspectEntrySurrogate
|
|
150
|
+
lytMdlParent.lytMdlBodyChildren.append(self)
|
|
151
|
+
self.facts = () # bound facts
|
|
152
|
+
def __repr__(self):
|
|
153
|
+
return (f"LytMdlBodyCell[{', '.join(v for f,v,j in self.facts)}]")
|
|
27
154
|
def definitionNodes(nodes):
|
|
28
|
-
return [(ord.definitionNodeObject if isinstance(node,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
155
|
+
return [(ord.definitionNodeObject if isinstance(node, StrctMdlStructuralNode) else node) for node in nodes]
|
|
156
|
+
def parentChildOrder(node):
|
|
157
|
+
_parentChildOrder = node.get("parentChildOrder")
|
|
158
|
+
if _parentChildOrder:
|
|
159
|
+
return _parentChildOrder
|
|
160
|
+
# look for inherited parentChildOrder
|
|
161
|
+
for rel in node.modelXbrl.relationshipSet(node.ancestorArcroles).toModelObject(node):
|
|
162
|
+
if rel.fromModelObject is not None:
|
|
163
|
+
_parentChildOrder = parentChildOrder(rel.fromModelObject)
|
|
164
|
+
if _parentChildOrder:
|
|
165
|
+
return _parentChildOrder
|
|
166
|
+
return None
|
|
167
|
+
def aspectStrctNodes(strctNode):
|
|
168
|
+
if strctNode is None:
|
|
169
|
+
return EMPTY_DICT
|
|
170
|
+
_aspectStrctNodes = defaultdict(set)
|
|
171
|
+
for aspect in aspectModels["dimensional"]:
|
|
172
|
+
strctNodeDefiningAspect = strctNode.hasAspect(aspect)
|
|
173
|
+
if not strctNodeDefiningAspect:
|
|
174
|
+
for a in aspectRuleAspects.get(aspect,()):
|
|
175
|
+
strctNodeDefiningAspect = strctNode.hasAspect(a)
|
|
176
|
+
if strctNodeDefiningAspect:
|
|
177
|
+
break
|
|
178
|
+
if strctNodeDefiningAspect:
|
|
179
|
+
if aspect == Aspect.DIMENSIONS:
|
|
180
|
+
for dim in (strctNode.aspectValue(Aspect.DIMENSIONS) or ()):
|
|
181
|
+
_aspectStrctNodes[dim].add(strctNodeDefiningAspect)
|
|
182
|
+
else:
|
|
183
|
+
if aspect in aspectRuleAspects:
|
|
184
|
+
_strctNodeDefiningAspect = None
|
|
185
|
+
for asp in aspectRuleAspects[aspect]:
|
|
186
|
+
_strctNodeDefiningAspect = strctNode.hasAspect(asp)
|
|
187
|
+
if _strctNodeDefiningAspect:
|
|
188
|
+
_aspectStrctNodes[asp].add(_strctNodeDefiningAspect)
|
|
189
|
+
if not _strctNodeDefiningAspect: # use top level aspect, e.g. PERIOD instead of PERIOD_START...
|
|
190
|
+
_aspectStrctNodes[aspect].add(strctNodeDefiningAspect)
|
|
191
|
+
else:
|
|
192
|
+
_aspectStrctNodes[aspect].add(strctNodeDefiningAspect)
|
|
193
|
+
return _aspectStrctNodes
|
|
194
|
+
# Structural model
|
|
195
|
+
class StrctMdlNode:
|
|
196
|
+
def __init__(self, strctMdlParentNode, defnMdlNode=None):
|
|
197
|
+
self.defnMdlNode = defnMdlNode
|
|
198
|
+
self.strctMdlParentNode = strctMdlParentNode
|
|
199
|
+
self.strctMdlChildNodes = []
|
|
200
|
+
if strctMdlParentNode:
|
|
201
|
+
strctMdlParentNode.strctMdlChildNodes.append(self)
|
|
37
202
|
self.aspects = {}
|
|
38
|
-
self.
|
|
39
|
-
self.
|
|
40
|
-
self.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if aspect != Aspect.DIMENSIONS:
|
|
47
|
-
self.aspectEntryObjectId = self.aspects[aspect] = contextItemFact.aspectEntryObjectId
|
|
48
|
-
break
|
|
49
|
-
else:
|
|
50
|
-
self.contextItemBinding = None
|
|
51
|
-
self.subtreeRollUp = ROLLUP_NOT_ANALYZED
|
|
52
|
-
self.depth = parentStructuralNode.depth + 1 if parentStructuralNode else 0
|
|
53
|
-
if tableNode is not None:
|
|
54
|
-
self.tableNode = tableNode
|
|
55
|
-
self.breakdownNode = breakdownNode # CR definition node
|
|
56
|
-
self.tagSelector = definitionNode.tagSelector
|
|
57
|
-
self.isLabeled = True
|
|
58
|
-
|
|
203
|
+
self.hasChildRollup = False
|
|
204
|
+
self.contextItemBinding = None
|
|
205
|
+
self.variables = {}
|
|
206
|
+
self.zInheritance = None
|
|
207
|
+
self.rollup = False # true when this is the rollup node among its siblings
|
|
208
|
+
self.choiceNodeIndex = 0
|
|
209
|
+
self.tagSelector = getattr(defnMdlNode, "tagSelector", None)
|
|
210
|
+
self.isUnreported = False
|
|
59
211
|
@property
|
|
60
|
-
def
|
|
61
|
-
return self.
|
|
62
|
-
|
|
212
|
+
def axis(self):
|
|
213
|
+
return getattr(self, "_axis", self.strctMdlParentNode.axis if self.strctMdlParentNode else "")
|
|
63
214
|
@property
|
|
64
|
-
def
|
|
65
|
-
if
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
#
|
|
70
|
-
return None
|
|
71
|
-
|
|
215
|
+
def depth(self):
|
|
216
|
+
return self.strctMdlParentNode.depth + 1 if self.strctMdlParentNode else 0
|
|
217
|
+
def aspectsCovered(self, inherit=False):
|
|
218
|
+
return EMPTY_SET
|
|
219
|
+
def hasAspect(self, aspect, inherit=True):
|
|
220
|
+
return None # if aspect found would return its defining structural node
|
|
72
221
|
@property
|
|
73
|
-
def
|
|
74
|
-
if self.
|
|
75
|
-
return self.
|
|
222
|
+
def parentChildOrder(self):
|
|
223
|
+
if self.defnMdlNode is not None:
|
|
224
|
+
return self.defnMdlNode.parentChildOrder
|
|
225
|
+
return "parent-first" # default value
|
|
226
|
+
@property
|
|
227
|
+
def hasRollUpChild(self):
|
|
228
|
+
return any(c.hasChildRollup for c in self.strctMdlChildNodes)
|
|
229
|
+
@property
|
|
230
|
+
def tagSelectors(self):
|
|
76
231
|
try:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
232
|
+
return self._tagSelectors
|
|
233
|
+
except AttributeError:
|
|
234
|
+
if self.strctMdlParentNode is not None:
|
|
235
|
+
self._tagSelectors = self.strctMdlParentNode.tagSelectors.copy()
|
|
236
|
+
else:
|
|
237
|
+
self._tagSelectors = set()
|
|
238
|
+
if not self.rollup and isinstance(self.defnMdlNode, DefnMdlConceptRelationshipNode):
|
|
239
|
+
self._tagSelectors -= TABLE_PERIOD_SELECTORS # these can't inherit
|
|
240
|
+
else:
|
|
241
|
+
_defnTagSelector = getattr(self.defnMdlNode, "tagSelector", None)
|
|
242
|
+
if _defnTagSelector:
|
|
243
|
+
self._tagSelectors.add(_defnTagSelector)
|
|
244
|
+
if self.tagSelector:
|
|
245
|
+
self._tagSelectors.add(self.tagSelector)
|
|
246
|
+
return self._tagSelectors
|
|
247
|
+
@tagSelectors.setter
|
|
248
|
+
def tagSelectors(self, newValue):
|
|
249
|
+
self._tagSelectors = newValue
|
|
90
250
|
@property
|
|
91
|
-
def
|
|
92
|
-
|
|
93
|
-
|
|
251
|
+
def leafNodeCount(self):
|
|
252
|
+
childLeafCount = 0
|
|
253
|
+
if self.strctMdlChildNodes:
|
|
254
|
+
for strctMdlChildNode in self.strctMdlChildNodes:
|
|
255
|
+
childLeafCount += strctMdlChildNode.leafNodeCount
|
|
256
|
+
if childLeafCount == 0:
|
|
257
|
+
return 1
|
|
258
|
+
if not self.isAbstract and isinstance(self.defnMdlNode, DefnMdlClosedDefinitionNode):
|
|
259
|
+
childLeafCount += 1 # has a roll up
|
|
260
|
+
return childLeafCount
|
|
94
261
|
@property
|
|
95
262
|
def cardinalityAndDepth(self):
|
|
96
|
-
|
|
97
|
-
|
|
263
|
+
if self.defnMdlNode is not None:
|
|
264
|
+
return self.defnMdlNode.cardinalityAndDepth(self)
|
|
265
|
+
return (1, 0) # no breakdown
|
|
266
|
+
def objectId(self, refId=""):
|
|
267
|
+
if self.defnMdlNode is not None:
|
|
268
|
+
return self.defnMdlNode.objectId(refId)
|
|
269
|
+
return None
|
|
98
270
|
@property
|
|
99
|
-
def
|
|
100
|
-
if self.
|
|
101
|
-
return self.
|
|
102
|
-
return 0
|
|
103
|
-
|
|
104
|
-
'''
|
|
105
|
-
def breakdownNode(self, tableELR):
|
|
106
|
-
definitionNode = self.definitionNode
|
|
107
|
-
if isinstance(definitionNode, ModelBreakdown):
|
|
108
|
-
return definitionNode
|
|
109
|
-
axisSubtreeRelSet = definitionNode.modelXbrl.relationshipSet((XbrlConst.tableBreakdownTree, XbrlConst.tableBreakdownTreeMMDD, XbrlConst.tableBreakdownTree201305, XbrlConst.tableDefinitionNodeSubtree, XbrlConst.tableDefinitionNodeSubtreeMMDD, XbrlConst.tableDefinitionNodeSubtree201305, XbrlConst.tableDefinitionNodeSubtree201301, XbrlConst.tableAxisSubtree2011), tableELR)
|
|
110
|
-
while (True):
|
|
111
|
-
for parentRel in axisSubtreeRelSet.toModelObject(definitionNode):
|
|
112
|
-
definitionNode = parentRel.fromModelObject
|
|
113
|
-
if isinstance(definitionNode, ModelBreakdown):
|
|
114
|
-
return definitionNode
|
|
115
|
-
break # recurse to move to this node's parent breakdown node
|
|
116
|
-
return definitionNode # give up here
|
|
117
|
-
'''
|
|
118
|
-
|
|
119
|
-
def constraintSet(self, tagSelectors=None):
|
|
120
|
-
definitionNode = self.definitionNode
|
|
121
|
-
if tagSelectors:
|
|
122
|
-
for tag in tagSelectors:
|
|
123
|
-
if tag in definitionNode.constraintSets:
|
|
124
|
-
return definitionNode.constraintSets[tag]
|
|
125
|
-
return definitionNode.constraintSets.get(None) # returns None if no default constraint set
|
|
126
|
-
|
|
127
|
-
def aspectsCovered(self, inherit=False):
|
|
128
|
-
aspectsCovered = self.aspects.keys() | self.definitionNode.aspectsCovered()
|
|
129
|
-
if inherit and self.parentStructuralNode is not None:
|
|
130
|
-
aspectsCovered.update(self.parentStructuralNode.aspectsCovered(inherit=inherit))
|
|
131
|
-
return aspectsCovered
|
|
132
|
-
|
|
133
|
-
def hasAspect(self, aspect, inherit=True):
|
|
134
|
-
return (aspect in self.aspects or
|
|
135
|
-
self.definitionNode.hasAspect(self, aspect) or
|
|
136
|
-
(inherit and
|
|
137
|
-
self.parentStructuralNode is not None and
|
|
138
|
-
self.parentStructuralNode.hasAspect(aspect, inherit)))
|
|
139
|
-
|
|
140
|
-
def aspectValue(self, aspect, inherit=True, dims=None, depth=0, tagSelectors=None):
|
|
141
|
-
xc = self._rendrCntx
|
|
142
|
-
if False: # TEST: self.choiceStructuralNodes: # use aspects from choice structural node
|
|
143
|
-
choiceNodeIndex = getattr(self,"choiceNodeIndex",0)
|
|
144
|
-
if choiceNodeIndex != -1:
|
|
145
|
-
chosenStructuralNode = self.choiceStructuralNodes[choiceNodeIndex]
|
|
146
|
-
aspects = chosenStructuralNode.aspects
|
|
147
|
-
definitionNode = chosenStructuralNode.definitionNode
|
|
148
|
-
contextItemBinding = chosenStructuralNode.contextItemBinding
|
|
149
|
-
else: # aspect entry mode
|
|
150
|
-
aspects = self.aspects
|
|
151
|
-
definitionNode = self.choiceStructuralNodes[0].definitionNode
|
|
152
|
-
contextItemBinding = None
|
|
153
|
-
else:
|
|
154
|
-
aspects = self.aspects
|
|
155
|
-
definitionNode = self.definitionNode
|
|
156
|
-
contextItemBinding = self.contextItemBinding
|
|
157
|
-
constraintSet = self.constraintSet(tagSelectors)
|
|
158
|
-
if aspect == Aspect.DIMENSIONS:
|
|
159
|
-
if dims is None: dims = set()
|
|
160
|
-
if inherit and self.parentStructuralNode is not None:
|
|
161
|
-
dims |= self.parentStructuralNode.aspectValue(aspect, dims=dims, depth=depth+1)
|
|
162
|
-
if aspect in aspects:
|
|
163
|
-
dims |= aspects[aspect]
|
|
164
|
-
elif constraintSet is not None and constraintSet.hasAspect(self, aspect):
|
|
165
|
-
dims |= set(definitionNode.aspectValue(xc, aspect) or {})
|
|
166
|
-
if constraintSet is not None and constraintSet.hasAspect(self, Aspect.OMIT_DIMENSIONS):
|
|
167
|
-
dims -= set(constraintSet.aspectValue(xc, Aspect.OMIT_DIMENSIONS))
|
|
168
|
-
return dims
|
|
169
|
-
if aspect in aspects:
|
|
170
|
-
return aspects[aspect]
|
|
171
|
-
elif constraintSet is not None and constraintSet.hasAspect(self, aspect):
|
|
172
|
-
if isinstance(definitionNode, ModelSelectionDefinitionNode):
|
|
173
|
-
# result is in the indicated variable of ordCntx
|
|
174
|
-
return self.variables.get(self.definitionNode.variableQname)
|
|
175
|
-
elif isinstance(definitionNode, ModelFilterDefinitionNode):
|
|
176
|
-
if contextItemBinding:
|
|
177
|
-
return contextItemBinding.aspectValue(aspect)
|
|
178
|
-
elif isinstance(definitionNode, ModelTupleDefinitionNode):
|
|
179
|
-
if aspect == Aspect.LOCATION and contextItemBinding:
|
|
180
|
-
return contextItemBinding.yieldedFact
|
|
181
|
-
# non-location tuple aspects don't leak into cell bindings
|
|
182
|
-
else:
|
|
183
|
-
return constraintSet.aspectValue(xc, aspect)
|
|
184
|
-
if inherit and self.parentStructuralNode is not None:
|
|
185
|
-
return self.parentStructuralNode.aspectValue(aspect, depth=depth+1)
|
|
271
|
+
def xlinkLabel(self):
|
|
272
|
+
if self.defnMdlNode is not None:
|
|
273
|
+
return self.defnMdlNode.xlinkLabel
|
|
186
274
|
return None
|
|
187
|
-
|
|
188
|
-
'''
|
|
189
275
|
@property
|
|
190
|
-
def
|
|
191
|
-
|
|
192
|
-
return self.aspects[Aspect.CONCEPT]
|
|
193
|
-
return self.definitionNode.primaryItemQname
|
|
194
|
-
|
|
276
|
+
def structuralDepth(self):
|
|
277
|
+
return 0
|
|
195
278
|
@property
|
|
196
|
-
def
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
# check for message before checking for genLabel
|
|
208
|
-
msgsRelationshipSet = self.definitionNode.modelXbrl.relationshipSet(
|
|
209
|
-
(XbrlConst.tableDefinitionNodeSelectionMessage201301, XbrlConst.tableAxisSelectionMessage2011)
|
|
210
|
-
if isZSelection else
|
|
211
|
-
(XbrlConst.tableDefinitionNodeMessage201301, XbrlConst.tableAxisMessage2011))
|
|
212
|
-
if msgsRelationshipSet:
|
|
213
|
-
msg = msgsRelationshipSet.label(self.definitionNode, XbrlConst.standardMessage, lang, returnText=False)
|
|
214
|
-
if msg is not None:
|
|
215
|
-
if evaluate:
|
|
216
|
-
if returnMsgFormatString:
|
|
217
|
-
return msg.formatString # not possible to evaluate (during resolution)
|
|
218
|
-
else:
|
|
219
|
-
return self.evaluate(msg, msg.evaluate)
|
|
220
|
-
else:
|
|
221
|
-
return XmlUtil.text(msg)
|
|
222
|
-
if isZSelection: # no message, return text of selection
|
|
223
|
-
return self.variables.get(self.definitionNode.variableQname, "selection")
|
|
279
|
+
def childRollupStrctNode(self):
|
|
280
|
+
for childStrctNode in self.strctMdlChildNodes:
|
|
281
|
+
if childStrctNode.rollup:
|
|
282
|
+
return childStrctNode
|
|
283
|
+
grandchildStrctRollup = childStrctNode.childRollupStrctNode
|
|
284
|
+
if grandchildStrctRollup:
|
|
285
|
+
return grandchildStrctRollup
|
|
286
|
+
return None
|
|
287
|
+
def headerAndSource(self, role=None, lang=None, evaluate=True, returnGenLabel=True, returnMsgFormatString=False, recurseParent=True, returnStdLabel=True, layoutMdlSortOrder=False):
|
|
288
|
+
if self.defnMdlNode is None: # root
|
|
289
|
+
return None, None
|
|
224
290
|
if returnGenLabel:
|
|
225
|
-
label = self.
|
|
291
|
+
label = self.defnMdlNode.genLabel(role=role, lang=lang)
|
|
226
292
|
if label:
|
|
227
|
-
return label
|
|
293
|
+
return label, None # explicit is default source
|
|
228
294
|
if self.isEntryAspect and role is None:
|
|
229
|
-
# True if open node bound to a prototype, false if
|
|
230
|
-
return OPEN_ASPECT_ENTRY_SURROGATE # sort pretty high, work ok for python 2.7/3.2 as well as 3.3
|
|
295
|
+
# True if open node bound to a prototype, false if bound to a real fact
|
|
296
|
+
return OPEN_ASPECT_ENTRY_SURROGATE, None # sort pretty high, work ok for python 2.7/3.2 as well as 3.3
|
|
231
297
|
# if there's a child roll up, check for it
|
|
232
|
-
if self.
|
|
233
|
-
|
|
298
|
+
if self.childRollupStrctNode is not None: # check the rolling-up child too
|
|
299
|
+
label, typ = self.childRollupStrctNode.headerAndSource(role, lang, evaluate, returnGenLabel, returnMsgFormatString, recurseParent)
|
|
300
|
+
if label:
|
|
301
|
+
return label, typ
|
|
234
302
|
# if aspect is a concept of dimension, return its standard label
|
|
235
303
|
concept = None
|
|
236
304
|
if role is None and returnStdLabel:
|
|
@@ -238,27 +306,64 @@ class StructuralNode:
|
|
|
238
306
|
aspectValue = self.aspectValue(aspect, inherit=recurseParent)
|
|
239
307
|
if isinstance(aspect, QName) or aspect == Aspect.CONCEPT: # dimension or concept
|
|
240
308
|
if isinstance(aspectValue, QName):
|
|
241
|
-
concept = self.modelXbrl.qnameConcepts
|
|
309
|
+
concept = self.modelXbrl.qnameConcepts.get(aspectValue)
|
|
242
310
|
break
|
|
243
311
|
elif isinstance(aspectValue, ModelDimensionValue):
|
|
244
312
|
if aspectValue.isExplicit:
|
|
245
313
|
concept = aspectValue.member
|
|
246
314
|
elif aspectValue.isTyped:
|
|
247
|
-
return XmlUtil.innerTextList(aspectValue.typedMember)
|
|
315
|
+
return XmlUtil.innerTextList(aspectValue.typedMember), "processor"
|
|
316
|
+
elif aspectValue is None:
|
|
317
|
+
dimConcept = self.modelXbrl.qnameConcepts[aspect]
|
|
318
|
+
if dimConcept.isTypedDimension:
|
|
319
|
+
if layoutMdlSortOrder:
|
|
320
|
+
return UNREPORTED_ASPECT_SORT_VALUE, "processor"
|
|
248
321
|
elif isinstance(aspectValue, ModelObject):
|
|
249
322
|
text = XmlUtil.innerTextList(aspectValue)
|
|
250
|
-
if
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
323
|
+
if aspect == Aspect.PERIOD:
|
|
324
|
+
cntx = aspectValue.getparent()
|
|
325
|
+
if layoutMdlSortOrder:
|
|
326
|
+
if cntx.isInstantPeriod: text = "1 " + text # sort inst first for conformance suite
|
|
327
|
+
elif cntx.isStartEndPeriod: text = "2 " + text # sort startEnd second for conformance suite
|
|
328
|
+
elif cntx.isForeverPeriod: text = "3 forever " # sort forever third for conformance suite
|
|
329
|
+
elif cntx.isForeverPeriod: text = "forever"
|
|
330
|
+
elif aspect == Aspect.UNIT:
|
|
331
|
+
text = f"{aspectValue.objectIndex:05d} {text}" # conf suites use instance order of contexts
|
|
332
|
+
elif aspect == Aspect.ENTITY_IDENTIFIER and layoutMdlSortOrder:
|
|
333
|
+
text = f"{aspectValue.get('scheme')}#{aspectValue.stringValue}"
|
|
334
|
+
return text, "processor"
|
|
335
|
+
# TODO for conformance, concept should not be contributing labels
|
|
336
|
+
if concept is not None and layoutMdlSortOrder:
|
|
254
337
|
label = concept.label(lang=lang)
|
|
255
338
|
if label:
|
|
256
|
-
return label
|
|
339
|
+
return label, "processor"
|
|
257
340
|
# if there is a role, check if it's available on a parent node
|
|
258
|
-
if role and recurseParent and self.
|
|
259
|
-
return self.
|
|
260
|
-
return None
|
|
261
|
-
|
|
341
|
+
if role and recurseParent and self.strctMdlParentNode is not None:
|
|
342
|
+
return self.strctMdlParentNode.headerAndSource(role, lang, evaluate, returnGenLabel, returnMsgFormatString, recurseParent)
|
|
343
|
+
return None, None
|
|
344
|
+
def header(self, role=None, lang=None, evaluate=True, returnGenLabel=True, returnMsgFormatString=False, recurseParent=True, returnStdLabel=True, layoutMdlSortOrder=False):
|
|
345
|
+
return self.headerAndSource(role, lang, evaluate, returnGenLabel, returnMsgFormatString, recurseParent, returnStdLabel, layoutMdlSortOrder)[0]
|
|
346
|
+
@property
|
|
347
|
+
def isAbstract(self):
|
|
348
|
+
try:
|
|
349
|
+
try:
|
|
350
|
+
return self.abstract # ordinate may have an abstract attribute
|
|
351
|
+
except AttributeError: # if none use axis object
|
|
352
|
+
return self.defnMdlNode.isAbstract
|
|
353
|
+
except AttributeError: # axis may never be abstract
|
|
354
|
+
return False
|
|
355
|
+
@property
|
|
356
|
+
def isEntryAspect(self):
|
|
357
|
+
# true if open node and bound to a fact prototype
|
|
358
|
+
return self.contextItemBinding is not None and isinstance(self.contextItemBinding.yieldedFact, FactPrototype)
|
|
359
|
+
def isEntryPrototype(self, default=False):
|
|
360
|
+
# true if all axis open nodes before this one are entry prototypes (or not open axes)
|
|
361
|
+
if self.contextItemBinding is not None:
|
|
362
|
+
# True if open node bound to a prototype, false if bound to a real fact
|
|
363
|
+
return isinstance(self.contextItemBinding.yieldedFact, FactPrototype)
|
|
364
|
+
if isinstance(self.strctMdlParentNode, StrctMdlStructuralNode):
|
|
365
|
+
return self.strctMdlParentNode.isEntryPrototype(default)
|
|
366
|
+
return default # nothing open to be bound to a fact
|
|
262
367
|
def evaluate(self, evalObject, evalMethod, otherAxisStructuralNode=None, evalArgs=(), handleXPathException=True, **kwargs):
|
|
263
368
|
xc = self._rendrCntx
|
|
264
369
|
if self.contextItemBinding and not isinstance(xc.contextItem, ModelFact):
|
|
@@ -266,18 +371,15 @@ class StructuralNode:
|
|
|
266
371
|
xc.contextItem = self.contextItemBinding.yieldedFact
|
|
267
372
|
else:
|
|
268
373
|
previousContextItem = None
|
|
269
|
-
|
|
270
|
-
variables = self.choiceStructuralNodes[self.choiceNodeIndex].variables
|
|
271
|
-
else:
|
|
272
|
-
variables = self.variables
|
|
374
|
+
variables = self.variables
|
|
273
375
|
removeVarQnames = []
|
|
274
376
|
for variablesItems in variables.items():
|
|
275
377
|
for qn, value in variablesItems:
|
|
276
378
|
if qn not in xc.inScopeVars:
|
|
277
379
|
removeVarQnames.append(qn)
|
|
278
380
|
xc.inScopeVars[qn] = value
|
|
279
|
-
if self.
|
|
280
|
-
result = self.
|
|
381
|
+
if isinstance(self.strctMdlParentNode, StrctMdlStructuralNode):
|
|
382
|
+
result = self.strctMdlParentNode.evaluate(evalObject, evalMethod, otherAxisStructuralNode, evalArgs)
|
|
281
383
|
elif otherAxisStructuralNode is not None:
|
|
282
384
|
# recurse to other ordinate (which will recurse to z axis)
|
|
283
385
|
result = otherAxisStructuralNode.evaluate(evalObject, evalMethod, None, evalArgs)
|
|
@@ -299,81 +401,272 @@ class StructuralNode:
|
|
|
299
401
|
if previousContextItem is not None:
|
|
300
402
|
xc.contextItem = previousContextItem # xbrli.xbrl
|
|
301
403
|
return result
|
|
302
|
-
|
|
303
404
|
def hasValueExpression(self, otherAxisStructuralNode=None):
|
|
304
|
-
return (self.
|
|
305
|
-
(otherAxisStructuralNode
|
|
306
|
-
|
|
405
|
+
return (self.defnMdlNode.hasValueExpression or
|
|
406
|
+
not isinstance(otherAxisStructuralNode, StrctMdlBreakdown) and
|
|
407
|
+
(otherAxisStructuralNode is not None and
|
|
408
|
+
otherAxisStructuralNode.defnMdlNode is not None and
|
|
409
|
+
otherAxisStructuralNode.defnMdlNode.hasValueExpression))
|
|
307
410
|
def evalValueExpression(self, fact, otherAxisStructuralNode=None):
|
|
308
411
|
for structuralNode in (self, otherAxisStructuralNode):
|
|
309
|
-
if structuralNode is not None and
|
|
310
|
-
|
|
412
|
+
if (structuralNode is not None and
|
|
413
|
+
structuralNode.defnMdlNode is not None and
|
|
414
|
+
structuralNode.defnMdlNode.hasValueExpression):
|
|
415
|
+
return self.evaluate(self.defnMdlNode, structuralNode.defnMdlNode.evalValueExpression, otherAxisStructuralNode=otherAxisStructuralNode, evalArgs=(fact,))
|
|
311
416
|
return None
|
|
312
|
-
|
|
313
417
|
@property
|
|
314
|
-
def
|
|
315
|
-
|
|
316
|
-
|
|
418
|
+
def hasBreakdownWithoutNodes(self):
|
|
419
|
+
if isinstance(self, StrctMdlBreakdown) and not self.strctMdlChildNodes:
|
|
420
|
+
return True
|
|
421
|
+
for childStructuralNode in self.strctMdlChildNodes:
|
|
422
|
+
if childStructuralNode.hasBreakdownWithoutNodes:
|
|
423
|
+
return True
|
|
424
|
+
return False
|
|
425
|
+
def __repr__(self):
|
|
426
|
+
return (f"{type(self).__name__}[{self.xlinkLabel}]")
|
|
427
|
+
class StrctMdlTableSet(StrctMdlNode):
|
|
428
|
+
def __init__(self, defnMdlTable):
|
|
429
|
+
super(StrctMdlTableSet, self).__init__(None, defnMdlTable)
|
|
430
|
+
class StrctMdlTable(StrctMdlNode):
|
|
431
|
+
def __init__(self, strctMdlParentNode, defnMdlTable):
|
|
432
|
+
super(StrctMdlTable, self).__init__(strctMdlParentNode, defnMdlTable)
|
|
433
|
+
self._rendrCntx = defnMdlTable.renderingXPathContext
|
|
434
|
+
# childStrctMdlNodes are StrctMdlBreakdowns
|
|
435
|
+
self.defnMdlBreakdowns = defaultdict(list)
|
|
436
|
+
self.axisDepth = {"x": 0, "y":0, "z":0}
|
|
437
|
+
self.layoutMdlCells = [] # z body cells
|
|
438
|
+
self.tblParamValues = OrderedDict()
|
|
439
|
+
def strctMdlFirstAxisBreakdown(self, axis):
|
|
440
|
+
for c in self.strctMdlChildNodes:
|
|
441
|
+
if c._axis == axis:
|
|
442
|
+
return c
|
|
443
|
+
return None
|
|
444
|
+
class StrctMdlBreakdown(StrctMdlNode):
|
|
445
|
+
# breakdown also acts as the layout model group containing headers of cells
|
|
446
|
+
def __init__(self, strctMdlParentNode, defnMdlBreakdown, axis):
|
|
447
|
+
super(StrctMdlBreakdown, self).__init__(None, defnMdlBreakdown)
|
|
448
|
+
self._rendrCntx = strctMdlParentNode._rendrCntx # copy from parent except at root
|
|
449
|
+
self._axis = axis
|
|
450
|
+
self.rendrCntx = strctMdlParentNode._rendrCntx
|
|
451
|
+
self.hasOpenNode = False
|
|
452
|
+
self.isLabeled = False
|
|
453
|
+
self.layoutMdlHdrCells = [] # layoutMdlHeaderCells objects
|
|
454
|
+
|
|
455
|
+
# find all leaf not of the parent to add it to them (see 9.3.2)
|
|
456
|
+
self.strctMdlParentNode = strctMdlParentNode
|
|
457
|
+
if isinstance(strctMdlParentNode, StrctMdlBreakdown):
|
|
458
|
+
self._addBreakdownToLeafs(strctMdlParentNode, set())
|
|
459
|
+
else:
|
|
460
|
+
strctMdlParentNode.strctMdlChildNodes.append(self)
|
|
317
461
|
|
|
318
|
-
def
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
462
|
+
def _addBreakdownToLeafs(self, sn, alreadyAddedTo: set):
|
|
463
|
+
if not sn.strctMdlChildNodes:
|
|
464
|
+
if sn not in alreadyAddedTo:
|
|
465
|
+
sn.strctMdlChildNodes.append(self)
|
|
466
|
+
alreadyAddedTo.add(sn)
|
|
467
|
+
else:
|
|
468
|
+
for c in sn.strctMdlChildNodes:
|
|
469
|
+
self._addBreakdownToLeafs(c, alreadyAddedTo)
|
|
470
|
+
|
|
471
|
+
def siblingBreakdownNode(self):
|
|
472
|
+
if self.strctMdlParentNode is not None:
|
|
473
|
+
for sibling in self.strctMdlParentNode.strctMdlChildNodes[
|
|
474
|
+
self.strctMdlParentNode.strctMdlChildNodes.index(self)+1:]:
|
|
475
|
+
if sibling._axis == self._axis:
|
|
476
|
+
return (sibling,)
|
|
477
|
+
return ()
|
|
478
|
+
@property
|
|
479
|
+
def strctMdlAncestorBreakdownNode(self):
|
|
480
|
+
return self
|
|
481
|
+
@property
|
|
482
|
+
def strctMdlEffectiveChildNodes(self):
|
|
483
|
+
if self.strctMdlChildNodes: # not leaf
|
|
484
|
+
return self.strctMdlChildNodes
|
|
485
|
+
# effective child nodes at a leaf node is sibling beakdown node subtee
|
|
486
|
+
return self.siblingBreakdownNode()
|
|
487
|
+
def setHasOpenNode(self):
|
|
488
|
+
self.hasOpenNode = True
|
|
489
|
+
def inheritedAspectValue(self, *args):
|
|
490
|
+
if isinstance(self.strctMdlParentNode, StrctMdlStructuralNode):
|
|
491
|
+
return self.strctMdlParentNode.inheritedAspectValue(*args)
|
|
492
|
+
else:
|
|
493
|
+
return None
|
|
494
|
+
# for __hash__ and __eq__: at some point, the breakdown is used a key of a dict
|
|
495
|
+
# when 2 same axis exist, multiple breakdown for the same definition node can be created
|
|
496
|
+
# but we want to only have one as key
|
|
497
|
+
# (see headerElts in ViewFileRenderedGrid.py)
|
|
498
|
+
def __hash__(self):
|
|
499
|
+
return self.defnMdlNode.__hash__()
|
|
500
|
+
def __eq__(self, other):
|
|
501
|
+
return self.defnMdlNode == other.defnMdlNode
|
|
502
|
+
class StrctMdlStructuralNode(StrctMdlNode):
|
|
503
|
+
def __init__(self, strctMdlParentNode, defnMdlNode, zInheritance=None, contextItemFact=None, tableNode=None, rendrCntx=None):
|
|
504
|
+
super(StrctMdlStructuralNode, self).__init__(strctMdlParentNode, defnMdlNode)
|
|
505
|
+
self._rendrCntx = rendrCntx or strctMdlParentNode._rendrCntx # copy from parent except at root
|
|
506
|
+
self.zInheritance = zInheritance
|
|
507
|
+
if contextItemFact is not None:
|
|
508
|
+
self.contextItemBinding = VariableBinding(self._rendrCntx,
|
|
509
|
+
boundFact=contextItemFact)
|
|
510
|
+
if isinstance(self.contextItemBinding.yieldedFact, FactPrototype):
|
|
511
|
+
for aspect in defnMdlNode.aspectsCovered():
|
|
512
|
+
if aspect != Aspect.DIMENSIONS:
|
|
513
|
+
self.aspectEntryObjectId = self.aspects[aspect] = contextItemFact.aspectEntryObjectId
|
|
514
|
+
break
|
|
515
|
+
else:
|
|
516
|
+
self.contextItemBinding = None
|
|
517
|
+
if tableNode is not None:
|
|
518
|
+
self.tableNode = tableNode
|
|
519
|
+
self.isLabeled = True
|
|
520
|
+
@property
|
|
521
|
+
def modelXbrl(self):
|
|
522
|
+
return self.defnMdlNode.modelXbrl
|
|
523
|
+
@property
|
|
524
|
+
def structuralDepth(self):
|
|
525
|
+
if self.strctMdlParentNode is not None:
|
|
526
|
+
return self.strctMdlParentNode.structuralDepth + 1
|
|
527
|
+
return 0
|
|
528
|
+
def siblingBreakdownNode(self):
|
|
529
|
+
if self.strctMdlParentNode is not None:
|
|
530
|
+
return self.strctMdlParentNode.siblingBreakdownNode()
|
|
531
|
+
return ()
|
|
532
|
+
@property
|
|
533
|
+
def strctMdlEffectiveChildNodes(self):
|
|
534
|
+
if self.strctMdlChildNodes: # not leaf
|
|
535
|
+
# if nested breakdown which is unlabeled return children of breakdown
|
|
536
|
+
if len(self.strctMdlChildNodes) == 1 and isinstance(self.strctMdlChildNodes[0], StrctMdlBreakdown): # nested layout node
|
|
537
|
+
if True: # TBD determine if labeled: not self.strctMdlChildNodes[0].isLabeled:
|
|
538
|
+
return self.strctMdlChildNodes[0].strctMdlChildNodes
|
|
539
|
+
return self.strctMdlChildNodes
|
|
540
|
+
# effective child nodes at a leaf node is sibling beakdown node subtee
|
|
541
|
+
return self.siblingBreakdownNode()
|
|
542
|
+
@property
|
|
543
|
+
def strctMdlAncestorBreakdownNode(self):
|
|
544
|
+
if isinstance(self.strctMdlParentNode, StrctMdlBreakdown):
|
|
545
|
+
return self.strctMdlParentNode
|
|
546
|
+
return self.strctMdlParentNode.strctMdlAncestorBreakdownNode
|
|
547
|
+
def constraintSet(self, tagSelectors=None):
|
|
548
|
+
defnMdlNode = self.defnMdlNode
|
|
549
|
+
if defnMdlNode is None:
|
|
550
|
+
return None # root node
|
|
551
|
+
# may be both a period override and other in the selectors
|
|
326
552
|
|
|
553
|
+
if tagSelectors:
|
|
554
|
+
ts = set(tagSelectors)
|
|
555
|
+
if TABLE_PERIOD_SELECTORS & ts and len(ts & defnMdlNode.constraintSets.keys()) > 1:
|
|
556
|
+
return defnMdlNode.constraintSets[(TABLE_PERIOD_SELECTORS & ts & defnMdlNode.constraintSets.keys()).pop()]
|
|
557
|
+
if tagSelectors:
|
|
558
|
+
for tag in tagSelectors:
|
|
559
|
+
if tag in defnMdlNode.constraintSets:
|
|
560
|
+
return defnMdlNode.constraintSets[tag]
|
|
561
|
+
return defnMdlNode.constraintSets.get(None) # returns None if no default constraint set
|
|
562
|
+
def constraintTags(self):
|
|
563
|
+
defnMdlNode = self.defnMdlNode
|
|
564
|
+
if defnMdlNode is None:
|
|
565
|
+
return None # root node
|
|
566
|
+
return list(defnMdlNode.constraintSets.keys())
|
|
567
|
+
def aspectsCovered(self, inherit=False):
|
|
568
|
+
if self.aspects is None:
|
|
569
|
+
return EMPTY_SET
|
|
570
|
+
aspectsCovered = self.aspects.keys()
|
|
571
|
+
if self.defnMdlNode is not None and hasattr(self.defnMdlNode, "aspectsCovered"):
|
|
572
|
+
aspectsCovered |= self.defnMdlNode.aspectsCovered()
|
|
573
|
+
if inherit and isinstance(self.strctMdlParentNode, StrctMdlStructuralNode):
|
|
574
|
+
aspectsCovered |= self.strctMdlParentNode.aspectsCovered(inherit=inherit)
|
|
575
|
+
elif (inherit and isinstance(self.strctMdlParentNode, StrctMdlStructuralNode)):
|
|
576
|
+
aspectsCovered |= self.strctMdlParentNode.strctMdlParentNode.aspectsCovered(inherit=inherit)
|
|
577
|
+
return aspectsCovered
|
|
578
|
+
def hasAspect(self, aspect, inherit=True):
|
|
579
|
+
if (aspect in self.aspects or
|
|
580
|
+
(self.defnMdlNode is not None and self.defnMdlNode.hasAspect(self, aspect))):
|
|
581
|
+
return self
|
|
582
|
+
if inherit:
|
|
583
|
+
# block override of aspect rule aspects, e.g. don't inherit period duration aspects if this str node defines an instant aspect
|
|
584
|
+
if any(aspect in _aspectRuleAspects and self.hasAspect(_aspect, inherit=False)
|
|
585
|
+
for _aspect, _aspectRuleAspects in aspectRuleAspects.items()):
|
|
586
|
+
return None
|
|
587
|
+
if isinstance(self.strctMdlParentNode, StrctMdlStructuralNode):
|
|
588
|
+
return self.strctMdlParentNode.hasAspect(aspect, inherit)
|
|
589
|
+
if isinstance(self.strctMdlParentNode, StrctMdlBreakdown):
|
|
590
|
+
return self.strctMdlParentNode.strctMdlParentNode.hasAspect(aspect, inherit)
|
|
591
|
+
return None
|
|
592
|
+
def dimRAV(self, aspect, value): # dimensional rollup aspect value (None for a rollup node)
|
|
593
|
+
if isinstance(value, QName) and self.rollup == ROLLUP_IMPLIES_DEFAULT_MEMBER and aspect in self.defnMdlNode.modelXbrl.qnameDimensionDefaults:
|
|
594
|
+
return self.defnMdlNode.modelXbrl.qnameDimensionDefaults[aspect]
|
|
595
|
+
return value
|
|
596
|
+
def aspectValue(self, aspect, inherit=True, dims=None, depth=0, tagSelectors=None):
|
|
597
|
+
if self.rollup in (ROLLUP_FOR_CONCEPT_RELATIONSHIP_NODE, ROLLUP_FOR_DIMENSION_RELATIONSHIP_NODE):
|
|
598
|
+
return self.strctMdlParentNode.aspectValue(aspect, inherit, dims, depth, tagSelectors)
|
|
599
|
+
xc = self._rendrCntx
|
|
600
|
+
aspects = self.aspects
|
|
601
|
+
defnMdlNode = self.defnMdlNode
|
|
602
|
+
contextItemBinding = self.contextItemBinding
|
|
603
|
+
constraintSet = self.constraintSet(tagSelectors)
|
|
604
|
+
if aspect == Aspect.DIMENSIONS:
|
|
605
|
+
if dims is None: dims = set()
|
|
606
|
+
if inherit and isinstance(self.strctMdlParentNode, StrctMdlStructuralNode):
|
|
607
|
+
dims |= self.strctMdlParentNode.aspectValue(aspect, dims=dims, depth=depth+1)
|
|
608
|
+
if inherit and isinstance(self.strctMdlParentNode, StrctMdlBreakdown) and isinstance(self.strctMdlParentNode.strctMdlParentNode, StrctMdlStructuralNode):
|
|
609
|
+
dims |= self.strctMdlParentNode.strctMdlParentNode.aspectValue(aspect, dims=dims, depth=depth+1)
|
|
610
|
+
if aspect in aspects:
|
|
611
|
+
dims |= aspects[aspect]
|
|
612
|
+
elif constraintSet is not None and constraintSet.hasAspect(self, aspect):
|
|
613
|
+
dims |= set(defnMdlNode.aspectValue(xc, aspect) or {})
|
|
614
|
+
if constraintSet is not None and constraintSet.hasAspect(self, Aspect.OMIT_DIMENSIONS):
|
|
615
|
+
dims -= set(constraintSet.aspectValue(xc, Aspect.OMIT_DIMENSIONS))
|
|
616
|
+
return dims
|
|
617
|
+
if aspect in aspects:
|
|
618
|
+
return aspects[aspect]
|
|
619
|
+
elif constraintSet is not None and constraintSet.hasAspect(self, aspect):
|
|
620
|
+
if isinstance(defnMdlNode, DefnMdlAspectNode):
|
|
621
|
+
if contextItemBinding:
|
|
622
|
+
return self.dimRAV(aspect, contextItemBinding.aspectValue(aspect))
|
|
623
|
+
else:
|
|
624
|
+
return self.dimRAV(aspect, constraintSet.aspectValue(xc, aspect))
|
|
625
|
+
if inherit and isinstance(self.strctMdlParentNode, StrctMdlStructuralNode):
|
|
626
|
+
return self.strctMdlParentNode.aspectValue(aspect, depth=depth+1)
|
|
627
|
+
elif inherit and isinstance(self.strctMdlParentNode, StrctMdlBreakdown) and isinstance(self.strctMdlParentNode.strctMdlParentNode, StrctMdlStructuralNode):
|
|
628
|
+
return self.strctMdlParentNode.strctMdlParentNode.aspectValue(aspect, depth=depth+1)
|
|
629
|
+
return None
|
|
630
|
+
'''
|
|
631
|
+
@property
|
|
632
|
+
def primaryItemQname(self): # for compatibility with viewRelationsihps
|
|
633
|
+
if Aspect.CONCEPT in self.aspects:
|
|
634
|
+
return self.aspects[Aspect.CONCEPT]
|
|
635
|
+
return self.defnMdlNode.primaryItemQname
|
|
636
|
+
@property
|
|
637
|
+
def explicitDims(self):
|
|
638
|
+
return self.defnMdlNode.explicitDims
|
|
639
|
+
'''
|
|
327
640
|
@property
|
|
328
641
|
def tableDefinitionNode(self):
|
|
329
|
-
if self.
|
|
642
|
+
if self.strctMdlParentNode is None:
|
|
330
643
|
return self.tableNode
|
|
331
644
|
else:
|
|
332
|
-
return self.
|
|
333
|
-
|
|
334
|
-
@property
|
|
335
|
-
def tagSelectors(self):
|
|
336
|
-
try:
|
|
337
|
-
return self._tagSelectors
|
|
338
|
-
except AttributeError:
|
|
339
|
-
if self.parentStructuralNode is None:
|
|
340
|
-
self._tagSelectors = set()
|
|
341
|
-
else:
|
|
342
|
-
self._tagSelectors = self.parentStructuralNode.tagSelectors
|
|
343
|
-
if self.tagSelector:
|
|
344
|
-
self._tagSelectors.add(self.tagSelector)
|
|
345
|
-
return self._tagSelectors
|
|
346
|
-
|
|
645
|
+
return self.strctMdlParentNode.tableDefinitionNode
|
|
347
646
|
@property
|
|
348
647
|
def leafNodeCount(self):
|
|
349
648
|
childLeafCount = 0
|
|
350
|
-
if self.
|
|
351
|
-
for childStructuralNode in self.
|
|
649
|
+
if self.strctMdlChildNodes:
|
|
650
|
+
for childStructuralNode in self.strctMdlChildNodes:
|
|
352
651
|
childLeafCount += childStructuralNode.leafNodeCount
|
|
353
652
|
if childLeafCount == 0:
|
|
354
653
|
return 1
|
|
355
|
-
if not self.isAbstract and isinstance(self.definitionNode, (ModelClosedDefinitionNode, ModelEuAxisCoord)):
|
|
356
|
-
childLeafCount += 1 # has a roll up
|
|
357
654
|
return childLeafCount
|
|
358
|
-
|
|
359
655
|
def setHasOpenNode(self):
|
|
360
|
-
if self.
|
|
361
|
-
self.
|
|
656
|
+
if isinstance(self.strctMdlParentNode, StrctMdlStructuralNode):
|
|
657
|
+
self.strctMdlParentNode.setHasOpenNode()
|
|
362
658
|
else:
|
|
363
659
|
self.hasOpenNode = True
|
|
364
|
-
|
|
365
660
|
def inheritedPrimaryItemQname(self, view):
|
|
366
|
-
return (self.primaryItemQname or self.inheritedPrimaryItemQname(self.
|
|
367
|
-
|
|
661
|
+
return (self.primaryItemQname or self.inheritedPrimaryItemQname(self.strctMdlParentNode, view))
|
|
368
662
|
def inheritedExplicitDims(self, view, dims=None, nested=False):
|
|
369
663
|
if dims is None: dims = {}
|
|
370
664
|
if self.parentOrdinateContext:
|
|
371
|
-
self.
|
|
665
|
+
self.strctMdlParentNode.inheritedExplicitDims(view, dims, True)
|
|
372
666
|
for dim, mem in self.explicitDims:
|
|
373
667
|
dims[dim] = mem
|
|
374
668
|
if not nested:
|
|
375
669
|
return {(dim,mem) for dim,mem in dims.items() if mem != 'omit'}
|
|
376
|
-
|
|
377
670
|
def inheritedAspectValue(self, otherAxisStructuralNode,
|
|
378
671
|
view, aspect, tagSelectors,
|
|
379
672
|
xAspectStructuralNodes, yAspectStructuralNodes, zAspectStructuralNodes):
|
|
@@ -382,18 +675,25 @@ class StructuralNode:
|
|
|
382
675
|
if len(aspectStructuralNodes) == 1:
|
|
383
676
|
structuralNode = aspectStructuralNodes.pop()
|
|
384
677
|
elif len(aspectStructuralNodes) > 1:
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
else:
|
|
392
|
-
structuralNode = _aspectStructuralNode
|
|
678
|
+
strctNodesWithAspect = set(_aspectStructuralNode
|
|
679
|
+
for _aspectStructuralNode in aspectStructuralNodes
|
|
680
|
+
if not _aspectStructuralNode.rollup
|
|
681
|
+
if _aspectStructuralNode.defnMdlNode.hasAspect(self, aspect))
|
|
682
|
+
if len(strctNodesWithAspect) == 1:
|
|
683
|
+
structuralNode = strctNodesWithAspect.pop()
|
|
393
684
|
else:
|
|
394
|
-
#
|
|
395
|
-
|
|
396
|
-
|
|
685
|
+
# check if all nodes have same value
|
|
686
|
+
if aspect == Aspect.LOCATION:
|
|
687
|
+
hasClash = False
|
|
688
|
+
for _aspectStructuralNode in aspectStructuralNodes:
|
|
689
|
+
if not _aspectStructuralNode.defnMdlNode.aspectValueDependsOnVars(aspect):
|
|
690
|
+
if structuralNode:
|
|
691
|
+
hasClash = True
|
|
692
|
+
else:
|
|
693
|
+
structuralNode = _aspectStructuralNode
|
|
694
|
+
else:
|
|
695
|
+
# take closest structural node
|
|
696
|
+
hasClash = True
|
|
397
697
|
''' reported in static analysis by RenderingEvaluator.py
|
|
398
698
|
if hasClash:
|
|
399
699
|
from arelle.ModelFormulaObject import aspectStr
|
|
@@ -410,13 +710,8 @@ class StructuralNode:
|
|
|
410
710
|
evalArgs=(aspect,))
|
|
411
711
|
return structuralNode.aspectValue(aspect, tagSelectors=tagSelectors)
|
|
412
712
|
return None
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
def __repr__(self):
|
|
416
|
-
return ("structuralNode[{0}]{1})".format(self.objectId(),self.definitionNode))
|
|
417
|
-
|
|
418
713
|
# Root class for rendering is formula, to allow linked and nested compiled expressions
|
|
419
|
-
def
|
|
714
|
+
def defnMdlLabelsView(mdlObj):
|
|
420
715
|
return tuple(sorted([("{} {} {} {}".format(label.localName,
|
|
421
716
|
str(rel.order).rstrip("0").rstrip("."),
|
|
422
717
|
os.path.basename(label.role or ""),
|
|
@@ -425,250 +720,66 @@ def definitionModelLabelsView(mdlObj):
|
|
|
425
720
|
for rel in mdlObj.modelXbrl.relationshipSet((XbrlConst.elementLabel,XbrlConst.elementReference)).fromModelObject(mdlObj)
|
|
426
721
|
for label in (rel.toModelObject,)] +
|
|
427
722
|
[("xlink:label", mdlObj.xlinkLabel)]))
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
class ModelEuTable(ModelResource):
|
|
431
|
-
def init(self, modelDocument):
|
|
432
|
-
super(ModelEuTable, self).init(modelDocument)
|
|
433
|
-
self.aspectsInTaggedConstraintSets = set()
|
|
434
|
-
|
|
435
|
-
@property
|
|
436
|
-
def aspectModel(self):
|
|
437
|
-
return "dimensional"
|
|
438
|
-
|
|
439
|
-
@property
|
|
440
|
-
def propertyView(self):
|
|
441
|
-
return ((("id", self.id),) +
|
|
442
|
-
self.definitionLabelsView)
|
|
443
|
-
|
|
444
|
-
''' now only accessed from structural node
|
|
445
|
-
def header(self, role=None, lang=None, strip=False, evaluate=True):
|
|
446
|
-
return self.genLabel(role=role, lang=lang, strip=strip)
|
|
447
|
-
'''
|
|
448
|
-
|
|
449
|
-
@property
|
|
450
|
-
def parameters(self):
|
|
451
|
-
return {}
|
|
452
|
-
|
|
453
|
-
@property
|
|
454
|
-
def definitionLabelsView(self):
|
|
455
|
-
return definitionModelLabelsView(self)
|
|
456
|
-
|
|
457
|
-
def filteredFacts(self, xpCtx, facts):
|
|
458
|
-
return facts
|
|
459
|
-
|
|
460
|
-
@property
|
|
461
|
-
def xpathContext(self):
|
|
462
|
-
return None
|
|
463
|
-
|
|
464
|
-
def __repr__(self):
|
|
465
|
-
return ("table[{0}]{1})".format(self.objectId(),self.propertyView))
|
|
466
|
-
|
|
467
|
-
class ModelEuAxisCoord(ModelResource):
|
|
468
|
-
def init(self, modelDocument):
|
|
469
|
-
super(ModelEuAxisCoord, self).init(modelDocument)
|
|
470
|
-
|
|
471
|
-
@property
|
|
472
|
-
def abstract(self):
|
|
473
|
-
return self.get("abstract") or 'false'
|
|
474
|
-
|
|
475
|
-
@property
|
|
476
|
-
def isAbstract(self):
|
|
477
|
-
return self.abstract == "true"
|
|
478
|
-
|
|
479
|
-
@property
|
|
480
|
-
def isMerged(self):
|
|
481
|
-
return False
|
|
482
|
-
|
|
483
|
-
@property
|
|
484
|
-
def parentChildOrder(self):
|
|
485
|
-
return self.get("parentChildOrder")
|
|
486
|
-
|
|
487
|
-
@property
|
|
488
|
-
def isRollUp(self):
|
|
489
|
-
return False
|
|
490
|
-
|
|
491
|
-
@property
|
|
492
|
-
def parentDefinitionNode(self):
|
|
493
|
-
try:
|
|
494
|
-
return self._parentDefinitionNode
|
|
495
|
-
except AttributeError:
|
|
496
|
-
parentDefinitionNode = None
|
|
497
|
-
for rel in self.modelXbrl.relationshipSet(XbrlConst.euAxisMember).toModelObject(self):
|
|
498
|
-
parentDefinitionNode = rel.fromModelObject
|
|
499
|
-
break
|
|
500
|
-
self._parentDefinitionNode = parentDefinitionNode
|
|
501
|
-
return parentDefinitionNode
|
|
502
|
-
|
|
503
|
-
def aspectsCovered(self):
|
|
504
|
-
aspectsCovered = set()
|
|
505
|
-
if XmlUtil.hasChild(self, XbrlConst.euRend, "primaryItem"):
|
|
506
|
-
aspectsCovered.add(Aspect.CONCEPT)
|
|
507
|
-
if XmlUtil.hasChild(self, XbrlConst.euRend, "timeReference"):
|
|
508
|
-
aspectsCovered.add(Aspect.INSTANT)
|
|
509
|
-
for e in XmlUtil.children(self, XbrlConst.euRend, "explicitDimCoord"):
|
|
510
|
-
aspectsCovered.add(self.prefixedNameQname(e.get("dimension")))
|
|
511
|
-
return aspectsCovered
|
|
512
|
-
|
|
513
|
-
@property
|
|
514
|
-
def constraintSets(self):
|
|
515
|
-
return {None: self}
|
|
516
|
-
|
|
517
|
-
@property
|
|
518
|
-
def tagSelector(self): # default constraint set for ruleNode has name None
|
|
519
|
-
return None
|
|
520
|
-
|
|
521
|
-
def hasAspect(self, structuralNode, aspect):
|
|
522
|
-
if aspect == Aspect.CONCEPT:
|
|
523
|
-
return XmlUtil.hasChild(self, XbrlConst.euRend, "primaryItem")
|
|
524
|
-
elif aspect == Aspect.DIMENSIONS:
|
|
525
|
-
return XmlUtil.hasChild(self, XbrlConst.euRend, "explicitDimCoord")
|
|
526
|
-
elif aspect in (Aspect.PERIOD_TYPE, Aspect.INSTANT):
|
|
527
|
-
return XmlUtil.hasChild(self, XbrlConst.euRend, "timeReference")
|
|
528
|
-
elif isinstance(aspect, QName):
|
|
529
|
-
for e in XmlUtil.children(self, XbrlConst.euRend, "explicitDimCoord"):
|
|
530
|
-
if self.prefixedNameQname(e.get("dimension")) == aspect:
|
|
531
|
-
return True
|
|
532
|
-
return False
|
|
533
|
-
|
|
534
|
-
def aspectValueDependsOnVars(self, aspect):
|
|
535
|
-
return False
|
|
536
|
-
|
|
537
|
-
def aspectValue(self, xpCtx, aspect, inherit=False):
|
|
538
|
-
if aspect == Aspect.DIMENSIONS:
|
|
539
|
-
dims = set(self.prefixedNameQname(e.get("dimension"))
|
|
540
|
-
for e in XmlUtil.children(self, XbrlConst.euRend, "explicitDimCoord"))
|
|
541
|
-
if inherit and self.parentDefinitionNode is not None:
|
|
542
|
-
dims |= self.parentDefinitionNode.aspectValue(None, aspect, inherit)
|
|
543
|
-
return dims
|
|
544
|
-
if inherit and not self.hasAspect(None, aspect):
|
|
545
|
-
if self.parentDefinitionNode is not None:
|
|
546
|
-
return self.parentDefinitionNode.aspectValue(None, aspect, inherit)
|
|
547
|
-
return None
|
|
548
|
-
if aspect == Aspect.CONCEPT:
|
|
549
|
-
priItem = XmlUtil.childAttr(self, XbrlConst.euRend, "primaryItem", "name")
|
|
550
|
-
if priItem is not None:
|
|
551
|
-
return self.prefixedNameQname(priItem)
|
|
552
|
-
return None
|
|
553
|
-
elif aspect == Aspect.PERIOD_TYPE:
|
|
554
|
-
if XmlUtil.hasChild(self, XbrlConst.euRend, "timeReference"):
|
|
555
|
-
return "instant"
|
|
556
|
-
elif aspect == Aspect.INSTANT:
|
|
557
|
-
return XmlUtil.datetimeValue(XmlUtil.childAttr(self, XbrlConst.euRend, "timeReference", "instant"),
|
|
558
|
-
addOneDay=True)
|
|
559
|
-
elif isinstance(aspect, QName):
|
|
560
|
-
for e in XmlUtil.children(self, XbrlConst.euRend, "explicitDimCoord"):
|
|
561
|
-
if self.prefixedNameQname(e.get("dimension")) == aspect:
|
|
562
|
-
return self.prefixedNameQname(e.get("value"))
|
|
563
|
-
return None
|
|
564
|
-
|
|
565
|
-
'''
|
|
566
|
-
@property
|
|
567
|
-
def primaryItemQname(self):
|
|
568
|
-
priItem = XmlUtil.childAttr(self, XbrlConst.euRend, "primaryItem", "name")
|
|
569
|
-
if priItem is not None:
|
|
570
|
-
return self.prefixedNameQname(priItem)
|
|
571
|
-
return None
|
|
572
|
-
|
|
573
|
-
@property
|
|
574
|
-
def explicitDims(self):
|
|
575
|
-
return {(self.prefixedNameQname(e.get("dimension")),
|
|
576
|
-
self.prefixedNameQname(e.get("value")))
|
|
577
|
-
for e in XmlUtil.children(self, XbrlConst.euRend, "explicitDimCoord")}
|
|
578
|
-
|
|
579
|
-
@property
|
|
580
|
-
def instant(self):
|
|
581
|
-
return XmlUtil.datetimeValue(XmlUtil.childAttr(self, XbrlConst.euRend, "timeReference", "instant"),
|
|
582
|
-
addOneDay=True)
|
|
583
|
-
'''
|
|
584
|
-
|
|
585
|
-
def cardinalityAndDepth(self, structuralNode, **kwargs):
|
|
586
|
-
return (1, 1)
|
|
587
|
-
|
|
588
|
-
''' now only accessed from structural node
|
|
589
|
-
def header(self, role=None, lang=None, strip=False, evaluate=True):
|
|
590
|
-
return self.genLabel(role=role, lang=lang, strip=strip)
|
|
591
|
-
'''
|
|
592
|
-
|
|
593
|
-
@property
|
|
594
|
-
def hasValueExpression(self):
|
|
595
|
-
return False
|
|
596
|
-
|
|
597
|
-
@property
|
|
598
|
-
def definitionLabelsView(self):
|
|
599
|
-
return definitionModelLabelsView(self)
|
|
600
|
-
|
|
601
|
-
@property
|
|
602
|
-
def propertyView(self):
|
|
603
|
-
explicitDims = self.aspectValue(None, Aspect.DIMENSIONS, inherit=True)
|
|
604
|
-
return ((("id", self.id),
|
|
605
|
-
("primary item", self.aspectValue(None, Aspect.CONCEPT, inherit=True)),
|
|
606
|
-
("dimensions", "({0})".format(len(explicitDims)),
|
|
607
|
-
tuple((str(dim),str(self.aspectValue(None, dim, inherit=True)))
|
|
608
|
-
for dim in sorted(explicitDims)))
|
|
609
|
-
if explicitDims else (),
|
|
610
|
-
("abstract", self.abstract)) +
|
|
611
|
-
self.definitionLabelsView)
|
|
612
|
-
|
|
613
|
-
def __repr__(self):
|
|
614
|
-
return ("axisCoord[{0}]{1})".format(self.objectId(),self.propertyView))
|
|
615
|
-
|
|
616
|
-
# 2011 Table linkbase
|
|
617
|
-
class ModelTable(ModelFormulaResource):
|
|
723
|
+
# REC Table linkbase
|
|
724
|
+
class DefnMdlTable(ModelFormulaResource):
|
|
618
725
|
def init(self, modelDocument):
|
|
619
|
-
super(
|
|
726
|
+
super(DefnMdlTable, self).init(modelDocument)
|
|
620
727
|
self.modelXbrl.modelRenderingTables.add(self)
|
|
621
728
|
self.modelXbrl.hasRenderingTables = True
|
|
622
729
|
self.aspectsInTaggedConstraintSets = set()
|
|
623
|
-
|
|
624
730
|
def clear(self):
|
|
625
731
|
if getattr(self, "_rendrCntx"):
|
|
626
732
|
self._rendrCntx.close()
|
|
627
733
|
super(ModelTable, self).clear() # delete children
|
|
628
|
-
|
|
629
734
|
@property
|
|
630
|
-
def
|
|
631
|
-
return
|
|
632
|
-
|
|
735
|
+
def isMerged(self):
|
|
736
|
+
return False
|
|
737
|
+
@property
|
|
738
|
+
def parentTableNode(self):
|
|
739
|
+
return self
|
|
740
|
+
@property
|
|
741
|
+
def parentChildOrder(self):
|
|
742
|
+
return parentChildOrder(self)
|
|
633
743
|
@property
|
|
634
744
|
def descendantArcroles(self):
|
|
635
|
-
return (XbrlConst.tableFilter, XbrlConst.tableFilterMMDD,
|
|
636
|
-
XbrlConst.tableBreakdown, XbrlConst.tableBreakdownMMDD,
|
|
745
|
+
return (XbrlConst.tableFilter, XbrlConst.tableFilterMMDD,
|
|
746
|
+
XbrlConst.tableBreakdown, XbrlConst.tableBreakdownMMDD,
|
|
637
747
|
XbrlConst.tableParameter, XbrlConst.tableParameterMMDD)
|
|
638
|
-
|
|
748
|
+
@property
|
|
749
|
+
def ancestorArcroles(self):
|
|
750
|
+
return ()
|
|
751
|
+
@property
|
|
752
|
+
def aspectModel(self):
|
|
753
|
+
return "dimensional" # attribute removed 2013-06, always dimensional
|
|
639
754
|
@property
|
|
640
755
|
def filterRelationships(self):
|
|
641
756
|
try:
|
|
642
757
|
return self._filterRelationships
|
|
643
758
|
except AttributeError:
|
|
644
759
|
rels = [] # order so conceptName filter is first (if any) (may want more sorting in future)
|
|
645
|
-
for rel in self.modelXbrl.relationshipSet((XbrlConst.tableFilter, XbrlConst.tableFilterMMDD
|
|
760
|
+
for rel in self.modelXbrl.relationshipSet((XbrlConst.tableFilter, XbrlConst.tableFilterMMDD)).fromModelObject(self):
|
|
646
761
|
if isinstance(rel.toModelObject, ModelConceptName):
|
|
647
762
|
rels.insert(0, rel) # put conceptName filters first
|
|
648
763
|
else:
|
|
649
764
|
rels.append(rel)
|
|
650
765
|
self._filterRelationships = rels
|
|
651
766
|
return rels
|
|
652
|
-
|
|
653
767
|
''' now only accessed from structural node
|
|
654
768
|
def header(self, role=None, lang=None, strip=False, evaluate=True):
|
|
655
769
|
return self.genLabel(role=role, lang=lang, strip=strip)
|
|
656
770
|
'''
|
|
657
|
-
|
|
658
771
|
@property
|
|
659
772
|
def definitionLabelsView(self):
|
|
660
|
-
return
|
|
661
|
-
|
|
773
|
+
return defnMdlLabelsView(self)
|
|
662
774
|
def filteredFacts(self, xpCtx, facts):
|
|
663
775
|
return formulaEvaluatorFilterFacts(xpCtx, VariableBinding(xpCtx),
|
|
664
776
|
facts, self.filterRelationships, None)
|
|
665
|
-
|
|
666
777
|
@property
|
|
667
778
|
def renderingXPathContext(self):
|
|
668
779
|
try:
|
|
669
780
|
return self._rendrCntx
|
|
670
781
|
except AttributeError:
|
|
671
|
-
xpCtx = getattr(self.modelXbrl, "rendrCntx", None)
|
|
782
|
+
xpCtx = getattr(self.modelXbrl, "rendrCntx", None)
|
|
672
783
|
if xpCtx is not None:
|
|
673
784
|
self._rendrCntx = xpCtx.copy()
|
|
674
785
|
for tblParamRel in self.modelXbrl.relationshipSet((XbrlConst.tableParameter, XbrlConst.tableParameterMMDD)).fromModelObject(self):
|
|
@@ -679,107 +790,147 @@ class ModelTable(ModelFormulaResource):
|
|
|
679
790
|
else:
|
|
680
791
|
self._rendrCntx = None
|
|
681
792
|
return self._rendrCntx
|
|
682
|
-
|
|
683
793
|
@property
|
|
684
794
|
def propertyView(self):
|
|
685
|
-
return ((("id", self.id),) +
|
|
795
|
+
return ((("id", self.id),("xlink:label", self.xlinkLabel)) +
|
|
686
796
|
self.definitionLabelsView)
|
|
687
|
-
|
|
688
797
|
def __repr__(self):
|
|
689
|
-
return ("
|
|
690
|
-
|
|
691
|
-
|
|
798
|
+
return ("DefnMdlTable[{0}]{1})".format(self.objectId(),self.propertyView))
|
|
799
|
+
@property
|
|
800
|
+
def definitionNodeView(self):
|
|
801
|
+
return XmlUtil.xmlstring(self, stripXmlns=True, prettyPrint=True)
|
|
802
|
+
@property
|
|
803
|
+
def definitionLabelsView(self):
|
|
804
|
+
return defnMdlLabelsView(self)
|
|
805
|
+
class DefnMdlBreakdown(ModelFormulaResource):
|
|
806
|
+
strctMdlRollupType = ROLLUP_FOR_DEFINITION_NODE
|
|
692
807
|
def init(self, modelDocument):
|
|
693
|
-
super(
|
|
694
|
-
|
|
808
|
+
super(DefnMdlBreakdown, self).init(modelDocument)
|
|
809
|
+
@property
|
|
810
|
+
def isMerged(self):
|
|
811
|
+
return False
|
|
812
|
+
def hasAspect(self, *args):
|
|
813
|
+
return False
|
|
695
814
|
@property
|
|
696
|
-
def
|
|
815
|
+
def parentTableNode(self):
|
|
816
|
+
for rel in self.modelXbrl.relationshipSet("Table-rendering").toModelObject(self):
|
|
817
|
+
if rel.fromModelObject is not None:
|
|
818
|
+
p = rel.fromModelObject.parentTableNode
|
|
819
|
+
if p is not None:
|
|
820
|
+
return p
|
|
697
821
|
return None
|
|
698
|
-
|
|
822
|
+
@property
|
|
823
|
+
def parentChildOrder(self):
|
|
824
|
+
return parentChildOrder(self)
|
|
699
825
|
@property
|
|
700
826
|
def descendantArcroles(self):
|
|
701
|
-
return (XbrlConst.
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
827
|
+
return (XbrlConst.tableBreakdownTree, XbrlConst.tableBreakdownTreeMMDD)
|
|
828
|
+
@property
|
|
829
|
+
def ancestorArcroles(self):
|
|
830
|
+
return (XbrlConst.tableModel, XbrlConst.tableModelMMDD)
|
|
831
|
+
@property
|
|
832
|
+
def childrenCoverSameAspects(self):
|
|
833
|
+
return False
|
|
834
|
+
def aspectsCovered(self):
|
|
835
|
+
return EMPTY_SET
|
|
836
|
+
@property
|
|
837
|
+
def constraintSets(self):
|
|
838
|
+
return EMPTY_DICT
|
|
839
|
+
@property
|
|
840
|
+
def isAbstract(self):
|
|
841
|
+
return False
|
|
842
|
+
def cardinalityAndDepth(self, structuralNode, **kwargs):
|
|
843
|
+
return (1,
|
|
844
|
+
1 if (structuralNode.header(evaluate=False) is not None) else 0)
|
|
845
|
+
@property
|
|
846
|
+
def propertyView(self):
|
|
847
|
+
return ((("id", self.id),
|
|
848
|
+
("xlink:label", self.xlinkLabel),
|
|
849
|
+
("parent child order", self.get("parentChildOrder"))) +
|
|
850
|
+
defnMdlLabelsView(self))
|
|
851
|
+
def __repr__(self):
|
|
852
|
+
return ("DefnMdlBreakdown[{0}]{1})".format(self.objectId(),self.propertyView))
|
|
853
|
+
@property
|
|
854
|
+
def definitionNodeView(self):
|
|
855
|
+
return XmlUtil.xmlstring(self, stripXmlns=True, prettyPrint=True)
|
|
856
|
+
@property
|
|
857
|
+
def definitionLabelsView(self):
|
|
858
|
+
return defnMdlLabelsView(self)
|
|
859
|
+
class DefnMdlDefinitionNode(ModelFormulaResource):
|
|
860
|
+
aspectModel = "dimensional"
|
|
861
|
+
def init(self, modelDocument):
|
|
862
|
+
super(DefnMdlDefinitionNode, self).init(modelDocument)
|
|
863
|
+
@property
|
|
864
|
+
def isMerged(self):
|
|
865
|
+
return False
|
|
866
|
+
@property
|
|
867
|
+
def parentTableNode(self):
|
|
868
|
+
for rel in self.modelXbrl.relationshipSet("Table-rendering").toModelObject(self):
|
|
869
|
+
if rel.fromModelObject is not None:
|
|
870
|
+
p = rel.fromModelObject.parentTableNode
|
|
871
|
+
if p is not None:
|
|
872
|
+
return p
|
|
873
|
+
return None
|
|
874
|
+
@property
|
|
875
|
+
def descendantArcroles(self):
|
|
876
|
+
return (XbrlConst.tableDefinitionNodeSubtree, XbrlConst.tableDefinitionNodeSubtreeMMDD)
|
|
705
877
|
def hasAspect(self, structuralNode, aspect):
|
|
706
878
|
return False
|
|
707
|
-
|
|
708
879
|
def aspectValueDependsOnVars(self, aspect):
|
|
709
880
|
return False
|
|
710
|
-
|
|
711
881
|
@property
|
|
712
882
|
def variablename(self):
|
|
713
883
|
"""(str) -- name attribute"""
|
|
714
884
|
return self.getStripped("name")
|
|
715
|
-
|
|
716
885
|
@property
|
|
717
886
|
def variableQname(self):
|
|
718
887
|
"""(QName) -- resolved name for an XPath bound result having a QName name attribute"""
|
|
719
888
|
varName = self.variablename
|
|
720
889
|
return qname(self, varName, noPrefixIsNoNamespace=True) if varName else None
|
|
721
|
-
|
|
722
890
|
def aspectValue(self, xpCtx, aspect, inherit=True):
|
|
723
891
|
if aspect == Aspect.DIMENSIONS:
|
|
724
892
|
return []
|
|
725
893
|
return None
|
|
726
|
-
|
|
727
894
|
def aspectsCovered(self):
|
|
728
|
-
return
|
|
729
|
-
|
|
895
|
+
return EMPTY_SET
|
|
730
896
|
@property
|
|
731
897
|
def constraintSets(self):
|
|
732
898
|
return {None: self}
|
|
733
|
-
|
|
734
899
|
@property
|
|
735
900
|
def tagSelector(self):
|
|
736
901
|
return self.get("tagSelector")
|
|
737
|
-
|
|
738
902
|
@property
|
|
739
903
|
def valueExpression(self):
|
|
740
904
|
return self.get("value")
|
|
741
|
-
|
|
742
905
|
@property
|
|
743
906
|
def hasValueExpression(self):
|
|
744
907
|
return bool(self.valueProg) # non empty program
|
|
745
|
-
|
|
746
908
|
def compile(self):
|
|
747
909
|
if not hasattr(self, "valueProg"):
|
|
748
910
|
value = self.valueExpression
|
|
749
911
|
self.valueProg = XPathParser.parse(self, value, self, "value", Trace.VARIABLE)
|
|
750
912
|
# duplicates formula resource for RuleAxis but not for other subclasses
|
|
751
|
-
super(
|
|
752
|
-
|
|
913
|
+
super(DefnMdlDefinitionNode, self).compile()
|
|
753
914
|
def evalValueExpression(self, xpCtx, fact):
|
|
754
915
|
# compiled by FormulaResource compile()
|
|
755
916
|
return xpCtx.evaluateAtomicValue(self.valueProg, 'xs:string', fact)
|
|
756
|
-
|
|
757
917
|
'''
|
|
758
918
|
@property
|
|
759
919
|
def primaryItemQname(self): # for compatibility with viewRelationsihps
|
|
760
920
|
return None
|
|
761
|
-
|
|
762
921
|
@property
|
|
763
922
|
def explicitDims(self):
|
|
764
923
|
return set()
|
|
765
924
|
'''
|
|
766
|
-
|
|
767
925
|
@property
|
|
768
926
|
def isAbstract(self):
|
|
769
927
|
return False
|
|
770
|
-
|
|
771
928
|
@property
|
|
772
929
|
def isMerged(self):
|
|
773
930
|
return False
|
|
774
|
-
|
|
775
|
-
@property
|
|
776
|
-
def isRollUp(self):
|
|
777
|
-
return self.get("rollUp") == 'true'
|
|
778
|
-
|
|
779
931
|
def cardinalityAndDepth(self, structuralNode, **kwargs):
|
|
780
932
|
return (1,
|
|
781
933
|
1 if (structuralNode.header(evaluate=False) is not None) else 0)
|
|
782
|
-
|
|
783
934
|
''' now only accessed from structural node (mulst have table context for evaluate)
|
|
784
935
|
def header(self, role=None, lang=None, strip=False, evaluate=True):
|
|
785
936
|
if role is None:
|
|
@@ -797,55 +948,31 @@ class ModelDefinitionNode(ModelFormulaResource):
|
|
|
797
948
|
return result
|
|
798
949
|
return self.genLabel(role=role, lang=lang, strip=strip)
|
|
799
950
|
'''
|
|
800
|
-
|
|
801
951
|
@property
|
|
802
952
|
def definitionNodeView(self):
|
|
803
953
|
return XmlUtil.xmlstring(self, stripXmlns=True, prettyPrint=True)
|
|
804
|
-
|
|
805
|
-
|
|
806
954
|
@property
|
|
807
955
|
def definitionLabelsView(self):
|
|
808
|
-
return
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
def init(self, modelDocument):
|
|
812
|
-
super(ModelBreakdown, self).init(modelDocument)
|
|
813
|
-
|
|
814
|
-
@property
|
|
815
|
-
def parentChildOrder(self):
|
|
816
|
-
return self.get("parentChildOrder")
|
|
817
|
-
|
|
818
|
-
@property
|
|
819
|
-
def descendantArcroles(self):
|
|
820
|
-
return (XbrlConst.tableBreakdownTree, XbrlConst.tableBreakdownTreeMMDD, XbrlConst.tableBreakdownTree201305)
|
|
821
|
-
|
|
822
|
-
@property
|
|
823
|
-
def propertyView(self):
|
|
824
|
-
return ((("id", self.id),
|
|
825
|
-
("parent child order", self.parentChildOrder),
|
|
826
|
-
("definition", self.definitionNodeView)) +
|
|
827
|
-
self.definitionLabelsView)
|
|
828
|
-
|
|
829
|
-
class ModelClosedDefinitionNode(ModelDefinitionNode):
|
|
956
|
+
return defnMdlLabelsView(self)
|
|
957
|
+
class DefnMdlClosedDefinitionNode(DefnMdlDefinitionNode):
|
|
958
|
+
strctMdlRollupType = ROLLUP_FOR_CLOSED_DEFINITION_NODE
|
|
830
959
|
def init(self, modelDocument):
|
|
831
|
-
super(
|
|
832
|
-
|
|
960
|
+
super(DefnMdlClosedDefinitionNode, self).init(modelDocument)
|
|
833
961
|
@property
|
|
834
962
|
def abstract(self):
|
|
835
963
|
return self.get("abstract")
|
|
836
|
-
|
|
837
964
|
@property
|
|
838
965
|
def isAbstract(self):
|
|
839
966
|
return self.abstract == 'true'
|
|
840
|
-
|
|
841
967
|
@property
|
|
842
968
|
def parentChildOrder(self):
|
|
843
|
-
return self
|
|
844
|
-
|
|
969
|
+
return parentChildOrder(self)
|
|
845
970
|
@property
|
|
846
971
|
def descendantArcroles(self):
|
|
847
|
-
return (XbrlConst.tableDefinitionNodeSubtree, XbrlConst.tableDefinitionNodeSubtreeMMDD
|
|
848
|
-
|
|
972
|
+
return (XbrlConst.tableDefinitionNodeSubtree, XbrlConst.tableDefinitionNodeSubtreeMMDD)
|
|
973
|
+
@property
|
|
974
|
+
def ancestorArcroles(self):
|
|
975
|
+
return (XbrlConst.tableBreakdownTree, XbrlConst.tableBreakdownTreeMMDD, XbrlConst.tableDefinitionNodeSubtree, XbrlConst.tableDefinitionNodeSubtreeMMDD)
|
|
849
976
|
def filteredFacts(self, xpCtx, facts):
|
|
850
977
|
aspects = self.aspectsCovered()
|
|
851
978
|
axisAspectValues = dict((aspect, self.aspectValue(xpCtx, aspect))
|
|
@@ -854,55 +981,55 @@ class ModelClosedDefinitionNode(ModelDefinitionNode):
|
|
|
854
981
|
return set(fact
|
|
855
982
|
for fact in facts
|
|
856
983
|
if aspectsMatch(xpCtx, fact, fp, aspects))
|
|
857
|
-
|
|
858
|
-
|
|
984
|
+
@property
|
|
985
|
+
def childrenCoverSameAspects(self):
|
|
986
|
+
# indicates this definition node has children with same aspect
|
|
987
|
+
descendantRels = self.modelXbrl.relationshipSet(self.descendantArcroles).fromModelObject(self)
|
|
988
|
+
if descendantRels:
|
|
989
|
+
selfAspectsCovered = self.aspectsCovered()
|
|
990
|
+
if selfAspectsCovered: # is roll up if self and descendants cover same aspects
|
|
991
|
+
return all(selfAspectsCovered == rel.toModelObject.aspectsCovered()
|
|
992
|
+
for rel in descendantRels
|
|
993
|
+
if not isinstance(rel.toModelObject,(NoneType,DefnMdlTable)))
|
|
994
|
+
aDescendantAspectsCovered = None
|
|
995
|
+
for rel in descendantRels: # no self aspects, find any descendant's aspects
|
|
996
|
+
if rel.toModelObject is not None:
|
|
997
|
+
aDescendantAspectsCovered = rel.toModelObject.aspectsCovered()
|
|
998
|
+
break
|
|
999
|
+
if aDescendantAspectsCovered: # all descendants must contribute same aspects to be a roll up
|
|
1000
|
+
return all(aDescendantAspectsCovered == rel.toModelObject.aspectsCovered()
|
|
1001
|
+
for rel in descendantRels
|
|
1002
|
+
if rel.toModelObject is not None)
|
|
1003
|
+
return False
|
|
1004
|
+
class DefnMdlConstraintSet(ModelFormulaRules):
|
|
859
1005
|
def init(self, modelDocument):
|
|
860
|
-
super(
|
|
861
|
-
self._locationSourceVar = self.source(Aspect.LOCATION_RULE, acceptFormulaSource=False)
|
|
862
|
-
self._locationAspectCovered = set()
|
|
1006
|
+
super(DefnMdlConstraintSet, self).init(modelDocument)
|
|
863
1007
|
self.aspectValues = {} # only needed if error blocks compiling this node, replaced by compile()
|
|
864
1008
|
self.aspectProgs = {} # ditto
|
|
865
|
-
|
|
866
|
-
|
|
1009
|
+
def isMerged(self):
|
|
1010
|
+
return False
|
|
867
1011
|
def hasAspect(self, structuralNode, aspect, inherit=None):
|
|
868
1012
|
return self._hasAspect(structuralNode, aspect, inherit)
|
|
869
|
-
|
|
870
1013
|
def _hasAspect(self, structuralNode, aspect, inherit=None): # opaque from ModelRuleDefinitionNode
|
|
871
|
-
if aspect
|
|
872
|
-
return True
|
|
873
|
-
elif aspect in aspectRuleAspects:
|
|
1014
|
+
if aspect in aspectRuleAspects:
|
|
874
1015
|
return any(self.hasRule(a) for a in aspectRuleAspects[aspect])
|
|
875
1016
|
return self.hasRule(aspect)
|
|
876
|
-
|
|
877
1017
|
def aspectValue(self, xpCtx, aspect, inherit=None):
|
|
878
1018
|
try:
|
|
879
1019
|
# if xpCtx is None: xpCtx = self.modelXbrl.rendrCntx (must have xpCtx of callint table)
|
|
880
|
-
if aspect == Aspect.LOCATION and self._locationSourceVar in xpCtx.inScopeVars:
|
|
881
|
-
return xpCtx.inScopeVars[self._locationSourceVar]
|
|
882
1020
|
return self.evaluateRule(xpCtx, aspect)
|
|
883
1021
|
except AttributeError:
|
|
884
1022
|
return '(unavailable)' # table defective or not initialized
|
|
885
|
-
|
|
886
1023
|
def aspectValueDependsOnVars(self, aspect):
|
|
887
|
-
return aspect in self.aspectProgs.keys()
|
|
888
|
-
|
|
1024
|
+
return aspect in self.aspectProgs.keys()
|
|
889
1025
|
def aspectsCovered(self):
|
|
890
|
-
return self.aspectValues.keys() | self.aspectProgs.keys()
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
@property
|
|
894
|
-
def aspectModel(self):
|
|
895
|
-
for frameRecord in inspect.stack():
|
|
896
|
-
obj = frameRecord[0].f_locals['self']
|
|
897
|
-
if isinstance(obj,ModelTable):
|
|
898
|
-
return obj.aspectModel
|
|
899
|
-
return None
|
|
900
|
-
|
|
1026
|
+
return self.aspectValues.keys() | self.aspectProgs.keys()
|
|
1027
|
+
def aspectsModelCovered(self):
|
|
1028
|
+
return set(aspectModelAspect.get(aspect,aspect) for aspect in self.aspectsCovered())
|
|
901
1029
|
'''
|
|
902
1030
|
@property
|
|
903
1031
|
def primaryItemQname(self):
|
|
904
1032
|
return self.evaluateRule(self.modelXbrl.rendrCntx, Aspect.CONCEPT)
|
|
905
|
-
|
|
906
1033
|
@property
|
|
907
1034
|
def explicitDims(self):
|
|
908
1035
|
dimMemSet = set()
|
|
@@ -913,7 +1040,6 @@ class ModelConstraintSet(ModelFormulaRules):
|
|
|
913
1040
|
if mem: # may be none if dimension was omitted
|
|
914
1041
|
dimMemSet.add( (dim, mem) )
|
|
915
1042
|
return dimMemSet
|
|
916
|
-
|
|
917
1043
|
@property
|
|
918
1044
|
def instant(self):
|
|
919
1045
|
periodType = self.evaluateRule(self.modelXbrl.rendrCntx, Aspect.PERIOD_TYPE)
|
|
@@ -923,33 +1049,26 @@ class ModelConstraintSet(ModelFormulaRules):
|
|
|
923
1049
|
{"instant": Aspect.INSTANT,
|
|
924
1050
|
"duration": Aspect.END}[periodType])
|
|
925
1051
|
'''
|
|
926
|
-
|
|
927
1052
|
def cardinalityAndDepth(self, structuralNode, **kwargs):
|
|
928
|
-
if self.aspectValues or self.aspectProgs or structuralNode.header(evaluate=False) is not None:
|
|
1053
|
+
if self.aspectValues or self.aspectProgs or structuralNode.header(role="*", evaluate=False) is not None:
|
|
929
1054
|
return (1, 1)
|
|
930
1055
|
else:
|
|
931
1056
|
return (0, 0)
|
|
932
|
-
|
|
933
|
-
class ModelRuleSet(ModelConstraintSet, ModelFormulaResource):
|
|
1057
|
+
class DefnMdlRuleSet(DefnMdlConstraintSet, ModelFormulaResource):
|
|
934
1058
|
def init(self, modelDocument):
|
|
935
|
-
super(
|
|
936
|
-
|
|
1059
|
+
super(DefnMdlRuleSet, self).init(modelDocument)
|
|
937
1060
|
@property
|
|
938
1061
|
def tagName(self): # can't call it tag because that would hide ElementBase.tag
|
|
939
1062
|
return self.get("tag")
|
|
940
|
-
|
|
941
|
-
class ModelRuleDefinitionNode(ModelConstraintSet, ModelClosedDefinitionNode):
|
|
1063
|
+
class DefnMdlRuleDefinitionNode(DefnMdlConstraintSet, DefnMdlClosedDefinitionNode):
|
|
942
1064
|
def init(self, modelDocument):
|
|
943
|
-
super(
|
|
944
|
-
|
|
1065
|
+
super(DefnMdlRuleDefinitionNode, self).init(modelDocument)
|
|
945
1066
|
@property
|
|
946
1067
|
def merge(self):
|
|
947
1068
|
return self.get("merge")
|
|
948
|
-
|
|
949
1069
|
@property
|
|
950
1070
|
def isMerged(self):
|
|
951
|
-
return self.merge
|
|
952
|
-
|
|
1071
|
+
return self.merge in ("true","1")
|
|
953
1072
|
@property
|
|
954
1073
|
def constraintSets(self):
|
|
955
1074
|
try:
|
|
@@ -960,11 +1079,9 @@ class ModelRuleDefinitionNode(ModelConstraintSet, ModelClosedDefinitionNode):
|
|
|
960
1079
|
if self.aspectsCovered(): # any local rule?
|
|
961
1080
|
self._constraintSets[None] = self
|
|
962
1081
|
return self._constraintSets
|
|
963
|
-
|
|
964
1082
|
def hasAspect(self, structuralNode, aspect):
|
|
965
1083
|
return any(constraintSet._hasAspect(structuralNode, aspect)
|
|
966
1084
|
for constraintSet in self.constraintSets.values())
|
|
967
|
-
|
|
968
1085
|
@property
|
|
969
1086
|
def aspectsInTaggedConstraintSet(self):
|
|
970
1087
|
try:
|
|
@@ -977,167 +1094,95 @@ class ModelRuleDefinitionNode(ModelConstraintSet, ModelClosedDefinitionNode):
|
|
|
977
1094
|
if aspect != Aspect.DIMENSIONS:
|
|
978
1095
|
self._aspectsInTaggedConstraintSet.add(aspect)
|
|
979
1096
|
return self._aspectsInTaggedConstraintSet
|
|
980
|
-
|
|
981
1097
|
def compile(self):
|
|
982
|
-
super(
|
|
1098
|
+
super(DefnMdlRuleDefinitionNode, self).compile()
|
|
983
1099
|
for constraintSet in self.constraintSets.values():
|
|
984
1100
|
if constraintSet != self: # compile nested constraint sets
|
|
985
1101
|
constraintSet.compile()
|
|
986
|
-
|
|
987
1102
|
@property
|
|
988
1103
|
def propertyView(self):
|
|
989
1104
|
return ((("id", self.id),
|
|
1105
|
+
("xlink:label", self.xlinkLabel),
|
|
990
1106
|
("abstract", self.abstract),
|
|
991
1107
|
("merge", self.merge),
|
|
992
1108
|
("definition", self.definitionNodeView)) +
|
|
993
1109
|
self.definitionLabelsView)
|
|
994
|
-
|
|
995
1110
|
def __repr__(self):
|
|
996
|
-
return ("
|
|
997
|
-
|
|
998
|
-
# deprecated 2013-05-17
|
|
999
|
-
class ModelTupleDefinitionNode(ModelRuleDefinitionNode):
|
|
1000
|
-
def init(self, modelDocument):
|
|
1001
|
-
super(ModelTupleDefinitionNode, self).init(modelDocument)
|
|
1002
|
-
|
|
1003
|
-
@property
|
|
1004
|
-
def descendantArcroles(self):
|
|
1005
|
-
return (XbrlConst.tableTupleContent201301, XbrlConst.tableTupleContent2011, XbrlConst.tableDefinitionNodeMessage201301, XbrlConst.tableAxisMessage2011)
|
|
1006
|
-
|
|
1007
|
-
@property
|
|
1008
|
-
def contentRelationships(self):
|
|
1009
|
-
return self.modelXbrl.relationshipSet((XbrlConst.tableTupleContent201301, XbrlConst.tableTupleContent2011)).fromModelObject(self)
|
|
1010
|
-
|
|
1011
|
-
def hasAspect(self, structuralNode, aspect, inherit=None):
|
|
1012
|
-
return aspect == Aspect.LOCATION # non-location aspects aren't leaked to ordinate for Tuple or self.hasRule(aspect)
|
|
1013
|
-
|
|
1014
|
-
def aspectValue(self, xpCtx, aspect, inherit=None):
|
|
1015
|
-
return self.evaluateRule(xpCtx, aspect)
|
|
1016
|
-
|
|
1017
|
-
def aspectsCovered(self):
|
|
1018
|
-
return {Aspect.LOCATION} # tuple's aspects don't leak to ordinates
|
|
1019
|
-
|
|
1020
|
-
def tupleAspectsCovered(self):
|
|
1021
|
-
return self.aspectValues.keys() | self.aspectProgs.keys() | {Aspect.LOCATION}
|
|
1022
|
-
|
|
1023
|
-
def filteredFacts(self, xpCtx, facts):
|
|
1024
|
-
aspects = self.aspectsCovered()
|
|
1025
|
-
axisAspectValues = dict((aspect, self.tupleAspectsCovered(aspect))
|
|
1026
|
-
for aspect in aspects
|
|
1027
|
-
if aspect != Aspect.LOCATION) # location determined by ordCntx, not axis
|
|
1028
|
-
fp = FactPrototype(self, axisAspectValues)
|
|
1029
|
-
return set(fact
|
|
1030
|
-
for fact in facts
|
|
1031
|
-
if fact.isTuple and aspectsMatch(xpCtx, fact, fp, aspects))
|
|
1032
|
-
|
|
1033
|
-
class ModelCompositionDefinitionNode(ModelClosedDefinitionNode):
|
|
1034
|
-
def init(self, modelDocument):
|
|
1035
|
-
super(ModelCompositionDefinitionNode, self).init(modelDocument)
|
|
1036
|
-
|
|
1037
|
-
@property
|
|
1038
|
-
def abstract(self): # always abstract, no filters, no data
|
|
1039
|
-
return 'true'
|
|
1040
|
-
|
|
1041
|
-
class ModelRelationshipDefinitionNode(ModelClosedDefinitionNode):
|
|
1111
|
+
return ("DefnMdlRuleDefinitionNode[{0}]{1})".format(self.objectId(),self.propertyView))
|
|
1112
|
+
class DefnMdlRelationshipNode(DefnMdlClosedDefinitionNode):
|
|
1042
1113
|
def init(self, modelDocument):
|
|
1043
|
-
super(
|
|
1044
|
-
|
|
1114
|
+
super(DefnMdlRelationshipNode, self).init(modelDocument)
|
|
1115
|
+
self.relationshipSourceQnamesAndQnameExpressionProgs = []
|
|
1045
1116
|
def aspectsCovered(self):
|
|
1046
1117
|
return {Aspect.CONCEPT}
|
|
1047
|
-
|
|
1048
1118
|
@property
|
|
1049
1119
|
def conceptQname(self):
|
|
1050
1120
|
name = self.getStripped("conceptname")
|
|
1051
1121
|
return qname(self, name, noPrefixIsNoNamespace=True) if name else None
|
|
1052
|
-
|
|
1053
|
-
@property
|
|
1054
|
-
def relationshipSourceQname(self):
|
|
1055
|
-
sourceQname = XmlUtil.child(self, (XbrlConst.table, XbrlConst.tableMMDD, XbrlConst.table201305, XbrlConst.table201301, XbrlConst.table2011), "relationshipSource")
|
|
1056
|
-
if sourceQname is not None:
|
|
1057
|
-
return qname( sourceQname, XmlUtil.text(sourceQname) )
|
|
1058
|
-
return None
|
|
1059
|
-
|
|
1060
1122
|
@property
|
|
1061
1123
|
def linkrole(self):
|
|
1062
|
-
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD
|
|
1063
|
-
|
|
1064
|
-
@property
|
|
1065
|
-
def axis(self):
|
|
1066
|
-
a = XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD, XbrlConst.table201305, XbrlConst.table201301, XbrlConst.table2011), ("axis", "formulaAxis"))
|
|
1067
|
-
if not a: a = 'descendant' # would be an XML error
|
|
1068
|
-
return a
|
|
1069
|
-
|
|
1124
|
+
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD), "linkrole")
|
|
1070
1125
|
@property
|
|
1071
|
-
def
|
|
1072
|
-
return self.
|
|
1073
|
-
|
|
1126
|
+
def formulaAxis(self):
|
|
1127
|
+
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD), "formulaAxis")
|
|
1074
1128
|
@property
|
|
1075
1129
|
def generations(self):
|
|
1076
1130
|
try:
|
|
1077
|
-
return int( XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD
|
|
1131
|
+
return int( XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD), "generations") )
|
|
1078
1132
|
except (TypeError, ValueError):
|
|
1079
|
-
if self.
|
|
1133
|
+
if self.formulaAxis in ('sibling', 'sibling-or-self', 'child', 'parent'):
|
|
1080
1134
|
return 1
|
|
1081
1135
|
return 0
|
|
1082
|
-
|
|
1083
1136
|
@property
|
|
1084
|
-
def
|
|
1085
|
-
return
|
|
1086
|
-
|
|
1137
|
+
def relationshipSourceQnamesAndExpressions(self):
|
|
1138
|
+
return [qname(e, XmlUtil.text(e)) if e.qname.localName == "relationshipSource" else XmlUtil.text(e)
|
|
1139
|
+
for e in XmlUtil.children(self, (XbrlConst.table, XbrlConst.tableMMDD), ("relationshipSource", "relationshipSourceExpression"))]
|
|
1087
1140
|
@property
|
|
1088
1141
|
def linkroleExpression(self):
|
|
1089
|
-
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD
|
|
1090
|
-
|
|
1142
|
+
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD), "linkroleExpression")
|
|
1091
1143
|
@property
|
|
1092
|
-
def
|
|
1093
|
-
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD
|
|
1094
|
-
|
|
1144
|
+
def formulaAxisExpression(self):
|
|
1145
|
+
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD), "formulaAxisExpression")
|
|
1095
1146
|
@property
|
|
1096
1147
|
def generationsExpression(self):
|
|
1097
|
-
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD
|
|
1098
|
-
|
|
1148
|
+
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD), "generationsExpression")
|
|
1099
1149
|
def compile(self):
|
|
1100
|
-
if not hasattr(self, "
|
|
1101
|
-
self.
|
|
1150
|
+
if not hasattr(self, "linkroleExpressionProg"):
|
|
1151
|
+
self.relationshipSourceQnamesAndQnameExpressionProgs = [
|
|
1152
|
+
qe if isinstance(qe, QName) else XPathParser.parse(self, qe, self, "relationshipSourceQnamesExpressionProg", Trace.VARIABLE)
|
|
1153
|
+
for qe in self.relationshipSourceQnamesAndExpressions]
|
|
1102
1154
|
self.linkroleExpressionProg = XPathParser.parse(self, self.linkroleExpression, self, "linkroleQnameExpressionProg", Trace.VARIABLE)
|
|
1103
|
-
self.
|
|
1155
|
+
self.formulaAxisExpressionProg = XPathParser.parse(self, self.formulaAxisExpression, self, "formulaAxisExpressionProg", Trace.VARIABLE)
|
|
1104
1156
|
self.generationsExpressionProg = XPathParser.parse(self, self.generationsExpression, self, "generationsExpressionProg", Trace.VARIABLE)
|
|
1105
|
-
super(
|
|
1106
|
-
|
|
1157
|
+
super(DefnMdlRelationshipNode, self).compile()
|
|
1107
1158
|
def variableRefs(self, progs=[], varRefSet=None):
|
|
1108
|
-
if self.
|
|
1159
|
+
if self.relationshipSourceQnamesAndQnameExpressionProgs and self.relationshipSourceQnamesAndQnameExpressionProgs != [XbrlConst.qnXfiRoot]:
|
|
1109
1160
|
if varRefSet is None: varRefSet = set()
|
|
1110
|
-
varRefSet.
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1161
|
+
#varRefSet.update(self.relationshipSourceQnamesAndQnameExpressionProgs)
|
|
1162
|
+
varRefs = super(DefnMdlRelationshipNode, self).variableRefs(
|
|
1163
|
+
[p
|
|
1164
|
+
for p in self.relationshipSourceQnamesAndQnameExpressionProgs + [
|
|
1165
|
+
self.linkroleExpressionProg, self.formulaAxisExpressionProg,
|
|
1166
|
+
self.generationsExpressionProg]
|
|
1115
1167
|
if p], varRefSet)
|
|
1116
|
-
|
|
1117
|
-
def
|
|
1118
|
-
if
|
|
1119
|
-
|
|
1120
|
-
return xpCtx.evaluateAtomicValue(self.relationshipSourceQnameExpressionProg, 'xs:QName', fact)
|
|
1121
|
-
|
|
1168
|
+
return varRefs
|
|
1169
|
+
def evalRrelationshipSourceQnames(self, xpCtx, fact=None):
|
|
1170
|
+
return [qp if isinstance(qp, QName) else xpCtx.evaluateAtomicValue(qp, 'xs:QName', fact)
|
|
1171
|
+
for qp in self.relationshipSourceQnamesAndQnameExpressionProgs]
|
|
1122
1172
|
def evalLinkrole(self, xpCtx, fact=None):
|
|
1123
1173
|
if self.linkrole:
|
|
1124
1174
|
return self.linkrole
|
|
1125
1175
|
return xpCtx.evaluateAtomicValue(self.linkroleExpressionProg, 'xs:anyURI', fact)
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
return xpCtx.evaluateAtomicValue(self.axisExpressionProg, 'xs:token', fact)
|
|
1131
|
-
|
|
1176
|
+
def evalFormulaAxis(self, xpCtx, fact=None):
|
|
1177
|
+
if self.formulaAxis:
|
|
1178
|
+
return self.formulaAxis
|
|
1179
|
+
return xpCtx.evaluateAtomicValue(self.formulaAxisExpressionProg, 'xs:token', fact)
|
|
1132
1180
|
def evalGenerations(self, xpCtx, fact=None):
|
|
1133
1181
|
if self.generations:
|
|
1134
1182
|
return self.generations
|
|
1135
1183
|
return xpCtx.evaluateAtomicValue(self.generationsExpressionProg, 'xs:integer', fact)
|
|
1136
|
-
|
|
1137
1184
|
def cardinalityAndDepth(self, structuralNode, **kwargs):
|
|
1138
|
-
return self.lenDepth(self.relationships(structuralNode, **kwargs),
|
|
1139
|
-
self.axis.endswith('-or-self'))
|
|
1140
|
-
|
|
1185
|
+
return self.lenDepth(self.relationships(structuralNode, **kwargs), self.isOrSelfAxis)
|
|
1141
1186
|
def lenDepth(self, nestedRelationships, includeSelf):
|
|
1142
1187
|
l = 0
|
|
1143
1188
|
d = 1
|
|
@@ -1153,292 +1198,239 @@ class ModelRelationshipDefinitionNode(ModelClosedDefinitionNode):
|
|
|
1153
1198
|
if includeSelf:
|
|
1154
1199
|
l += 1 # root relationships include root in addition
|
|
1155
1200
|
if includeSelf:
|
|
1201
|
+
l += 1
|
|
1156
1202
|
d += 1
|
|
1157
1203
|
return (l, d)
|
|
1158
|
-
|
|
1159
1204
|
@property
|
|
1160
1205
|
def propertyView(self):
|
|
1161
1206
|
return ((("id", self.id),
|
|
1207
|
+
("xlink:label", self.xlinkLabel),
|
|
1162
1208
|
("abstract", self.abstract),
|
|
1163
1209
|
("definition", self.definitionNodeView)) +
|
|
1164
1210
|
self.definitionLabelsView)
|
|
1165
|
-
|
|
1166
1211
|
def __repr__(self):
|
|
1167
|
-
return ("
|
|
1168
|
-
|
|
1169
|
-
|
|
1212
|
+
return ("defnMdlRelationshipNode[{0}]{1})".format(self.objectId(),self.propertyView))
|
|
1213
|
+
class DefnMdlConceptRelationshipNode(DefnMdlRelationshipNode):
|
|
1214
|
+
strctMdlRollupType = ROLLUP_FOR_CONCEPT_RELATIONSHIP_NODE
|
|
1170
1215
|
def init(self, modelDocument):
|
|
1171
|
-
super(
|
|
1172
|
-
|
|
1216
|
+
super(DefnMdlConceptRelationshipNode, self).init(modelDocument)
|
|
1173
1217
|
def hasAspect(self, structuralNode, aspect):
|
|
1174
1218
|
return aspect == Aspect.CONCEPT
|
|
1175
|
-
|
|
1176
1219
|
@property
|
|
1177
1220
|
def arcrole(self):
|
|
1178
|
-
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD
|
|
1179
|
-
|
|
1221
|
+
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD), "arcrole")
|
|
1180
1222
|
@property
|
|
1181
1223
|
def arcQname(self):
|
|
1182
|
-
arcnameElt = XmlUtil.child(self, (XbrlConst.table, XbrlConst.tableMMDD
|
|
1224
|
+
arcnameElt = XmlUtil.child(self, (XbrlConst.table, XbrlConst.tableMMDD), "arcname")
|
|
1183
1225
|
if arcnameElt is not None:
|
|
1184
1226
|
return qname( arcnameElt, XmlUtil.text(arcnameElt) )
|
|
1185
1227
|
return None
|
|
1186
|
-
|
|
1187
1228
|
@property
|
|
1188
1229
|
def linkQname(self):
|
|
1189
|
-
linknameElt = XmlUtil.child(self, (XbrlConst.table, XbrlConst.tableMMDD
|
|
1230
|
+
linknameElt = XmlUtil.child(self, (XbrlConst.table, XbrlConst.tableMMDD), "linkname")
|
|
1190
1231
|
if linknameElt is not None:
|
|
1191
1232
|
return qname( linknameElt, XmlUtil.text(linknameElt) )
|
|
1192
1233
|
return None
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
1234
|
def compile(self):
|
|
1196
1235
|
if not hasattr(self, "arcroleExpressionProg"):
|
|
1197
1236
|
self.arcroleExpressionProg = XPathParser.parse(self, self.arcroleExpression, self, "arcroleExpressionProg", Trace.VARIABLE)
|
|
1198
1237
|
self.linkQnameExpressionProg = XPathParser.parse(self, self.linkQnameExpression, self, "linkQnameExpressionProg", Trace.VARIABLE)
|
|
1199
1238
|
self.arcQnameExpressionProg = XPathParser.parse(self, self.arcQnameExpression, self, "arcQnameExpressionProg", Trace.VARIABLE)
|
|
1200
|
-
super(
|
|
1201
|
-
|
|
1239
|
+
super(DefnMdlConceptRelationshipNode, self).compile()
|
|
1202
1240
|
def variableRefs(self, progs=[], varRefSet=None):
|
|
1203
|
-
return super(
|
|
1241
|
+
return super(DefnMdlConceptRelationshipNode, self).variableRefs(
|
|
1204
1242
|
[p for p in (self.arcroleExpressionProg,
|
|
1205
1243
|
self.linkQnameExpressionProg, self.arcQnameExpressionProg)
|
|
1206
1244
|
if p], varRefSet)
|
|
1207
|
-
|
|
1208
1245
|
def evalArcrole(self, xpCtx, fact=None):
|
|
1209
1246
|
if self.arcrole:
|
|
1210
1247
|
return self.arcrole
|
|
1211
1248
|
return xpCtx.evaluateAtomicValue(self.arcroleExpressionProg, 'xs:anyURI', fact)
|
|
1212
|
-
|
|
1213
1249
|
def evalLinkQname(self, xpCtx, fact=None):
|
|
1214
1250
|
if self.linkQname:
|
|
1215
1251
|
return self.linkQname
|
|
1216
1252
|
return xpCtx.evaluateAtomicValue(self.linkQnameExpressionProg, 'xs:QName', fact)
|
|
1217
|
-
|
|
1218
1253
|
def evalArcQname(self, xpCtx, fact=None):
|
|
1219
1254
|
if self.arcQname:
|
|
1220
1255
|
return self.arcQname
|
|
1221
1256
|
return xpCtx.evaluateAtomicValue(self.arcQnameExpressionProg, 'xs:QName', fact)
|
|
1222
|
-
|
|
1223
1257
|
@property
|
|
1224
1258
|
def arcroleExpression(self):
|
|
1225
|
-
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD
|
|
1226
|
-
|
|
1259
|
+
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD), "arcroleExpression")
|
|
1227
1260
|
@property
|
|
1228
1261
|
def linkQnameExpression(self):
|
|
1229
|
-
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD
|
|
1230
|
-
|
|
1262
|
+
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD), "linknameExpression")
|
|
1231
1263
|
@property
|
|
1232
1264
|
def arcQnameExpression(self):
|
|
1233
|
-
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD
|
|
1234
|
-
|
|
1265
|
+
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD), "arcnameExpression")
|
|
1266
|
+
@property
|
|
1267
|
+
def isOrSelfAxis(self):
|
|
1268
|
+
return self._formulaAxis.endswith('-or-self') and self._formulaAxis not in ("sibling-or-self", "sibling-or-descendant-or-self")
|
|
1235
1269
|
def coveredAspect(self, ordCntx=None):
|
|
1236
1270
|
return Aspect.CONCEPT
|
|
1237
|
-
|
|
1238
1271
|
def relationships(self, structuralNode, **kwargs):
|
|
1239
|
-
self.
|
|
1240
|
-
linkrole = structuralNode.evaluate(self, self.evalLinkrole)
|
|
1272
|
+
self._sourceQnames = structuralNode.evaluate(self, self.evalRrelationshipSourceQnames, **kwargs) or [XbrlConst.qnXfiRoot]
|
|
1273
|
+
linkrole = structuralNode.evaluate(self, self.evalLinkrole, handleXPathException=False) # expect cast exception on bad anyURI
|
|
1241
1274
|
if not linkrole:
|
|
1242
|
-
linkrole =
|
|
1243
|
-
linkQname = (structuralNode.evaluate(self, self.evalLinkQname) or () )
|
|
1244
|
-
arcrole = (structuralNode.evaluate(self, self.evalArcrole) or () )
|
|
1245
|
-
arcQname = (structuralNode.evaluate(self, self.evalArcQname) or () )
|
|
1246
|
-
self.
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1275
|
+
linkrole = XbrlConst.defaultLinkRole
|
|
1276
|
+
linkQname = (structuralNode.evaluate(self, self.evalLinkQname, handleXPathException=False) or () )
|
|
1277
|
+
arcrole = (structuralNode.evaluate(self, self.evalArcrole, handleXPathException=False) or () )
|
|
1278
|
+
arcQname = (structuralNode.evaluate(self, self.evalArcQname, handleXPathException=False) or () )
|
|
1279
|
+
self._formulaAxis = (structuralNode.evaluate(self, self.evalFormulaAxis, handleXPathException=False) or "descendant-or-self" )
|
|
1280
|
+
rels_axis = self._formulaAxis
|
|
1281
|
+
if rels_axis not in ("sibling-or-self", "sibling-or-descendant-or-self"):
|
|
1282
|
+
rels_axis = rels_axis.replace('-or-self','')
|
|
1283
|
+
self._generations = (structuralNode.evaluate(self, self.evalGenerations, handleXPathException=False) or () )
|
|
1284
|
+
if self._generations == () and self._formulaAxis in ("child", "child-or-self", "parent", "parent-or-self", "sibling", "sibling-or-self"):
|
|
1285
|
+
self._generations = 1
|
|
1286
|
+
rels = []
|
|
1287
|
+
for srcQname in self._sourceQnames:
|
|
1288
|
+
rels.extend(concept_relationships(self.modelXbrl.rendrCntx,
|
|
1289
|
+
None,
|
|
1290
|
+
(srcQname,
|
|
1291
|
+
linkrole,
|
|
1292
|
+
arcrole,
|
|
1293
|
+
rels_axis,
|
|
1294
|
+
self._generations,
|
|
1295
|
+
linkQname,
|
|
1296
|
+
arcQname),
|
|
1297
|
+
True)) # return nested lists representing concept tree nesting
|
|
1298
|
+
return rels
|
|
1299
|
+
class DefnMdlDimensionRelationshipNode(DefnMdlRelationshipNode):
|
|
1300
|
+
strctMdlRollupType = ROLLUP_FOR_DIMENSION_RELATIONSHIP_NODE
|
|
1260
1301
|
def init(self, modelDocument):
|
|
1261
|
-
super(
|
|
1302
|
+
super(DefnMdlDimensionRelationshipNode, self).init(modelDocument)
|
|
1303
|
+
self.tlbDimRelsUseHcRoleForDomainRoots = False #legacy feature for Dutch taxonomies before 2025, set by formula parameter tlbDimRelsUseHcRoleForDomainRoots
|
|
1262
1304
|
|
|
1263
1305
|
def hasAspect(self, structuralNode, aspect):
|
|
1264
1306
|
return aspect == self.coveredAspect(structuralNode) or aspect == Aspect.DIMENSIONS
|
|
1265
|
-
|
|
1266
1307
|
def aspectValue(self, xpCtx, aspect, inherit=None):
|
|
1267
1308
|
if aspect == Aspect.DIMENSIONS:
|
|
1268
1309
|
return (self.coveredAspect(xpCtx), )
|
|
1269
1310
|
return None
|
|
1270
|
-
|
|
1271
1311
|
def aspectsCovered(self):
|
|
1272
1312
|
return {self.dimensionQname}
|
|
1273
|
-
|
|
1274
1313
|
@property
|
|
1275
1314
|
def dimensionQname(self):
|
|
1276
|
-
dimensionElt = XmlUtil.child(self, (XbrlConst.table, XbrlConst.tableMMDD
|
|
1315
|
+
dimensionElt = XmlUtil.child(self, (XbrlConst.table, XbrlConst.tableMMDD), "dimension")
|
|
1277
1316
|
if dimensionElt is not None:
|
|
1278
1317
|
return qname( dimensionElt, XmlUtil.text(dimensionElt) )
|
|
1279
1318
|
return None
|
|
1280
|
-
|
|
1281
|
-
@property
|
|
1282
|
-
def dimensionQnameExpression(self):
|
|
1283
|
-
return XmlUtil.childText(self, (XbrlConst.table, XbrlConst.tableMMDD, XbrlConst.table201305, XbrlConst.table201301, XbrlConst.table2011), "dimensionExpression")
|
|
1284
|
-
|
|
1285
1319
|
def compile(self):
|
|
1286
|
-
|
|
1287
|
-
self.dimensionQnameExpressionProg = XPathParser.parse(self, self.dimensionQnameExpression, self, "dimensionQnameExpressionProg", Trace.VARIABLE)
|
|
1288
|
-
super(ModelDimensionRelationshipDefinitionNode, self).compile()
|
|
1289
|
-
|
|
1320
|
+
super(DefnMdlDimensionRelationshipNode, self).compile()
|
|
1290
1321
|
def variableRefs(self, progs=[], varRefSet=None):
|
|
1291
|
-
return super(
|
|
1292
|
-
|
|
1322
|
+
return super(DefnMdlDimensionRelationshipNode, self).variableRefs(self.relationshipSourceQnamesAndQnameExpressionProgs, varRefSet)
|
|
1293
1323
|
def evalDimensionQname(self, xpCtx, fact=None):
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1324
|
+
return self.dimensionQname
|
|
1325
|
+
@property
|
|
1326
|
+
def isOrSelfAxis(self):
|
|
1327
|
+
return False # always return relationships into nodes for domain members
|
|
1298
1328
|
def coveredAspect(self, structuralNode=None):
|
|
1299
1329
|
try:
|
|
1300
1330
|
return self._coveredAspect
|
|
1301
1331
|
except AttributeError:
|
|
1302
1332
|
self._coveredAspect = self.dimRelationships(structuralNode, getDimQname=True)
|
|
1303
1333
|
return self._coveredAspect
|
|
1304
|
-
|
|
1305
1334
|
def relationships(self, structuralNode, **kwargs):
|
|
1306
1335
|
return self.dimRelationships(structuralNode, getMembers=True)
|
|
1307
|
-
|
|
1308
1336
|
def dimRelationships(self, structuralNode, getMembers=False, getDimQname=False):
|
|
1309
1337
|
self._dimensionQname = structuralNode.evaluate(self, self.evalDimensionQname)
|
|
1310
|
-
self.
|
|
1311
|
-
linkrole = structuralNode.evaluate(self, self.evalLinkrole)
|
|
1338
|
+
self._sourceQnames = structuralNode.evaluate(self, self.evalRrelationshipSourceQnames, handleXPathException=False) or []
|
|
1339
|
+
linkrole = structuralNode.evaluate(self, self.evalLinkrole, handleXPathException=False) # expect cast exception on bad anyURI
|
|
1312
1340
|
if not linkrole and getMembers:
|
|
1313
|
-
linkrole =
|
|
1341
|
+
linkrole = XbrlConst.defaultLinkRole
|
|
1314
1342
|
dimConcept = self.modelXbrl.qnameConcepts.get(self._dimensionQname)
|
|
1315
|
-
|
|
1316
|
-
self.
|
|
1317
|
-
self.
|
|
1343
|
+
sourceConcepts = [self.modelXbrl.qnameConcepts.get(qn) for qn in self._sourceQnames]
|
|
1344
|
+
self._formulaAxis = (structuralNode.evaluate(self, self.evalFormulaAxis, handleXPathException=False) or "descendant-or-self" )
|
|
1345
|
+
if self._formulaAxis not in ("descendant", "descendant-or-self", "child", "child-or-self"):
|
|
1346
|
+
raise ResolutionException("xbrlte:expressionNotCastableToRequiredType",_("Dimension relationship contains an invalid axis specification"))
|
|
1347
|
+
isOrSelf = self._formulaAxis.endswith("-or-self")
|
|
1348
|
+
self._generations = (structuralNode.evaluate(self, self.evalGenerations, handleXPathException=False) or () )
|
|
1349
|
+
if self._generations == () and self._formulaAxis in ("child", "child-or-self"):
|
|
1350
|
+
self._generations = 1
|
|
1318
1351
|
if ((self._dimensionQname and (dimConcept is None or not dimConcept.isDimensionItem)) or
|
|
1319
|
-
(self.
|
|
1320
|
-
|
|
1352
|
+
(self._sourceQnames and (
|
|
1353
|
+
any(c is None or not c.isItem for c in sourceConcepts)))):
|
|
1321
1354
|
return ()
|
|
1322
|
-
if dimConcept is not None:
|
|
1323
|
-
if getDimQname:
|
|
1324
|
-
return self._dimensionQname
|
|
1325
|
-
if sourceConcept is None:
|
|
1326
|
-
sourceConcept = dimConcept
|
|
1327
|
-
if getMembers:
|
|
1328
|
-
return concept_relationships(self.modelXbrl.rendrCntx,
|
|
1329
|
-
None,
|
|
1330
|
-
(self._sourceQname,
|
|
1331
|
-
linkrole,
|
|
1332
|
-
"XBRL-dimensions", # all dimensions arcroles
|
|
1333
|
-
self._axis.replace('-or-self',''),
|
|
1334
|
-
self._generations),
|
|
1335
|
-
True) # return nested lists representing concept tree nesting
|
|
1336
1355
|
if getDimQname:
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1356
|
+
return self._dimensionQname
|
|
1357
|
+
if getMembers:
|
|
1358
|
+
rels = []
|
|
1359
|
+
def srcQnDims(srcRel, srcQn):
|
|
1360
|
+
if not srcQn or srcRel.toModelObject.qname == srcQn:
|
|
1361
|
+
_rels = concept_relationships(self.modelXbrl.rendrCntx,
|
|
1362
|
+
None,
|
|
1363
|
+
(srcRel.toModelObject.qname,
|
|
1364
|
+
srcRel.consecutiveLinkrole,
|
|
1365
|
+
XbrlConst.domainMember,
|
|
1366
|
+
self._formulaAxis.replace('-or-self',''),
|
|
1367
|
+
self._generations),
|
|
1368
|
+
True,
|
|
1369
|
+
targetRole=True)
|
|
1370
|
+
if isOrSelf:
|
|
1371
|
+
rels.append(srcRel)
|
|
1372
|
+
if _rels:
|
|
1373
|
+
rels.append(_rels)
|
|
1374
|
+
elif _rels:
|
|
1375
|
+
rels.extend(_rels) # return nested lists representing concept tree nesting)
|
|
1376
|
+
return # found the starting source QName
|
|
1377
|
+
for rel in self.modelXbrl.relationshipSet(XbrlConst.domainMember,srcRel.consecutiveLinkrole).fromModelObject(srcRel.toModelObject):
|
|
1378
|
+
srcQnDims(rel, srcQn)
|
|
1379
|
+
if self.tlbDimRelsUseHcRoleForDomainRoots:
|
|
1380
|
+
# legacy mode uses Hc Linkrole for roots instead of Dim linkrole (Dutch taxonomies before 2025)
|
|
1381
|
+
sourceDimRels = self.modelXbrl.relationshipSet(XbrlConst.hypercubeDimension,linkrole).toModelObject(dimConcept)
|
|
1382
|
+
for srcQn in self._sourceQnames or (None,):
|
|
1383
|
+
for rel in sourceDimRels:
|
|
1384
|
+
for dimDomRel in self.modelXbrl.relationshipSet(XbrlConst.dimensionDomain,rel.consecutiveLinkrole).fromModelObject(rel.toModelObject):
|
|
1385
|
+
srcQnDims(dimDomRel, srcQn)
|
|
1386
|
+
else:
|
|
1387
|
+
dimRels = self.modelXbrl.relationshipSet(XbrlConst.dimensionDomain,linkrole).fromModelObject(dimConcept)
|
|
1388
|
+
for srcQn in self._sourceQnames or (None,):
|
|
1389
|
+
for dimDomRel in dimRels:
|
|
1390
|
+
srcQnDims(dimDomRel, srcQn)
|
|
1391
|
+
return rels
|
|
1352
1392
|
coveredAspectToken = {"concept": Aspect.CONCEPT,
|
|
1353
1393
|
"entity-identifier": Aspect.VALUE,
|
|
1354
1394
|
"period-start": Aspect.START, "period-end": Aspect.END,
|
|
1355
1395
|
"period-instant": Aspect.INSTANT, "period-instant-end": Aspect.INSTANT_END,
|
|
1356
1396
|
"unit": Aspect.UNIT}
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
def init(self, modelDocument):
|
|
1360
|
-
super(ModelOpenDefinitionNode, self).init(modelDocument)
|
|
1361
|
-
|
|
1362
|
-
# deprecated 2013-05-17
|
|
1363
|
-
class ModelSelectionDefinitionNode(ModelOpenDefinitionNode):
|
|
1397
|
+
class DefnMdlOpenDefinitionNode(DefnMdlDefinitionNode):
|
|
1398
|
+
strctMdlRollupType = ROLLUP_FOR_OPEN_DEFINITION_NODE
|
|
1364
1399
|
def init(self, modelDocument):
|
|
1365
|
-
super(
|
|
1366
|
-
|
|
1367
|
-
@property
|
|
1368
|
-
def descendantArcroles(self):
|
|
1369
|
-
return (XbrlConst.tableDefinitionNodeMessage201301, XbrlConst.tableAxisMessage2011, XbrlConst.tableDefinitionNodeSelectionMessage201301, XbrlConst.tableAxisSelectionMessage2011)
|
|
1370
|
-
|
|
1371
|
-
def clear(self):
|
|
1372
|
-
XPathParser.clearNamedProg(self, "selectProg")
|
|
1373
|
-
super(ModelSelectionDefinitionNode, self).clear()
|
|
1374
|
-
|
|
1375
|
-
def coveredAspect(self, structuralNode=None):
|
|
1376
|
-
try:
|
|
1377
|
-
return self._coveredAspect
|
|
1378
|
-
except AttributeError:
|
|
1379
|
-
coveredAspect = self.get("coveredAspect")
|
|
1380
|
-
if coveredAspect in coveredAspectToken:
|
|
1381
|
-
self._coveredAspect = coveredAspectToken[coveredAspect]
|
|
1382
|
-
else: # must be a qname
|
|
1383
|
-
self._coveredAspect = qname(self, coveredAspect)
|
|
1384
|
-
return self._coveredAspect
|
|
1385
|
-
|
|
1386
|
-
def aspectsCovered(self):
|
|
1387
|
-
return {self.coveredAspect}
|
|
1388
|
-
|
|
1389
|
-
def hasAspect(self, structuralNode, aspect):
|
|
1390
|
-
return aspect == self.coveredAspect() or (isinstance(self._coveredAspect,QName) and aspect == Aspect.DIMENSIONS)
|
|
1391
|
-
|
|
1400
|
+
super(DefnMdlOpenDefinitionNode, self).init(modelDocument)
|
|
1392
1401
|
@property
|
|
1393
|
-
def
|
|
1394
|
-
return
|
|
1395
|
-
|
|
1396
|
-
def compile(self):
|
|
1397
|
-
if not hasattr(self, "selectProg"):
|
|
1398
|
-
self.selectProg = XPathParser.parse(self, self.select, self, "select", Trace.PARAMETER)
|
|
1399
|
-
super(ModelSelectionDefinitionNode, self).compile()
|
|
1400
|
-
|
|
1401
|
-
def variableRefs(self, progs=[], varRefSet=None):
|
|
1402
|
-
return super(ModelSelectionDefinitionNode, self).variableRefs(self.selectProg, varRefSet)
|
|
1403
|
-
|
|
1404
|
-
def evaluate(self, xpCtx, typeQname=None):
|
|
1405
|
-
if typeQname:
|
|
1406
|
-
return xpCtx.evaluateAtomicValue(self.selectProg, typeQname)
|
|
1407
|
-
else:
|
|
1408
|
-
return xpCtx.flattenSequence(xpCtx.evaluate(self.selectProg, None))
|
|
1409
|
-
|
|
1402
|
+
def childrenCoverSameAspects(self):
|
|
1403
|
+
return False
|
|
1410
1404
|
aspectNodeAspectCovered = {"conceptAspect": Aspect.CONCEPT,
|
|
1411
1405
|
"unitAspect": Aspect.UNIT,
|
|
1412
1406
|
"entityIdentifierAspect": Aspect.ENTITY_IDENTIFIER,
|
|
1413
1407
|
"periodAspect": Aspect.PERIOD}
|
|
1414
|
-
|
|
1415
|
-
class ModelFilterDefinitionNode(ModelOpenDefinitionNode):
|
|
1408
|
+
class DefnMdlAspectNode(DefnMdlOpenDefinitionNode):
|
|
1416
1409
|
def init(self, modelDocument):
|
|
1417
|
-
super(
|
|
1418
|
-
|
|
1410
|
+
super(DefnMdlAspectNode, self).init(modelDocument)
|
|
1419
1411
|
@property
|
|
1420
1412
|
def descendantArcroles(self):
|
|
1421
|
-
return (XbrlConst.tableAspectNodeFilter, XbrlConst.tableAspectNodeFilterMMDD,
|
|
1422
|
-
XbrlConst.tableDefinitionNodeSubtree, XbrlConst.tableDefinitionNodeSubtreeMMDD
|
|
1423
|
-
|
|
1424
|
-
|
|
1413
|
+
return (XbrlConst.tableAspectNodeFilter, XbrlConst.tableAspectNodeFilterMMDD,
|
|
1414
|
+
XbrlConst.tableDefinitionNodeSubtree, XbrlConst.tableDefinitionNodeSubtreeMMDD)
|
|
1425
1415
|
@property
|
|
1426
1416
|
def filterRelationships(self):
|
|
1427
1417
|
try:
|
|
1428
1418
|
return self._filterRelationships
|
|
1429
1419
|
except AttributeError:
|
|
1430
1420
|
rels = [] # order so conceptName filter is first (if any) (may want more sorting in future)
|
|
1431
|
-
|
|
1421
|
+
# fact space is filtered by both table filter and aspect filters, table first.
|
|
1422
|
+
for rel in self.modelXbrl.relationshipSet((XbrlConst.tableAspectNodeFilterMMDD, XbrlConst.tableAspectNodeFilter)).fromModelObject(self):
|
|
1432
1423
|
if isinstance(rel.toModelObject, ModelConceptName):
|
|
1433
1424
|
rels.insert(0, rel) # put conceptName filters first
|
|
1434
1425
|
else:
|
|
1435
1426
|
rels.append(rel)
|
|
1427
|
+
tableNode = self.parentTableNode
|
|
1428
|
+
if tableNode is not None:
|
|
1429
|
+
rels.extend(tableNode.filterRelationships)
|
|
1436
1430
|
self._filterRelationships = rels
|
|
1437
1431
|
return rels
|
|
1438
|
-
|
|
1439
1432
|
def hasAspect(self, structuralNode, aspect):
|
|
1440
1433
|
return aspect in self.aspectsCovered()
|
|
1441
|
-
|
|
1442
1434
|
def aspectsCovered(self, varBinding=None):
|
|
1443
1435
|
try:
|
|
1444
1436
|
return self._aspectsCovered
|
|
@@ -1446,34 +1438,22 @@ class ModelFilterDefinitionNode(ModelOpenDefinitionNode):
|
|
|
1446
1438
|
self._aspectsCovered = set()
|
|
1447
1439
|
self._dimensionsCovered = set()
|
|
1448
1440
|
self.includeUnreportedValue = False
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
if aspectElt
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
self._aspectsCovered.add(dimQname)
|
|
1455
|
-
self._aspectsCovered.add(Aspect.DIMENSIONS)
|
|
1456
|
-
self._dimensionsCovered.add(dimQname)
|
|
1457
|
-
self.includeUnreportedValue = aspectElt.get("includeUnreportedValue") in ("true", "1")
|
|
1458
|
-
else:
|
|
1459
|
-
self._aspectsCovered.add(aspectNodeAspectCovered[aspectElt.localName])
|
|
1460
|
-
else:
|
|
1461
|
-
# filter node (prior to 2013-05-17)
|
|
1462
|
-
for rel in self.filterRelationships:
|
|
1463
|
-
if rel.isCovered:
|
|
1464
|
-
_filter = rel.toModelObject
|
|
1465
|
-
self._aspectsCovered |= _filter.aspectsCovered(varBinding)
|
|
1466
|
-
self._dimensionsCovered = set(aspect for aspect in self._aspectsCovered if isinstance(aspect,QName))
|
|
1467
|
-
if self._dimensionsCovered:
|
|
1441
|
+
aspectElt = XmlUtil.child(self, self.namespaceURI, ("conceptAspect", "unitAspect", "entityIdentifierAspect", "periodAspect", "dimensionAspect"))
|
|
1442
|
+
if aspectElt is not None:
|
|
1443
|
+
if aspectElt.localName == "dimensionAspect":
|
|
1444
|
+
dimQname = qname(aspectElt, aspectElt.textValue)
|
|
1445
|
+
self._aspectsCovered.add(dimQname)
|
|
1468
1446
|
self._aspectsCovered.add(Aspect.DIMENSIONS)
|
|
1447
|
+
self._dimensionsCovered.add(dimQname)
|
|
1448
|
+
self.includeUnreportedValue = aspectElt.get("includeUnreportedValue") in ("true", "1")
|
|
1449
|
+
else:
|
|
1450
|
+
self._aspectsCovered.add(aspectNodeAspectCovered[aspectElt.localName])
|
|
1469
1451
|
return self._aspectsCovered
|
|
1470
|
-
|
|
1471
1452
|
def aspectValue(self, xpCtx, aspect, inherit=None):
|
|
1472
1453
|
if aspect == Aspect.DIMENSIONS:
|
|
1473
1454
|
return self._dimensionsCovered
|
|
1474
1455
|
# does not apply to filter, value can only come from a bound fact
|
|
1475
1456
|
return None
|
|
1476
|
-
|
|
1477
1457
|
def filteredFactsPartitions(self, xpCtx, facts):
|
|
1478
1458
|
filteredFacts = formulaEvaluatorFilterFacts(xpCtx, VariableBinding(xpCtx),
|
|
1479
1459
|
facts, self.filterRelationships, None)
|
|
@@ -1482,71 +1462,39 @@ class ModelFilterDefinitionNode(ModelOpenDefinitionNode):
|
|
|
1482
1462
|
reportedAspectFacts = set()
|
|
1483
1463
|
for fact in filteredFacts:
|
|
1484
1464
|
if all(fact.context is not None and
|
|
1485
|
-
isinstance(fact.context.dimValue(dimAspect), ModelDimensionValue)
|
|
1465
|
+
isinstance(fact.context.dimValue(dimAspect), (ModelDimensionValue,QName)) # include default dimension values
|
|
1486
1466
|
for dimAspect in self._dimensionsCovered):
|
|
1487
1467
|
reportedAspectFacts.add(fact)
|
|
1488
1468
|
else:
|
|
1489
1469
|
reportedAspectFacts = filteredFacts
|
|
1490
1470
|
return factsPartitions(xpCtx, reportedAspectFacts, self.aspectsCovered())
|
|
1491
|
-
|
|
1492
1471
|
@property
|
|
1493
1472
|
def propertyView(self):
|
|
1494
1473
|
return ((("id", self.id),
|
|
1474
|
+
("xlink:label", self.xlinkLabel),
|
|
1495
1475
|
("aspect", ", ".join(aspectStr(aspect)
|
|
1496
1476
|
for aspect in self.aspectsCovered()
|
|
1497
1477
|
if aspect != Aspect.DIMENSIONS)),
|
|
1498
1478
|
("definition", self.definitionNodeView)) +
|
|
1499
1479
|
self.definitionLabelsView)
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
1480
|
from arelle.ModelObjectFactory import elementSubstitutionModelClass
|
|
1504
1481
|
elementSubstitutionModelClass.update((
|
|
1505
1482
|
# IWD
|
|
1506
|
-
(XbrlConst.qnTableTableMMDD,
|
|
1507
|
-
(XbrlConst.qnTableBreakdownMMDD,
|
|
1508
|
-
(XbrlConst.qnTableRuleSetMMDD,
|
|
1509
|
-
(XbrlConst.qnTableRuleNodeMMDD,
|
|
1510
|
-
(XbrlConst.qnTableConceptRelationshipNodeMMDD,
|
|
1511
|
-
(XbrlConst.qnTableDimensionRelationshipNodeMMDD,
|
|
1512
|
-
(XbrlConst.qnTableAspectNodeMMDD,
|
|
1513
|
-
#
|
|
1514
|
-
(XbrlConst.qnTableTable,
|
|
1515
|
-
(XbrlConst.qnTableBreakdown,
|
|
1516
|
-
(XbrlConst.qnTableRuleSet,
|
|
1517
|
-
(XbrlConst.qnTableRuleNode,
|
|
1518
|
-
(XbrlConst.qnTableConceptRelationshipNode,
|
|
1519
|
-
(XbrlConst.qnTableDimensionRelationshipNode,
|
|
1520
|
-
(XbrlConst.qnTableAspectNode,
|
|
1521
|
-
# PWD 2013-05-17
|
|
1522
|
-
(XbrlConst.qnTableTable201305, ModelTable),
|
|
1523
|
-
(XbrlConst.qnTableBreakdown201305, ModelBreakdown),
|
|
1524
|
-
(XbrlConst.qnTableRuleNode201305, ModelRuleDefinitionNode),
|
|
1525
|
-
(XbrlConst.qnTableConceptRelationshipNode201305, ModelConceptRelationshipDefinitionNode),
|
|
1526
|
-
(XbrlConst.qnTableDimensionRelationshipNode201305, ModelDimensionRelationshipDefinitionNode),
|
|
1527
|
-
(XbrlConst.qnTableAspectNode201305, ModelFilterDefinitionNode),
|
|
1528
|
-
# PWD 2013-01-17
|
|
1529
|
-
(XbrlConst.qnTableTable201301, ModelTable),
|
|
1530
|
-
(XbrlConst.qnTableRuleNode201301, ModelRuleDefinitionNode),
|
|
1531
|
-
(XbrlConst.qnTableCompositionNode201301, ModelCompositionDefinitionNode),
|
|
1532
|
-
(XbrlConst.qnTableConceptRelationshipNode201301, ModelConceptRelationshipDefinitionNode),
|
|
1533
|
-
(XbrlConst.qnTableDimensionRelationshipNode201301, ModelDimensionRelationshipDefinitionNode),
|
|
1534
|
-
(XbrlConst.qnTableSelectionNode201301, ModelSelectionDefinitionNode),
|
|
1535
|
-
(XbrlConst.qnTableFilterNode201301, ModelFilterDefinitionNode),
|
|
1536
|
-
(XbrlConst.qnTableTupleNode201301, ModelTupleDefinitionNode),
|
|
1537
|
-
# PWD 2011 Montreal
|
|
1538
|
-
(XbrlConst.qnTableTable2011, ModelTable),
|
|
1539
|
-
(XbrlConst.qnTableRuleAxis2011, ModelRuleDefinitionNode),
|
|
1540
|
-
(XbrlConst.qnTableCompositionAxis2011, ModelCompositionDefinitionNode),
|
|
1541
|
-
(XbrlConst.qnTableConceptRelationshipAxis2011, ModelConceptRelationshipDefinitionNode),
|
|
1542
|
-
(XbrlConst.qnTableSelectionAxis2011, ModelSelectionDefinitionNode),
|
|
1543
|
-
(XbrlConst.qnTableFilterAxis2011, ModelFilterDefinitionNode),
|
|
1544
|
-
(XbrlConst.qnTableTupleAxis2011, ModelTupleDefinitionNode),
|
|
1545
|
-
(XbrlConst.qnTableDimensionRelationshipAxis2011, ModelDimensionRelationshipDefinitionNode),
|
|
1546
|
-
# Eurofiling
|
|
1547
|
-
(XbrlConst.qnEuTable, ModelEuTable),
|
|
1548
|
-
(XbrlConst.qnEuAxisCoord, ModelEuAxisCoord),
|
|
1483
|
+
(XbrlConst.qnTableTableMMDD, DefnMdlTable),
|
|
1484
|
+
(XbrlConst.qnTableBreakdownMMDD, DefnMdlBreakdown),
|
|
1485
|
+
(XbrlConst.qnTableRuleSetMMDD, DefnMdlRuleSet),
|
|
1486
|
+
(XbrlConst.qnTableRuleNodeMMDD, DefnMdlRuleDefinitionNode),
|
|
1487
|
+
(XbrlConst.qnTableConceptRelationshipNodeMMDD, DefnMdlConceptRelationshipNode),
|
|
1488
|
+
(XbrlConst.qnTableDimensionRelationshipNodeMMDD, DefnMdlDimensionRelationshipNode),
|
|
1489
|
+
(XbrlConst.qnTableAspectNodeMMDD, DefnMdlAspectNode),
|
|
1490
|
+
# REC
|
|
1491
|
+
(XbrlConst.qnTableTable, DefnMdlTable),
|
|
1492
|
+
(XbrlConst.qnTableBreakdown, DefnMdlBreakdown),
|
|
1493
|
+
(XbrlConst.qnTableRuleSet, DefnMdlRuleSet),
|
|
1494
|
+
(XbrlConst.qnTableRuleNode, DefnMdlRuleDefinitionNode),
|
|
1495
|
+
(XbrlConst.qnTableConceptRelationshipNode, DefnMdlConceptRelationshipNode),
|
|
1496
|
+
(XbrlConst.qnTableDimensionRelationshipNode, DefnMdlDimensionRelationshipNode),
|
|
1497
|
+
(XbrlConst.qnTableAspectNode, DefnMdlAspectNode),
|
|
1549
1498
|
))
|
|
1550
|
-
|
|
1551
1499
|
# import after other modules resolved to prevent circular references
|
|
1552
1500
|
from arelle.FunctionXfi import concept_relationships
|