fnogatz / xsd2json

Translate XML Schema into equivalent JSON Schema
MIT License
149 stars 28 forks source link

Doesnt seem to work..just sits idle #18

Open justjacksonn opened 9 years ago

justjacksonn commented 9 years ago

I installed the swipl on my mac osx 10.10 (Yosemite). I had to manually add a /usr/local/bin/swipl link. When I run swipl I get the prompt, so I exit out. I then installed xsd2json and that was fine. Now when I run xsd2json, I just see a spinning | character and it sits there forever. I've let it go for 2 hours, still nothing. I thought maybe it was just extremely slow, but obviously it's more than that.

Are there some updated Mac OS instructions/steps on how to install and get it to work? I can't seem to find the man documentation for it either.

Thanks.

fnogatz commented 9 years ago

Hi,

2 hours is definitely too much to wait for - in general the translation process is done in at most half a minute. Could you please run node bin/xsd2json test/xsd/schema.xsd from within the xsd2json module to check if it is working in general?

justjacksonn commented 9 years ago

That worked.. returned:

{ "type": "string" }

other thoughts on what may be wrong?

fnogatz commented 9 years ago

This normally happens once your XSD contains an element that can't be translated yet. I will write a little debugger the next days that helps to identify those missing translation rules. In the meantime you could paste your XSD here or mail it me at fnogatz@gmail.com, so I can investigate the missing parts.

PiQ99 commented 9 years ago

A little debugger will be sooo helpful, I guess! Nice :)

justjacksonn commented 9 years ago

Yes, some way to identify, point out during the process the line/issue, and then stop the processing would be very good. Thanks. I can't paste/share the XSD as it's internal, sorry. :(

redaktor commented 9 years ago

For instance the xsd's here: http://schemas.liquid-technologies.com/prism/2.0/ returns

ERROR: Out of global stack
PiQ99 commented 9 years ago

I tried my schema again and it also just sits idle in the same time I am writing.

Do you have any new ideas atm? :-)

Nevertheless with version 1.0.1 its working just, more or less, fine. If i would update to version 1.1.0 its not working anymore. Maybe there is also a problem for the other people.

PiQ99 commented 9 years ago

Do you have any new information for us or did you have tim eto develop a debugger?

I tried to update to the latest version again, but it still sits idle. :(

Fannon commented 9 years ago

Hello! Same problem here. I've enabled debug output and to me it seems that xsd2json didn't crash, but converts just VERY slowly.

In my case I've used it to convert this: http://www.gdv-online.de/snetz/namespaces/KSN/release2013.zip

After 10 hour's its still converting on a desktop i7 CPU. The debugging output indicates no problems and still goes on, however.

Best, Simon

PiQ99 commented 9 years ago

How did you enabled the debug-output option?

Try to convert your thing with version 1.0.1 which still works for me.

But now, I actually need the different xsd-schema types (xs:anyURI, xs:hexBinary, ..), but these came with later versions of xsd2json, that don't work for me, anymore.

ghost commented 9 years ago

Hi,

Maybe you have same issue than me: do you have cycles in your XSD (ex: a complextype "A" has an element of type "B" and the complextype "B" has an element of type "A") ?

It definitively makes sense when you are designing, and if the specification has a clear explanation,

Best regards, Richard