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

Types for choices imported from different xsds lead to choice being displayed multiple times in Schema Explorer #962

Open
JohannaOtt opened this issue Apr 12, 2022 · 5 comments

Comments

@JohannaOtt
Copy link
Contributor

Version 4.2.0.SNAPSHOT
Build 202203231441
Revision 1a25d6c

When importing a schema (for example this one) that is importing a type used in a choice from two different XSDs, the choice is displayed twice in the Schema Explorer
grafik
grafik

In this case, it is imported from http://schemas.opengis.net/iso/19139/20070417/gmd/maintenance.xsd in one case and from https://schemas.isotc211.org/19139/-/gmd/1.0/maintenance.xsd in the other one.

As the target namespace and the local name of the types are the same, they should not be considered being different types.

@stempler
Copy link
Member

@JohannaOtt But I would see as a problem that you can't just assume the definition in both cases is the same. So one would need to check if the definitions are the same, and if they are not raise an error.

@JohannaOtt
Copy link
Contributor Author

@stempler Is it possible to have types with the same name from the same namespace but different definitions?

@stempler
Copy link
Member

Is it possible to have types with the same name from the same namespace but different definitions?

Sure, there is nothing preventing this.

For example:

  • GML 2 and GML 3.0/3.1 use the same namespace
  • INSPIRE 4.0 schemas that get fixes keep the same namespace
  • Schema profiles that for instance exclude certain elements or change the cardinality
  • Draft versions that use the same namespace than the later released version

@JohannaOtt
Copy link
Contributor Author

Thank you for clarifying.

So one would need to check if the definitions are the same, and if they are not raise an error.

So a solution could be that hale studio determines whether the definitions is the same or not and provides an error in such cases so that the user can provide feedback to the schema provider?

Copy link

github-actions bot commented May 8, 2024

This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

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