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

Issue with validating ISO 19115-2 MI_Metadata due to removed schemaLocation="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/gmd/gmd.xsd" #217

Open
MartinePaepen opened this issue May 4, 2021 · 17 comments

Comments

@MartinePaepen
Copy link

At VITO we have generated INSPIRE metadata files wrt the ISO 19115-2 gmi metadata.
Validation was always possible however now some links are broken.
How can we update our metadata files using the currently applicable xsd schema's?

Attached you can find an example that doesn't validate any more.
example INSPIRE file.txt

The validation error is:
The schemas referenced by attribute 'xsi:schemaLocation' at element gmi:MI_Metadata are not valid.
Document 'http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/gmd/gmd.xsd' referenced by xs:import definition does not refer to a valid schema document.
Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Error location: html
Details
cvc-assess-elt.1: Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Error location: html / head
Details
cvc-assess-elt.1: Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Error location: html / head / meta
Details
cvc-assess-elt.1: Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Error location: html / head / meta / meta
Details
cvc-assess-elt.1: Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Error location: html / head / meta / meta / meta
Details
cvc-assess-elt.1: Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Error location: html / head / meta / meta / meta / meta
Details
cvc-assess-elt.1: Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Error location: html / head / meta / meta / meta / meta / meta
Details
cvc-assess-elt.1: Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Neither an element declaration nor a type definition is known for element <title>. Strict assessment failed.
Error location: html / head / meta / meta / meta / meta / meta / title
Details
cvc-assess-elt.1: Neither an element declaration nor a type definition is known for element <title>. Strict assessment failed.
Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Error location: html / head / meta / meta / meta / meta / meta / link
Details
cvc-assess-elt.1: Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Error location: html / head / meta / meta / meta / meta / meta / link / link
Details
cvc-assess-elt.1: Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Error location: html / head / meta / meta / meta / meta / meta / link / link / meta
Details
cvc-assess-elt.1: Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Neither an element declaration nor a type definition is known for element . Strict assessment failed.
Error location: html / head / meta / meta / meta / meta / meta / link / link / meta / meta
Details
cvc-assess-elt.1: Neither an element declaration nor a type definition is known for element . Strict assessment failed.
.......
......
....
src-resolve: Value 'gco:AbstractObject_Type' of attribute 'base' doesn't resolve to a type definition.
'gmd:CI_Citation_PropertyType' must refer to an existing simple or complex type.
Error location: xs:schema / xs:complexType / xs:complexContent / xs:extension / xs:sequence / xs:element / @type
Details
src-resolve: Value 'gmd:CI_Citation_PropertyType' of attribute 'type' doesn't resolve to a type definition.
Processing was aborted after reporting 100 error(s). Please increase the error limit to report additional errors.

@ejbleys
Copy link
Contributor

ejbleys commented May 5, 2021 via email

@ejbleys
Copy link
Contributor

ejbleys commented May 5, 2021 via email

@ejbleys
Copy link
Contributor

ejbleys commented May 5, 2021 via email

@MartinePaepen
Copy link
Author

MartinePaepen commented May 6, 2021 via email

@MartinePaepen
Copy link
Author

MartinePaepen commented May 6, 2021 via email

@MartinePaepen
Copy link
Author

MartinePaepen commented May 6, 2021 via email

@MartinePaepen
Copy link
Author

There seems to be an issue with:
https://schemas.isotc211.org/19115/-2/gmi/1.0/gmi.xsd

The targetNamespace is still: targetNamespace="http://standards.iso.org/iso/19115/-2/gmi/1.0"

==> this generates anerror while validating /
Shouldn't it be ==> https://schemas.isotc211.org/19115/-2/gmi/1.0

<xs:schema xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:gss="http://www.isotc211.org/2005/gss" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://standards.iso.org/iso/19115/-2/gmi/1.0" version="0.1">

xs:annotation
xs:documentationThis file was created by Ted Habermann during May 2015 to correct omissions (gmx, MI_EnvironmentalRecord) in existing gmi schema ====== </xs:documentation>
</xs:annotation>

