-
Notifications
You must be signed in to change notification settings - Fork 106
Fix sequence numbering in choice with sequences with complexTypes #97
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
Conversation
The sequence numbering was reset within the complexType handling and this change attempts to preserve the sequence numbering across the elements in the choice alternative handling.
9666175
to
9169410
Compare
You are probably on the right track... XSD:
XML:
XSD:
XML:
|
Hi @willemdj I just pushed a commit reverting my change for the sequence-in-sequence construct. Looking at the model created the change caused collisions in the sequence names which would then make the validation fail. Can you check with your third example if it works? Do you think it would be possible to add your other test-cases to the repo? It would be a great addition to have them! Kind regards, |
It now works for all my test cases, great. I agree that it would be better to have the tests in the git repo, but it would be too much work to make things useable. Given the age of this repo and the limited number of issues over the last couple of years, I am going to keep things as they are now. |
Thanks a lot for accepting the pr @willemdj! Just in case you're wondering: I'm working for a Swiss insurance company (Helvetia Versicherung) where we use Do you think it would be possible to make a release to hex.pm with this change? Cheers, |
Nice to know what you are doing with erlsom. I made a new hex release. Regards, |
The sequence numbering was reset within the complexType handling and this change attempts to preserve the sequence numbering across the elements in the choice alternative handling.
Hi @willemdj this PR fixes #96 and all tests passes, including the new one I added.
First I fixed it by reverting this change 42dc8c9#diff-9669fbc4324a63d6d211486aeef2f42b2fb749159b449a5f2aae44ab5c9f0930R520 so translateLocalComplexType/2 wouldn't reset the seqCnt - @devinus do you know why this change was introduced? With the seqCnt reset removed all tests still pass.
In any case I came across the TODO (removed in the commit) and it made sense to me and I changed the code to preserve the count across elements and reset it when recursing.
What do you think?
Kind regards,
Lars