Closed jodygarnett closed 1 year ago
The problem I think is that online xsd are not updated in http://nap.geogratis.gc.ca/ server, containing old versions.
Alternatively an option can be to define the schema location to use the local xsd's. For example for iso19139, in this test server: https://vanilla.geocat.net/geonetwork/xml/schemas/iso19139/schema/gmd/gmd.xsd, but probably requires some code changes to be able to replace the url of the server as usually this information is defined in the @schema-ident.xml@ file of the schema.
Thanks, I have updated the description to be more clear.
Just to confirm this is an hnap problem, and not something to report to core-geonetwork?
Notes:
Ideas:
Notes:
I did do a branch that performs the upgrade. https://github.com/ianwallen/iso19139.ca.HNAP/tree/NAP_upgrade_2013 Not sure if upgrading will cause any issues.
Other examples of "internal" changes that may or may not provide value:
Assigning to @bo-lu and @geothorne to coordinate a course of action:
If this issue is fixed then I believe it will also fix issue #89
Discussion on where to publish:
As a group we have access to http://nap.geogratis.gc.ca/metadata/tools/schemas/ server
The server is being replaced, so a new server will need to take over this domain
The structure above appears to be accidental, cannot figure out the naming convention
Ideally we will continue the above folder for existing users, but note it is not used currently by FGP.
Consider http://schemas.opengis.net/wfs/ example with different 1.0 and 1.1 folders
Propose folder structure based on year or version number from HNAP Proposed Updates 2.3.1 document:
napm.xsd has version:
<xs:schema
targetNamespace="http://www.geconnections.org/nap/napMetadataTools/napXsd/napm"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
elementFormDefault="qualified"
version="2013-02-22"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:napm="http://www.geconnections.org/nap/napMetadataTools/napXsd/napm">
gmd.xsd has version:
<xs:schema
targetNamespace="http://www.isotc211.org/2005/gmd"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
version="2012-07-13">
@bo-lu this requires some though and a decision ahead of server being shut off.
@bo-lu from last meeting it seems a service can be setup at this location (once the present server is decommissioned).
We still have this issue capturing that the schema included with the hnap schema plugin does not match what is published.
I would like to propose following the OGC example of publishing schemas by version number:
We can then support the two schema presently known, and allow for future versions:
http://nap.geogratis.gc.ca/schemas/iso19139.ca.HNAP/1.2 http://nap.geogratis.gc.ca/schemas/iso19139.ca.HNAP/2.3.1
A suggestion was made to use an official GC github to host the above.
I will ask if we can use: https://github.com/Canadian-Geospatial-Platform
We should try an experiment and then make a recommendation to HNAP team (who has governance over the standard and this location).
Use of github directly is not the best, the file:
Is accessed as:
Could also look at:
xsd
files need to check My take is that we can host the schema files on 'geo.ca' and create a github repository for issue tracking and fixes (i.e., via pull requests).
The the previous server decommissioned this issue is now critical (ie actively broken) and the metadata documents being published cannot be used by external tools. We are looking for a 5 to 10 year decision here, although realistically documents like these do not expire and are useful as a historical record.
Some good ideas from meeting (following the OGC opengis and w3c example layout):
@bo-lu has access to geo.ca
domain will request schemas.geo.ca
:
As a fall back plan we could setup GitHub pages metadata101.github.io/schemas
:
I am checking if osgeo can provide hosting (so we can avoid GitHub in the URL) https://trac.osgeo.org/osgeo/ticket/2594
The new location is shaping up https://github.com/metadata101/schemas
Notes above indicate version 2.3.1
(geogratis) and 1.2
(hnap schema plugin) but I am having trouble finding these version numbers in the schema output.
Some work remains for gitub pages to publish xsd
files as assets, and to revert some edits that have been made over time (hard coding geogratis links).
Breakout review of https://hnap.schemas.metadata.geo.ca/metadata and comparison with https://schemas.opengis.net/
hnap.schemas.metadata.geo.ca
register/iso19135-2-2012/
metadata/can-cgsb-171.100-2009-a/
schemas.opengis.net
Approach:
iso
)can-cgsb
, gml
)2.0.1
gml, 2.3.1
hnap)can-cgsb-171.100-2009-a
Canadian standard number format: Number - subject area, standard number, year of publication.
171
geospatial subject area100
is HNAP2009
year of publicationa
This looks like for external schemas:
ogc/gml/2.01
iso/19115/2003
iso/19115/2003/README.md
- document exact version used and changelogiso/19135/
- register folder iso/19139/
If we ignore the 201.100
as assumed:
2009a/2.3.1/
2009a/2.4/
- proposed changes/clarificationsThis results in (if we can drop hnap
from subdomain):
https://schemas.metadata.geo.ca/2009a/2.3.1/register.xsd
https://schemas.metadata.geo.ca/2009a/2.3.1/napm/napm.xsd
Actions:
How should we configure it so that geogratis is permanent redirected?
It depends what software is presently serving geogratis and the new service.
https://schemas.metadata.geo.ca/*
So all incoming requests will be redirected to schemas.metadata.geo.ca .
3) If the new service is running something like apache then it can be setup to respond to the redirects from the previous domain (step 2 above), and redirect to the new file by file location.
The redirect should respond with a HTTP/1.1 301 Moved Permanently
indicating the new location of the file.
We can dig into this once we have new service to experiment with.
Although setting up a web service to redirect files is straightforward; configuring an xml parser to follow such redirects is not very common; and can also be considered a security vulnerability. With this in mind setting up redirects may not reliably allow existing datasets downloaded the public to be validated without modification of the file (or the code reading the file).
Note in HNAP all the schema namesapces are http
this does not have to be https
as it is only a URI.
The schema location will change from geogratis to a https location.
See: https://stackoverflow.com/questions/30707609/xml-namespace-uri-with-https
Identified a number of metadata/register/
files referenced in code lists and examples:
<gmd:LanguageCode codeList="http://nap.geogratis.gc.ca/metadata/register/napMetadataRegister.xml#IC_116"
codeListValue="{$mainLanguage}">
**Guideline:** characterSet shall use codelist [napMD_CharacterSetCode]
(http://nap.geogratis.gc.ca/metadata/register/codelists-eng.html#IC_95). Value will be “utf8; utf8”.
Update:
html
content is migrated https://schemas.metadata.geo.ca/metadata/register/codelists-eng.html#IC_95The code list is a URI, however recommended to resolve this as a URL (to match how ISO19139 works):
<gmd:LanguageCode codeList="https://schemas.metadata.geo.ca/metadata/register/napMetadataRegister.xml#IC_116"
codeListValue="{$mainLanguage}">
This is a change to the content of our records durning migration; previously we were just changing the schemaLocation at the top of the files (not the content).
Branch is here: https://github.com/metadata101/iso19139.ca.HNAP/tree/transition_schemas_metadata_geo_ca
I am testing on 4.2.x before proposing backport.
The http://nap.geogratis.gc.ca/ server is decommissioned making this issue now critical (ie actively broken) and the metadata documents being published cannot be used by external tools. We are looking for a 5 to 10 year decision here, although realistically documents like these do not expire and are useful as a historical record.
Some good ideas from meeting (following the OGC opengis and w3c example layout):
@bo-lu has access to
geo.ca
domain will requestschemas.geo.ca
:The other idea is to setup GitHub pages
metadata101.github.io/schemas
:Original: Schema location for hnap version 1.2 and 2.3.1, replacing http://nap.geogratis.gc.ca/
The Metadata configuration configuration validation to remove schema location for validation is required to validate records that have been generated by geonetwork.
Notes:
Generated schemaLocation information:
Example:
With remove schema location for validation
true
, when validating thexsi:schemaLocation
above are removed (and geonetwork is able to validate the file).