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

ddex standard convertion not working #95

Open
joneldiablo opened this issue Dec 4, 2018 · 1 comment
Open

ddex standard convertion not working #95

joneldiablo opened this issue Dec 4, 2018 · 1 comment

Comments

@joneldiablo
Copy link

I try to convert with this code:

var xsd2json = require('xsd2json');
var filename = '../examples/release-notification.xsd';

// use as function
xsd2json(filename, {'debug-info':true},function(err, schemaObject) {
  if(err) throw err;
  console.log(JSON.stringify(schemaObject, null, 2));
});

the xml schema from here http://service.ddex.net/xml/ern/37/release-notification.xsd
but in the console just have this error
ERROR: -g user:main: false

what it means?

if I remove this , {'debug-info':true} from the function, the execution hangs

@fnogatz
Copy link
Owner

fnogatz commented Dec 4, 2018

Thank you for reporting this. First of all, it is a good idea to try the native Prolog interface as described here. It gives the following:

> swipl -g main cli.pl -- /home/fnogatz/tmp/release-notification.xsd
ERROR: -g main: open/4: source_sink `'/home/fnogatz/tmp/http://ddex.net/xml/avs/avs_20161006.xsd'' does not exist (No such file or directory)

As of now, xsd2json does not support remote locations as it can be found in the schema here:

<xs:import namespace="http://ddex.net/xml/avs/avs" schemaLocation="http://ddex.net/xml/avs/avs_20161006.xsd"/>

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

No branches or pull requests

2 participants