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

Support of xs:extension and xs:include #3

Open
albanm opened this issue Nov 4, 2014 · 4 comments
Open

Support of xs:extension and xs:include #3

albanm opened this issue Nov 4, 2014 · 4 comments
Assignees

Comments

@albanm
Copy link

albanm commented Nov 4, 2014

Thanks for the impressive piece of work.

In your thesis you specifically mention that xsd2json doesn't support the extension of complex types. Do you have any project to fill this gap ? If not, do you have a solution in mind to implement this functionality that maybe another developer could contribute ?

I have no deep understanding of the problem or of your program, but I wonder if the simplest solution could be to do some merging of the complex types definitions before applying CHR rules ?

I also wonder about include and import that you say are not supported. Do you think a simple merge of included schemas in the root schema will do the trick ?

Basically: do you think a not too complex tranformation (xslt or other) applied on the schemas before processing by xsd2json could help overcome its limitations ?

Alban

@fnogatz
Copy link
Owner

fnogatz commented Nov 6, 2014

Hi Alban,

both problems are still there as I had no time to implement them yet :) The extension of complex types as well as xs:include and xs:import could be handled by XSLT of course, but I would prefer using only CHR. Especially as the namespace support is already implemented in xsd2json but currently not really used.

The best would be if you could provide some simple test cases in the /test directory. PRs welcome :)

I will take some time on the weekend to investigate possible solutions. What do you need first? Extensions or includes?

@fnogatz
Copy link
Owner

fnogatz commented Feb 2, 2015

Support of xs:include and xs:import has been added.

@fnogatz fnogatz self-assigned this Feb 6, 2015
@rudda
Copy link

rudda commented Nov 1, 2019

are there some example to use it?
I have a xsd file with include tag but I need to give a path where are all include xsd files dependencies ?

@fnogatz
Copy link
Owner

fnogatz commented Nov 3, 2019

The tests under /test/xsd contain some examples, maybe they are helpful for you?

  • test/xsd/include.xsd
  • test/xsd/include2.xsd
  • test/xsd/import.xsd

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

No branches or pull requests

3 participants