Hello, I have a problem referencing an owl ontology in RDF document. I think that I can include my ontology by using a prefix in the header of my RDf and than use its predicates but I'm getting "The prefix "nova" for element "nova:precededBy" is not bound ", here is my RDF file:

<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:rdfg="http://www.w3.org/2004/03/trix/rdfg-1/"
   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
   xmlns:owl="http://www.w3.org/2002/07/owl#"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   xmlns:nova="http://www-inf.int-evry.fr/~sakka_mo/domainModels/nova.owl" > 
  <rdf:Description rdf:about="#archive-1">
   <nova:precededBy rdf:resource="#copy-1"/>
  </rdf:Description>
</rdf:RDF>

asked 03 Aug '11, 05:37

amin's gravatar image

amin
22715
accept rate: 0%

edited 03 Aug '11, 09:39

Signified's gravatar image

Signified ♦
24.0k1623


What? That's not an RDF file, it's totally broken.

Honestly, don't try to write RDF/XML by hand. RDF/XML is intended to be used with an RDF API and an RDF/XML serializer. If you want to write RDF triples by hand, then don't use the RDF/XML syntax but instead use the Turtle syntax. It's very similar to the graph pattern syntax of SPARQL (the RDF query language), so if you are also going to learn SPARQL then you'll have to learn Turtle anyways.

permanent link

answered 03 Aug '11, 05:52

cygri's gravatar image

cygri ♦
9.0k412
accept rate: 34%

sorry, it's an encoding problem. Here is the link for my RDF file:http://www-inf.int-evry.fr/~sakka_mo/domainModels/archiver.rdf Can you tell me if what I'm trying to do is possible? Otherwise, you think that I can do it using Turtle syntax?

(03 Aug '11, 06:38) amin amin's gravatar image

From the document you linked on @cygri's answer, you have a stray '>' in your namespace declarations. Also, XML-based parsers are often sensitive to leading whitespace at the start of the document.

Replace the head of your document with this and avoid leading whitespace.

<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:rdfg="http://www.w3.org/2004/03/trix/rdfg-1/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:nova="http://www-inf.int-evry.fr/~sakka_mo/domainModels/nova.owl">

cygri's advice to avoid editting/writing RDF/XML by hand still applies. If you must do so, then the RDF/XML validator is your only friend. Good luck!

permanent link

answered 03 Aug '11, 09:37

Signified's gravatar image

Signified ♦
24.0k1623
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×877
×617

question asked: 03 Aug '11, 05:37

question was seen: 1,375 times

last updated: 03 Aug '11, 09:39