dgm9704 / xoxo Goto Github PK
View Code? Open in Web Editor NEWread, write, compare, convert XBRL reports
License: GNU Lesser General Public License v3.0
read, write, compare, convert XBRL reports
License: GNU Lesser General Public License v3.0
ie: <xbrli:scenario />
instead it should not be serialized at all
Assert.Fail failed. System.NullReferenceException: Object reference not set to an instance of an object.
at Diwen.Xbrl.Fact.ToString()
at Diwen.Xbrl.InstanceComparer.FactComparison(Instance a, Instance b)
at Diwen.Xbrl.InstanceComparer.Report(Instance a, Instance b, ComparisonTypes comparisonTypes)
-> In Fact.ToString() check for Metric, Unit and Context being null
Facts can be equivalent in other ways and have different values for Decimals. In some cases these facts should be seen as being same.
Object reference not set to an instance of an object.
at Diwen.Xbrl.InstanceComparer.CheckEntity(Instance a, Instance b)
Other instance is empty (has no contexts or facts), other has no facts but has a context (for filing indicators)
So basically need to implement reading of processing instructions when deserializing
Two facts can be equivalent but have values differing only by trialing decimal zeroes. In some cases these facts should be seen as being same.
Seems to come from trying to get Scenario.ToString() when scenario is null
Not fixed, still need to do the same for Scenario.ExplicitMemebrs and .TypedMembers
Two cases with facts differing by value, only first is reported. Facts have same context but different metric. If one is fixed then other is reported.
... this results in difference being reported when functionally same instance.
The comparison should be skipped when other instance (or both) doesn't have taxonomyversion,
since it isn't mandatory.
This results in every context in compared instances being "different", which is true from a purely technical point of view. However it would better if the entity is compared only once per comparison (plus of course checked to be consistent across the instance) and contexts compared only by scenarios. The above holds also for period.
This would result in a situation where two otherwise functionally identical reports with differing entity (or period) would not report each and every context (and fact!) as different. Instead, the report would simply state that the entity (or period) is different and leave it at that.
In some cases it's know beforehand that instances are going to differ eg by entity or period, but should be otherwise identical. These cases are now reported as different. Since the basic comparisons are already separated in logic, there should/could be switches for them also.
...so when there are problems, you would at least get some output
There should be some way to tell where the differences(s) are, like reading a property after comparison, or giving an optional out parameter, logging the differences to a stream, throwing an exception with details or something. At the moment it's just a true/false which doesn't help much with any substantial instance.
RemoveUnusedContexts() gets IEnumerable and calls Contains multiple times. Should probably call ToList() first
ie. these should be equal cases and are not atm.
a)
<xbrli:unit id="uEUR">
<xbrli:measure>iso4217:EUR</xbrli:measure>
</xbrli:unit>
<eba_met:mi290 unitRef="uEUR" decimals="-3" [...]
b)
<unit id="u-01">
<measure>iso4217:EUR</measure>
</unit>
<eba_met:mi290 unitRef="u-01" decimals="-3" [...]
example instance:
<?xml version='1.0' encoding='utf-8'?>
<?taxonomy-version 2.0.3?>
<xbrli:xbrl xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink">
<link:schemaRef xlink:type="simple" xlink:href="http://www.eba.europa.eu/eu/fr/xbrl/crr/fws/corep/its-2013-02/2014-07-31/mod/corep_con.xsd"/>
</xbrli:xbrl>
link to xsd:
https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd
excerpt:
<element name="xbrl">
<annotation>
<documentation>XBRL instance root element.</documentation>
</annotation>
<complexType>
<sequence>
<element ref="link:schemaRef" minOccurs="1" maxOccurs="unbounded"/>
<element ref="link:linkbaseRef" minOccurs="0" maxOccurs="unbounded"/>
<element ref="link:roleRef" minOccurs="0" maxOccurs="unbounded"/>
<element ref="link:arcroleRef" minOccurs="0" maxOccurs="unbounded"/>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="xbrli:item"/>
<element ref="xbrli:tuple"/>
<element ref="xbrli:context"/>
<element ref="xbrli:unit"/>
<element ref="link:footnoteLink"/>
</choice>
</sequence>
<attribute name="id" type="ID" use="optional"/>
<anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="lax"/>
</complexType>
</element>
eg. "0.0000" and "0" are considered different when both are possible and correct representations of fact value.
... and everything else use double quotes
Scenario argument should perhaps be allowed as null
System.NullReferenceException: Object reference not set to an instance of an object.
at Diwen.Xbrl.Fact.Equals(Fact other)
at System.Collections.Generic.GenericEqualityComparer1.Equals(T x, T y) at System.Collections.Generic.LinkedList
1.Find(T value)
at Diwen.Xbrl.ListExtensions.ContentCompareReport[T](IList1 left, IList
1 right)
at Diwen.Xbrl.InstanceComparer.FactComparison(Instance a, Instance b)
at Diwen.Xbrl.InstanceComparer.Report(Instance a, Instance b, ComparisonTypes comparisonTypes)
at XbrlCompare.Program.CompareAndReport(String inputReport, String outputReport, String comparisonReport, ComparisonTypes comparisonTypes)
at XbrlCompare.Program.Main(String[] args)
When comparing FilingIndicator collections, filed=false should match missing filing indicator
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.