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

Use a fake group type for disambiguating between alternatives, similar to what is done for simple types in alts. #77

Merged
merged 2 commits into from
Oct 17, 2020

Conversation

ElectronicRU
Copy link
Contributor

@ElectronicRU ElectronicRU commented Sep 29, 2020

Also necessitates small changes in the parser to be able to handle
top-level fake types.

COMPATIBILITY BREAKING!

Closes #76 .

…r to what is done for simple types in alts.

Also necessitates small changes in the parser to be able to handle
top-level fake types.
@ElectronicRU
Copy link
Contributor Author

As a side note, gexf tests apparently have the schema include each element twice in the document root -- not sure if this is intentional or not, but helped me catch a bug, so hey, no complaints.

If you're not keen on breaking compatibility of data in this edge case, I think a flag could be added to the model for this.

@willemdj
Copy link
Owner

Can you provide a minimal example/test case?

How exactly is this compatibility breaking? Which scenario's would stop working?

@willemdj
Copy link
Owner

Just noticed that you provided an example in another comment. I'll add it to my set of test cases, and run the entire suite to check if your change breaks anything. Probably not before the weekend, I'll let you know.

@ElectronicRU
Copy link
Contributor Author

Good, thanks!
@willemdj it's compatibility breaking in a sense that scan results change, as well as compilation results for a schema. A pre-compiled schema would continue to work exactly as before, though.

@willemdj
Copy link
Owner

I ran my tests, and they all work, so that is good news.

However, it is still not clear to me how your change breaks compatibility. Can you give an example?

@ElectronicRU
Copy link
Contributor Author

I ran my tests, and they all work, so that is good news.

However, it is still not clear to me how your change breaks compatibility. Can you give an example?

Well, the schema types for this example XSD files would be different -- each of the option types would have just one field (and maybe anyAttrs), instead of a copy of fields of underlying type.

Assuming a compiled schema from an older version is used, this should be compatible.

@ElectronicRU
Copy link
Contributor Author

Hey, don't mean to nag, but what's the status on this currently?

@willemdj
Copy link
Owner

willemdj commented Oct 15, 2020 via email

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