nschorgh / cavexml Goto Github PK
View Code? Open in Web Editor NEWExperimental implementation of a CaveXML standard to facilitate exchange of data about caves through the definition and implementation of a data interchange format.
License: Other
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
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].
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 .
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.
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>
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 ) }
Another improvement for CaveXML in RDF is to use instead of cavexml:map-link
, bibo:Map
from Bibo ontology :
https://bibliontology.com/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.