GithubHelp home page GithubHelp logo

tqa's People

Contributors

dvreeze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tqa's Issues

Catalog file location not conform XBRL spec

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).

tqa-0001 TaxonomyElem creation too expensive for SaxonElem backing element

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:

  • During TaxonomyElem creation, reduce the number of parent element/EName calls, by passing the parent around
  • Make parent element/EName querying itself very efficient, with custom implementations for well-known backing elements

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.