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

Re: rdfs:isDefinedBy (Was Re: Representing DCMI semantics asRDFschemas versus Web pages)

From: Daniele Capursi <capursi@sword.it>
Date: Thu, 6 Jun 2002 11:56:58 +0200
Message-ID: <003601c20d40$8241e5e0$2c00000a@renoir>
To: <www-rdf-interest@w3.org>
Dear Sirs,
I'm using RDF to represent knowledge in a software project and I think that my problem might be part of this thread, beacuse it's about similar things.
I'm trying to write and RDF schema for my RDF data, in order to validate them. I think that existing RDF parsers should have the capability to perform such validation in a manner similar to what XML parsers do with XML. So I wrote the schema, but I can't find anywhere how to attach my schema to a document of mine.
In XML I would just use the "!DOCTYPE" node or the "xsi:schemaLocation" attribute in order to specify that my XML document can be validated using a DTD or an XLM Schema of my choice. Then all I have to do is to tell my XML parser to validate my document while parsing it and I have it validated. Is there a way to indicate that an RDF/XML document should be compliant to an RDF schema with something like the "!DOCTYPE" node or the "xsi:schemaLocation" attribute?
I can't find a single example showing a schema and a case of its use on the whole Internet!
In particular I'm trying to use the w3c online RDF validator, but I don't know how to tell it to get my schema, when parsing my RDF/XML document and to validate it against the schema.
The only way I found to do this is to put my schema on the web (and make it reachable via an http: URI) and to use its URI as the name of the namespace for the objects I have in the RDF document, but it seemed like the validator just ignores the schema.
Then then I tried to do this by putting both the RDF schema and the RDF model in a unique RDF/XML document. But I have some troubles to make sure a predicate refers to the same property I defined in the schema.

Following there is a snippet of the resulting document:

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xml:lang="en" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/TR/rdf-schema#">

<rdfs:Class rdf:ID="MetadataType"/>

<rdf:Property rdf:ID="Author" rdfs:isDefinedBy="http://www.my-ns.com#">
    <rdfs:comment>Creator of this RDF description.</rdfs:comment>
    <rdfs:subPropertyOf rdf:resource="http://purl.org/dc/elements/1.1/creator"/>
    <rdfs:range rdf:resource="#MetadataType"/>

<rdf:Description rdf:about="someURI">
    <Author rdf:resource="anotherUrI"/>


I just defined some constraints about the "Author" property and tried to say that the resource at "anotherURI" is the Author of the resource at "someURI". Included as an attachment you can find the resulting graph generated by the validator. As you can see, the property Author is reported as "online:#Author", where online is the default namespace. The predicate of the last statement asserted in the document is just "Author" instead, while the validator gives me the following warning: "Warning: {W104} Element node must be qualified.[Line = 13, Column = 40]", referred to this predicate. But I don't know what namespace I should assing to the Author tag! I'm referring the same Author property just defined. Maybe I should assign to the property a namespace and use the same namespace to its instance. But I don't know how to assign a namespace to a property! I can't find anything about it in the RDFS specifications.

Can anybody help me?
Thanks in advance.

Daniele Capursi.

(image/png attachment: servlet_61569.png)

Received on Thursday, 6 June 2002 05:57:08 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:41 UTC