Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add attributes to fact? #63

Closed
BartDelouvroy opened this issue Jan 3, 2019 · 7 comments
Closed

How to add attributes to fact? #63

BartDelouvroy opened this issue Jan 3, 2019 · 7 comments
Assignees
Labels

Comments

@BartDelouvroy
Copy link

Hi,

I want to use your library to create XBRL files for EBA reports (based on DPM - data point model) .
A fact consists of attributes unitRef, decimals, contextRef which are covered by the method AddFact.
However it also needs some additional attributes like in below example:

<eba_met:mi170 unitRef="uGBP" decimals="-3" model:table="C_40.00" model:x="070" model:y="030" contextRef="c13">6238000</eba_met:mi170>

My question: how can I add attributes like 'model:table' etc?

Kind regards,
Bart.

@dgm9704 dgm9704 self-assigned this Jan 3, 2019
@dgm9704
Copy link
Owner

dgm9704 commented Jan 3, 2019

I’ll take a look at this and get back to you!

@dgm9704
Copy link
Owner

dgm9704 commented Jan 3, 2019

Hi!
Bad news I'm afraid.
The way the library is built, means that handling additional attributes
in the same way as the normal ones is not supported.

The main reason is (there are others also):
Any facts with the same metric, context, value, unit and decimals
are considered "identical" as per the taxonomy (and DPM)
Additional attributes would/could create facts that are duplicate
in that way, but different in a way that would require them both to be
represented in a file.
This would be true eg. for facts that are modeled in more than table
in a given entrypoint (module).
That report file could then violate the taxonomy, Filing Rules,
or some other validation.

There is a possible work-around however:
That is to create your report normally, but instead of writing it to file,
you would call Instance.ToXmlDocument(), manipulate the returned XmlDocument
by adding any necessary attributes, and finally writing that XmlDocument
to file.

Having said all this, I confess I am very curious:
I handle lots of XBRL files coming and going in my day job, also those
that are based on the EBA DPM, and I haven't seen any need for additional
attributes for facts in succesful reporting.

EBA releases different test and reference instances for each DPM/taxonomy version.
I vaguely remember that they did put out some files that still had some of their
internal modeling data still "attached" by mistake.
(And afterwards released the corrected files without this extra info)
Now, please don't take offense, but could it be that you might be working
with those incorrect test files, and trying to reproduce them?

If that is the case then simply downloading the newest test files
would perhaps help you or clarify the issue?
If not, then I will gladly try to figure a way around this problem.

@BartDelouvroy
Copy link
Author

Hi,

Despite my 10 years in banking industry I'm totally new to XBRL.
You are totally right. I started experimenting with XBRL for EBA reports and took the XBRL samples some 3 months ago. Following your suggestion, I just downloaded them again and it now contains a readme file with errata containing the text "Originally provided instance files mistakenly contained model:table, model:x, model:y, model:z etc attributes on fact values.". The new samples do not contain these attributes anymore.

Glad that this can be categorized as a non-issue. Thanks a lot for pointing me in the right direction!

Kind regards,
Bart.

@dgm9704
Copy link
Owner

dgm9704 commented Jan 4, 2019

I'm glad I could help, I know first hand that there is a somewhat steep learning curve to XBRL. Please feel free to ask if there are any other problems, either with the library, or even XBRL reporting in general.

@BartDelouvroy
Copy link
Author

BartDelouvroy commented Mar 26, 2020 via email

@dgm9704
Copy link
Owner

dgm9704 commented Mar 28, 2020

Hello.
Could you provide the actual error message if there is one? You can leave out any information that is private of course.
What you could try is to serialize the same Instance that gives the error with .ToFile and see what that produces. If that works as it should then the problem would be in the ToXmlDocument or related code.

@BartDelouvroy
Copy link
Author

BartDelouvroy commented Mar 28, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants