Skip to content

Commit

Permalink
Fixed #126
Browse files Browse the repository at this point in the history
  • Loading branch information
manusimidt committed Feb 26, 2024
1 parent 485a428 commit 339e2ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions xbrl/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ def parse_xbrl(instance_path: str, cache: HttpCache, instance_url: str or None =
facts: List[AbstractFact] = []
for fact_elem in root:
# skip contexts and units
if 'context' in fact_elem.tag or 'unit' in fact_elem.tag or 'schemaRef' in fact_elem.tag:
taxonomy_ns, concept_name = fact_elem.tag.split('}')
if 'context' in concept_name or 'unit' in concept_name or 'schemaRef' in concept_name:
continue
# check if the element has the required attributes
if 'contextRef' not in fact_elem.attrib:
Expand All @@ -381,7 +382,6 @@ def parse_xbrl(instance_path: str, cache: HttpCache, instance_url: str or None =
xml_id: str or None = fact_elem.attrib['id'] if 'id' in fact_elem.attrib else None

# find the taxonomy where the tag is coming from
taxonomy_ns, concept_name = fact_elem.tag.split('}')
taxonomy_ns = taxonomy_ns.replace('{', '')
# get the concept object from the taxonomy
tax = taxonomy.get_taxonomy(taxonomy_ns)
Expand Down
4 changes: 3 additions & 1 deletion xbrl/taxonomy.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,9 @@
'http://xbrl.sec.gov/rr-lab/2022': 'https://xbrl.sec.gov/rr/2022/rr-2022_lab.xsd',
'http://xbrl.sec.gov/rr-pre/2022': 'https://xbrl.sec.gov/rr/2022/rr-2022_pre.xsd',
'http://xbrl.sec.gov/rr-def/2022': 'https://xbrl.sec.gov/rr/2022/rr-2022_def.xsd',
'http://www.xbrl.org/dtr/type/2022-03-31': 'https://www.xbrl.org/dtr/type/2022-03-31/types.xsd'
'http://www.xbrl.org/dtr/type/2022-03-31': 'https://www.xbrl.org/dtr/type/2022-03-31/types.xsd',

'http://www.hmrc.gov.uk/schemas/ct/dpl/2021-01-01': 'https://www.hmrc.gov.uk/schemas/ct/dpl/2021-01-01/dpl-2021.xsd'
}


Expand Down

0 comments on commit 339e2ea

Please sign in to comment.