fnogatz / xsd2json

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

Domain error: `sgml_option' expected, found `help(false)' #44

Closed harleypig closed 7 years ago

harleypig commented 7 years ago

Ubuntu 16.04 swi-prolog-nox 6.6.4-2ubuntu1 xsd2json 1.7.7

$ xsd2json schema.xsd > schema.json
ERROR: Prolog initialisation failed:
ERROR: Domain error: `sgml_option' expected, found `help(false)'

I have no knowledge of prolog whatsoever, but I am a developer. I can hack and slash my way through code if need be. What other information do you need?

fnogatz commented 7 years ago

Hi! I could reproduce your error for SWI-Prolog v6.6.4. I will have a look into it. Thanks for reporting the bug!

For a short solution you could try to update your SWI-Prolog version. The easiest way might be to install the latest SWI-Prolog 7.3 using swivm.

fnogatz commented 7 years ago

The SGML-Parser of SWI-Prolog 6 fails for unknown options, whereas version 7 is more relaxed. I have added a filter to pass only valid options, so this should be fixed now. I have published an updated version as 1.7.8 on npm.

However, I found another bug, which occurs when using SWI-Prolog 6 with xs:documentation nodes. It is disussed in #45.