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

How to parse RDF input file #37

Open
rajaram5 opened this issue Feb 19, 2021 · 1 comment
Open

How to parse RDF input file #37

rajaram5 opened this issue Feb 19, 2021 · 1 comment

Comments

@rajaram5
Copy link

I am trying to convert RDF to XML. In my xsparql query I would like to take input RDF file as a arg from command line.

My xsparql query

`prefix obo: http://purl.obolibrary.org/obo/
prefix sio: http://semanticscience.org/resource/
prefix xsd: http://www.w3.org/2001/XMLSchema#
prefix snomedct: http://purl.bioontology.org/ontology/SNOMEDCT/
prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
{
for $dob from $inputFile
where {
$output rdf:type sio:SIO_000340.
$output sio:SIO_000300 $dob.

     $quality rdf:type obo:NCIT_C68615 .
     $quality sio:SIO_000642  $output.

     $person rdf:type sio:SIO_000498. 
     $person sio:SIO_000217 $quality .
   }
   
   return <ItemDataDateTime ItemOID="BRTHDTC">{$dob}</ItemDataDateTime>  

}

`

My command line

java -jar xsparql-cli-jar-with-dependencies.jar xsparql/cde-dob-to-odm.xsparql inputFile="file:///home/rajaram/work/ejp-rd/cde-mappings/cde-to-odm/xsparql/cde-dob-sex.ttl" -f output.xml

@VladimirAlexiev
Copy link
Contributor

hi @rajaram5 !

  • use backticks to show your code better
  • show the error message
  • The first error is that there should be no {

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

No branches or pull requests

2 participants