W3C home > Mailing lists > Public > www-rdf-interest@w3.org > November 2002

Re: Linking an RDF instance to its RDF Schema

From: Frank Manola <fmanola@mitre.org>
Date: Sun, 17 Nov 2002 21:05:37 -0500
Message-ID: <3DD84AF1.2060201@mitre.org>
To: www-rdf-interest@w3.org

MDaconta@aol.com wrote:

> Hi Frank,
> 
> Unfortunately, the protege editor is not following the conventions
> you discuss ... more responses below...
> 
> In a message dated 11/17/2002 3:39:57 PM US Mountain Standard Time, 
> fmanola@mitre.org writes:
>  >>>
> Mike--
> 
> If you have rdf:type properties in your instances, their values should
> be URIs that identify Class resources in your schema.  User-defined
> properties in the instance data should be (after QName resolution) URIs
> that identify Property resources in your schema.  Are you looking for
> some other kind of explicit link?
> <<<
> 
> The good news in that is that it provides a link to the RDF Schema
> which is what I was looking for.  The bad news is that it does not seem
> to agree with the treatment of namespaces in XML Documents.
> I thought namespaces did not have to refer to a document which is why
> you have either the DOCTYPE declaration or the schemaLocation attribute.
> Also, I thought this is what prompted the RDDL to be proposed.  In other 
> words,
> should we assume that RDF uses namespaces differently than XML documents?
> This doesn't seem like it would bode well for embedding RDF in XML (like
> XHTML).


I didn't mean to suggest that namespaces *had* to refer to a document. 
They don't.  And if you were creating an RDF vocabulary, you could 
certainly define a URI to namespace-qualify your terms (classes and 
properties), and use those terms in RDF instance data, without defining 
a schema (of course you'd find it harder to do validity checking on that 
data without a machine-readable schema, but that's another issue).  All 
RDF cares about is that those terms be URIs and, in the case of RDF/XML, 
that those URIs can be formed by concatenating the namespace URIs and 
the XML element names (or whatever).  There's nothing that says that 
there's necessarily a schema at the "end" of the namespace URI. 
However, I guess I was assuming that when your processor generated the 
schema, and conforming instance data, it was using the convention I 
mentioned (and, of course, there's nothing in XML that *precludes* the 
namespace URI identifying a document).  Also keep in mind in this 
connection that we're anticipating situations where RDF instance data 
will be using terms from multiple vocabularies, so you'd need to 
identify multiple namespaces (and schemas), not just one.


> 
>  >>>
> MDaconta@aol.com wrote:
>  >Hi All,
>  >
>  >Working with protege recently, It can generate both an RDF
>  >Schema and separate instance documents conforming to the
>  >schema; however, there is no direct, explicit link between the RDF
>  >Schema and
>  >its instance document.  Why not?
>  >
>  >I notice that the RDF Schema spec and the Primer are both silent on
>  >this issue.  As this is different than the process for XML documents,
>  >I would think an explanation or justification is in order.
>  >
> 
> fmanola@mitre.org writes:
> The Primer isn't silent on the issue.  At least there's an example of
> instance data at the end of Section 5.2 that illustrates the points I
> made above.  Perhaps it could be elaborated (suggestions are welcome,
> although people are always complaining about how long the Primer has
> gotten in trying to follow all the other suggestions.. :-) ...
> <<<
> 
> Sorry.  You are correct that you do address it in the Primer.  I missed it
> as your instance example is separated from the discussion of using
> the namespace as the link to the Schema.  


Well, technically all I was discussing was how to refer to the 
individual terms (classes and properties) in the instance data once 
you'd defined them in a schema, not how to locate the schema per se (cf 
my first comment above), so you were partly right.

> In your example of an
> RDF instance you have:
> 
>   <?xml version="1.0"?>
>   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>               xmlns:xyz="http://example.org/schemas/vehicles#>
> 
>     <rdf:Description rdf:ID="johnSmithsCar">
>          <rdf:type rdf:resource="#PassengerVehicle"/>
>          <xyz:registeredTo 
> rdf:resource="http://www.example.org/staffid/85740"/>
>          <xyz:rearSeatLegRoom
>              
> rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">127</xyz:rearSeatLegRoom>
>     </rdf:Description>
>   </rdf:RDF>
>            
> Doesn't the <rdf:type rdf:resource="#PassengerVehicle"> mean
> that the definition of PassengerVehicle is an ID in the current document?


Yes (the paragraph in the Primer above this example says that we've 
assumed it's defined in the same document as the schema).  Otherwise you 
write out the full URI.


> 
> A note on the length of the Primer ... I don't think you can put a
> limit on a good tutorial.  I think you have done an excellent job on
> the document.  It is a 1000% better than the previous version and a
> superb document.


Thanks.  There are clearly many opinions about what a "Primer" ought to 
be doing (and about the background those who read "Primers" probably 
have).

--Frank




-- 
Frank Manola                   The MITRE Corporation
202 Burlington Road, MS A345   Bedford, MA 01730-1420
mailto:fmanola@mitre.org       voice: 781-271-8147   FAX: 781-271-875
Received on Sunday, 17 November 2002 20:48:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:57 GMT