Altova RaptorXML+XBRL Server 2024

L’exemple suivant affiche comment valider un fichier XBRL. Un problème qui pourrait être rencontré est une ou plusieurs taxonomies qui manquent. Dans ce cas, RaptorXML+XBRL Server indiquera le problème et suggérera comment remédier au problème.

 

Valider XBRL depuis la ligne de commande

La validation peut échouer en raison de taxonomies manquantes. Par exemple, utilisez PowerShell :

 

PS C:\temp\Nanonull> raptorxmlxbrl valxbrl nanonull.xbrl
file:///C:/temp/Nanonull/nanonull.xbrl: runtime="141ms" result="Failed"
Error: file:///C:/temp/Nanonull/nanonull.xsd:52:

  Ne peut pas charger un schéma avec un espace de nom cible [...] from [...].

  from 'http://xbrl.fasb.org/us-gaap/2013/elts/us-types-2013-01-31.xsd'.
FatalError: I/O operation on file'http://xbrl.fasb.org/us-gaap/2013/elts/us-types-2013-01-31.xsd' failed.
Détails : I/O Error 1001: File 'us-types-2013-01-31.xsd' is part of missing taxonomy 'US GAAP 2013.01'.

  Call 'C:\ProgramData\Altova\SharedBetweenVersions\taxonomymanager.exe install us-gaap-2013.0'.

 

Suivez la suggestion et exécutez la commande du Gestionnaire de taxonomie d’Altova :

 

PS C:\temp\Nanonull> C:\ProgramData\Altova\SharedBetweenVersions\taxonomymanager.exe install us-gaap-2013.0
Install ratings-2015.0.0, us-gaap-2013.0.0.
Create folder C:\ProgramData\Altova\pkgs\xbrl\atings\.
Download from Altova taxonomy store: ratings-2015-03-31_0.zip.
Create folder C:\ProgramData\Altova\pkgs\xbrl\us-gaap\.
Download from Altova taxonomy store: country-2012-01-31_0.zip.
Download from Altova taxonomy store: country-2013-01-31_0.zip.
Download from Altova taxonomy store: edgartaxonomies-2013_0.xml.
Download from Altova taxonomy store: dei-2012-01-31_0.zip.
Download from Altova taxonomy store: currency-2011-01-31_0.zip.
Download from Altova taxonomy store: dei-2013-01-31_0.zip.
Download from Altova taxonomy store: currency-2012-01-31_0.zip.
Download from Altova taxonomy store: invest-2012-01-31_0.zip.
Download from Altova taxonomy store: rr-2010-02-28_0.zip.
Download from Altova taxonomy store: exch-2013-01-31_0.zip.
Download from Altova taxonomy store: invest-2013-01-31_0.zip.
Download from Altova taxonomy store: naics-2011-01-31_0.zip.
Download from Altova taxonomy store: rr-2012-01-31_0.zip.
Download from Altova taxonomy store: sic-2011-01-31_0.zip.
Download from Altova taxonomy store: stpr-2011-01-31_0.zip.
Download from Altova taxonomy store: us-gaap-2013-01-31_0.zip.
OK.

 

Confirmez les taxonomies installées utilisant le Gestionnaire de taxonomie :

 

PS C:\temp\Nanonull> taxonomymanager list -i
PKGID             NAME VERSION      STATUS
ratings-2015.0    "Ratings 2015"    installed: ratings-2015.0.0 "2015.03"
us-gaap-2013.0    "US GAAP 2013"    installed: us-gaap-2013.0.0 "2013.01"
2 packages, 0 upgradeable
OK.

 

Maintenant que les taxonomies ont été correctement installées par le Gestionnaire de taxonomie, la validation devrait être réussie :

 

PS C:\temp\Nanonull> raptorxmlxbrl valxbrl nanonull.xbrl
file:///C:/temp/Nanonull/nanonull.xbrl: runtime="787ms" result="OK"

 

Tester les requêtes POST avec CURL

Une requête POST peut être testée avec CURL :

 

PS C:\temp\Nanonull> curl.exe -F 'msg={\"command\": \"xbrl\", ["args\":[\"file:///C:/temp/Nanonull/nanonull.xbrl\"], \"options\":{}};type=application/json' http://localhost:8087/v1/queue

 

Le résultat est :

 

"state": "OK"

 

Utilisez POST pour télécharger le fichier d’instance utilisant le schéma additional-files :

 

PS C:\temp\Nanonull> curl.exe -F 'msg={\"command\": \"xbrl\", \"args\":[\"additional-files:///nanonull.xbrl\"], \"options\":{}};type=application/json'

-F "additional-files=@nanonull.xbrl;type=application/xml" http://localhost:8087/v1/queue

 

Dans ce cas, disons que la taxonomie nanonull.xsd n’a pas été trouvée :

 

Erreur : additional-files:///nanonull.xbrl:3: La valeur 'nanonull.xsd' de l’attribut 'xlink:href' sur l’élément <link:schemaRef> doit pointer vers un schéma de taxonomie valide.

Erreur : L’opération I/O sur le fichier 'additional-files:///nanonull.xsd' a échoué.

Détails : Erreur de système 2 : Le système ne peut pas trouver de fichier spécifié.

  I/O Error 400: Ne sait pas comment gérer l’URI relatif (nom de schéma manque).

FatalError: additional-files:///nanonull.xbrl:2: Le DTS découvert commençant par l’instance XBRL <xbrli:xbrl> n’est pas valide.

 

Donc nous incluons la taxonomie et les fichiers associés dans la requête POST tel que recensé ci-dessous :

 

PS C:\temp\Nanonull> curl.exe -F 'msg={\"command\": \"xbrl\", \"args\":[\"additional-files:///nanonull.xbrl\"], \"options\":{}};type=application/json' -F "additional-files=@nanonull.xbrl;type=application/xml" -F "additional-files=@nanonull.xsd;type=application/xml" -F "additional-files=@nanonull_cal.xml;type=application/xml" -F "additional-files=@nanonull_def.xml;type=application/xml" -F "additional-files=@nanonull_for.xml;type=application/xml" -F "additional-files=@nanonull_lab.xml;type=application/xml" -F "additional-files=@nanonull_pre.xml;type=application/xml" -F "additional-files=@nanonull_tab.xml;type=application/xml" http://localhost:8087/v1/queue

 

Finalement, nous pouvons soumettre l’archive Nanonull.zip entier :

 

PS C:\temp\Nanonull> curl.exe -F 'msg={\"command\": \"xbrl\", \"args\":[\"additional-files:///Nanonull.zip%7Czip/nanonull.xbrl\"], \"options\":{}};type=application/json' -F "additional-files=@Nanonull.zip;type=application/octet-stream" http://localhost:8087/v1/queue

 

 

 

 

 

© 2018-2024 Altova GmbH