|
Hi All Can I just confirm my understanding of rdf:type. I can, in RDF, define an instance of an RDFS class with URI 'myclassuri' as follows (RDF/XML):
And then define an instance of this class, as the property of a subject, as follows:
Correct? However, if I then do this, with another set of triples:
Whilst this does define a valid set of triples, the property 'myinstanceuri' is invalid, because it does not have an rdf:type. Is this correct? i.e. it is not an object property defined with an rdf:type (either an RDFS property or an OWL property) and so cannot reference the subject with URI 'someotheruri'. Is this correct? Thank you for clarification |
|
First off, if you're new to RDF, please try to avoid RDF/XML as much as possible. It really is the worst syntax to look. Instead, try to look at examples involving N-Triples and/or Turtle. These syntaxes reveal the triple-nature of the RDF model, which is key to understanding it. Also, I think it's always good practice to use examples in your examples whenever possible. :) That is, generally avoid using In any case,
Correct.
Yes, you can do this. The implication then is that
RDF essentially has an Open World Assumption (OWA), which means that it never complains when data are missing where instead, it tries to fill in that missing data through semantics. In this case, the triples you provide are not formally a problem. In this case, (On an OWL level, the issue is different. OWL has some expectations that you declare object-properties and datatype-properties and classes explicitly as such. However, that's a separate issue which is specific to OWL, not to RDF.)
... your examples are a bit confusing in that you create a class whose instance is a property on a subject whose class ... I dunno. I got lost in the middle. There's nothing formally wrong with your examples, but they're sufficiently strange that I wonder if maybe you're still confused in some aspect of @Signified - thanks for that helpful answer. I think your answer that it is implied that myinstanceuri is of type rdf:Property clears up my confusion, and the thing that driving me round in never ending circles of thought! So, actually (and I'll use the same examples for clarity for now) given:
And
Implies:
That clears it up - I didn't get the implication you highlight. Appreciate your point on RDF/XML - only I'm writing a parser for RDF/XML at the moment, and it needs to take these implications into account. This confusion came up whilst I was considering what triples to generate from the rdf:Description container given the above kind of scenario. (Converted above to a comment since it's not an answer to the original question.) Sure no problem. That implication is given in the RDF semantics document and is supported by the rule http://www.w3.org/TR/rdf-mt/#RDFRules And you have my commiserations on having to write an RDF/XML parser. (I also wrote one a while back.) 1
I share Signified's advice in the beginning of his answer, his confirmation in the middle part, and his confusion at the end. :-) @Markos101 Is there a particular reason you are writing an RDF/XML parser? Is there not an existing one for your chosen platform/language? |


@Markos101, welcome to the site! You might find the pointers at this link helpful:
http://answers.semanticweb.com/questions/14494/welcome-to-answerssemanticwebcom
In terms of highlighting syntax in posts, there's a number of options. My preferred method is to prefix syntax lines with four spaces (I'll edit this question for you).
I should add, the preview might hide XML tags (a bug in the platform), but they'll appear in the output. No need for entity escaping.
@Signified - thanks for editing my post! I'll take a read of the notes.