Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Fix geoportal.lt XML schema bug #11

Open
sirex opened this issue Sep 25, 2017 · 1 comment
Open

Fix geoportal.lt XML schema bug #11

sirex opened this issue Sep 25, 2017 · 1 comment

Comments

@sirex
Copy link
Contributor

sirex commented Sep 25, 2017

The issue is here:

    <gmd:MD_Metadata
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:gmd="http://www.isotc211.org/2005/gmd"
        xmlns:schemaLocation="http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd">

The error is in xmlns:schemaLocation attribute. Value of the attribute should be an URL, but here two URI's separated with space are provided. The attribute value should be written as follows:

    <gmd:MD_Metadata
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:gmd="http://www.isotc211.org/2005/gmd"
        xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd">
@sirex sirex created this issue from a note in Replace old opendata.gov.lt to CKAN (To do) Sep 25, 2017
@sirex
Copy link
Contributor Author

sirex commented Nov 30, 2017

Temporary fix:

  1. Open this file:
/usr/lib/ckan/default/local/lib/python2.7/site-packages/owslib/csw.py
  1. Change 586 line to:
self._exml = etree.parse(StringIO.StringIO(self.response.replace('xmlns:schemaLocation', 'xsi:schemaLocation')))

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

No branches or pull requests

1 participant