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

OWSLib doesn't parse anchor #306

Closed
madi opened this issue Jan 18, 2016 · 5 comments
Closed

OWSLib doesn't parse anchor #306

madi opened this issue Jan 18, 2016 · 5 comments
Labels

Comments

@madi
Copy link
Contributor

madi commented Jan 18, 2016

To parse ISO metadata, at present OWSLib only recognizes the following constructs:

<gmd:abstract>
  <gco:CharacterString>
...
</gmd:abstract>
<gmd:useLimitation>
  <gco:CharacterString>
...
</gmd:useLimitation>
<gmd:lineage>
...
  <gco:CharacterString>
...
...
</gmd:lineage>

In the above mentioned cases, the gco:CharacterString part can be substituted in favor of gmx:Anchor. For completeness, see discussion at http://lists.osgeo.org/pipermail/geonode-users/2016-January/001284.html and following.

Thank you

@pmdias
Copy link
Contributor

pmdias commented Jan 20, 2016

@madi I didn't understand if you are only interested on saving the content of the gmx:Anchor or also the multiple attributes from xlink:simpleAttrs (href, title, ...) that the element can have.

From what I see on the example you provided, you also have a gmx:Anchorinside the gmd:lineage with some text, but I guess most use cases for the gmx:Anchorwould only have a URL provided with the attribute href.

<gmd:keyword>
  <gmx:Anchor xlink:href="http://vocab.ndg.nerc.ac.uk/term/C161/0/55" xlink:actuate="onRequest"></gmx:Anchor>
</gmd:keyword>

@madi
Copy link
Contributor Author

madi commented Jan 20, 2016

@pmdias the content of gmx:Anchor should be parsed and saved, and the URL as well. The final result should be a text that is clickable and points to a URL. If I'm not much mistaken, in Geonetwork anchor is correctly parsed and has this behavior. If this is not possible, at least the text should be visible and the URL the user could manually go to.

@madi
Copy link
Contributor Author

madi commented Feb 5, 2016

Hi, this bug is at present very important to us. OWSLib is currently used at basis of several cataloguing software, and as we produce our metadata to be harvested by different technologies, solving it at the root would really mean a great progress to us. If you think is useful, I could propose a patch to https://github.com/geopython/OWSLib/blob/master/owslib/iso.py, that sets a check to see if there is anchor in the fields of abstract, lineage and useLimitation, and in case parses the text and stores the value into self.abstract (or lineage or uselimitation) and moreover stores the URL provided into self.abstractURL, self.lineageURL and self.uselimitationURL respectively. Would this work for you? Thank you in advance

@tomkralidis
Copy link
Member

@madi 👍 I think this is a good approach (suggest abstract_url, lineage_url, uselimitation_url) given the use case.

@cehbrecht
Copy link
Contributor

This is fixed by PR #308.

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

No branches or pull requests

4 participants