dvreeze / tqa Goto Github PK
View Code? Open in Web Editor NEWXBRL Taxonomy Query API
License: Apache License 2.0
XBRL Taxonomy Query API
License: Apache License 2.0
Hi Chris! Hope you are doing well!
According to https://www.xbrl.org/Specification/taxonomy-package/REC-2016-04-19/taxonomy-package-REC-2016-04-19.html,
a taxonomy package zip should contain only a single root entry, which is a folder with the same name as the zip file itself:
A Taxonomy Package MUST contain a single top-level directory, with all other files being contained within that directory or descendant subdirectories (tpe:invalidDirectoryStructure). It is recommended, but not required, that the name of the top-level directory be the same as the name of the Taxonomy Package with the .zip file extension removed.
In any case it's easy to assume they mean the implicit root of every zip file, but in fact they truly mean that an explicit single folder should be inside the zip.
Currently TQA assumes a top level folder "META-INF/catalog.xml", but that should rather be "???/META-INF/catalog.xml" (see TaxonomyBaseFactoryFromRemoteZip.scala and TaxonomyPackagePartialUriResolver.scala).
Recursive TaxonomyElem creation looks at the parent element to distinguish between global and local element declarations, for example. The way the parent element is determined is not through a call to method parentOption, but through a call to method reverseAncestryOrSelfENames instead. The latter is optimal if the backing element is a native yaidom indexed element, but quite inefficient (and generating lots of garbage) for Saxon wrapper elements. This should be fixed.
The fix could be twofold:
About the second point: we could have an (internal) element query API extension API, one "instanceof" pattern match for well-known backing element implementations, and then type-safe implementations of that query API extension for those element implementations. One method in that extension query API could be "hasParentWithName(ename)", and it would have quite different implementations for Saxon wrappers and native yaidom indexed elements.
This could all be done in TQA (no need to change yaidom), without any breaking changes.
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.