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

GML schema problem in gmi 1.0 #203

Open
tedhabermann opened this issue Dec 5, 2018 · 4 comments
Open

GML schema problem in gmi 1.0 #203

tedhabermann opened this issue Dec 5, 2018 · 4 comments

Comments

@tedhabermann
Copy link
Contributor

We ran into a problem validating ISO 19115-2 using the schemas at standards.iso.org/iso/19115/-2/gmi/1.0. XMLSpy was unable to follow the redirect from www.opengis.net/gml/3.2 to schemas.opengis.net/gml/3.2.1 so the schemas in https://schemas.opengis.net/gml/3.2.1 that are included in xml.xsd could not be found.

This problem emerged when the user switched from http://www.isotc211.org/2005/gmi/gmi.xsd to https://standards.iso.org/iso/19115/-2/gmi/1.0/gmi.xsd. I was curious about why that switch caused the problem. It turns out that the file https://standards.iso.org/iso/19115/-2/gmi/1.0/spatialRepresentationInformation.xsd imports gml from www.opengis.net/gml/3.2 causing the redirect problem. The other schemas in this chain (https://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/gco/basicTypes.xsd) import gml through http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19136_Schemas/gml.xsd, avoiding the redirect. Thus we really have two problems - redundant definitions of the gml schema, and a redirect that is not followed by XMLSpy.

This can be fixed by changing the xml schema location in https://standards.iso.org/iso/19115/-2/gmi/1.0/spatialRepresentationInformation.xsd from www.opengis.net/gml/3.2 to http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19136_Schemas/gml.xsd, removing the redundant schema definition and avoiding the redirect.

@cportele
Copy link
Member

cportele commented Dec 5, 2018

Don't use http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19136_Schemas/gml.xsd. This schema is outdated. Use http://schemas.opengis.net/gml/3.2.1/gml.xsd instead. This is and will always be the latest version of the GML 3.2 schema. The revision of ISO 19136 (ISO 19136-1) references the schema on the OGC server, too.

(Most XML parsers do not follow redirects, by the way.)

@tedhabermann
Copy link
Contributor Author

Clemens,
The schema https://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/gco/basicTypes.xsd (which is imported by gmi.xsd) imports gml as <xs:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19136_Schemas/gml.xsd"/>. I'm not sure I have the capability to change that file. Permissions at ISO are becoming more problematic...
Ted

@smrgeoinfo
Copy link
Contributor

I'd say the same schema location should be used for http://www.opengis.net/gml/3.2 namespace everywhere in the 19115-2 implementation. Is http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19136_Schemas/gml.xsd reliably going to stay accessible at that location? If so, there should be no problem using it; any changes in the openGIS gml 3.2 schema should be backward compatible bug fixes (3.2.1.2 vs 3.2.2 currently); gml 3.2 should not be changing in other ways (else it should be 3.2+n). Changing the schema location for 19139 basicTypes does not seem like a good idea at this point.

@cportele
Copy link
Member

cportele commented Dec 6, 2018

I do not know the plans ISO has with the standards.iso.org server, but I recommend to use http://schemas.opengis.net/gml/3.2.1/gml.xsd as the canonical schema location for the GML 3.2 schema. (In retrospect, we probably should not have published a copy of the GML 3.2 schema on the ISO server.)

If you want to import the GML 3.2 schema from the ISO server that should be fine as long you don't depend on corrigenda and as long as all namespaces involved only import the GML 3.2 schema from that schema location.

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

No branches or pull requests

3 participants