<xs:import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="https://schemas.isotc211.org/19139/-/gmd/1.0/gmd.xsd"/>
<xs:import namespace="http://www.isotc211.org/2005/gco" schemaLocation="https://schemas.isotc211.org/19139/-/gco/1.0/gco.xsd"/>
<xs:import namespace="http://www.isotc211.org/2005/gss" schemaLocation="https://schemas.isotc211.org/19139/-/gss/1.0/gss.xsd"/>
<xs:import namespace="http://www.isotc211.org/2005/gmx" schemaLocation="https://schemas.isotc211.org/19139/-/gmx/1.0/gmx.xsd"/>
<xs:include schemaLocation="metadataEntitySet.xsd"/>
<xs:include schemaLocation="contentInformation.xsd"/>
<xs:include schemaLocation="dataQualityInformation.xsd"/>
<xs:include schemaLocation="spatialRepresentationInformation.xsd"/>
</xs:schema>

@MartinePaepen
Copy link
Author

It works when using: xsi:schemaLocation="http://www.isotc211.org/2005/gmi http://www.isotc211.org/2005/gmi/gmi.xsd
However which is the recommended xsd to be used for MI_metadata?
http://www.isotc211.org/2005/gmi/gmi.xsd
or
https://schemas.isotc211.org/19115/-2/gmi/1.0/gmi.xsd

@ejbleys
Copy link
Contributor

ejbleys commented May 6, 2021 via email

@ejbleys
Copy link
Contributor

ejbleys commented May 6, 2021 via email

@ejbleys
Copy link
Contributor

ejbleys commented May 6, 2021 via email

@MartinePaepen
Copy link
Author

MartinePaepen commented May 7, 2021

There seems to be an issue with:
https://schemas.isotc211.org/19115/-2/gmi/1.0/gmi.xsd

The targetNamespace in teh xsd is still: targetNamespace="http://standards.iso.org/iso/19115/-2/gmi/1.0"

==> this gives an error while validating /
Shouldn't it be ==> https://schemas.isotc211.org/19115/-2/gmi/1.0

<xs:schema xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:gss="http://www.isotc211.org/2005/gss" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://standards.iso.org/iso/19115/-2/gmi/1.0" version="0.1">

Thanks for your effort,
Martine

@ejbleys
Copy link
Contributor

ejbleys commented May 7, 2021 via email

@MartinePaepen
Copy link
Author

MartinePaepen commented May 7, 2021

Yes, I understand the namespace usage but why isn't it https://www.isotc211.org/2005/gmi/
which would be in line with the other namespaces in the xsd? (exapmle <xs:import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="https://schemas.isotc211.org/19139/-/gmd/1.0/gmd.xsd"/>
<xs:import namespace="http://www.isotc211.org/2005/gco" schemaLocation="https://schemas.isotc211.org/19139/-/gco/1.0/gco.xsd"/> .....)

It is very confusing because for the namespace https://www.isotc211.org/2005/gmi/ there is also an xsd ( https://www.isotc211.org/2005/gmi/gmi.xsd ) which can be used and works fine for me.

AND if I compare with for example GMD metadata, I see:
Namespace https://www.isotc211.org/2005/gmd/ with xsd: https://www.isotc211.org/2005/gmd/gmd.xsd

However in the gmi.xsd is referred to
https://schemas.isotc211.org/19139/-/gmd/1.0/gmd.xsd

AND if I look in https://schemas.isotc211.org/19139/-/gmd/1.0/gmd.xsd , the targetnamespace is targetNamespace="http://www.isotc211.org/2005/gmd" Which seems OK but is different from the GMI.xsd targetNamespace.

==> the problem is that my validation tool (XMLSPY) has problems with this GMI targetNamespace in the xsd which is not the namespace which I can use in the xml as I need to use Namespace https://www.isotc211.org/2005/gmi/

@ejbleys
Copy link
Contributor

ejbleys commented May 7, 2021 via email

@MartinePaepen
Copy link
Author

MartinePaepen commented May 7, 2021

Ok, it might not be a 2005 standard.
There is however a page https://www.isotc211.org/2005/gmi/ and even a mapping xsd.
This makes things even more confusing.

The solution for my (and probably others') problem is the replacement of the targetNamespace in the schema
https://schemas.isotc211.org/19115/-2/gmi/1.0/gmi.xsd
==> use targetNamespace https://www.isotc211.org/2005/gmi/ in stead of: http://standards.iso.org/iso/19115/-2/gmi/1.0

This would also make it more in line with the other schema's :-)

@ejbleys
Copy link
Contributor

ejbleys commented May 7, 2021 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
Development

No branches or pull requests

2 participants