Giter Site home page Giter Site logo

nschorgh / cavexml Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 3 MB

Experimental implementation of a CaveXML standard to facilitate exchange of data about caves through the definition and implementation of a data interchange format.

License: Other

CSS 1.64% Python 86.28% XSLT 4.44% XQuery 7.64%
speleology dataset interchange-format

cavexml's People

Contributors

nschorgh avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cavexml's Issues

longitude range

On Earth, the range of geographic longitude is conventionally -180 to +180 degree, and CaveXML restricts it to that range. On the Moon and Mars, on the other hand, it's 0 to 360 degree. XML 1.0 doesn't allow for restrictions that are conditional on other fields, so this would require changing over to XML 1.1. A quick fix would be extend the allowed latitude range to [-180,+360].

Add void:Dataset description in RDF/XML

For writing an RDF void:Dataset description, one can take inspiration from the current list of void:Dataset in KartsLink database :
https://data.grottocenter.org/history?uri=http%3A%2F%2Frdfs.org%2Fns%2Fvoid%23Dataset

What I propose is that you write the void:Dataset description in RDF/XML , as a file dataset.rdf in git .
Here is an example

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:foaf="http://xmlns.com/foaf/0.1/"
    xmlns:void="http://rdfs.org/ns/void#"
>
  <foaf:Document rdf:about="http://data.grottocenter.org/ldp/1612772267045-338797407009437">
    <void:uriRegexPattern rdf:resource="https://data.grottocenter.org/ldp/thai/.*"/>
    <rdfs:label xml:lang="fr">Thai</rdfs:label>
    <void:exampleResource rdf:resource="https://data.grottocenter.org/ldp/thai/3428"/>
    <foaf:primaryTopic rdf:resource="http://dbpedia.org/resource/Speleology"/>
    <void:sparqlEndpoint rdf:resource="https://data.grottocenter.org/sparql"/>
    <void:uriSpace xml:lang="fr">https://data.grottocenter.org/ldp/thai/</void:uriSpace>
    <rdf:type rdf:resource="http://rdfs.org/ns/void#Dataset"/>
    <void:dataDump rdf:resource="https://ontology.uis-speleo.org/data/thai.csv.ttl.zip"/>
  </foaf:Document>
</rdf:RDF>

It would be good also to state the coverage of the cave dataset. My understanding is that they have been visited or somehow studied by you .

record identifiers

For unique RDF record identifiers, generate hash codes based on the first five elements (country-code to other-cave-name).

To do that, either use existing MD5 hash-generator in cavexml.py and generate auxiliary XML file before applying cavexml2rdf.xquery, or re-implement hash generation within XQuery script.

RDF, references should be URI's , not litterals.

Currently for this XML source :

      <reference>https://rpif.asu.edu/LTdatabase/result.php?RECNO=1134</reference>
      <reference>Simons (1998) doi:10.5038/1827-806X.27.1.4</reference>
      <reference>Middleton (1999) http://www.vulcanospeleology.org/1998.pdf</reference>

we have this RDF :

    <dct:references>https://rpif.asu.edu/LTdatabase/result.php?RECNO=1134</dct:references>
    <dct:references>Simons (1998) doi:10.5038/1827-806X.27.1.4</dct:references>
    <dct:references>Middleton (1999) http://www.vulcanospeleology.org/1998.pdf</dct:references>

The first line , beginning with https: or http: , should become:

      <dct:references rdf:about="https://rpif.asu.edu/LTdatabase/result.php?RECNO=1134" />

For the other lines , not beginning with https: or http: , this is more complex:

  <karstlink:UndergroundCavity rdf:about=""" >
    <!-- ... etc unchanged -->
    <dct:references rdf:about="doi:10.5038/1827-806X.27.1.4" />
  </karstlink:UndergroundCavity>
  <foaf:Document rdf:about="doi:10.5038/1827-806X.27.1.4">
    <rdfs:label>Simons (1998)</rdfs:label>
  </foaf:Document>

XQUERY change

For the first line , beginning with https: or http: :

declare function local:processReferences($tags as element()*) as element()* {
  for $tag in $tags
    return local:processReference($tag)
};

declare function local:processReference($tag as element() ) as element()* {
  if($tag / text() != "" ) then
    if( fn:starts-with($tag / text(), "http://") or
        fn:starts-with($tag / text(), "https://")
    ) then
      <dct:references rdf:about="{$tag / text()}" />
    else
      element dct:references { $tag / text() }
  else ()
};
(: ............. :)
    { local:processTag( $rec/branch-name, "karstlink:relatedToUndergroundCavity" ) }
    { local:processReferences( $rec/reference ) }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.