arelle-release 2.37.21__py3-none-any.whl → 2.37.23__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.
Potentially problematic release.
This version of arelle-release might be problematic. Click here for more details.
- arelle/ModelRelationshipSet.py +3 -0
- arelle/ValidateDuplicateFacts.py +13 -7
- arelle/XbrlConst.py +3 -0
- arelle/_version.py +2 -2
- arelle/api/Session.py +88 -58
- arelle/plugin/validate/DBA/rules/fr.py +10 -10
- arelle/plugin/validate/DBA/rules/th.py +1 -1
- arelle/plugin/validate/ESEF/ESEF_Current/ValidateXbrlFinally.py +21 -20
- arelle/plugin/validate/NL/DisclosureSystems.py +14 -0
- arelle/plugin/validate/NL/PluginValidationDataExtension.py +167 -3
- arelle/plugin/validate/NL/ValidationPluginExtension.py +10 -1
- arelle/plugin/validate/NL/resources/config.xml +12 -1
- arelle/plugin/validate/NL/rules/fr_kvk.py +1 -1
- arelle/plugin/validate/NL/rules/nl_kvk.py +680 -155
- arelle/utils/validate/DetectScriptsInXhtml.py +1 -4
- arelle/utils/validate/ESEFImage.py +274 -0
- {arelle_release-2.37.21.dist-info → arelle_release-2.37.23.dist-info}/METADATA +1 -1
- {arelle_release-2.37.21.dist-info → arelle_release-2.37.23.dist-info}/RECORD +27 -26
- tests/integration_tests/validation/conformance_suite_configs.py +2 -0
- tests/integration_tests/validation/conformance_suite_configurations/nl_inline_2024.py +30 -43
- tests/integration_tests/validation/conformance_suite_configurations/nl_inline_2024_gaap_other.py +244 -0
- tests/integration_tests/validation/discover_tests.py +2 -2
- tests/unit_tests/arelle/plugin/validate/ESEF/ESEF_Current/test_validate_css_url.py +10 -2
- arelle/plugin/validate/ESEF/ESEF_Current/Image.py +0 -213
- {arelle_release-2.37.21.dist-info → arelle_release-2.37.23.dist-info}/WHEEL +0 -0
- {arelle_release-2.37.21.dist-info → arelle_release-2.37.23.dist-info}/entry_points.txt +0 -0
- {arelle_release-2.37.21.dist-info → arelle_release-2.37.23.dist-info}/licenses/LICENSE.md +0 -0
- {arelle_release-2.37.21.dist-info → arelle_release-2.37.23.dist-info}/top_level.txt +0 -0
tests/integration_tests/validation/conformance_suite_configurations/nl_inline_2024_gaap_other.py
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
from pathlib import PurePath, Path
|
|
2
|
+
|
|
3
|
+
from tests.integration_tests.validation.assets import NL_PACKAGES
|
|
4
|
+
from tests.integration_tests.validation.conformance_suite_config import ConformanceSuiteConfig, ConformanceSuiteAssetConfig, AssetSource
|
|
5
|
+
|
|
6
|
+
config = ConformanceSuiteConfig(
|
|
7
|
+
args=[
|
|
8
|
+
'--disclosureSystem', 'NL-INLINE-2024-GAAP-OTHER',
|
|
9
|
+
'--baseTaxonomyValidation', 'none',
|
|
10
|
+
# '--testcaseResultsCaptureWarnings',
|
|
11
|
+
],
|
|
12
|
+
assets=[
|
|
13
|
+
ConformanceSuiteAssetConfig.conformance_suite(
|
|
14
|
+
Path('conformance-suite-2024-sbr-domein-handelsregister.zip'),
|
|
15
|
+
entry_point=Path('conformance-suite-2024-sbr-domein-handelsregister/index.xml'),
|
|
16
|
+
public_download_url='https://www.sbr-nl.nl/sites/default/files/2025-04/conformance-suite-2024-sbr-domein-handelsregister.zip',
|
|
17
|
+
source=AssetSource.S3_PUBLIC,
|
|
18
|
+
),
|
|
19
|
+
*NL_PACKAGES['NL-INLINE-2024'],
|
|
20
|
+
],
|
|
21
|
+
expected_additional_testcase_errors={f"conformance-suite-2024-sbr-domein-handelsregister/tests/{s}": val for s, val in {
|
|
22
|
+
'G5-1-3_2/index.xml:TC2_invalid': {
|
|
23
|
+
'documentNameDoesNotFollowNamingConvention': 1,
|
|
24
|
+
'requiredEntryPointOtherGaapNotReferenced': 1,
|
|
25
|
+
},
|
|
26
|
+
}.items()},
|
|
27
|
+
expected_failure_ids=frozenset([
|
|
28
|
+
# Conformance Suite Errors
|
|
29
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-3-1_2/index.xml:TC3_invalid', # Expects an error code with a preceding double quote. G3-3-1_3 expects the same code without the typo.
|
|
30
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-4-1_1/index.xml:TC2_invalid', # Produces: [err:XPTY0004] Variable set Het entity identifier scheme dat bij dit feit hoort MOET het standaard KVK identifier scheme zijn
|
|
31
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-4-1_2/index.xml:TC2_invalid', # Expects fractionElementUsed”. Note the double quote at the end.
|
|
32
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-4-2_1/index.xml:TC2_invalid', # Produces 'EFM.6.03.11' and 'NL.NL-KVK.3.4.2.1.htmlOrXmlBaseUsed'
|
|
33
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_2_G3-1-1_1/index.xml:TC2_invalid', # Expects NonIdenticalIdentifier instead of nonIdenticalIdentifier (note the cap N)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# Wont Run
|
|
37
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-1-2_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
38
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-1-2_1/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
39
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-1-2_2/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
40
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-1-2_2/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
41
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-1-2_2/index.xml:TC3_invalid', # Tested in NL-INLINE-2024
|
|
42
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-1-3_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
43
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-1-3_1/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
44
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-1-3_2/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
45
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-1-3_2/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
46
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-1_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
47
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-1_1/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
48
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-3_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
49
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-3_1/index.xml:TC2_valid', # Tested in NL-INLINE-2024
|
|
50
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-3_1/index.xml:TC3_invalid', # Tested in NL-INLINE-2024
|
|
51
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-3_1/index.xml:TC4_invalid', # Tested in NL-INLINE-2024
|
|
52
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-4_2/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
53
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-4_2/index.xml:TC2_valid', # Tested in NL-INLINE-2024
|
|
54
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-4_2/index.xml:TC3_valid', # Tested in NL-INLINE-2024
|
|
55
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-4_2/index.xml:TC4_invalid', # Tested in NL-INLINE-2024
|
|
56
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-7_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
57
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-7_1/index.xml:TC2_valid', # Tested in NL-INLINE-2024
|
|
58
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-7_1/index.xml:TC3_valid', # Tested in NL-INLINE-2024
|
|
59
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-7_1/index.xml:TC4_invalid', # Tested in NL-INLINE-2024
|
|
60
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-7_1/index.xml:TC5_invalid', # Tested in NL-INLINE-2024
|
|
61
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-7_1/index.xml:TC6_invalid', # Tested in NL-INLINE-2024
|
|
62
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-2-7_1/index.xml:TC7_invalid', # Tested in NL-INLINE-2024
|
|
63
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-3-1_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
64
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-3-1_1/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
65
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-3-1_2/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
66
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-3-1_2/index.xml:TC2_valid', # Tested in NL-INLINE-2024
|
|
67
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-3-1_3/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
68
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-3-1_3/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
69
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-4-1_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
70
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-4-1_2/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
71
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-4-1_3/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
72
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-4-1_3/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
73
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-4-1_4/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
74
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-4-1_4/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
75
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-4-1_5/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
76
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-4-1_5/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
77
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-4-2_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
78
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-4-2_1/index.xml:TC3_invalid', # Tested in NL-INLINE-2024
|
|
79
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-1_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
80
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-1_1/index.xml:TC2_valid', # Tested in NL-INLINE-2024
|
|
81
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-1_1/index.xml:TC3_invalid', # Tested in NL-INLINE-2024
|
|
82
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-1_1/index.xml:TC4_invalid', # Tested in NL-INLINE-2024
|
|
83
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-1_2/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
84
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-1_2/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
85
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-1_3/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
86
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-1_3/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
87
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-1_4/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
88
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-1_4/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
89
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-1_5/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
90
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-1_5/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
91
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-1_5/index.xml:TC3_invalid', # Tested in NL-INLINE-2024
|
|
92
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-2_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
93
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-2_1/index.xml:TC2_valid', # Tested in NL-INLINE-2024
|
|
94
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-2_1/index.xml:TC3_invalid', # Tested in NL-INLINE-2024
|
|
95
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-2_2/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
96
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-2_2/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
97
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-2_3/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
98
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-2_3/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
99
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-3_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
100
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-3_1/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
101
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-4_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
102
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-5-4_1/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
103
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-6-2_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
104
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-6-2_1/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
105
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-6-3_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
106
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-6-3_1/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
107
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-6-3_2/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
108
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-6-3_2/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
109
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-6-3_3/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
110
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-6-3_3/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
111
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-7-1_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
112
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G3-7-1_1/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
113
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G6-1-1_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
114
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G6-1-1_1/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
115
|
+
|
|
116
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-1_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
117
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-1_1/index.xml:TC2_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
118
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-1_1/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
119
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-1_1/index.xml:TC4_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
120
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-1_1/index.xml:TC5_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
121
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-1_1/index.xml:TC6_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
122
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-1_1/index.xml:TC7_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
123
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-1_2/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
124
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-1_2/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
125
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-1_2/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
126
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-2_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
127
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-2_1/index.xml:TC2_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
128
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-2_1/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
129
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-2_2/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
130
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-2_2/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
131
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-5_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
132
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-5_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
133
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-5_2/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
134
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-5_2/index.xml:TC2_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
135
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-5_2/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
136
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-5_2/index.xml:TC4_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
137
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-5_2/index.xml:TC5_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
138
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-5_2/index.xml:TC6_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
139
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-1-5_2/index.xml:TC7_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
140
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-2-0_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
141
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-2-0_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
142
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-2-0_2/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
143
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-2-0_2/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
144
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-2-1_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
145
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-2-1_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
146
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-2-2_2/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
147
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-2-2_2/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
148
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-2-3_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
149
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-2-3_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
150
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-3-1_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
151
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-3-1_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
152
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-3-1_1/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
153
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-3-1_1/index.xml:TC4_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
154
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-3-2_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
155
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-3-2_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
156
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-1_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
157
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-1_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
158
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-2_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
159
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-2_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
160
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-2_2/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
161
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-2_2/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
162
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-2_3/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
163
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-2_3/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
164
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-2_4/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
165
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-2_4/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
166
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-3_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
167
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-3_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
168
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-3_1/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
169
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-3_2/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
170
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-3_2/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
171
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-3_2/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
172
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-4_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
173
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-4_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
174
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-5_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
175
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-5_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
176
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-5_2/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
177
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-5_2/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
178
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-5_2/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
179
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-6_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
180
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-6_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
181
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/G4-4-6_1/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
182
|
+
|
|
183
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_II_Par_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
184
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_II_Par_1/index.xml:TC2_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
185
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_II_Par_1/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
186
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_II_Par_1_RTS_Annex_IV_par_7/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
187
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_II_Par_1_RTS_Annex_IV_par_7/index.xml:TC2_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
188
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_II_Par_1_RTS_Annex_IV_par_7/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
189
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_II_Par_1_RTS_Annex_IV_par_7/index.xml:TC4_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
190
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_III_Par_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
191
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_III_Par_1/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
192
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_III_Par_1/index.xml:TC3_invalid', # Tested in NL-INLINE-2024
|
|
193
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_11_G4-2-2_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
194
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_11_G4-2-2_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
195
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_11_G4-2-2_1/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
196
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_12_G3-2-4_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
197
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_12_G3-2-4_1/index.xml:TC2_valid', # Tested in NL-INLINE-2024
|
|
198
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_12_G3-2-4_1/index.xml:TC3_valid', # Tested in NL-INLINE-2024
|
|
199
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_12_G3-2-4_1/index.xml:TC4_invalid', # Tested in NL-INLINE-2024
|
|
200
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_14_G3-5-1_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
201
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_14_G3-5-1_1/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
202
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_1_G3-1-4_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
203
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_1_G3-1-4_1/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
204
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_1_G3-1-4_2/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
205
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_1_G3-1-4_2/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
206
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_2_G3-1-1_1/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
207
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_2_G3-1-1_2/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
208
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_2_G3-1-1_2/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
209
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_4_1/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
210
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_4_1/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
211
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_4_2/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
212
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_4_2/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
213
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_4_3/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
214
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_4_3/index.xml:TC2_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
215
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_4_3/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
216
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_4_3/index.xml:TC4_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
217
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_4_3/index.xml:TC5_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
218
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_5/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
219
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_5/index.xml:TC2_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
220
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_5/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
221
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_6/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
222
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_6/index.xml:TC2_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
223
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_6/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
224
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_6/index.xml:TC4_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
225
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_8_G4-4-5/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
226
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_8_G4-4-5/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
227
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_8_G4-4-5/index.xml:TC3_invalid', # Tested in NL-INLINE-2024
|
|
228
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_9_Par_10/index.xml:TC1_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
229
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_9_Par_10/index.xml:TC2_valid', # Must be run with different disclosure system for GAAP/IFRS
|
|
230
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Annex_IV_Par_9_Par_10/index.xml:TC3_invalid', # Must be run with different disclosure system for GAAP/IFRS
|
|
231
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Art_3/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
232
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Art_3/index.xml:TC2_valid', # Tested in NL-INLINE-2024
|
|
233
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Art_3/index.xml:TC3_valid', # Tested in NL-INLINE-2024
|
|
234
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Art_3/index.xml:TC4_invalid', # Tested in NL-INLINE-2024
|
|
235
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Art_6_a/index.xml:TC1_valid', # Tested in NL-INLINE-2024
|
|
236
|
+
'conformance-suite-2024-sbr-domein-handelsregister/tests/RTS_Art_6_a/index.xml:TC2_invalid', # Tested in NL-INLINE-2024
|
|
237
|
+
]),
|
|
238
|
+
info_url='https://www.sbr-nl.nl/sbr-domeinen/handelsregister/uitbreiding-elektronische-deponering-handelsregister',
|
|
239
|
+
name=PurePath(__file__).stem,
|
|
240
|
+
network_or_cache_required=False,
|
|
241
|
+
plugins=frozenset({'validate/NL'}),
|
|
242
|
+
shards=8,
|
|
243
|
+
test_case_result_options='match-all',
|
|
244
|
+
)
|
|
@@ -18,9 +18,9 @@ ALL_PYTHON_VERSIONS = (
|
|
|
18
18
|
'3.10',
|
|
19
19
|
'3.11',
|
|
20
20
|
'3.12',
|
|
21
|
-
'3.13',
|
|
21
|
+
'3.13.3',
|
|
22
22
|
)
|
|
23
|
-
LATEST_PYTHON_VERSION = '3.13'
|
|
23
|
+
LATEST_PYTHON_VERSION = '3.13.3'
|
|
24
24
|
# number of cores on the runners
|
|
25
25
|
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
|
|
26
26
|
OS_CORES = {
|
|
@@ -9,11 +9,19 @@ class TestValidateCssUrl(TestCase):
|
|
|
9
9
|
validateCssUrl(
|
|
10
10
|
'* { background: url("http://example.com") }',
|
|
11
11
|
MagicMock(), modelXbrl, MagicMock(), MagicMock(), MagicMock())
|
|
12
|
-
|
|
12
|
+
expected = dict(
|
|
13
|
+
level='ERROR',
|
|
14
|
+
codes=('ESEF.3.5.1.inlineXbrlDocumentContainsExternalReferences', 'NL.NL-KVK.3.6.2.1.inlineXbrlDocumentContainsExternalReferences'),
|
|
15
|
+
)
|
|
16
|
+
self.assertLessEqual(expected.items(), modelXbrl.log.call_args.kwargs.items())
|
|
13
17
|
|
|
14
18
|
def test_url_token(self) -> None:
|
|
15
19
|
modelXbrl = MagicMock()
|
|
16
20
|
validateCssUrl(
|
|
17
21
|
'* { background: url(http://example.com) }',
|
|
18
22
|
MagicMock(), modelXbrl, MagicMock(), MagicMock(), MagicMock())
|
|
19
|
-
|
|
23
|
+
expected = dict(
|
|
24
|
+
level='ERROR',
|
|
25
|
+
codes=('ESEF.3.5.1.inlineXbrlDocumentContainsExternalReferences', 'NL.NL-KVK.3.6.2.1.inlineXbrlDocumentContainsExternalReferences'),
|
|
26
|
+
)
|
|
27
|
+
self.assertLessEqual(expected.items(), modelXbrl.log.call_args.kwargs.items())
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
See COPYRIGHT.md for copyright information.
|
|
3
|
-
"""
|
|
4
|
-
from __future__ import annotations
|
|
5
|
-
|
|
6
|
-
import binascii
|
|
7
|
-
import os
|
|
8
|
-
from typing import cast
|
|
9
|
-
from urllib.parse import unquote
|
|
10
|
-
|
|
11
|
-
from arelle import ModelDocument
|
|
12
|
-
from lxml.etree import XML, XMLSyntaxError
|
|
13
|
-
from lxml.etree import _Element
|
|
14
|
-
|
|
15
|
-
from arelle.ModelObjectFactory import parser
|
|
16
|
-
from arelle.ModelXbrl import ModelXbrl
|
|
17
|
-
from arelle.UrlUtil import decodeBase64DataImage, scheme
|
|
18
|
-
from arelle.ValidateFilingText import parseImageDataURL, validateGraphicHeaderType
|
|
19
|
-
from arelle.ValidateXbrl import ValidateXbrl
|
|
20
|
-
from arelle.typing import TypeGetText
|
|
21
|
-
from ..Const import supportedImgTypes
|
|
22
|
-
from ..Util import getDisclosureSystemYear
|
|
23
|
-
|
|
24
|
-
_: TypeGetText # Handle gettext
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
# check image contents against mime/file ext and for Steganography
|
|
28
|
-
def validateImage(
|
|
29
|
-
baseUrl: str | None,
|
|
30
|
-
image: str,
|
|
31
|
-
modelXbrl: ModelXbrl,
|
|
32
|
-
val: ValidateXbrl,
|
|
33
|
-
elts: _Element | list[_Element],
|
|
34
|
-
evaluatedMsg: str,
|
|
35
|
-
contentOtherThanXHTMLGuidance: str,
|
|
36
|
-
) -> None:
|
|
37
|
-
"""
|
|
38
|
-
image: either an url or base64 in data:image style
|
|
39
|
-
"""
|
|
40
|
-
# a list of img elements are maintained because an SVG can reference another SVG
|
|
41
|
-
# or other type of image and we need to log the entire reference chain.
|
|
42
|
-
if not isinstance(elts, list):
|
|
43
|
-
elts = [elts]
|
|
44
|
-
minExternalRessourceSize = val.authParam["minExternalResourceSizekB"]
|
|
45
|
-
if minExternalRessourceSize != -1:
|
|
46
|
-
# transform kb to b
|
|
47
|
-
minExternalRessourceSize = minExternalRessourceSize * 1024
|
|
48
|
-
if scheme(image) in ("http", "https", "ftp"):
|
|
49
|
-
modelXbrl.error("ESEF.4.1.6.xHTMLDocumentContainsExternalReferences" if val.unconsolidated
|
|
50
|
-
else "ESEF.3.5.1.inlineXbrlDocumentContainsExternalReferences",
|
|
51
|
-
_("Inline XBRL instance documents MUST NOT contain any reference pointing to resources outside the reporting package: %(element)s"),
|
|
52
|
-
modelObject=elts, element=elts[0].tag, evaluatedMsg=evaluatedMsg,
|
|
53
|
-
messageCodes=("ESEF.3.5.1.inlineXbrlDocumentContainsExternalReferences",
|
|
54
|
-
"ESEF.4.1.6.xHTMLDocumentContainsExternalReferences"))
|
|
55
|
-
elif image.startswith("data:image"):
|
|
56
|
-
dataURLParts = parseImageDataURL(image)
|
|
57
|
-
if not dataURLParts or not dataURLParts.isBase64:
|
|
58
|
-
modelXbrl.warning(f"{contentOtherThanXHTMLGuidance}.embeddedImageNotUsingBase64Encoding",
|
|
59
|
-
_("Images included in the XHTML document SHOULD be base64 encoded: %(src)s."),
|
|
60
|
-
modelObject=elts, src=image[:128], evaluatedMsg=evaluatedMsg)
|
|
61
|
-
if dataURLParts and dataURLParts.mimeSubtype and dataURLParts.data:
|
|
62
|
-
checkImageContents(None, modelXbrl, elts, dataURLParts.mimeSubtype, False, unquote(dataURLParts.data), val.consolidated, val)
|
|
63
|
-
else:
|
|
64
|
-
if not dataURLParts.mimeSubtype:
|
|
65
|
-
modelXbrl.error(f"{contentOtherThanXHTMLGuidance}.MIMETypeNotSpecified",
|
|
66
|
-
_("Images included in the XHTML document MUST be saved with MIME type specifying PNG, GIF, SVG or JPG/JPEG formats: %(src)s."),
|
|
67
|
-
modelObject=elts, src=image[:128], evaluatedMsg=evaluatedMsg)
|
|
68
|
-
elif dataURLParts.mimeSubtype not in ("gif", "jpeg", "png", "svg+xml"):
|
|
69
|
-
modelXbrl.error(f"{contentOtherThanXHTMLGuidance}.imageFormatNotSupported",
|
|
70
|
-
_("Images included in the XHTML document MUST be saved in PNG, GIF, SVG or JPG/JPEG formats: %(src)s."),
|
|
71
|
-
modelObject=elts, src=image[:128], evaluatedMsg=evaluatedMsg)
|
|
72
|
-
# check for malicious image contents
|
|
73
|
-
try: # allow embedded newlines
|
|
74
|
-
imgContents = decodeBase64DataImage(dataURLParts.data)
|
|
75
|
-
checkImageContents(None, modelXbrl, elts, str(dataURLParts.mimeSubtype), False, imgContents, val.consolidated, val)
|
|
76
|
-
imgContents = b"" # deref, may be very large
|
|
77
|
-
|
|
78
|
-
except binascii.Error as err:
|
|
79
|
-
modelXbrl.error(f"{contentOtherThanXHTMLGuidance}.embeddedImageNotUsingBase64Encoding",
|
|
80
|
-
_("Base64 encoding error %(err)s in image source: %(src)s."),
|
|
81
|
-
modelObject=elts, err=str(err), src=image[:128], evaluatedMsg=evaluatedMsg)
|
|
82
|
-
else:
|
|
83
|
-
# presume it to be an image file, check image contents
|
|
84
|
-
try:
|
|
85
|
-
base = baseUrl
|
|
86
|
-
normalizedUri = modelXbrl.modelManager.cntlr.webCache.normalizeUrl(image, base)
|
|
87
|
-
if not modelXbrl.fileSource.isInArchive(normalizedUri):
|
|
88
|
-
normalizedUri = modelXbrl.modelManager.cntlr.webCache.getfilename(normalizedUri)
|
|
89
|
-
imglen = 0
|
|
90
|
-
with modelXbrl.fileSource.file(normalizedUri, binary=True)[0] as fh:
|
|
91
|
-
imgContents = cast(bytes, fh.read())
|
|
92
|
-
imglen += len(imgContents or '')
|
|
93
|
-
checkImageContents(normalizedUri, modelXbrl, elts, os.path.splitext(image)[1], True, imgContents,
|
|
94
|
-
val.consolidated, val)
|
|
95
|
-
imgContents = b"" # deref, may be very large
|
|
96
|
-
if getDisclosureSystemYear(modelXbrl) < 2023 and imglen < minExternalRessourceSize:
|
|
97
|
-
modelXbrl.warning(
|
|
98
|
-
"%s.imageIncludedAndNotEmbeddedAsBase64EncodedString" % contentOtherThanXHTMLGuidance,
|
|
99
|
-
_("Images SHOULD be included in the XHTML document as a base64 encoded string unless their size exceeds the minimum size for the authority (%(maxImageSize)s): %(file)s."),
|
|
100
|
-
modelObject=elts, maxImageSize=minExternalRessourceSize, file=os.path.basename(normalizedUri), evaluatedMsg=evaluatedMsg)
|
|
101
|
-
except IOError as err:
|
|
102
|
-
fileReferencingImage = os.path.basename(baseUrl) if baseUrl else ''
|
|
103
|
-
modelXbrl.error(f"{contentOtherThanXHTMLGuidance}.imageFileCannotBeLoaded",
|
|
104
|
-
_("Error opening the file '%(src)s' referenced by '%(fileReferencingImage)s': %(error)s"),
|
|
105
|
-
modelObject=elts, src=image, fileReferencingImage=fileReferencingImage, error=err, evaluatedMsg=evaluatedMsg)
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
def checkImageContents(
|
|
109
|
-
baseURI: str | None,
|
|
110
|
-
modelXbrl: ModelXbrl,
|
|
111
|
-
imgElts: list[_Element],
|
|
112
|
-
imgType: str,
|
|
113
|
-
isFile: bool,
|
|
114
|
-
data: bytes | str,
|
|
115
|
-
consolidated: bool,
|
|
116
|
-
val: ValidateXbrl,
|
|
117
|
-
) -> None:
|
|
118
|
-
guidance = 'ESEF.2.5.1' if consolidated else 'ESEF.4.1.3'
|
|
119
|
-
if "svg" in imgType:
|
|
120
|
-
try:
|
|
121
|
-
checkSVGContent(baseURI, modelXbrl, imgElts, data, guidance, val)
|
|
122
|
-
except XMLSyntaxError as err:
|
|
123
|
-
try:
|
|
124
|
-
checkSVGContent(baseURI, modelXbrl, imgElts, unquote(data), guidance, val) # Try with utf-8 decoded data as in conformance suite G4-1-3_2/TC2
|
|
125
|
-
except XMLSyntaxError:
|
|
126
|
-
modelXbrl.error(f"{guidance}.imageFileCannotBeLoaded",
|
|
127
|
-
_("Image SVG has XML error %(error)s"),
|
|
128
|
-
modelObject=imgElts, error=err)
|
|
129
|
-
except UnicodeDecodeError as err:
|
|
130
|
-
modelXbrl.error(f"{guidance}.imageFileCannotBeLoaded",
|
|
131
|
-
_("Image SVG has XML error %(error)s"),
|
|
132
|
-
modelObject=imgElts, error=err)
|
|
133
|
-
else:
|
|
134
|
-
headerType = validateGraphicHeaderType(data) # type: ignore[arg-type]
|
|
135
|
-
if (("gif" not in imgType and headerType == "gif") or
|
|
136
|
-
("jpeg" not in imgType and "jpg" not in imgType and headerType == "jpg") or
|
|
137
|
-
("png" not in imgType and headerType == "png")):
|
|
138
|
-
imageDoesNotMatchItsFileExtension = f"{guidance}.imageDoesNotMatchItsFileExtension"
|
|
139
|
-
incorrectMIMETypeSpecified = f"{guidance}.incorrectMIMETypeSpecified"
|
|
140
|
-
if isFile:
|
|
141
|
-
code = imageDoesNotMatchItsFileExtension
|
|
142
|
-
message = _("File type %(headerType)s inferred from file signature does not match the file extension %(imgType)s")
|
|
143
|
-
else:
|
|
144
|
-
code = incorrectMIMETypeSpecified
|
|
145
|
-
message = _("File type %(headerType)s inferred from file signature does not match the data URL media subtype (MIME subtype) %(imgType)s")
|
|
146
|
-
modelXbrl.error(code, message,
|
|
147
|
-
modelObject=imgElts, imgType=imgType, headerType=headerType,
|
|
148
|
-
messageCodes=(imageDoesNotMatchItsFileExtension, incorrectMIMETypeSpecified))
|
|
149
|
-
elif not any(it in imgType for it in supportedImgTypes[isFile]):
|
|
150
|
-
modelXbrl.error(f"{guidance}.imageFormatNotSupported",
|
|
151
|
-
_("Images included in the XHTML document MUST be saved in PNG, GIF, SVG or JPEG formats: %(imgType)s is not supported"),
|
|
152
|
-
modelObject=imgElts, imgType=imgType)
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
def checkSVGContent(
|
|
156
|
-
baseURI: str | None,
|
|
157
|
-
modelXbrl: ModelXbrl,
|
|
158
|
-
imgElts: list[_Element],
|
|
159
|
-
data: bytes | str,
|
|
160
|
-
guidance: str,
|
|
161
|
-
val: ValidateXbrl,
|
|
162
|
-
) -> None:
|
|
163
|
-
if baseURI:
|
|
164
|
-
svgDoc = cast(ModelDocument.ModelDocument, ModelDocument.load(modelXbrl, baseURI, referringElement=imgElts[0]))
|
|
165
|
-
elt = svgDoc.xmlRootElement
|
|
166
|
-
else:
|
|
167
|
-
_parser, _ignored, _ignored = parser(modelXbrl, baseURI)
|
|
168
|
-
elt = XML(data, parser=_parser)
|
|
169
|
-
checkSVGContentElt(elt, baseURI, modelXbrl, imgElts, guidance, val)
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
def getHref(elt:_Element) -> str:
|
|
173
|
-
simple_href = elt.get("href", "").strip()
|
|
174
|
-
if len(simple_href) > 0:
|
|
175
|
-
return simple_href
|
|
176
|
-
else:
|
|
177
|
-
# 'xlink:href' is deprecated but still used by some SVG generators
|
|
178
|
-
return elt.get("{http://www.w3.org/1999/xlink}href", "").strip()
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
def checkSVGContentElt(
|
|
182
|
-
elt: _Element,
|
|
183
|
-
baseUrl: str | None,
|
|
184
|
-
modelXbrl: ModelXbrl,
|
|
185
|
-
imgElts: list[_Element],
|
|
186
|
-
guidance: str,
|
|
187
|
-
val: ValidateXbrl,
|
|
188
|
-
) -> None:
|
|
189
|
-
rootElement = True
|
|
190
|
-
for elt in elt.iter():
|
|
191
|
-
if rootElement:
|
|
192
|
-
if elt.tag != "{http://www.w3.org/2000/svg}svg":
|
|
193
|
-
modelXbrl.error(f"{guidance}.imageFileCannotBeLoaded",
|
|
194
|
-
_("Image SVG has root element which is not svg"),
|
|
195
|
-
modelObject=imgElts)
|
|
196
|
-
rootElement = False
|
|
197
|
-
# Comments, processing instructions, and maybe other special constructs don't have string tags.
|
|
198
|
-
if not isinstance(elt.tag, str):
|
|
199
|
-
continue
|
|
200
|
-
eltTag = elt.tag.rpartition("}")[2] # strip namespace
|
|
201
|
-
if eltTag == "image":
|
|
202
|
-
imgElts = [*imgElts, elt]
|
|
203
|
-
validateImage(baseUrl, getHref(elt), modelXbrl, val, imgElts, "", guidance)
|
|
204
|
-
if eltTag in ("object", "script", "audio", "foreignObject", "iframe", "image", "use", "video"):
|
|
205
|
-
href = elt.get("href","")
|
|
206
|
-
if eltTag in ("object", "script") or "javascript:" in href:
|
|
207
|
-
modelXbrl.error(f"{guidance}.executableCodePresent",
|
|
208
|
-
_("Inline XBRL images MUST NOT contain executable code: %(element)s"),
|
|
209
|
-
modelObject=imgElts, element=eltTag)
|
|
210
|
-
elif scheme(href) in ("http", "https", "ftp"):
|
|
211
|
-
modelXbrl.error(f"{guidance}.referencesPointingOutsideOfTheReportingPackagePresent",
|
|
212
|
-
_("Inline XBRL instance document [image] MUST NOT contain any reference pointing to resources outside the reporting package: %(element)s"),
|
|
213
|
-
modelObject=imgElts, element=eltTag)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|