xbrlus / xule

An open-source XBRL processor for business rules, rendering and custom data reporting. See https://xbrl.us/xule for documentation and https://xbrl.us/xule-editor for a VS Code syntax highlighter.
Apache License 2.0
24 stars 9 forks source link

Missing reference warning when -f uses a local file in arelle #13

Closed BrittMcDanel closed 1 year ago

BrittMcDanel commented 1 year ago

Hello,

I am using arelle, and when passing a local file path in -f, I get missing reference errors. The local file is the exact source from the url. For example:

python3.9 arelleCmdLine.py --plugins xule -f https://www.sec.gov/Archives/edgar/data/62996/000006299622000041/mas-20220930.htm --noCertificateCheck --xule-compile "sample.xule" --xule-run --xule-rule-set "compiled_rules.zip" --xule-compile-type="json"

Works correctly, but:

python3.9 arelleCmdLine.py --plugins xule -f data/mas-20220930.htm --noCertificateCheck --xule-compile "sample.xule" --xule-run --xule-rule-set "compiled_rules.zip" --xule-compile-type="json"

Gives warnings such as:

[ix11.12.1.2:missingReferences] Instance fact missing schema definition: us-gaap:RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability of Inline Element ix:nonFraction - mas-20220930.htm 24012

My xule file is:

namespace us-gaap=http://fasb.org/us-gaap/2022
namespace mas=https://www.sec.gov/Archives/edgar/data/62996/000006299622000041/mas-20220930.xsd

output query-test
navigate summation-item descendants

Do the namespaces need to be local files too when running from a local file? Thanks

davidtauriello commented 1 year ago

Hi @BrittMcDanel - there are likely references in the HTML that are looking for taxonomy files relative to the location of the HTML (not absolute).

The quickest solution is to use the .zip file posted to EDGAR that is the actual company submission (the extracted fileset is part of EDGAR processing. You could also extract the files from the .zip then point to the HTML, but that's one extra step.

You can get to the .zip by removing the html file from the URL - in the case of your example, you'll find the .zip among the files listed here: https://www.sec.gov/Archives/edgar/data/62996/000006299622000041/